Skip to main content

peerings

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

Overview

Namepeerings
TypeResource
Idgoogle.managedidentities.peerings

Fields

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.
createTimestringOutput 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.
statusMessagestringOutput only. Additional information about the current status of this peering, if available.
updateTimestringOutput only. Last update time.

Methods

NameAccessible byRequired ParamsDescription
getSELECTpeeringsId, projectsIdGets details of a single Peering.
listSELECTprojectsIdLists Peerings in a given project.
createINSERTprojectsIdCreates a Peering for Managed AD instance.
deleteDELETEpeeringsId, projectsIdDeletes identified Peering.
patchUPDATEpeeringsId, projectsIdUpdates the labels for specified Peering.

SELECT examples

Lists Peerings in a given project.

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

INSERT example

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

/*+ create */
INSERT INTO google.managedidentities.peerings (
projectsId,
labels,
authorizedNetwork,
domainResource
)
SELECT
'{{ projectsId }}',
'{{ labels }}',
'{{ authorizedNetwork }}',
'{{ domainResource }}'
;

UPDATE example

Updates a peerings resource.

/*+ update */
UPDATE google.managedidentities.peerings
SET
labels = '{{ labels }}',
authorizedNetwork = '{{ authorizedNetwork }}',
domainResource = '{{ domainResource }}'
WHERE
peeringsId = '{{ peeringsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified peerings resource.

/*+ delete */
DELETE FROM google.managedidentities.peerings
WHERE peeringsId = '{{ peeringsId }}'
AND projectsId = '{{ projectsId }}';