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​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the resource.
createTimestring (google-datetime)Output only. The create time of the resource.
displayNamestringThe private connection display name.
errorobjectOutput only. The error details in case of state FAILED. (id: Status)
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" }.
pscInterfaceConfigobjectPSC Interface configuration. (id: PscInterfaceConfig)
reservedPublicIpConfigobjectReserved Public IP configuration. (id: ReservedPublicIpConfig)
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The state of the private connection. (STATE_UNSPECIFIED, CREATING, CREATED, FAILED, DELETING, FAILED_TO_DELETE, DELETED)
updateTimestring (google-datetime)Output only. The last update time of the resource.
vpcPeeringConfigobjectVPC peering configuration. (id: VpcPeeringConfig)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, privateConnectionsIdGets details of a single private connection.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenRetrieves a list of private connections in a given project and location.
createinsertprojectsId, locationsIdprivateConnectionId, requestId, skipValidation, validateOnlyCreates a new private connection in a given project and location.
deletedeleteprojectsId, locationsId, privateConnectionsIdrequestIdDeletes a single Database Migration Service private connection.

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
locationsIdstring
privateConnectionsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
privateConnectionIdstring
requestIdstring
skipValidationboolean
validateOnlyboolean

SELECT examples​

Gets details of a single private connection.

SELECT
name,
createTime,
displayName,
error,
labels,
pscInterfaceConfig,
reservedPublicIpConfig,
satisfiesPzi,
satisfiesPzs,
state,
updateTime,
vpcPeeringConfig
FROM google.datamigration.private_connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND privateConnectionsId = '{{ privateConnectionsId }}' -- required
;

INSERT examples​

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

INSERT INTO google.datamigration.private_connections (
data__displayName,
data__labels,
data__name,
data__pscInterfaceConfig,
data__reservedPublicIpConfig,
data__vpcPeeringConfig,
projectsId,
locationsId,
privateConnectionId,
requestId,
skipValidation,
validateOnly
)
SELECT
'{{ displayName }}',
'{{ labels }}',
'{{ name }}',
'{{ pscInterfaceConfig }}',
'{{ reservedPublicIpConfig }}',
'{{ vpcPeeringConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ privateConnectionId }}',
'{{ requestId }}',
'{{ skipValidation }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples​

Deletes a single Database Migration Service private connection.

DELETE FROM google.datamigration.private_connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND privateConnectionsId = '{{ privateConnectionsId }}' --required
AND requestId = '{{ requestId }}'
;