Updated on 2023-11-21 GMT+08:00

Querying Instances in the Recycle Bin

Function

This API is used to query all instances in the recycle bin.

URI

GET https://{Endpoint}/v3/{project_id}/recycle-instances

Table 1 Path parameters

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

offset

No

Integer

Index offset.

  • If offset is set to N, the resource query starts from the N+1 piece of data. If action is set to filter, offset is 0 by default, indicating that the query starts from the first piece of data.
  • The value must be a positive integer.

limit

No

Integer

Maximum records to be queried.

  • The value ranges from 1 to 100.
  • If this parameter is not transferred, the first 100 records are queried by default.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Total number of records.

instances

Array of objects

Instance information. For details, see Table 5.

Table 5 RecycleInstance

Parameter

Type

Description

id

String

Instance ID.

name

String

Instance name.

mode

String

Instance type. The value can be:

  • Cluster, indicating that the instance is a GeminiDB Cassandra, GeminiDB Influx, or GeminiDB Redis replica set instance.
  • InfluxdbSingle, indicating that the instance is a single-node GeminiDB Influx instance.
  • ReplicaSet, indicating that the instance is a GeminiDB Mongo replica set instance.

datastore

object

Database information For details, see Table 6.

charge_mode

String

Billing mode. Options:

  • prePaid: indicates that the billing mode is yearly/monthly.
  • postPaid: indicates that the billing mode is pay-per-use.

enterprise_project_id

String

Enterprise project ID. The value 0 indicates that the default enterprise project is used.

backup_id

String

Backup ID.

created_at

String

Instance creation time.

deleted_at

String

Instance deletion time.

retained_until

String

Retention end time.

Table 6 RecycleDatastore

Parameter

Type

Description

type

String

Database type. The value can be:

  • cassandra, indicating that target instances are of the GeminiDB Cassandra type.
  • mongodb, indicating that target instances are of the GeminiDB Mongo type.
  • influxdb, indicating that target instances are of the GeminiDB Influx type.
  • redis, indicating that target instances are of the GeminiDB Redis type.

version

String

Database version. The value can be:

Example Requests

  • URI example
    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/recycle-instances?offset=0&limit=100
  • Example request body

    None

Example Responses

Status code: 200

Success

{ 
  "total_count" : 1, 
  "instances" : [ { 
    "id" : "07fc12a8e0e94df7a3fcf53d0b5e1605in06", 
    "name" : "test", 
    "mode" : "Cluster", 
    "datastore" : { 
      "type" : "cassandra", 
      "version" : "3.11" 
    }, 
    "charge_mode" : "postPaid", 
    "enterprise_project_id" : "0", 
    "backup_id" : "bf9ee62a7f7044c583c6765c916c36edbr02", 
    "created_at" : "2022-01-01T10:00:00", 
    "deleted_at" : "2022-02-01T11:00:00", 
    "retained_until" : "2022-02-02T11:00:00" 
  } ] 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.