Package google.cloud.location

索引

位置

一種抽象介面,提供服務適用的位置相關資訊。服務專用的中繼資料是透過 Location.metadata 欄位提供。

GetLocation

rpc GetLocation(GetLocationRequest) returns (Location)

取得位置的相關資訊。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform

詳情請參閱Authentication Overview

IAM 權限

需要 name 資源的下列 IAM 權限:

  • gdchardwaremanagement.locations.get

詳情請參閱 IAM 說明文件

ListLocations

rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse)

列出這項服務支援位置的相關資訊。這個方法有兩種呼叫方式:

  • 列出所有公開位置:使用路徑 GET /v1/locations
  • 列出專案可見的位置:使用路徑 GET /v1/projects/{project_id}/locations。這可能包括公開地點,以及專案可見的私人或其他地點。
授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform

詳情請參閱Authentication Overview

IAM 權限

需要 name 資源的下列 IAM 權限:

  • gdchardwaremanagement.locations.list

詳情請參閱 IAM 說明文件

GetLocationRequest

Locations.GetLocation 的要求訊息。

欄位
name

string

位置的資源名稱。

ListLocationsRequest

Locations.ListLocations 的要求訊息。

欄位
name

string

擁有位置集合的資源 (如適用)。

filter

string

篩選器,可將結果縮小至偏好的子集。篩選語言接受 "displayName=tokyo" 等字串,詳情請參閱 AIP-160

page_size

int32

要傳回的結果數上限。如未設定,服務會選取預設值。

page_token

string

從回應的 next_page_token 欄位收到的網頁符記。傳送該頁面符記即可接收後續頁面。

extra_location_types[]

string

選用。請勿使用這個欄位。除非另有明確說明,否則系統會忽略這項屬性。這項功能主要供內部使用。

ListLocationsResponse

Locations.ListLocations 的回應訊息。

欄位
locations[]

Location

符合要求中指定篩選器的位置清單。

next_page_token

string

標準清單下一頁符記。

位置

代表 Google Cloud 位置的資源。

欄位
name

string

位置的資源名稱,可以隨不同的實作而改變。範例:"projects/example-project/locations/us-east1"

location_id

string

這個位置的標準 ID,例如 "us-east1"

display_name

string

這個位置的易記名稱,通常是附近的城市名稱,例如「東京」。

labels

map<string, string>

位置的跨服務屬性。例如

{"cloud.googleapis.com/region": "us-east1"}
metadata

Any

服務專用的中繼資料,例如指定位置的可用容量。