locations
Creates, updates, deletes, gets or lists a locations resource.
Overview
| Name | locations |
| Type | Resource |
| Id | google.apphub.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 | pageToken, filter, extraLocationTypes, pageSize | Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version. |
detach_service_project_attachment | exec | projectsId, locationsId | Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to. | |
lookup_service_project_attachment | exec | projectsId, locationsId | Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project. |
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.apphub.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
;
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided in the ListLocationsRequest.name field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project. For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
SELECT
name,
displayName,
labels,
locationId,
metadata
FROM google.apphub.locations
WHERE projectsId = '{{ projectsId }}' -- required
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND extraLocationTypes = '{{ extraLocationTypes }}'
AND pageSize = '{{ pageSize }}'
;
Lifecycle Methods
- detach_service_project_attachment
- lookup_service_project_attachment
Detaches a service project from a host project. You can call this API from any service project without needing access to the host project that it is attached to.
EXEC google.apphub.locations.detach_service_project_attachment
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
;
Lists a service project attachment for a given service project. You can call this API from any project to find if it is attached to a host project.
EXEC google.apphub.locations.lookup_service_project_attachment
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
;