Updated on 2025-11-25 GMT+08:00

Updating the Recycle Bin Policy

Function

This API is used to update the recycle bin policy.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

PUT /v2/{project_id}/recycle

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

retention_days

No

Integer

Definition

Retention days.

Constraints

N/A

Range

1–7

Default Value

N/A

default_use_recycle

No

Boolean

Definition

Whether to use the recycle bin.

Constraints

N/A

Range

  • true: Yes

  • false: No

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

retention_days

Integer

Definition

Retention days.

Range

1–7

default_use_recycle

Boolean

Definition

Whether to use the recycle bin.

Range

  • true: Yes

  • false: No

recycle_instances

Array of InstanceRecycleInfo objects

Definition

Recycled instance list.

Table 4 InstanceRecycleInfo

Parameter

Type

Description

instance_id

String

Definition

Instance ID.

Range

N/A

status

String

Definition

Instance status.

Range

For details, see Instance Status.

name

String

Definition

Instance name.

Range

N/A

engine

String

Definition

Message engine.

Range

rabbitmq: RabbitMQ message engine.

in_recycle_time

String

Definition

Recycle time.

Range

N/A

save_time

Integer

Definition

Retention period.

Range

1–7

auto_delete_time

String

Definition

Automatic deletion time.

Range

N/A

cost_per_hour

Double

Definition

Hourly fee.

Range

N/A

error_message

String

Definition

Error message.

Range

N/A

product_id

String

Definition

Product ID.

Range

N/A

Example Requests

PUT https://{endpoint}/v2/{project_id}/recycle

{
  "retention_days" : "2,",
  "default_use_recycle" : true
}

Example Responses

Status code: 200

{
  "retention_days" : "2,",
  "default_use_recycle" : "true,",
  "recycle_instances" : null
}

Status Codes

Status Code

Description

200

Recycle bin instance list queried.

Error Codes

See Error Codes.