Skip to main content

connection_profiles

Creates, updates, deletes, gets or lists a connection_profiles resource.

Overview

Nameconnection_profiles
TypeResource
Idgoogle.datamigration.connection_profiles

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe name of this connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.
alloydbobjectAn AlloyDB cluster connection profile. (id: AlloyDbConnectionProfile)
cloudsqlobjectA CloudSQL database connection profile. (id: CloudSqlConnectionProfile)
createTimestring (google-datetime)Output only. The timestamp when the resource was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
displayNamestringThe connection profile display name.
errorobjectOutput only. The error details in case of state FAILED. (id: Status)
labelsobjectThe resource labels for connection profile to use to annotate any related underlying resources such as Compute Engine VMs. An object containing a list of "key": "value" pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
mysqlobjectA MySQL database connection profile. (id: MySqlConnectionProfile)
oracleobjectAn Oracle database connection profile. (id: OracleConnectionProfile)
postgresqlobjectA PostgreSQL database connection profile. (id: PostgreSqlConnectionProfile)
providerstringThe database provider.
rolestringOptional. The connection profile role.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
sqlserverobjectConnection profile for a SQL Server data source. (id: SqlServerConnectionProfile)
statestringThe current connection profile state (e.g. DRAFT, READY, or FAILED).
updateTimestring (google-datetime)Output only. The timestamp when the resource was last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, connectionProfilesIdGets details of a single connection profile.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByRetrieves a list of all connection profiles in a given project and location.
createinsertprojectsId, locationsIdconnectionProfileId, requestId, validateOnly, skipValidationCreates a new connection profile in a given project and location.
patchupdateprojectsId, locationsId, connectionProfilesIdupdateMask, requestId, validateOnly, skipValidationUpdate the configuration of a single connection profile.
deletedeleteprojectsId, locationsId, connectionProfilesIdrequestId, forceDeletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connectionProfilesIdstring
locationsIdstring
projectsIdstring
connectionProfileIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
skipValidationboolean
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets details of a single connection profile.

SELECT
name,
alloydb,
cloudsql,
createTime,
displayName,
error,
labels,
mysql,
oracle,
postgresql,
provider,
role,
satisfiesPzi,
satisfiesPzs,
sqlserver,
state,
updateTime
FROM google.datamigration.connection_profiles
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionProfilesId = '{{ connectionProfilesId }}' -- required;

INSERT examples

Creates a new connection profile in a given project and location.

INSERT INTO google.datamigration.connection_profiles (
data__name,
data__labels,
data__state,
data__displayName,
data__role,
data__mysql,
data__postgresql,
data__sqlserver,
data__oracle,
data__cloudsql,
data__alloydb,
data__provider,
projectsId,
locationsId,
connectionProfileId,
requestId,
validateOnly,
skipValidation
)
SELECT
'{{ name }}',
'{{ labels }}',
'{{ state }}',
'{{ displayName }}',
'{{ role }}',
'{{ mysql }}',
'{{ postgresql }}',
'{{ sqlserver }}',
'{{ oracle }}',
'{{ cloudsql }}',
'{{ alloydb }}',
'{{ provider }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionProfileId }}',
'{{ requestId }}',
'{{ validateOnly }}',
'{{ skipValidation }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update the configuration of a single connection profile.

UPDATE google.datamigration.connection_profiles
SET
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__state = '{{ state }}',
data__displayName = '{{ displayName }}',
data__role = '{{ role }}',
data__mysql = '{{ mysql }}',
data__postgresql = '{{ postgresql }}',
data__sqlserver = '{{ sqlserver }}',
data__oracle = '{{ oracle }}',
data__cloudsql = '{{ cloudsql }}',
data__alloydb = '{{ alloydb }}',
data__provider = '{{ provider }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionProfilesId = '{{ connectionProfilesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
AND skipValidation = {{ skipValidation}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Database Migration Service connection profile. A connection profile can only be deleted if it is not in use by any active migration jobs.

DELETE FROM google.datamigration.connection_profiles
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionProfilesId = '{{ connectionProfilesId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}';