Setting the Recycle Bin Policy
API Description
This API is used to set the recycle bin policy for an instance.
URI
- URI format
PUT https://{Endpoint}/v3/{project_id}/instances/recycle-policy
- URI example
https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/recycle-policy
Table 1 Request parameters Name
Mandatory
Type
Description
X-Auth-Token
Yes
String
Definition
User token obtained from IAM. For details, see Authentication.
Constraints
N/A
Range
N/A
Default Value
N/A
project_id
Yes
String
Definition
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Request Parameters
- Parameter description
Table 2 Request body parameters Name
Mandatory
Type
Description
recycle_policy
Yes
Object
Definition
Instance recycling policy. For details, see Table 3.
Constraints
N/A
Range
N/A
Default Value
N/A
Table 3 RecyclePolicy Name
Mandatory
Type
Description
enabled
Yes
Boolean
Definition
Whether to enable the recycling policy.
Constraints
This parameter cannot be disabled.
Range
true: Enable the recycling policy.
Default Value
true: Enable the recycling policy.
retention_period_in_days
No
Integer
Definition
Policy retention duration (1 to 7 days). The value is a positive integer. If this parameter is left blank, the policy is retained for 7 days by default.
Constraints
The value must be a positive integer.
Range
1–7
Default Value
7
Example Request
PUT https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/recycle-policy { "recycle_policy" : { "enabled" : true, "retention_period_in_days" : 3 } }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
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