Help Center/ Enterprise Switch/ API Reference/ Enterprise Switch/ Querying the AZs of an Enterprise Switch
Updated on 2025-12-04 GMT+08:00

Querying the AZs of an Enterprise Switch

Function

This API is used to obtain the list of AZs where the active and standby nodes of the enterprise switch can be created.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

esw:availabilityZone:list

List

-

-

-

-

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

  • Definition: ID of the project to which the enterprise switch belongs.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

availability_zones

Array of strings

  • Definition: Response body for querying AZs.

  • Constraints: N/A

  • Range: N/A

  • Default value: N/A

request_id

String

  • Definition: Unique request ID.

  • Constraints: The value is in the UUID format.

  • Range: N/A

  • Default value: N/A

Example Requests

GET https://{{endpoint}}/v3/060576782980d5762f9ec014dd2f1148/l2cg/availability-zones

Example Responses

Status code: 200

The GET operation is successful. For more status codes, see Status Codes.

{
  "availability_zones" : [ "az1", "az2" ],
  "request_id" : "0bbb314411921a8378671558c4e08f5b"
}

Status Codes

Status Code

Description

200

The GET operation is successful. For more status codes, see Status Codes.

Error Codes

See Error Codes.