Skip to main content

cloud_locations

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

Overview

Namecloud_locations
TypeResource
Idgoogle.cloudlocationfinder.cloud_locations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}
carbonFreeEnergyPercentagenumber (float)Optional. The carbon free energy percentage of the cloud location. This represents the average percentage of time customers' application will be running on carbon-free energy. See https://cloud.google.com/sustainability/region-carbon for more details. There is a difference between default value 0 and unset value. 0 means the carbon free energy percentage is 0%, while unset value means the carbon footprint data is not available.
cloudLocationTypestringOptional. The type of the cloud location. (CLOUD_LOCATION_TYPE_UNSPECIFIED, CLOUD_LOCATION_TYPE_REGION, CLOUD_LOCATION_TYPE_ZONE, CLOUD_LOCATION_TYPE_GDCC_ZONE)
cloudProviderstringOptional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure. (CLOUD_PROVIDER_UNSPECIFIED, CLOUD_PROVIDER_GCP, CLOUD_PROVIDER_AWS, CLOUD_PROVIDER_AZURE, CLOUD_PROVIDER_OCI)
containingCloudLocationstringOutput only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.
displayNamestringOptional. The human-readable name of the cloud location. Example: us-east-2, us-east1.
territoryCodestringOptional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, cloudLocationsIdRetrieves a resource containing information about a cloud location.
listselectprojectsId, locationsIdpageSize, filter, pageTokenLists cloud locations under a given project and location.
searchexecprojectsId, locationsIdpageToken, pageSize, sourceCloudLocation, querySearches for cloud locations from a given source location.

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
cloudLocationsIdstring
locationsIdstring
projectsIdstring
filterstring
pageSizeinteger (int32)
pageTokenstring
querystring
sourceCloudLocationstring

SELECT examples

Retrieves a resource containing information about a cloud location.

SELECT
name,
carbonFreeEnergyPercentage,
cloudLocationType,
cloudProvider,
containingCloudLocation,
displayName,
territoryCode
FROM google.cloudlocationfinder.cloud_locations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND cloudLocationsId = '{{ cloudLocationsId }}' -- required
;

Lifecycle Methods

Searches for cloud locations from a given source location.

EXEC google.cloudlocationfinder.cloud_locations.search
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@pageToken='{{ pageToken }}',
@pageSize='{{ pageSize }}',
@sourceCloudLocation='{{ sourceCloudLocation }}',
@query='{{ query }}'
;