Updated on 2022-08-12 GMT+08:00

Querying AZ Information

Function

This API is used to query the AZ ID.

URI

GET /v1.0/availableZones

Request

Request parameters

None.

Example request

None.

Response

Response parameters

Table 1 and Table 2 describe the parameters.

Table 1 Response parameters

Parameter

Type

Description

region_id

String

Region ID.

available_zones

Array

Array of AZs. For details, see Table 2.

Table 2 available_zones parameter description

Parameter

Type

Description

soldOut

Boolean

Whether resources are sold out.

id

String

AZ ID.

code

String

AZ code.

name

String

AZ name.

port

String

AZ port.

resource_availability

String

Whether the AZ has available resources.

  • true: The AZ has available resources.
  • false: Resources of the AZ have been sold out.

Example response

{  
    regionId: "XXXX",  
    available_zones:[  
       {  
            "id":"1d7b939b382c4c3bb3481a8ca10da768",  
            "name":"az10.dc1",  
            "code":"az10.dc1",  
            "port":"8002", 
            "resource_availability": "true" 
        },    
        {  
            "id":"1d7b939b382c4c3bb3481a8ca10da769",  
            "name":"az10.dc2",  
            "code":"az10.dc2",  
            "port":"8002", 
            "resource_availability": "true" 
        }  
    ]  
}

Status Code

Table 3 describes the status code of successful operations. For details about other status codes, see Status Code.

Table 3 Status code

Status Code

Description

200

The AZ information is successfully queried.