Viewing the Instance List on the Intelligent O&M Page
Function
This API is used to view the instance list on the Intelligent O&M page.
URI
GET /v3/{project_id}/instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. To obtain the value, see Obtaining a Project ID. Minimum length: 1 character Maximum length: 1024 characters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
datastore_type |
Yes |
String |
Database type, which can be |
offset |
No |
Integer |
Offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value must be a number but cannot be a negative number. Minimum value: 0 Maximum value: 5000 |
limit |
No |
Integer |
Number of records displayed on each page. The default value is 20, and the maximum value is 200. Minimum value: 0 Maximum value: 200 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token |
X-Language |
No |
String |
Language Enumerated values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
instance_list |
Array of Table 5 |
Instance list Array length: 0 to 200 characters |
total_count |
Integer |
Total number of records Minimum value: 0 Maximum value: 10000 |
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Instance ID Minimum length: 1 character Maximum length: 64 characters |
instance_name |
String |
Instance name Minimum length: 1 character Maximum length: 64 characters |
instance_status |
String |
Instance status Minimum length: 1 character Maximum length: 16 characters |
version |
String |
Instance version |
engine_type |
String |
Engine type Minimum length: 0 character Maximum length: 64 characters |
ip |
String |
ip Minimum length: 0 character Maximum length: 128 characters |
port |
Integer |
Port number Minimum value: 0 Maximum value: 65535 |
cpu |
Integer |
Number of CPU cores of an instance |
mem |
Integer |
Instance memory size |
login_flag |
Boolean |
Whether instance login is enabled |
slow_sql_flag |
Boolean |
Whether Collect Slow Query Logs is enabled |
deadlock_flag |
Boolean |
Whether deadlock analysis is enabled |
lock_blocking_flag |
Boolean |
Whether the blocking mode is enabled |
charge_flag |
Boolean |
Whether the current instance is billed |
full_sql_flag |
Boolean |
Whether Collect All SQL Statements is enabled |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code Minimum length: 8 characters Maximum length: 36 characters |
error_msg |
String |
Error message Minimum length: 2 characters Maximum length: 512 characters |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code Minimum length: 8 characters Maximum length: 36 characters |
error_msg |
String |
Error message Minimum length: 2 characters Maximum length: 512 characters |
Example Request
Viewing the instance list on the Intelligent O&M page
GET https://das.cn-north-1.myhuaweicloud.com/v3/054c630ff780d4cc2f40c00d7f6fb21d/instances
Example Response
{ "instance_list" : [ { "instance_id" : "bcfa975193f1402fa11a6d4fd6baf5fbin01", "instance_name" : "rds-sql", "instance_status" : "ACTIVE", "version" : 5.7, "ip" : "192.168.0.84", "port" : 3306, "cpu" : 2, "mem" : 8, "login_flag" : true, "slow_sql_flag" : true, "deadlock_flag" : false, "lock_blocking_flag" : false, "charge_flag" : true, "full_sql_flag" : true } ], "total_count" : 2 }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
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