Skip to main content

private_connections

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

Overview

Nameprivate_connections
TypeResource
Idgoogle.datamigration.private_connections

Fields

NameDatatypeDescription
namestringThe name of the resource.
createTimestringOutput only. The create time of the resource.
displayNamestringThe private connection 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 private connections 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" }.
statestringOutput only. The state of the private connection.
updateTimestringOutput only. The last update time of the resource.
vpcPeeringConfigobjectThe VPC peering configuration is used to create VPC peering with the consumer's VPC.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, privateConnectionsId, projectsIdGets details of a single private connection.
listSELECTlocationsId, projectsIdRetrieves a list of private connections in a given project and location.
createINSERTlocationsId, projectsIdCreates a new private connection in a given project and location.
deleteDELETElocationsId, privateConnectionsId, projectsIdDeletes a single Database Migration Service private connection.

SELECT examples

Retrieves a list of private connections in a given project and location.

SELECT
name,
createTime,
displayName,
error,
labels,
state,
updateTime,
vpcPeeringConfig
FROM google.datamigration.private_connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.datamigration.private_connections (
locationsId,
projectsId,
name,
labels,
displayName,
vpcPeeringConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ labels }}',
'{{ displayName }}',
'{{ vpcPeeringConfig }}'
;

DELETE example

Deletes the specified private_connections resource.

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