Skip to main content

networks_peering

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

Overview

Namenetworks_peering
TypeResource
Idgoogle.compute.networks_peering

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
add_peeringinsertproject, networkrequestIdAdds a peering to the specified network.
update_peeringupdateproject, networkrequestIdUpdates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.
remove_peeringdeleteproject, networkrequestIdRemoves a peering from the specified network.

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
networkstring
projectstring
requestIdstring

INSERT examples

Adds a peering to the specified network.

INSERT INTO google.compute.networks_peering (
data__name,
data__peerNetwork,
data__autoCreateRoutes,
data__networkPeering,
project,
network,
requestId
)
SELECT
'{{ name }}',
'{{ peerNetwork }}',
{{ autoCreateRoutes }},
'{{ networkPeering }}',
'{{ project }}',
'{{ network }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.

UPDATE google.compute.networks_peering
SET
data__networkPeering = '{{ networkPeering }}'
WHERE
project = '{{ project }}' --required
AND network = '{{ network }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

Removes a peering from the specified network.

DELETE FROM google.compute.networks_peering
WHERE project = '{{ project }}' --required
AND network = '{{ network }}' --required
AND requestId = '{{ requestId }}';