You can call this operation to query the backup policy of a 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-bpxxxxxxxx

The ID of the instance.

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.

AccessKeyId String No LTAIgbTGpxxxxxx

The AccessKey ID that Alibaba Cloud provides for you to access services.

Response parameters

Prameter Type Sample response Description
BackupRetentionPeriod String 7

The backup retention period. Unit: days.

PreferredBackupPeriod String Monday,Wednesday,Friday,Sunday

The period of backup. Valid values:

  • Monday
  • Tuesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
PreferredBackupTime String 20:00Z-21:00Z

The period when the backup is performed, in the format of HH:mm Z- HH:mm z(UTC time).

RequestId String C2C283A1-1CC4-4DD9-B985-3811E0244A45

The ID of the request.

Examples

Sample requests


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

Sample success response

XML format

<DescribeBackupPolicyResponse>
  <PreferredBackupPeriod>Monday,Wednesday,Friday,Sunday</PreferredBackupPeriod>
	  <RequestId>C2C283A1-1CC4-4DD9-B985-3811E0244A45</RequestId>
	  <PreferredBackupTime>20:00Z-21:00Z</PreferredBackupTime>
	  <BackupRetentionPeriod>7</BackupRetentionPeriod>
</DescribeBackupPolicyResponse>

JSON format

{
	"PreferredBackupPeriod":"Monday,Wednesday,Friday,Sunday",
	"RequestId":"C2C283A1-1CC4-4DD9-B985-3811E0244A45",
	"PreferredBackupTime":"20:00Z-21:00Z",
	"BackupRetentionPeriod":"7"
}

Error codes

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