Skip to main content

locations

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

Overview

Namelocations
TypeResource
Idgoogle.networkconnectivity.locations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringResource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"
displayNamestringThe friendly name for this location, typically a nearby city name. For example, "Tokyo".
labelsobjectCross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}
locationIdstringThe canonical id for this location. For example: "us-east1".
metadataobjectService-specific metadata. For example the available capacity at the given location.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsIdGets information about a location.
listselectprojectsIdpageSize, extraLocationTypes, filter, pageTokenLists information about the supported locations for this service.
check_consumer_configexecprojectsId, locationsIdCheckConsumerConfig validates the consumer network and project for potential PSC connection creation. This method performs several checks, including: - Validating the existence and permissions of the service class. - Ensuring the consumer network exists and is accessible. - Verifying XPN relationships if applicable. - Checking for compatible IP versions between the consumer network and the requested version. This method performs a dynamic IAM check for the networkconnectivity.serviceClasses.use permission on the service class resource in the Prepare phase.

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
projectsIdstring
extraLocationTypesstring
filterstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets information about a location.

SELECT
name,
displayName,
labels,
locationId,
metadata
FROM google.networkconnectivity.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
;

Lifecycle Methods

CheckConsumerConfig validates the consumer network and project for potential PSC connection creation. This method performs several checks, including: - Validating the existence and permissions of the service class. - Ensuring the consumer network exists and is accessible. - Verifying XPN relationships if applicable. - Checking for compatible IP versions between the consumer network and the requested version. This method performs a dynamic IAM check for the networkconnectivity.serviceClasses.use permission on the service class resource in the Prepare phase.

EXEC google.networkconnectivity.locations.check_consumer_config 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"serviceClass": "{{ serviceClass }}",
"requestedIpVersion": "{{ requestedIpVersion }}",
"consumerNetwork": "{{ consumerNetwork }}",
"endpointProject": "{{ endpointProject }}"
}'
;