Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
33 KiB
Querying Instances in the Recycle Bin
Function
This API is used to query instances in the recycle bin.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Specifies the project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
offset
Yes
Index offset. The query starts from the next piece of data indexed by this parameter.
The value must be a non-negative number.
limit
Yes
Number of records on each page.
Value range: [1, 50]
Request
- Parameter description
Table 2 Request header parameters Parameter
Mandatory
Type
Description
X-Auth-Token
Yes
String
Specifies the user token.
The user token is a response to the API used to obtain a user token.
- URI example
GET https://rds.eu-de.otc.t-systems.com/v3/054ea741f700d4a32f1bc00f5c80dd4c/recycle-instances?offset=0&limit=10
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
total_count
Integer
Number of data records in the recycle bin.
instances
Array of objects
Instance information. For details, see Table 4.
Table 4 instances field data structure description Parameter
Type
Description
id
String
Instance ID.
name
String
Instance name.
ha_mode
String
Instance type. The value is case-insensitive.
Enumerated values:
- Single: single-node instance
- Ha: primary/standby instance
engine_name
String
DB engine name.
engine_version
String
DB engine version.
pay_model
String
Billing mode.
0: pay-per-use billing
created_at
String
Creation time. The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.
deleted_at
String
Deletion time.
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.
volume_type
String
Storage type.
- SSD: cloud SSD storage. This storage type is supported only with general-purpose and dedicated instances.
- ESSD: Extreme SSD storage.
volume_size
Integer
Storage space.
40–4000, in GB. The value must be a multiple of 10.
data_vip
String
Floating IP address.
data_vip_v6
String
Private IPv6 address.
enterprise_project_id
String
Enterprise project ID.
retained_until
String
Time until which the instance can be retained.
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.
recycle_backup_id
String
Backup ID.
recycle_status
String
Backup status.
Enumerated values:
- BUILDING: The instance is being backed up and cannot be rebuilt.
- COMPLETED: The backup is complete and the instance can be rebuilt.
recycle_backups
Array of objects
Backups used for restoration. For details, see Table 5.
is_serverless
Boolean
Instance type.
- true: serverless
- false: non-serverless
Table 5 recycle_backups field data structure description Parameter
Type
Description
backup_id
String
Backup ID.
backup_name
String
Backup name.
backup_status
String
Backup status.
- BUILDING: backup in progress
- COMPLETED: backup completed
- FAILED: backup failed
backup_create_at
String
Backup creation time.
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.
backup_update_at
String
Backup end time.
The value is in the "yyyy-mm-ddThh:mm:ssZ" format.
T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100.
backup_size
Integer
Backup size, in MB.
- Example normal response
{ "total_count": 1, "instances": [ { "id": "f55da7ba462f414da2f9505fda3562b9in01", "name": "mysql_57_ha_test3", "ha_mode": "Ha", "engine_name": "mysql", "engine_version": "5.7.44", "pay_model": "0", "created_at": "2025-09-02T09:04:06+0000", "deleted_at": "2025-09-03T10:06:33+0000", "volume_type": "SSD", "volume_size": 40, "data_vip": "172.168.235.59", "enterprise_project_id": "0", "retained_until": "2025-09-10T10:07:05+0000", "recycle_backup_id": "37a3d791431045a782d72496d384150abr01", "recycle_status": "COMPLETED", "recycle_backups": [ { "backup_id": "37a3d791431045a782d72496d384150abr01", "backup_name": "mysql-f55da7ba462f414da2f9505fda3562b9in01-20250903100705426", "backup_status": "COMPLETED", "backup_create_at": "2025-09-03T10:07:05+0000", "backup_update_at": "2025-09-03T10:08:20+0000", "backup_size": 3600 } ], "is_serverless": false } ] }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.