• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. OpenStack Cinder API v2
  5. EVS Disk
  6. Querying All AZs

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.

Request

None

Response

  • Parameter description

    Parameter

    Type

    Description

    availabilityZoneInfo

    list

    Specifies the list of queried AZs. For details, see Parameters in the availabilityZoneInfo field.

    error

    string

    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

    map<string, string>

    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

    Specifies the error message returned when an error occurs.

    code

    string

    Specifies the error code returned when an error occurs.

    For details about the error code, see Error Codes.

  • Example response
    {
        "availabilityZoneInfo": [
            {
                "zoneState": {
                    "available": true
                }, 
                "zoneName": "az1.dc1"
            }
        ]
    }

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Returned Values

  • Normal

    200

Error Codes

For details, see Error Codes.