Updated on 2023-09-14 GMT+08:00

Querying Regions

Function

This API is used to query the regions accessible to a specified user.

The API can be called using both the global endpoint and region-specific endpoints.

URI

GET /v3/regions

Request Parameters

Table 1 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Fill application/json;charset=utf8 in this field.

X-Auth-Token

Yes

String

IAM user token (no special permission requirements). If the token does not contain private region information, no private regions will be returned.

Response Parameters

Table 2 Parameters in the response body

Parameter

Type

Description

links

Object

Resource link information.

regions

Array of objects

Region information.

Table 4 regions

Parameter

Type

Description

description

String

Description of the region.

parent_region_id

String

Null.

links

Object

Region resource link.

locales

Object

Region name.

id

String

Region ID.

type

String

Region type.

Table 6 regions.locales

Parameter

Type

Description

zh-cn

String

Region name in Chinese.

en-us

String

Region name in English.

pt-br

String

Region name in Portuguese.

es-us

String

Region name in American Spanish.

es-es

String

Region name in Spanish.

Example Request

Request for querying a region list

GET https://iam.myhuaweicloud.eu/v3/regions

Example Response

Status code: 200

The request is successful.

{
    "regions": [
        {
            "parent_region_id": null,
            "description": "",
            "links": {
                "self": "https://iam.myhuaweicloud.eu/v3/regions/eu-west-101"
            },
            "type": "public",
            "id": "eu-west-101",
            "locales": {
                "zh-cn": "EU-Dublin",
                "en-us": "eu-west-101"
            }
        },
        {
            "parent_region_id": null,
            "description": "",
            "links": {
                "self": "https://iam.myhuaweicloud.eu/v3/regions/la-south-2"
            },
            "type": "public",
            "id": "la-south-2",
            "locales": {
                "pt-br": "AL-Santiago",
                "zh-cn": "Region name in Chinese",
                "en-us": "LA-Santiago",
                "es-us": "AL-Santiago de Chile1",
                "es-es": "LA-Santiago"
            }
        }
    ],
    "links": {
        "self": "https://iam.myhuaweicloud.eu/v3/regions",
        "previous": null,
        "next": null
    }
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

404

The requested resource cannot be found.

405

The method specified in the request is not allowed for the requested resource.

413

The request entity is too large.

500

Internal server error.

503

Service unavailable.

Error Codes

None