Modifying the Recycling Policy
Function
This API is used to change a retention period for deleted instances. The new retention period is available to only those instances deleted after the change, but not to the instances already moved to the recycle bin before the change.
Constraints
The retention period for deleted instances can be 1 to 7 days.
URI
PUT /v3/{project_id}/instances/recycle-policy
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        Yes  | 
      
        String  | 
      
        Explanation: Project ID of a user in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: N/A Default value: N/A  | 
     
Request Parameters
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        X-Auth-Token  | 
      
        Yes  | 
      
        String  | 
      
        Explanation: User token You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints: N/A Values: N/A Default value: N/A  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        recycle_policy  | 
      
        Yes  | 
      
        object  | 
      
        Explanation: Recycling policy. For details, see Table 4. Constraints: N/A Values: N/A Default value: N/A  | 
     
Response Parameters
Status code: 200
No response parameters
Example Request
- URI example
    
PUT https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/recycle-policy
 - Setting the retention period of instances in the recycle bin to 3 days
    
{ "recycle_policy": { "retention_period_in_days": 3 } } 
Example Response
None
Status Codes
For details, see Status Codes.
Error Codes
For details, 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