Modifies a backup policy for an ApsaraDB for MongoDB instance.
Operation description
The cross-region backup feature is suitable only for replica set or sharded cluster instances that use cloud disks.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:ModifyBackupPolicy | update | *Instance acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. | dds-bp16cb162771**** |
PreferredBackupTime | string | No | The start time of the backup. Specify the time in the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time must be in UTC. Note
The time range is 1 hour.
| 03:00Z-04:00Z |
PreferredBackupPeriod | string | No | The day of a week when the system regularly backs up data. Valid values:
** Notice: To ensure data security, make sure that the system backs up data at least twice a week. Note
Separate multiple values with commas (,).
| Monday,Wednesday,Friday,Sunday |
BackupRetentionPeriod | long | No | The retention period of full backups. Note
| 30 |
EnableBackupLog | long | No | Specifies whether to enable the log backup feature. Valid values:
| 0 |
LogBackupRetentionPeriod | long | No | The number of days for which log backups are retained. Default value: 7. Valid values: 7 to 730. | 7 |
SnapshotBackupType | string | No | The snapshot backup type. Valid values:
| Standard |
BackupInterval | string | No | The frequency at which high-frequency backups are generated. Valid values:
Note
| -1 |
HighFrequencyBackupRetention | long | No | The number of days for which high-frequency backup files are retained. Before you use this parameter, make sure that you specify the BackupInterval parameter. By default, high-frequency backup files are retained for one day. | 1 |
BackupRetentionPolicyOnClusterDeletion | integer | No | The backup retention policy configured for the instance. Valid values:
For more information, see Retain the backup files of an ApsaraDB for MongoDB instance for a long period of time. | 2 |
CrossBackupType | string | No | The action performed for the cross-region backup policy. Valid values:
Note
This parameter is required for a cross-region backup operation.
| update |
SrcRegion | string | No | The region ID of the instance. Note
| cn-beijing |
DestRegion | string | No | The region in which the backup files are retained. Note
This parameter is required for a cross-region backup operation.
| cn-hangzhou |
CrossRetentionType | string | No | The retention type of the cross-region backup files. Valid values:
Note
This parameter is required for a cross-region backup operation.
| delay |
CrossRetentionValue | integer | No | The retention period of the cross-region backup files. Valid values: 3 to 1825. Unit: day. Note
| 7 |
CrossBackupPeriod | string | No | The day of the week on which the cross-region backup files are retained. Valid values:
Note
This parameter is required for a cross-region backup operation.
| Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday |
EnableCrossLogBackup | integer | No | Specifies whether to enable the cross-region log backup feature. Note
This parameter is required for a cross-region backup operation.
| 1 |
CrossLogRetentionType | string | No | The retention type of the cross-region log backup files. Valid values:
Note
This parameter is required for a cross-region backup operation.
| delay |
CrossLogRetentionValue | integer | No | The retention period of the cross-region log backup files. Valid values: 3 to 1825. Unit: day. The parameter value must be less than or equal to the value of the CrossRetentionValue parameter. Note
This parameter is required for a cross-region backup operation.
| 3 |
InstanceType | string | No | The instance architecture. Valid values:
Note
| replicate |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "644A359C-B871-4DD3-97B5-ED91EF5809C2"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidPreferredBackupPeriod.Malformed | Specified parameter PreferredBackupPeriod is not valid. |
400 | InvalidPreferredBackupTime.Malformed | Specified parameter PreferredBackupTime is not valid. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-02-22 | The Error code has changed. The request parameters of the API has changed | View Change Details |