Updated on 2024-03-27 GMT+08:00

Querying Available Node Specifications

Function

This API is used to query available node specifications.

URI

GET /v3/{project_id}/node-type

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details, see Obtaining a Project ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

engine_type

Yes

String

Engine type.

db_use_type

Yes

String

Migration scenario.

  • migration: real-time migration.
  • sync: real-time synchronization.
  • cloudDataGuard: real-time disaster recovery.

Enumerated values:

  • migration
  • sync
  • cloudDataGuard

job_direction

Yes

String

Migration direction. The value can be up (to the cloud), down (out of the cloud), or non-dbs (self-built databases).

Enumerated values:

  • up
  • down
  • non-dbs

is_use_sellout_info

No

Boolean

Whether to check if resources are sold out.

Default value: false

is_multi_write

No

Boolean

Whether dual-active disaster recovery is used.

Default value: false

Request Parameters

Table 3 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

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

node_types

Array of objects

Node specification list.

For details, see Table 5.

Table 5 Data structure description of field node_types

Parameter

Type

Description

node_type

String

Specifications.

is_sellout

Boolean

Whether specifications are sold out.

Example Request

Querying available node specifications

https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/node_type?db_use_type=sync&engine_type=mysql&job_direction=up&is_multi_write=false&is_use_sellout_info=true

Example Response

Status code: 200

OK

{
  "node_types" : [ {
    "is_sellout" : false,
    "node_type" : "micro"
  }, {
    "is_sellout" : false,
    "node_type" : "small"
  }, {
    "is_sellout" : false,
    "node_type" : "medium"
  }, {
    "is_sellout" : false,
    "node_type" : "high"
  }, {
    "is_sellout" : false,
    "node_type" : "xlarge"
  } ]
}

Status code: 400

Bad Request

{
  "error_code" : "DRS.M00202",
  "error_msg" : "The value of job_direction is invalid."
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

For details, see Error Code.