Creating an Instance Diagnosis Task
Function
This API is used to diagnose a specific DCS instance.
URI
POST /v2/{project_id}/instances/{instance_id}/diagnosis
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
instance_id |
Yes |
String |
Definition Instance ID. It can be viewed on the instance details page on the DCS console. Constraints N/A Range N/A Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
begin_time |
Yes |
String |
Definition Diagnosis start time. The value is a UNIX timestamp, in milliseconds. Constraints N/A Range N/A Default Value N/A |
|
end_time |
Yes |
String |
Definition Diagnosis end time. The value is a UNIX timestamp, in milliseconds. Constraints N/A Range N/A Default Value N/A |
|
node_ip_list |
No |
Array of strings |
Definition IP addresses of diagnosed nodes. By default, all nodes are diagnosed. Query methods for an instance that is not the read/write splitting type.:
For read/write splitting instances, call the API used to query shard information. Constraints N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
report_id |
String |
Definition Report ID. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Definition Error information. Range N/A |
|
error_code |
String |
Definition Error code. Range For details, see Error Codes. |
|
error_ext_msg |
String |
Definition Extended error information. This parameter is not used currently and is set to null. Range N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Definition Error information. Range N/A |
|
error_code |
String |
Definition Error code. Range For details, see Error Codes. |
|
error_ext_msg |
String |
Definition Extended error information. This parameter is not used currently and is set to null. Range N/A |
Example Requests
Creating an instance diagnosis task and setting the diagnosis start time and end time and the IP address of the node to be diagnosed
POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/diagnosis
{
"begin_time" : 1618466522486,
"end_time" : 1618467122486,
"node_ip_list" : [ "192.168.0.111" ]
}
Example Responses
Status code: 200
The diagnosis task is successfully delivered.
{
"report_id" : "716c9cca-8ce2-4a89-b3db-7cee209d6379"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The diagnosis task is successfully delivered. |
|
400 |
Invalid request. |
|
500 |
Internal service error. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot