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

Querying Instances in the Recycle Bin

Function

This API is used to query instances in the recycle bin. Before calling this API:

URI

GET /v3/{project_id}/instances/recycle-info

Table 1 URI parameter

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.

Table 2 Query parameters

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

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

To obtain the value, call the 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

Table 4 Response body parameters

Parameter

Type

Description

total_count

String

Total number of records.

instances

Array of RecycleInstanceV3 objects

Instances in the recycle bin.

Table 5 RecycleInstanceV3

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

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

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.