Skip to main content

peerings

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

Overview​

Namepeerings
TypeResource
Idgoogle.managedidentities.peerings

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringOutput only. Unique name of the peering in this scope including projects and location using the form: projects/{project_id}/locations/global/peerings/{peering_id}.
authorizedNetworkstringRequired. The full names of the Google Compute Engine networks to which the instance is connected. Caller needs to make sure that CIDR subnets do not overlap between networks, else peering creation will fail.
createTimestring (google-datetime)Output only. The time the instance was created.
domainResourcestringRequired. Full domain resource path for the Managed AD Domain involved in peering. The resource path should be in the form: projects/{project_id}/locations/global/domains/{domain_name}
labelsobjectOptional. Resource labels to represent user-provided metadata.
statestringOutput only. The current state of this Peering. (STATE_UNSPECIFIED, CREATING, CONNECTED, DISCONNECTED, DELETING)
statusMessagestringOutput only. Additional information about the current status of this peering, if available.
updateTimestring (google-datetime)Output only. Last update time.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, peeringsIdGets details of a single Peering.
listselectprojectsIdfilter, orderBy, pageSize, pageTokenLists Peerings in a given project.
createinsertprojectsIdpeeringIdCreates a Peering for Managed AD instance.
patchupdateprojectsId, peeringsIdupdateMaskUpdates the labels for specified Peering.
deletedeleteprojectsId, peeringsIdDeletes identified Peering.

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
peeringsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
peeringIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

Gets details of a single Peering.

SELECT
name,
authorizedNetwork,
createTime,
domainResource,
labels,
state,
statusMessage,
updateTime
FROM google.managedidentities.peerings
WHERE projectsId = '{{ projectsId }}' -- required
AND peeringsId = '{{ peeringsId }}' -- required
;

INSERT examples​

Creates a Peering for Managed AD instance.

INSERT INTO google.managedidentities.peerings (
data__authorizedNetwork,
data__domainResource,
data__labels,
projectsId,
peeringId
)
SELECT
'{{ authorizedNetwork }}',
'{{ domainResource }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ peeringId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates the labels for specified Peering.

UPDATE google.managedidentities.peerings
SET
data__authorizedNetwork = '{{ authorizedNetwork }}',
data__domainResource = '{{ domainResource }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND peeringsId = '{{ peeringsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes identified Peering.

DELETE FROM google.managedidentities.peerings
WHERE projectsId = '{{ projectsId }}' --required
AND peeringsId = '{{ peeringsId }}' --required
;