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

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

Methods

NameAccessible byRequired ParamsDescription
add_peeringINSERTnetwork, projectAdds a peering to the specified network.
remove_peeringDELETEnetwork, projectRemoves a peering from the specified network.
update_peeringUPDATEnetwork, projectUpdates 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.

INSERT example

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

/*+ create */
INSERT INTO google.compute.networks_peering (
network,
project,
name,
peerNetwork,
autoCreateRoutes,
networkPeering
)
SELECT
'{{ network }}',
'{{ project }}',
'{{ name }}',
'{{ peerNetwork }}',
{{ autoCreateRoutes }},
'{{ networkPeering }}'
;

UPDATE example

Updates a networks_peering resource.

/*+ update */
UPDATE google.compute.networks_peering
SET
networkPeering = '{{ networkPeering }}'
WHERE
network = '{{ network }}'
AND project = '{{ project }}';

DELETE example

Deletes the specified networks_peering resource.

/*+ delete */
DELETE FROM google.compute.networks_peering
WHERE network = '{{ network }}'
AND project = '{{ project }}';