Querying the RDS Database List
Function
Querying the RDS Database List
URI
GET /v2/{project_id}/audit/databases/rds
|
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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
db_type |
Yes |
String |
Definition Database type. Constraints The value is case-sensitive and can contain only characters in the value range. Range
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 100 ** Default value**: The default value is 100. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition: User token. The token can be queried by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. Constraints: N/A Value range: You can obtain the value by calling the IAM API used to query a user token. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
databases |
Array of databases objects |
RDS database list |
|
total_count |
Integer |
Total number of license files |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID |
|
db_name |
String |
Database name |
|
status |
String |
Instance status.
|
|
port |
String |
Database Port |
|
ip |
String |
Database IP address |
|
instance_name |
String |
RDS instance name |
|
type |
String |
Database type.
|
|
version |
String |
Version |
|
is_supported |
Boolean |
Whether agent-free audit is supported |
|
enterprise_id |
String |
Enterprise project ID |
Status code: 400
|
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. |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error Codes |
|
error_msg |
String |
PDP5 error information |
Status code: 403
|
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. |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error Codes |
|
error_msg |
String |
PDP5 error information |
Status code: 500
|
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. |
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.
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