Updated on 2025-08-29 GMT+08:00

Querying AZs

Function

This API is used to query all available AZs when you create a load balancer.

Note the following when you create a load balancer:

  • One set of AZs is returned by default. When you create a dedicated load balancer, you can select one or more AZs only in this set.

  • If loadbalancer_id is specified, the set of AZs in the cluster where the load balancer resides is returned.

  • In special scenarios, dedicated load balancers must be created in specific AZs. In the returned one or more sets of AZs, you can select as many AZs as you want as long as the selected AZs are in the same set. For example, if two sets [az1,az2] and [az2,az3] are returned, you can select az1 and az2 or az2 and az3, but cannot select az1 and az3.

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/elb/availability-zones

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Constraints: N/A

Range: The value can contain a maximum of 32 characters, including digits and lowercase letters.

Default value: N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

public_border_group

No

String

Definition: Specifies the public border group.

Constraints: N/A

Range:

  • center: public border group of the central site

  • Edge site name: public border group of an edge site

Default value: N/A

loadbalancer_id

No

String

Definition: Specifies the ID of a load balancer to query the AZs it supports.

Constraints: N/A

Range: N/A

Default value: N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition: Specifies the token used for IAM authentication.

Constraints: N/A

Range: N/A

Default value: N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Definition: Specifies the request ID.

Range: The value is automatically generated, and can contain characters including digits, lowercase letters, and hyphens (-).

availability_zones

Array<Array<AvailabilityZone>>

Definition: Specifies the AZs that are available during load balancer creation. For example, in [az1,az2] and [az2,az3] sets, you can select az1 and az2 or az2 and az3, but cannot select az1 and az3.

Range: N/A

Table 5 AvailabilityZone

Parameter

Type

Description

code

String

Definition: Specifies the AZ code.

Range: N/A

state

String

Definition: Specifies the AZ status.

Range: ACTIVE.

protocol

Array of strings

Definition: Specifies the type of the flavors that is not sold out.

Range: L4 indicates network load balancers are not sold out. L7 indicates application load balancers are not sold out.

public_border_group

String

Definition: Specifies the public border group.

Range:

  • center: public border group of the central site

  • Edge site name: public border group of an edge site

category

Integer

Definition: Specifies the AZ category code. This parameter is used to identify the type of an edge AZ.

Range: 0 (central AZs), 21 (HomeZones AZs), and 41 (edge AZs)

Example Requests

Querying AZs where a load balancer works

GET https://{ELB_Endpoint}/v3/060576782980d5762f9ec014dd2f1148/elb/availability-zones

Example Responses

Status code: 200

Successful request.

{
  "availability_zones" : [ [ {
    "state" : "ACTIVE",
    "code" : "az1",
    "protocol" : [ "L4", "L7" ],
    "public_border_group" : "center",
    "spec_code" : null,
    "category" : 0
  }, {
    "state" : "ACTIVE",
    "code" : "az2",
    "protocol" : [ "L4" ],
    "public_border_group" : "center",
    "spec_code" : null,
    "category" : 0
  }, {
    "state" : "ACTIVE",
    "code" : "az3",
    "protocol" : [ "L7" ],
    "public_border_group" : "center",
    "spec_code" : null,
    "category" : 0
  }, {
    "state" : "ACTIVE",
    "code" : "homezone.az0",
    "protocol" : [ "L4" ],
    "public_border_group" : "homezone.azg",
    "spec_code" : null,
    "category" : 21
  } ] ],
  "request_id" : "0d799435-259e-459f-b2bc-0beee06f6a77"
}

Status Codes

Status Code

Description

200

Successful request.

Error Codes

See Error Codes.