Updated on 2024-11-01 GMT+08:00

Querying the RDS Database List

Function

This API is used to query the RDS database list.

Calling Method

For details, see Calling APIs.

URI

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

Table 1 URI parameter

Parameter

Mandatory

Parameter Type

Description

project_id

Yes

String

Project ID.

Table 2 Query parameters

Parameter

Mandatory

Parameter Type

Description

db_type

Yes

String

Database Type

  • MYSQL
  • ORACLE
  • POSTGRESQL
  • SQLSERVER
  • DAMENG
  • TAURUS
  • DWS
  • KINGBASE
  • MARIADB
  • GAUSSDBOPENGAUSS

offset

No

String

Offset. The query starts after the first data record offsets the number of data records. The default value is 0.

limit

No

String

Number of query records. The default value of this parameter is 100.

Request Parameter

Table 3 Request header parameter

Parameter

Mandatory

Parameter Type

Description

X-Auth-Token

Yes

String

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.)

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Parameter Type

Description

databases

Array of databases objects

RDS database list

total_count

Integer

Total number

Table 5 databases

Parameter

Parameter Type

Description

id

String

ID

db_name

String

Database Name

status

String

DB 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 the active/standby deployment.
  • 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 of the instance is being changed.
  • STORAGE FULL: The instance storage space is full.

port

String

Database port

ip

String

Database IP address

instance_name

String

RDS instance name

type

String

Type

  • MYSQL
  • ORACLE
  • POSTGRESQL
  • SQLSERVER
  • DAMENG
  • TAURUS
  • DWS
  • KINGBASE
  • MARIADB
  • GAUSSDBOPENGAUSS

version

String

Edition

is_supported

Boolean

Whether agent-free audit is supported

enterprise_id

String

Enterprise project ID.

Status code: 400

Table 6 Response body parameters

Parameter

Parameter Type

Description

error

Object

Error message.

Table 7 ErrorDetail

Parameter

Parameter Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 403

Table 8 Response body parameters

Parameter

Parameter Type

Description

error

Object

Error message.

Table 9 ErrorDetail

Parameter

Parameter Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 10 Response body parameter

Parameter

Parameter Type

Description

error

Object

Error message.

Table 11 ErrorDetail

Parameter

Parameter Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Request

None

Example Response

Status code: 200

Succeeded

{
  "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 code: 400

Request Parameter Error

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status code: 500

Internal server error.

{
  "error" : {
    "error_code" : "DBSS.XXXX",
    "error_msg" : "XXX"
  }
}

Status Code

Status Code

Description

200

Success

400

Incorrect request parameter.

403

Authentication failed.

500

Internal server error.

Error Codes

For details, see Error Codes.