Modifies the backup policy of an ApsaraDB for MongoDB instance.

Debugging

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.

DBInstanceId String Yes dds-bp16cb162771****

The ID of the instance.

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

The time range to back up data. Specify the time in the HH:mmZ-HH:mmZ format. The time must be in UTC.

Note The time range is 1 hour.
PreferredBackupPeriod String Yes Monday,Wednesday,Friday,Sunday

The day of a week on which to back up data. 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.

Note
  • If your instance is created before September 10, 2021, backups are retained for seven days by default.
  • If your instance is created after September 10, 2021, backups are retained for 30 days by default.
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 7

The number of days for which log backups are retained. Default value: 7.

Valid values: 7 to 730.

SnapshotBackupType String No Standard

The snapshot backup type. Default value: Standard. Valid values:

  • Flash: single-digit second backup
  • Standard: standard backup
BackupInterval String No -1

The frequency at which high-frequency backups are created. Valid values:

  • -1: disables high-frequency backup.
  • 15: every 15 minutes.
  • 30: every 30 minutes.
  • 60: every hour.
  • 120: every 2 hours.
  • 180: every 3 hours.
  • 240: every 4 hours.
  • 360: every 6 hours.
  • 480: every 8 hours.
  • 720: every 12 hours.
Note
  • If SnapshotBackupType is set to Standard, this parameter is set to -1 and cannot be changed.
  • High-frequency backup takes effect only when SnapshotBackupType is set to Flash and the value of this parameter is greater than 0.

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=ModifyBackupPolicy
&DBInstanceId=dds-bp16cb162771****
&PreferredBackupPeriod=Monday,Wednesday,Friday,Sunday
&PreferredBackupTime=03:00Z-04:00Z
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyBackupPolicyResponse>
    <RequestId>657D2872-ED98-5778-A676-10132E30****</RequestId>
</ModifyBackupPolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

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

Error codes

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