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

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

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.

Response parameters

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

The days on which backups are performed. Valid values:

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

The ID of the request.

PreferredBackupTime String 09:00Z-10:00Z

The period of time during which backups are performed. The time is in the HH:mmZ-HH:mmZ format. The time is displayed in UTC.

BackupRetentionPeriod String 30

The number of days for which backup files are retained.

EnableBackupLog Integer 0

Indicates whether to enable the log backup feature. Default value: 0. Valid values:

  • 0: disables the log backup feature.
  • 1: enables the log backup feature.
LogBackupRetentionPeriod Integer 0

The number of days for which log backup files are retained.

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>
    <LogBackupRetentionPeriod>0</LogBackupRetentionPeriod>
    <RequestId>5A9464CA-F7DC-5434-90B1-DF7F197C****</RequestId>
    <PreferredBackupTime>09:00Z-10:00Z</PreferredBackupTime>
    <EnableBackupLog>0</EnableBackupLog>
    <BackupRetentionPeriod>30</BackupRetentionPeriod>
    <PreferredNextBackupTime>2021-09-09T09:22Z</PreferredNextBackupTime>
</DescribeBackupPolicyResponse>

JSON format

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

{
  "PreferredBackupPeriod" : "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
  "LogBackupRetentionPeriod" : 0,
  "RequestId" : "5A9464CA-F7DC-5434-90B1-DF7F197C****",
  "PreferredBackupTime" : "09:00Z-10:00Z",
  "EnableBackupLog" : 0,
  "BackupRetentionPeriod" : "30",
  "PreferredNextBackupTime" : "2021-09-09T09:22Z"
}

Error codes

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