Updated on 2024-09-30 GMT+08:00

Querying AZ Information

Function

This API is used to query the availability zone (AZ) ID used when you create a cluster.

URI

GET /v1.1/{region_id}/available-zones

Table 1 URI parameters

Parameter

Mandatory

Type

Description

region_id

Yes

String

Explanation

Region ID

Constraints

N/A

Value range

The value can contain 1 to 255 characters.

Default value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

scope

No

String

Explanation

AZ scope.

Constraints

N/A

Value range

  • Center: central AZ
  • Edge: edge AZ

Default value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

available_zones

Array of AvailableZoneV2 objects

Explanation

AZ list. For details about AvailableZoneV2, see Table 4.

default_az_code

String

Explanation

Default AZ code

Value range

N/A

support_physical_az_group

Boolean

Explanation

Whether physical AZ group is supported.

Value range

  • True: Physical availability groups are supported.
  • False: Physical availability groups are not supported.
Table 4 AvailableZoneV2

Parameter

Type

Description

id

String

Explanation

ID

Value range

N/A

az_code

String

Explanation

AZ code.

Value range

N/A

az_name

String

Explanation

AZ name.

Value range

N/A

az_id

String

Explanation

AZ ID.

Value range

N/A

status

String

Explanation

AZ status

Value range

N/A

region_id

String

Explanation

Region ID.

Value range

N/A

az_group_id

String

Explanation

AZ group ID.

Value range

N/A

az_type

String

Explanation

AZ type.

Value range

  • Core
  • Satellite
  • Dedicated
  • Virtual
  • Edge
  • EdgeCental: central and edge

az_tags

AvailableTag object

Explanation

AZ tag. For details about AvailableTag, see Table 5.

Table 5 AvailableTag

Parameter

Type

Description

mode

String

Explanation

Resource mode, which can be dedicated or shared.

Value range

  • dedicated: dedicated AZ.
  • shared: shared AZ.

alias

String

Explanation

Alias of an AZ.

Value range

N/A

public_border_group

String

Explanation

Group to which the AZ belongs. The default value is center.

Value range

N/A

Example Request

None

Example Response

Status code: 200

Query AZ information.

{
  "available_zones" : [ {
    "id" : "xxx",
    "az_code" : "xxx",
    "az_name" : "AZ 1",
    "az_id" : "xxx",
    "status" : "Running",
    "region_id" : "xxx",
    "az_type" : "Dedicated",
    "az_group_id" : "",
    "az_tags" : {
      "mode" : null,
      "alias" : null,
      "public_border_group" : "center"
    }
  }, {
    "id" : "xxx",
    "az_code" : "xxx",
    "az_name" : "AZ 2",
    "az_id" : "xxx",
    "status" : "Running",
    "region_id" : "xxx",
    "az_type" : "Dedicated",
    "az_tags" : {
      "mode" : null,
      "alias" : null,
      "public_border_group" : "center"
    }
  }, {
    "id" : "xxx",
    "az_code" : "xxx",
    "az_name" : "AZ 3",
    "az_id" : "xxx",
    "status" : "Running",
    "region_id" : "xxx",
    "az_type" : "Dedicated",
    "az_tags" : {
      "mode" : null,
      "alias" : null,
      "public_border_group" : "center"
    }
  } ],
  "default_az_code" : "xxx",
  "support_physical_az_group" : true
}

Status Code

See Table 6.

Table 6 Status Code

Status Code

Description

200

AZ information

See Status Codes.

Error Codes

See Error Codes.