Updated on 2026-01-20 GMT+08:00

Exporting Top Risky Instances

Function

This API is used to export top risky instances. You can view data in the last 24 hours.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    das::showCloudDBAInfo

    Read

    -

    -

    -

    -

URI

GET /v3/{project_id}/instances/top-risk

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters, including only letters and digits.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

start_at

Yes

Long

Definition

Start time

Constraints

Unix timestamp, in milliseconds

Range

[0, 2^31-1]. The actual value depends on the query result.

Default Value

N/A

end_at

Yes

Long

Definition

End time

Constraints

Unix timestamp, in milliseconds

Range

[0, 2^31-1]. The actual value depends on the query result.

Default Value

N/A

datastore_type

Yes

String

Definition

Database type

Constraints

N/A

Range

  • MySQL
  • TaurusDB
  • PostgreSQL
  • Microsoft SQL Server

Default Value

N/A

num

No

Integer

Definition

Returned top risky instances

Constraints

N/A

Range

[0, 2^31-1]. The actual value depends on the query result.

Default Value

N/A

metric_code

No

String

Definition

Metric code

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

top_risk_info

Array of Table 4 objects

Definition

Risky instances

Range

N/A

total_count

Integer

Definition

Total number

Range

[0, 2^31-1]

Table 4 top_risk_info

Parameter

Type

Description

instance_id

String

Definition

Instance ID

Range

N/A

instance_name

String

Definition

Instance name

Range

N/A

node_id

String

Definition

Node ID

Range

N/A

metric_names

Array of strings

Definition

Metric name

Range

N/A

metric_values

Array of double

Definition

Metric value (%)

Range

[0%, 100%]

Example Requests

Exporting top risky instances

"GET https://das.cn-north-1.myhuaweicloud.com/v3/054c630ff780d4cc2f40c00d7f6fb21d/instances/top-risk"

Example Responses

Status code: 200

Successful response

{  "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.