Skip to main content

network_peerings

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

Overview

Namenetwork_peerings
TypeResource
Idgoogle.vmwareengine.network_peerings

Fields

NameDatatypeDescription
namestringOutput only. The resource name of the network peering. NetworkPeering is a global resource and location can only be global. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/global/networkPeerings/my-peering
descriptionstringOptional. User-provided description for this network peering.
createTimestringOutput only. Creation time of this resource.
exchangeSubnetRoutesbooleanOptional. True if full mesh connectivity is created and managed automatically between peered networks; false otherwise. Currently this field is always true because Google Compute Engine automatically creates and manages subnetwork routes between two VPC networks when peering state is 'ACTIVE'.
exportCustomRoutesbooleanOptional. True if custom routes are exported to the peered network; false otherwise. The default value is true.
exportCustomRoutesWithPublicIpbooleanOptional. True if all subnet routes with a public IP address range are exported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.
importCustomRoutesbooleanOptional. True if custom routes are imported from the peered network; false otherwise. The default value is true.
importCustomRoutesWithPublicIpbooleanOptional. True if all subnet routes with public IP address range are imported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported to peers and are not controlled by this field.
peerMtuintegerOptional. Maximum transmission unit (MTU) in bytes. The default value is 1500. If a value of 0 is provided for this field, VMware Engine uses the default value instead.
peerNetworkstringRequired. The relative resource name of the network to peer with a standard VMware Engine network. The provided network can be a consumer VPC network or another standard VMware Engine network. If the peer_network_type is VMWARE_ENGINE_NETWORK, specify the name in the form: projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}. Otherwise specify the name in the form: projects/{project}/global/networks/{network_id}, where {project} can either be a project number or a project ID.
peerNetworkTypestringRequired. The type of the network to peer with the VMware Engine network.
statestringOutput only. State of the network peering. This field has a value of 'ACTIVE' when there's a matching configuration in the peer network. New values may be added to this enum when appropriate.
stateDetailsstringOutput only. Output Only. Details about the current state of the network peering.
uidstringOutput only. System-generated unique identifier for the resource.
updateTimestringOutput only. Last update time of this resource.
vmwareEngineNetworkstringRequired. The relative resource name of the VMware Engine network. Specify the name in the following form: projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id} where {project} can either be a project number or a project ID.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, networkPeeringsId, projectsIdRetrieves a NetworkPeering resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state. NetworkPeering is a global resource and location can only be global.
listSELECTlocationsId, projectsIdLists NetworkPeering resources in a given project. NetworkPeering is a global resource and location can only be global.
createINSERTlocationsId, projectsIdCreates a new network peering between the peer network and VMware Engine network provided in a NetworkPeering resource. NetworkPeering is a global resource and location can only be global.
deleteDELETElocationsId, networkPeeringsId, projectsIdDeletes a NetworkPeering resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network. NetworkPeering is a global resource and location can only be global.
patchUPDATElocationsId, networkPeeringsId, projectsIdModifies a NetworkPeering resource. Only the description field can be updated. Only fields specified in updateMask are applied. NetworkPeering is a global resource and location can only be global.

SELECT examples

Lists NetworkPeering resources in a given project. NetworkPeering is a global resource and location can only be global.

SELECT
name,
description,
createTime,
exchangeSubnetRoutes,
exportCustomRoutes,
exportCustomRoutesWithPublicIp,
importCustomRoutes,
importCustomRoutesWithPublicIp,
peerMtu,
peerNetwork,
peerNetworkType,
state,
stateDetails,
uid,
updateTime,
vmwareEngineNetwork
FROM google.vmwareengine.network_peerings
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.vmwareengine.network_peerings (
locationsId,
projectsId,
peerNetwork,
exportCustomRoutes,
importCustomRoutes,
exchangeSubnetRoutes,
exportCustomRoutesWithPublicIp,
importCustomRoutesWithPublicIp,
peerMtu,
peerNetworkType,
vmwareEngineNetwork,
description
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ peerNetwork }}',
{{ exportCustomRoutes }},
{{ importCustomRoutes }},
{{ exchangeSubnetRoutes }},
{{ exportCustomRoutesWithPublicIp }},
{{ importCustomRoutesWithPublicIp }},
'{{ peerMtu }}',
'{{ peerNetworkType }}',
'{{ vmwareEngineNetwork }}',
'{{ description }}'
;

UPDATE example

Updates a network_peerings resource.

/*+ update */
UPDATE google.vmwareengine.network_peerings
SET
peerNetwork = '{{ peerNetwork }}',
exportCustomRoutes = true|false,
importCustomRoutes = true|false,
exchangeSubnetRoutes = true|false,
exportCustomRoutesWithPublicIp = true|false,
importCustomRoutesWithPublicIp = true|false,
peerMtu = '{{ peerMtu }}',
peerNetworkType = '{{ peerNetworkType }}',
vmwareEngineNetwork = '{{ vmwareEngineNetwork }}',
description = '{{ description }}'
WHERE
locationsId = '{{ locationsId }}'
AND networkPeeringsId = '{{ networkPeeringsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified network_peerings resource.

/*+ delete */
DELETE FROM google.vmwareengine.network_peerings
WHERE locationsId = '{{ locationsId }}'
AND networkPeeringsId = '{{ networkPeeringsId }}'
AND projectsId = '{{ projectsId }}';