Updating the Recycle Bin Policy
Function
This API is used to update the recycle bin policy.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{project_id}/recycle
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request 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
Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
retention_days |
Integer |
Definition Retention days. Range 1–7 |
|
default_use_recycle |
Boolean |
Definition Whether to use the recycle bin. Range
|
|
recycle_instances |
Array of InstanceRecycleInfo objects |
Definition Recycled instance list. |
|
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
|
|
in_recycle_time |
Long |
Definition Recycle time. Range N/A |
|
save_time |
Integer |
Definition Retention period. Range 1–7 |
|
auto_delete_time |
Long |
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
Updating the recycle bin policy
PUT https://{endpoint}/v2/{project_id}/recycle
{
"retention_days" : "2,",
"default_use_recycle" : true
}
Example Responses
Status code: 200
Recycle bin instance list queried.
{
"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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot