networks_peering
Creates, updates, deletes, gets or lists a networks_peering
resource.
Overview
Name | networks_peering |
Type | Resource |
Id | google.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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
add_peering | insert | project , network | requestId | Adds a peering to the specified network. |
update_peering | update | project , network | requestId | 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. |
remove_peering | delete | project , network | requestId | Removes 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.
Name | Datatype | Description |
---|---|---|
network | string | |
project | string | |
requestId | string |
INSERT
examples
- add_peering
- Manifest
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
;
# Description fields are for documentation purposes
- name: networks_peering
props:
- name: project
value: string
description: Required parameter for the networks_peering resource.
- name: network
value: string
description: Required parameter for the networks_peering resource.
- name: name
value: string
description: >
Name of the peering, which should conform to RFC1035.
- name: peerNetwork
value: string
description: >
URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.
- name: autoCreateRoutes
value: boolean
description: >
This field will be deprecated soon. Use exchange_subnet_routes in network_peering instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.
- name: networkPeering
value: object
description: >
A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.
- name: requestId
value: string
UPDATE
examples
- update_peering
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
- remove_peering
Removes a peering from the specified network.
DELETE FROM google.compute.networks_peering
WHERE project = '{{ project }}' --required
AND network = '{{ network }}' --required
AND requestId = '{{ requestId }}';