Skip to main content

subnets

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

Overview

Namesubnets
TypeResource
Idgoogle.vmwareengine.subnets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet
gatewayIpstringThe IP address of the gateway of this subnet. Must fall within the IP prefix defined above.
ipCidrRangestringThe IP address range of the subnet in CIDR format '10.0.0.0/24'.
statestringOutput only. The state of the resource.
typestringOutput only. The type of the subnet. For example "management" or "userDefined".
vlanIdinteger (int32)Output only. VLAN ID of the VLAN on which the subnet is configured

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, privateCloudsId, subnetsIdGets details of a single subnet.
listselectprojectsId, locationsId, privateCloudsIdpageSize, pageTokenLists subnets in a given private cloud.
patchupdateprojectsId, locationsId, privateCloudsId, subnetsIdupdateMaskUpdates the parameters of a single subnet. Only fields specified in update_mask are applied. Note: This API is synchronous and always returns a successful google.longrunning.Operation (LRO). The returned LRO will only have done and response fields.

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
locationsIdstring
privateCloudsIdstring
projectsIdstring
subnetsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single subnet.

SELECT
name,
gatewayIp,
ipCidrRange,
state,
type,
vlanId
FROM google.vmwareengine.subnets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND privateCloudsId = '{{ privateCloudsId }}' -- required
AND subnetsId = '{{ subnetsId }}' -- required;

UPDATE examples

Updates the parameters of a single subnet. Only fields specified in update_mask are applied. Note: This API is synchronous and always returns a successful google.longrunning.Operation (LRO). The returned LRO will only have done and response fields.

UPDATE google.vmwareengine.subnets
SET
data__ipCidrRange = '{{ ipCidrRange }}',
data__gatewayIp = '{{ gatewayIp }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND privateCloudsId = '{{ privateCloudsId }}' --required
AND subnetsId = '{{ subnetsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;