Skip to main content

connections

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

Overview

Nameconnections
TypeResource
Idgoogle.servicenetworking.connections

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
connectionsarrayThe list of Connections.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectservicesIdnetworkList the private connections that are configured in a service consumer's VPC network.
createinsertservicesIdCreates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.
patchupdateservicesId, connectionsIdupdateMask, forceUpdates the allocated ranges that are assigned to a 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
connectionsIdstring
servicesIdstring
forceboolean
networkstring
updateMaskstring (google-fieldmask)

SELECT examples

List the private connections that are configured in a service consumer's VPC network.

SELECT
connections
FROM google.servicenetworking.connections
WHERE servicesId = '{{ servicesId }}' -- required
AND network = '{{ network }}';

INSERT examples

Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.

INSERT INTO google.servicenetworking.connections (
data__network,
data__reservedPeeringRanges,
servicesId
)
SELECT
'{{ network }}',
'{{ reservedPeeringRanges }}',
'{{ servicesId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the allocated ranges that are assigned to a connection.

UPDATE google.servicenetworking.connections
SET
data__network = '{{ network }}',
data__reservedPeeringRanges = '{{ reservedPeeringRanges }}'
WHERE
servicesId = '{{ servicesId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND force = {{ force}}
RETURNING
name,
done,
error,
metadata,
response;