Exporting Top Risky Instances
Function
This API is used to export top risky instances. You can view data in the last 24 hours.
URI
GET /v3/{project_id}/instances/top-risk
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: The value can contain 32 characters. Only letters and digits are allowed. Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
start_at |
Yes |
Long |
Explanation: Start time Constraints: Unix timestamp, in milliseconds Values: [0, 2^31-1]. The actual value depends on the query result. Default value: N/A |
|
end_at |
Yes |
Long |
Explanation: End time Constraints: Unix timestamp, in milliseconds Values: [0, 2^31-1]. The actual value depends on the query result. Default value: N/A |
|
datastore_type |
Yes |
String |
Explanation: Database type Constraints: N/A Values:
Default value: N/A |
|
num |
No |
Integer |
Explanation: Returned top risky instances Constraints: N/A Values: [0, 2^31-1]. The actual value depends on the query result. Default value: N/A |
|
metric_code |
No |
String |
Explanation: Metric code Constraints: N/A Values: N/A Default value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
top_risk_info |
Array of Table 4 objects |
Explanation: Risky instances Values: N/A |
|
total_count |
Integer |
Explanation: Total number Values: [0, 2^31-1] |
|
Parameter |
Type |
Description |
|---|---|---|
|
instance_id |
String |
Explanation: Instance ID Values: N/A |
|
instance_name |
String |
Explanation: Instance name Values: N/A |
|
node_id |
String |
Explanation: Node ID Values: N/A |
|
metric_names |
Array of strings |
Explanation: Metric name Values: N/A |
|
metric_values |
Array of double |
Explanation: Metric value (%) Values: [0%, 100%] |
Example Request
Exporting top risky instances
"GET https://das.cn-north-1.myhuaweicloud.com/v3/054c630ff780d4cc2f40c00d7f6fb21d/instances/top-risk"
Example Response
Status code: 200
Successful request
{ "top_risk_info": [
{
"instance_id": "bcfa975193f1402fa11a6d4fd6baf5fbin01",
"instance_name" : "rds-sql-Do not delete 1",
"node_id": "1a6bf163753d4c9b925b7d402c001a2eno01",
"metric_names": [],
"metric_values": []
},
{
"instance_id": "3d180b532b6146eb91ec48ba4267b765in01",
"instance_name": "rds-acc1",
"node_id": "fd340a4c1d9046ffb5c7e8c2b939e34ano01",
"metric_names": [],
"metric_values": []
}
],
"total_count": 2
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response body for exporting all query logs |
|
400 |
Client error |
|
500 |
Server 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