Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
20 KiB
Querying Available Node Specifications
Function
This API is used to query available node specifications.
URI
GET /v3/{project_id}/node-type
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
engine_type |
Yes |
String |
Engine type of a DRS task. Values:
|
db_use_type |
Yes |
String |
Migration scenario. Values:
|
job_direction |
Yes |
String |
Migration direction. Values:
|
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
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Content-Type |
No |
String |
The content type. The default value is application/json. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
node_types |
Array of objects |
Node specification list. For details, see Table 5. |
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.