Modifying an Automated Backup Policy
Function
This API is used to modify an automated backup policy.
- Learn how to authenticate this API before using it.
- Before calling this API, obtain the required region and endpoint.
URI
- URI format
PUT https://{Endpoint}/mysql/v3/{project_id}/instances/{instance_id}/backups/policy/update
- Example
PUT https://{Endpoint}/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/43e4feaab48f11e89039fa163ebaa7e4br01/backups/policy/update
- Parameter description
Table 1 Parameter description Name
Type
Mandatory
Description
project_id
String
Yes
Project ID of a tenant in a region.
To obtain this value, see Obtaining a Project ID.
instance_id
String
No
DB instance ID.
Request
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
backup_policy |
object |
Yes |
Backup policy information. For details, see Table 3. |
|
Name |
Type |
Mandatory |
Description |
|---|---|---|---|
|
keep_days |
Integer |
Yes |
Backup retention days. The value ranges from 1 to 732. |
|
start_time |
String |
Yes |
Backup time window. Automated backups will be triggered during the backup time window. The value cannot be empty. It must be a valid value in the "hh:mm-HH:MM" format. The current time is in the UTC format.
Example value:
|
|
period |
String |
Yes |
Backup cycle configuration. Data will be automatically backed up on the selected days every week. Value range: The value is a number separated by commas (,), indicating the days of the week. For example, the value 1,2,3,4 indicates that the backup period is Monday, Tuesday, Wednesday, and Thursday. |
|
retention_num_backup_level1 |
Integer |
No |
Number of retained level-1 backups. The default value is 0. This parameter is valid when the level-1 backup function is enabled. Value:
|
- Request example
{ "backup_policy": { "keep_days": 7, "start_time": "19:00-20:00", "period": "1,2,3,4,5" } }
Response
- Normal response
Table 4 Parameter description Name
Type
Description
status
String
Backup status. Value:
- BUILDING: Modification in progress
- COMPLETED: Modification completed
- FAILED: Modification failed
instance_id
String
DB instance ID.
instance_name
String
DB instance name.
- Example normal response
{ "status": "COMPLETED", "instance_id": "ef25188419f941309882d2986b2210b9in07", "instance_name": "gauss-fhc" }
Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.
Last Article: Querying an Automated Backup Policy
Next Article: Managing Parameter Templates
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.