Modifying a Backup Policy
Function
This API is used to modify a backup policy.
URI
Request
- Parameter description
Parameter
Mandatory
Type
Description
backup_policy_name
No
string
Backup policy name
The name is a string of 1 to 64 characters consisting of letters, digits, underscores (_), and hyphens (-). It cannot start with default.
The default backup policy cannot be renamed.
scheduled_policy
No
dict
Details about the scheduling policy
start_time
No
string
Backup execution time (UTC), in the format of HH:mm
You need to set the execution time to a full hour. To set multiple backup execution times, enter them in ascending order by local time. For example, if your local time is 2 hours ahead of UTC and you want to perform backups at the local times 00:00, 02:00, and 04:00, set this parameter to 22:00,00:00,02:00 (UTC times) and time_zone to UTC+02:00.
frequency
Yes
integer
Backup interval (1 to 14 days)
rentention_num
No
integer
Number of retained backups. The value must be an integer from 2 to 14.
remain_first_backup_of_curMonth
No
string
Whether to retain the first backup in the current month
- Y
- N
status
No
string
Backup policy status
- ON
- OFF
- Example request
{ "backup_policy_name": "policy_01", "scheduled_policy" : { "remain_first_backup_of_curMonth" : "Y", "rentention_num" : 10, "week_frequency" : ["MON"], "start_time" : "12:00", "status" : "ON" }, }
Response
- Parameter description
Parameter
Type
Description
backup_policy_id
string
Backup policy ID returned if the operation is successful
message
string
Error message returned after an error occurs
code
string
Error code returned after an error occurs
For details about error codes, see Error Codes.
- Example response
{ "backup_policy_id": "af8a20b0-117d-4fc3-ae53-aa3968a4f870" }
or
{ "error": { "code": "XXXX", "message": "XXX" } }
Status Code
- Normal
- Abnormal
Status Code
Description
400 Bad Request
The server failed to process the request.
401 Unauthorized
You must enter the username and password to access the requested page.
403 Forbidden
You are forbidden to access the requested page.
404 Not Found
The server could not find the requested page.
405 Method Not Allowed
You are not allowed to use the method specified in the request.
406 Not Acceptable
The response generated by the server could not be accepted by the client.
407 Proxy Authentication Required
You must use the proxy server for authentication so that the request can be processed.
408 Request Timeout
The request timed out.
409 Conflict
The request could not be processed due to a conflict.
500 Internal Server Error
Failed to complete the request because of an internal service error.
501 Not Implemented
Failed to complete the request because the server does not support the requested function.
502 Bad Gateway
Failed to complete the request because the request is invalid.
503 Service Unavailable
Failed to complete the request because the service is unavailable.
504 Gateway Timeout
A gateway timeout error occurred.
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