Querying All AZs¶
Function¶
This API is used to query all AZs.
URI¶
URI format
GET /v2/{project_id}/os-availability-zone
Parameter description
Parameter
Mandatory
Description
project_id
Yes
Specifies the project ID.
For details about how to obtain the project ID, see Obtaining a Project ID.
Request¶
Example request
GET https://{endpoint}/v2/{project_id}/os-availability-zone
Response¶
Parameter description
Parameter
Type
Description
availabilityZoneInfo
list
Specifies the list of queried AZs. For details, see Parameters in the availabilityZoneInfo field.
error
Object
Specifies the error message returned when an error occurs. For details, see Parameters in the error field.
Parameters in the availabilityZoneInfo field
Parameter
Type
Description
zoneState
Object
Specifies the status of the AZ. For details, see Parameter in the zoneState field.
zoneName
String
Specifies the AZ name.
Parameter in the zoneState field
Parameter
Type
Description
available
Boolean
Specifies whether the AZ is available.
true: available
false: unavailable
Parameters in the error field
Parameter
Type
Description
message
String
The error message returned if an error occurs.
code
String
The error code returned if an error occurs.
For details about the error code, see Error Codes.
Example response
{ "availabilityZoneInfo": [ { "zoneState": { "available": true }, "zoneName": "az-dc-1" } ] }
or
{ "error": { "message": "XXXX", "code": "XXX" } }
Status Codes¶
Normal
200
Error Codes¶
For details, see Error Codes.