Updated on 2025-12-10 GMT+08:00

Listing AZs

Function

This API is used to list AZs.

Debugging

You can debug this API in API Explorer.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.
  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permissions listed below are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

ecs:cloudServers:listServersDetails

list

-

g:EnterpriseProjectId

ecs:cloudServers:list

-

URI

GET /v1/{project_id}/availability-zones

Table 1 describes the parameters in the URI.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the ID, see Obtaining a Project ID.

Request

None

Response

Table 2 describes the response parameters.

Table 2 Response parameters

Parameter

Type

Description

availability_zones

Array of objects

Specifies the AZ information list.

For details, see Table 3.

Table 3 availability_zones parameters

Parameter

Type

Description

availability_zone_id

String

Specifies the AZ ID.

type

String

Specifies the AZ type.

  • Center: central cloud
  • Edge: edge cloud

mode

String

Specifies the AZ mode.

  • dedicated: dedicated AZ
  • shared: shared AZ

public_border_group

String

Specifies the public network border group, which identifies the EIP type and is used to search for EIP resource pools available for an AZ.

alias

String

Specifies the AZ alias.

az_group_ids

Array of strings

Specifies the list of AZ groups that each AZ belongs to.

category

Integer

Specifies the subtype of an AZ type. The values and their mappings are as follows:

0: default

21: HomeZone

41: IES

This field is used to distinguish the type of an edge AZ. The value 0 is the default value and has no specific meaning.

Example Request

GET https://{endpoint}/v1/{project_id}/availability-zones

Example Response

{ 
     "availability_zones": [ 
         { 
             "availability_zone_id": "br-iaas-test1a", 
             "type": "Edge", 
             "mode": "dedicated", 
             "alias": "IES_test", 
             "public_border_group": "br-iaas-test1a",
             "az_group_ids": [
                  "br-iaas-test1a"
             ],
             "category": 21
         } 
     ] 
 }

Returned Values

For details, see Returned Values for General Requests.

Error Codes

For details, see Error Codes.