
# 查询区域列表 - KeystoneListRegions
#### 功能介绍
该接口可以用于查询华为云支持的区域列表。
该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见：[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IAM/doc?api=KeystoneListRegions)中调试该接口。
#### 授权信息
当前API调用无需策略权限。
#### URI
GET /v3/regions
#### 请求参数
表1请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                         |
|:---|:---|:---|:---|
| Content-Type | 是    | String | 该字段内容填为"application/json;charset=utf8"。                    |
| X-Auth-Token | 是    | String | IAM用户的token（无需特殊权限）。如果token中没有私有region信息，则查询结果不返回私有region。 |
   
#### 响应参数
表2响应Body参数 
| 参数                                                                          | 参数类型             | 描述      |
|:---|:---|:---|
| [links]            | Object           | 资源链接信息。 |
| [regions] | Array of objects | 区域信息列表。 |
   
 表3links 
| 参数       | 参数类型   | 描述                    |
|:---|:---|:---|
| self     | String | 资源链接地址。               |
| previous | String | 前一邻接资源链接地址，不存在时为null。 |
| next     | String | 后一邻接资源链接地址，不存在时为null。 |
   
 表4regions 
| 参数                                                                                 | 参数类型   | 描述                          |
|:---|:---|:---|
| description                                                                        | String | 区域描述信息。                     |
| parent_region_id                                                                   | String | null.                       |
| [links]     | Object | 区域的资源链接信息。                  |
| [locales] | Object | 区域名，受区域信息注册影响，不一定返回对象中所有字段。 |
| id                                                                                 | String | 区域ID。                       |
| type                                                                               | String | 区域类型。                       |
   
 表5regions.links 
| 参数   | 参数类型   | 描述      |
|:---|:---|:---|
| self | String | 资源链接地址。 |
   
 表6regions.locales 
| 参数    | 参数类型   | 描述           |
|:---|:---|:---|
| zh-cn | String | 区域的中文名称。     |
| en-us | String | 区域的英文名称。     |
| pt-br | String | 区域的葡萄牙语名称。   |
| es-us | String | 区域的美国西班牙语名称。 |
| es-es | String | 区域的西班牙语名称。   |
   
#### 请求示例
查询区域列表。
```
GET https://iam.myhuaweicloud.com/v3/regions
```
#### 响应示例
**状态码为 200 时:**
请求成功。
```
{
    "regions": [
        {
            "parent_region_id": null,
            "description": "",
            "links": {
                "self": "https://iam.myhuaweicloud.com/v3/regions/cn-north-1"
            },
            "type": "public",
            "id": "cn-north-1",
            "locales": {
                "zh-cn": "华北-北京一",
                "en-us": "cn-north-1"
            }
        },
        {
            "parent_region_id": null,
            "description": "",
            "links": {
                "self": "https://iam.myhuaweicloud.com/v3/regions/la-south-2"
            },
            "type": "public",
            "id": "la-south-2",
            "locales": {
                "pt-br": "AL-Santiago",
                "zh-cn": "拉美-圣地亚哥",
                "en-us": "LA-Santiago",
                "es-us": "AL-Santiago de Chile1",
                "es-es": "LA-Santiago"
            }
        }
    ],
    "links": {
        "self": "https://iam.myhuaweicloud.com/v3/regions",
        "previous": null,
        "next": null
    }
}
```
#### 返回值
| 返回值 | 描述        |
|:---|:---|
| 200 | 请求成功。     |
| 400 | 参数无效。     |
| 401 | 认证失败。     |
| 403 | 没有操作权限。   |
| 404 | 未找到相应的资源。 |
| 405 | 不允许的方法。   |
| 413 | 请求体过大。    |
| 500 | 内部服务错误。   |
| 503 | 服务不可用。    |
   
#### 错误码
无
