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

NameDatatypeDescription
namestringThe name of this connection profile resource in the form of projects/{project}/locations/{location}/connectionProfiles/{connectionProfile}.
alloydbobjectSpecifies required connection parameters, and the parameters required to create an AlloyDB destination cluster.
cloudsqlobjectSpecifies required connection parameters, and, optionally, the parameters required to create a Cloud SQL destination database instance.
createTimestringOutput 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.
errorobjectThe Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
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" }.
mysqlobjectSpecifies connection parameters required specifically for MySQL databases.
oracleobjectSpecifies connection parameters required specifically for Oracle databases.
postgresqlobjectSpecifies connection parameters required specifically for PostgreSQL databases.
providerstringThe database provider.
sqlserverobjectSpecifies connection parameters required specifically for SQL Server databases.
statestringThe current connection profile state (e.g. DRAFT, READY, or FAILED).
updateTimestringOutput 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

NameAccessible byRequired ParamsDescription
getSELECTconnectionProfilesId, locationsId, projectsIdGets details of a single connection profile.
listSELECTlocationsId, projectsIdRetrieves a list of all connection profiles in a given project and location.
createINSERTlocationsId, projectsIdCreates a new connection profile in a given project and location.
deleteDELETEconnectionProfilesId, locationsId, projectsIdDeletes 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.
patchUPDATEconnectionProfilesId, locationsId, projectsIdUpdate the configuration of a single connection profile.

SELECT examples

Retrieves a list of all connection profiles in a given project and location.

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

INSERT example

Use the following StackQL query and manifest file to create a new connection_profiles resource.

/*+ create */
INSERT INTO google.datamigration.connection_profiles (
locationsId,
projectsId,
name,
labels,
state,
displayName,
mysql,
postgresql,
sqlserver,
oracle,
cloudsql,
alloydb,
provider
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ state }}',
'{{ displayName }}',
'{{ mysql }}',
'{{ postgresql }}',
'{{ sqlserver }}',
'{{ oracle }}',
'{{ cloudsql }}',
'{{ alloydb }}',
'{{ provider }}'
;

UPDATE example

Updates a connection_profiles resource.

/*+ update */
UPDATE google.datamigration.connection_profiles
SET
name = '{{ name }}',
labels = '{{ labels }}',
state = '{{ state }}',
displayName = '{{ displayName }}',
mysql = '{{ mysql }}',
postgresql = '{{ postgresql }}',
sqlserver = '{{ sqlserver }}',
oracle = '{{ oracle }}',
cloudsql = '{{ cloudsql }}',
alloydb = '{{ alloydb }}',
provider = '{{ provider }}'
WHERE
connectionProfilesId = '{{ connectionProfilesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified connection_profiles resource.

/*+ delete */
DELETE FROM google.datamigration.connection_profiles
WHERE connectionProfilesId = '{{ connectionProfilesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';