locations
Creates, updates, deletes, gets or lists a locations resource.
Overview
| Name | locations |
| Type | Resource |
| Id | google.networkconnectivity.locations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" |
displayName | string | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
labels | object | Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} |
locationId | string | The canonical id for this location. For example: "us-east1". |
metadata | object | Service-specific metadata. For example the available capacity at the given location. |
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1" |
displayName | string | The friendly name for this location, typically a nearby city name. For example, "Tokyo". |
labels | object | Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"} |
locationId | string | The canonical id for this location. For example: "us-east1". |
metadata | object | Service-specific metadata. For example the available capacity at the given location. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId | Gets information about a location. | |
list | select | projectsId | pageSize, extraLocationTypes, filter, pageToken | Lists information about the supported locations for this service. |
check_consumer_config | exec | projectsId, locationsId | 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. |
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 |
|---|---|---|
locationsId | string | |
projectsId | string | |
extraLocationTypes | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets information about a location.
SELECT
name,
displayName,
labels,
locationId,
metadata
FROM google.networkconnectivity.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
;
Lists information about the supported locations for this service.
SELECT
name,
displayName,
labels,
locationId,
metadata
FROM google.networkconnectivity.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND extraLocationTypes = '{{ extraLocationTypes }}'
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
;
Lifecycle Methods
- check_consumer_config
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 }}"
}'
;