Updated on 2025-09-10 GMT+08:00

Querying the RDS Database List

Function

Querying the RDS Database List

URI

GET /v2/{project_id}/audit/databases/rds

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. You can obtain the value by calling the IAM API for querying the project list of a specified IAM user.

Constraints

N/A

Range:

The value is subject to the return value of the IAM service interface. The value contains 32 to 64 characters.

Default Value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

db_type

Yes

String

Definition:

Applicable Database

** Restrictions**:

The value is case sensitive. Only values within the value range can be transferred.

Range:

  • MYSQL

  • ORACLE

  • POSTGRESQL

  • SQLSERVER

  • DAMENG

  • TAURUS

  • DWS

  • KINGBASE

  • MARIADB

  • GAUSSDBOPENGAUSS

** Default value**:

N/A

offset

No

String

Definition:

Pagination offset. The query starts from the next piece of data indexed by this parameter.

Constraints

Only integers greater than or equal to 0 are supported.

Range:

Greater than or equal to 0

Default Value:

The default value is 0.

limit

No

String

Definition:

Number of records queried on each page.

** Restrictions**:

Only integers greater than 0 are supported.

Range:

Greater than 0 and less than or equal to 10000

** Default value**:

The default value is 100.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.)

Constraints

N/A

Range:

The value is subject to the user token query interface of the IAM service.

Default Value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

databases

Array of databases objects

RDS database list

total_count

Integer

Total number of license files

Table 5 databases

Parameter

Type

Description

id

String

ID

db_name

String

Database name

status

String

Instance status.

  • BUILD: The instance is being created.

  • ACTIVE: The instance is normal.

  • FAILED: The instance is abnormal.

  • FROZEN: The instance is frozen.

  • MODIFYING: The instance is being scaled out.

  • REBOOTING: The instance is being restarted.

  • RESTORING: The instance is being restored.

  • MODIFYING INSTANCE TYPE: The instance is changing to primary/standby.

  • SWITCHOVER: A primary/standby switchover is being performed.

  • MIGRATING: The instance is being migrated.

  • BACKING UP: The instance is being backed up.

  • MODIFYING DATABASE PORT: The database port is being changed for the instance.

  • STORAGE FULL: The instance disk space is full.

port

String

Database Port

ip

String

Database IP address

instance_name

String

RDS instance name

type

String

Applicable Database

  • MYSQL

  • ORACLE

  • POSTGRESQL

  • SQLSERVER

  • DAMENG

  • TAURUS

  • DWS

  • KINGBASE

  • MARIADB

  • GAUSSDBOPENGAUSS

version

String

Version

is_supported

Boolean

Whether agent-free audit is supported

enterprise_id

String

Enterprise project ID

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 7 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 9 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 11 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Example Requests

/v2/{project_id}/audit/databases/rds?db_type=MYSQL&offset=0&limit=10

Example Responses

Status code: 200

Success

{
  "databases" : [ {
    "id" : "5a5c4ca8b10f4b00bc88e03866fe3fd4in01",
    "db_name" : "rds-cwx1216198",
    "status" : "ACTIVE",
    "port" : "3306",
    "ip" : "192.168.0.159",
    "instance_name" : "rds-cwx1216198",
    "type" : "MySQL",
    "version" : "5.7",
    "is_supported" : null,
    "enterprise_id" : "0"
  }, {
    "id" : "3f1cfaac552e42f1bb9855993586076cin01",
    "db_name" : "rds-5c25",
    "status" : "FROZEN",
    "port" : "3306",
    "ip" : "192.168.0.14",
    "instance_name" : "rds-5c25",
    "type" : "MySQL",
    "version" : "5.7",
    "is_supported" : null,
    "enterprise_id" : "0"
  } ],
  "total_count" : 2
}

Status Codes

Status Code

Description

200

Success

400

Incorrect request parameter.

403

Authorization failed.

500

Internal server error.

Error Codes

See Error Codes.