Updated on 2024-08-23 GMT+08:00

Querying AZs in Which Flavors Are Not Sold Out

Function

This API is used to query AZs where flavors are not sold out.

URI

POST /v3/{project_id}/available-zone

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

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

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

The content type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

X-Language

No

String

Request language type.

Default value: en-us

Enumerated values:

  • en-us
  • zh-cn
Table 3 Request body parameters

Parameter

Mandatory

Type

Description

engine_type

Yes

String

Engine type of a DRS task.

db_use_type

Yes

String

The migration scenario. The value can be migration (real-time migration), sync (real-time synchronization), or cloudDataGuard (real-time disaster recovery).

Enumerated values:

  • migration
  • sync
  • cloudDataGuard

job_direction

Yes

String

Task direction.

Values:

  • up: to-the-cloud scenarios and the current cloud is the standby cloud in the DR.
  • down: out-of-cloud scenarios and the current cloud is the active cloud in the DR.
  • non-dbs: self-built databases.

node_type

Yes

String

Flavor type.

multi_write

No

String

Whether the DR mode is dual-active. If this parameter is left blank, the default value is false.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

az_infos

Array of objects

AZ information.

For details, see Table 5.

Table 5 Data structure description of field az_infos

Parameter

Type

Description

code

String

AZ ID.

name

String

AZ name.

status

String

AZ status.

Example Request

Example of querying AZs for MySQL synchronization

https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/available-zone

{
  "engine_type" : "mysql",
  "db_use_type" : "sync",
  "job_direction" : "up",
  "node_type" : "medium"
}

Example Response

Status code: 200

OK

{
  "az_infos" : [ {
    "code" : "az1xahz",
    "name" : "az1xahz",
    "status" : "DISABLED"
  }, {
    "code" : "az2xahz",
    "name" : "az2",
    "status" : "ENABLED"
  }, {
    "code" : "az3xahz",
    "name" : "az3",
    "status" : "ENABLED"
  }, {
    "code" : "az4xahz",
    "name" : "az4",
    "status" : "ENABLED"
  } ]
}

Status Code

Status Code

Description

200

OK

Error Code

For details, see Error Code.