Modifies the backup policy of an ApsaraDB for MongoDB instance.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyBackupPolicy

The operation that you want to perform. Set the value to ModifyBackupPolicy.

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

DBInstanceId String Yes dds-bp16cb162771****

The ID of the instance.

PreferredBackupTime String Yes 03:00Z-04:00Z

The backup window. Specify the time in the HH:mmZ-HH:mmZ format. The time must be in UTC.

Note The maximum period is 1 hour.
PreferredBackupPeriod String Yes Monday,Wednesday,Friday,Sunday

The days of the week on which to perform data backup. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note Separate multiple values with commas (,).
BackupRetentionPeriod Long No 30

The retention period of full backups. Unit: days. The default value is 30 for ApsaraDB for MongoDB instances created after September 10, 2021.

Note The default value is 7 for ApsaraDB for MongoDB instances created before September 10, 2021.
EnableBackupLog Long No 0

Specifies whether to enable log backup. Default value: 0. Valid values:

  • 0: disables log backup.
  • 1: enables log backup.
LogBackupRetentionPeriod Long No 0

The retention period of log backups. Unit: days. Default value: 7.

Response parameters

Parameter Type Example Description
RequestId String 644A359C-B871-4DD3-97B5-ED91EF5809C2

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "657D2872-ED98-5778-A676-10132E30****"

Error codes

For a list of error codes, visit the API Error Center.