Queries 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 DescribeBackupPolicy

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

DBInstanceId String Yes dds-bp16cb162771****

The ID of the instance.

Response parameters

Parameter Type Example Description
PreferredBackupPeriod String Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday

The day of a week on which to back up data. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
RequestId String 5A9464CA-F7DC-5434-90B1-DF7F197C****

The ID of the request.

PreferredBackupTime String 09:00Z-10:00Z

The time range to back up data. The time is in the HH:mmZ-HH:mmZ format. The time is displayed in UTC.

BackupRetentionPeriod String 30

The retention period of backups. Unit: days.

EnableBackupLog Integer 1

Indicates whether log backup is enabled. Default value: 0. Valid values:

  • 0: disables log backup.
  • 1: enables log backup.
LogBackupRetentionPeriod Integer 7

The number of days for which to retain log backups. Valid values: 7 to 730.

SnapshotBackupType String Standard

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

  • Flash: single-digit second backup
  • Standard: standard backup
BackupInterval Integer -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.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=DescribeBackupPolicy
DBInstanceId=dds-bp16cb162771****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeBackupPolicyResponse>
    <PreferredBackupPeriod>Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</PreferredBackupPeriod>
    <RequestId>5A9464CA-F7DC-5434-90B1-DF7F197C****</RequestId>
    <PreferredBackupTime>09:00Z-10:00Z</PreferredBackupTime>
    <BackupRetentionPeriod>30</BackupRetentionPeriod>
    <EnableBackupLog>1</EnableBackupLog>
    <LogBackupRetentionPeriod>7</LogBackupRetentionPeriod>
    <SnapshotBackupType>Standard</SnapshotBackupType>
    <BackupInterval>-1</BackupInterval>
</DescribeBackupPolicyResponse>

JSON format

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

{
  "PreferredBackupPeriod" : "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
  "RequestId" : "5A9464CA-F7DC-5434-90B1-DF7F197C****",
  "PreferredBackupTime" : "09:00Z-10:00Z",
  "BackupRetentionPeriod" : 30,
  "EnableBackupLog" : 1,
  "LogBackupRetentionPeriod" : 7,
  "SnapshotBackupType" : "Standard",
  "BackupInterval" : -1
}

Error codes

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