調用DescribeRegions接口查詢您可以使用的阿里云地域。

更多信息,請參見地域和可用區

調試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求參數

名稱 類型 是否必選 示例值 描述
Action String DescribeRegions

要執行的操作,取值:DescribeRegions。

關于公共請求參數的詳情,請參見公共參數

返回數據

名稱 類型 示例值 描述
RequestId String 4ABAEA6E-C740-5CE2-A003-643E551964F5

請求ID。

Regions Object

地域列表。

Region Array of Region

地域。

RegionId String cn-shanghai

地域ID。

示例

請求示例

http(s)://[Endpoint]/?Action=DescribeRegions
&<公共請求參數>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeRegionsResponse>
    <RequestId>4ABAEA6E-C740-5CE2-A003-643E551964F5</RequestId>
    <Regions>
        <Region>
            <RegionId>cn-hangzhou</RegionId>
        </Region>
        <Region>
            <RegionId>cn-shanghai</RegionId>
        </Region>
        <Region>
            <RegionId>cn-nanjing</RegionId>
        </Region>
        <Region>
            <RegionId>cn-fuzhou</RegionId>
        </Region>
        <Region>
            <RegionId>cn-qingdao</RegionId>
        </Region>
        <Region>
            <RegionId>cn-beijing</RegionId>
        </Region>
        <Region>
            <RegionId>cn-zhangjiakou</RegionId>
        </Region>
        <Region>
            <RegionId>cn-huhehaote</RegionId>
        </Region>
        <Region>
            <RegionId>cn-wulanchabu</RegionId>
        </Region>
        <Region>
            <RegionId>cn-shenzhen</RegionId>
        </Region>
        <Region>
            <RegionId>cn-heyuan</RegionId>
        </Region>
        <Region>
            <RegionId>cn-guangzhou</RegionId>
        </Region>
        <Region>
            <RegionId>cn-chengdu</RegionId>
        </Region>
        <Region>
            <RegionId>cn-hongkong</RegionId>
        </Region>
        <Region>
            <RegionId>ap-southeast-1</RegionId>
        </Region>
        <Region>
            <RegionId>ap-southeast-2</RegionId>
        </Region>
        <Region>
            <RegionId>ap-northeast-2</RegionId>
        </Region>
        <Region>
            <RegionId>ap-southeast-3</RegionId>
        </Region>
        <Region>
            <RegionId>ap-southeast-5</RegionId>
        </Region>
        <Region>
            <RegionId>ap-northeast-1</RegionId>
        </Region>
        <Region>
            <RegionId>eu-central-1</RegionId>
        </Region>
        <Region>
            <RegionId>eu-west-1</RegionId>
        </Region>
        <Region>
            <RegionId>us-west-1</RegionId>
        </Region>
        <Region>
            <RegionId>us-east-1</RegionId>
        </Region>
        <Region>
            <RegionId>me-east-1</RegionId>
        </Region>
        <Region>
            <RegionId>ap-southeast-7</RegionId>
        </Region>
        <Region>
            <RegionId>ap-south-1</RegionId>
        </Region>
    </Regions>
</DescribeRegionsResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "4ABAEA6E-C740-5CE2-A003-643E551964F5",
  "Regions" : {
    "Region" : [ {
      "RegionId" : "cn-hangzhou"
    }, {
      "RegionId" : "cn-shanghai"
    }, {
      "RegionId" : "cn-nanjing"
    }, {
      "RegionId" : "cn-fuzhou"
    }, {
      "RegionId" : "cn-qingdao"
    }, {
      "RegionId" : "cn-beijing"
    }, {
      "RegionId" : "cn-zhangjiakou"
    }, {
      "RegionId" : "cn-huhehaote"
    }, {
      "RegionId" : "cn-wulanchabu"
    }, {
      "RegionId" : "cn-shenzhen"
    }, {
      "RegionId" : "cn-heyuan"
    }, {
      "RegionId" : "cn-guangzhou"
    }, {
      "RegionId" : "cn-chengdu"
    }, {
      "RegionId" : "cn-hongkong"
    }, {
      "RegionId" : "ap-southeast-1"
    }, {
      "RegionId" : "ap-southeast-2"
    }, {
      "RegionId" : "ap-northeast-2"
    }, {
      "RegionId" : "ap-southeast-3"
    }, {
      "RegionId" : "ap-southeast-5"
    }, {
      "RegionId" : "ap-northeast-1"
    }, {
      "RegionId" : "eu-central-1"
    }, {
      "RegionId" : "eu-west-1"
    }, {
      "RegionId" : "us-west-1"
    }, {
      "RegionId" : "us-east-1"
    }, {
      "RegionId" : "me-east-1"
    }, {
      "RegionId" : "ap-southeast-7"
    }, {
      "RegionId" : "ap-south-1"
    } ]
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。