Querying Instances in the Recycle Bin
Function
This API is used to query instances in the recycle bin. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/recycle-info
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Number of records to be queried. The default value is 10. The value must be a positive integer. The minimum value is 1 and the maximum value is 100. |
offset |
No |
Integer |
Index offset. If offset is set to N, the 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. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. |
Content-Type |
Yes |
String |
Content type. Value: application/json |
X-Language |
No |
String |
Language. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
String |
Total number of records. |
instances |
Array of RecycleInstanceV3 objects |
Instances in the recycle bin. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Instance ID. |
name |
String |
Instance name. |
ha_mode |
String |
Instance type. |
engine_name |
String |
Engine name. |
engine_version |
String |
Engine version. |
pay_model |
String |
Billing mode. |
create_at |
Integer |
Creation time. |
deleted_at |
Integer |
Deletion time. |
volume_type |
String |
Storage type. |
volume_size |
String |
Storage space. |
data_vip |
String |
Virtual IP address of the data plane. |
data_vip_ipv6 |
String |
IPv6 address of the data plane. |
enterprise_project_id |
String |
Enterprise project ID. |
enterprise_project_name |
String |
Enterprise project name. |
backup_level |
String |
Backup level. |
recycle_backup_id |
String |
Backup ID. |
recycle_status |
String |
Recycling status. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying instances in the recycle bin
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/recycle-info
Example Response
Status code: 200
Success.
{ "total_count" : 2, "instances" : [ { "id" : "090e539b45e047ee9cc17750b321ef7ein07", "name" : "gauss-dd-single", "ha_mode" : "StandSingle", "engine_name" : "taurus", "engine_version" : "2.0.51.240300", "pay_model" : "0", "create_at" : 1712656933705, "deleted_at" : 1712659228276, "volume_type" : "", "volume_size" : "0", "data_vip" : "172.16.1.234", "data_vip_ipv6" : null, "enterprise_project_id" : "0", "enterprise_project_name" : "default", "backup_level" : "2", "recycle_backup_id" : "c62e218ccd6c49098baa925453c65e29br07", "recycle_status" : "Active" }, { "id" : "632423cc56c348bd967b3a03e7abdab9in07", "name" : "gauss-dd-single", "ha_mode" : "StandSingle", "engine_name" : "taurus", "engine_version" : "2.0.51.240300", "pay_model" : "0", "create_at" : 1712658210524, "deleted_at" : 1712659158927, "volume_type" : "", "volume_size" : "0", "data_vip" : "172.16.1.194", "data_vip_ipv6" : null, "enterprise_project_id" : "0", "enterprise_project_name" : "default", "backup_level" : "2", "recycle_backup_id" : "70d03dc459304f7298c0f5b49286f37cbr07", "recycle_status" : "Active" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.