Subscriptions - List Locations

取得所有可用的地理位置。
此作業提供資源提供者可用的所有位置;不過,每個資源提供者都可能支援此列表的子集。

GET https://management.azure.com/subscriptions/{subscriptionId}/locations?api-version=2022-12-01
GET https://management.azure.com/subscriptions/{subscriptionId}/locations?api-version=2022-12-01&includeExtendedLocations={includeExtendedLocations}

URI 參數

名稱 位於 必要 類型 Description
subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

includeExtendedLocations
query

boolean

是否要包含擴充位置。

回應

名稱 類型 Description
200 OK

LocationListResult

確定 - 傳回位置的陣列。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

GetLocationsWithASubscriptionId
GetLocationsWithExtendedLocations

GetLocationsWithASubscriptionId

Sample Request

GET https://management.azure.com/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations?api-version=2022-12-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus",
      "name": "eastus",
      "type": "Region",
      "displayName": "East US",
      "regionalDisplayName": "(US) East US",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Recommended",
        "geography": "United States",
        "geographyGroup": "US",
        "longitude": "-79.8164",
        "latitude": "37.3719",
        "physicalLocation": "Virginia",
        "pairedRegion": [
          {
            "name": "westus",
            "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/westus"
          }
        ]
      },
      "availabilityZoneMappings": [
        {
          "logicalZone": "1",
          "physicalZone": "eastus-az1"
        },
        {
          "logicalZone": "2",
          "physicalZone": "eastus-az3"
        },
        {
          "logicalZone": "3",
          "physicalZone": "eastus-az2"
        }
      ]
    },
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus2",
      "name": "eastus2",
      "type": "Region",
      "displayName": "East US 2",
      "regionalDisplayName": "(US) East US 2",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Recommended",
        "geography": "United States",
        "geographyGroup": "US",
        "longitude": "-78.3889",
        "latitude": "36.6681",
        "physicalLocation": "Virginia",
        "pairedRegion": [
          {
            "name": "centralus",
            "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/centralus"
          }
        ]
      },
      "availabilityZoneMappings": [
        {
          "logicalZone": "1",
          "physicalZone": "eastus2-az1"
        },
        {
          "logicalZone": "2",
          "physicalZone": "eastus2-az3"
        },
        {
          "logicalZone": "3",
          "physicalZone": "eastus2-az2"
        }
      ]
    }
  ]
}

GetLocationsWithExtendedLocations

Sample Request

GET https://management.azure.com/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations?api-version=2022-12-01&includeExtendedLocations=true

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus",
      "name": "eastus",
      "type": "Region",
      "displayName": "East US",
      "regionalDisplayName": "(US) East US",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Recommended",
        "geography": "United States",
        "geographyGroup": "US",
        "longitude": "-79.8164",
        "latitude": "37.3719",
        "physicalLocation": "Virginia",
        "pairedRegion": [
          {
            "name": "westus",
            "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/westus"
          }
        ]
      },
      "availabilityZoneMappings": [
        {
          "logicalZone": "1",
          "physicalZone": "eastus-az1"
        },
        {
          "logicalZone": "2",
          "physicalZone": "eastus-az3"
        },
        {
          "logicalZone": "3",
          "physicalZone": "eastus-az2"
        }
      ]
    },
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus2",
      "name": "eastus2",
      "type": "Region",
      "displayName": "East US 2",
      "regionalDisplayName": "(US) East US 2",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Recommended",
        "geography": "United States",
        "geographyGroup": "US",
        "longitude": "-78.3889",
        "latitude": "36.6681",
        "physicalLocation": "Virginia",
        "pairedRegion": [
          {
            "name": "centralus",
            "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/centralus"
          }
        ]
      },
      "availabilityZoneMappings": [
        {
          "logicalZone": "1",
          "physicalZone": "eastus2-az1"
        },
        {
          "logicalZone": "2",
          "physicalZone": "eastus2-az3"
        },
        {
          "logicalZone": "3",
          "physicalZone": "eastus2-az2"
        }
      ]
    },
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus/edgeZones/ezecustomerlabboston1",
      "name": "ezecustomerlabboston1",
      "type": "EdgeZone",
      "displayName": "EZE Customer Lab Boston 1",
      "regionalDisplayName": "(US) EZE Customer Lab Boston 1",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Extended",
        "geographyGroup": "US",
        "geography": "United States",
        "longitude": "-71.219038",
        "latitude": "42.301218"
      }
    },
    {
      "id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/southcentralus/edgeZones/ezecustomerlabhouston1",
      "name": "ezecustomerlabhouston1",
      "type": "EdgeZone",
      "displayName": "EZE Customer Lab Houston 1",
      "regionalDisplayName": "(US) EZE Customer Lab Houston 1",
      "metadata": {
        "regionType": "Physical",
        "regionCategory": "Extended",
        "geographyGroup": "US",
        "geography": "United States",
        "longitude": "-95.41452",
        "latitude": "29.9411"
      }
    }
  ]
}

定義

名稱 Description
AvailabilityZoneMappings

區域的可用性區域對應

CloudError

資源管理要求的錯誤回應。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

Location

位置資訊。

LocationListResult

位置清單作業回應。

LocationMetadata

位置元數據資訊

LocationType

位置類型。

PairedRegion

配對區域的相關信息。

RegionCategory

區域的類別。

RegionType

區域的型別。

AvailabilityZoneMappings

區域的可用性區域對應

名稱 類型 Description
logicalZone

string

可用性區域的邏輯區域識別碼

physicalZone

string

邏輯區域標識碼對應至之可用性區域的完整實體區域標識碼

CloudError

資源管理要求的錯誤回應。

名稱 類型 Description
error

ErrorResponse

錯誤回應
所有 Azure Resource Manager API 的常見錯誤回應,以傳回失敗作業的錯誤詳細數據。 (這也會遵循 OData 錯誤回應格式.) 。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

Location

位置資訊。

名稱 類型 Description
availabilityZoneMappings

AvailabilityZoneMappings[]

此區域的可用性區域對應。

displayName

string

位置的顯示名稱。

id

string

位置的完整標識碼。 例如,/subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus。

metadata

LocationMetadata

位置的元數據,例如 lat/long、配對的區域等等。

name

string

位置名稱。

regionalDisplayName

string

位置和其區域的顯示名稱。

subscriptionId

string

訂閱識別碼。

type

LocationType

位置類型。

LocationListResult

位置清單作業回應。

名稱 類型 Description
value

Location[]

位置的陣列。

LocationMetadata

位置元數據資訊

名稱 類型 Description
geography

string

位置的地理位置。

geographyGroup

string

位置的地理位置群組。

homeLocation

string

邊緣區域的首頁位置。

latitude

string

位置的緯度。

longitude

string

位置的經度。

pairedRegion

PairedRegion[]

與這個區域配對的區域。

physicalLocation

string

Azure 位置的實體位置。

regionCategory

RegionCategory

區域的類別。

regionType

RegionType

區域的型別。

LocationType

位置類型。

名稱 類型 Description
EdgeZone

string

Region

string

PairedRegion

配對區域的相關信息。

名稱 類型 Description
id

string

位置的完整標識碼。 例如,/subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus。

name

string

配對區域的名稱。

subscriptionId

string

訂閱識別碼。

RegionCategory

區域的類別。

名稱 類型 Description
Extended

string

Other

string

Recommended

string

RegionType

區域的型別。

名稱 類型 Description
Logical

string

Physical

string