All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeBackupPolicy

更新時間:Sep 29, 2024

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeBackupPolicyget
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

dds-bp16cb162771****
InstanceTypestringNo

The architecture of the instance. Valid values:

  • sharding: sharded cluster instance
  • replicate: replica set or standalone instance
sharding
SrcRegionstringNo

The region ID of the instance.

cn-beijing

Response parameters

ParameterTypeDescriptionExample
object

The returned results.

PreferredBackupPeriodstring

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

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
RequestIdstring

The request ID.

5A9464CA-F7DC-5434-90B1-DF7F197C****
PreferredBackupTimestring

The time range during which the backup was created. The time follows the ISO 8601 standard in the HH:mmZ-HH:mmZ format. The time is displayed in UTC.

09:00Z-10:00Z
BackupRetentionPeriodstring

The retention period of the backup data. Unit: day.

30
PreferredNextBackupTimestring

The time of next standard backup.

2024-06-19T19:11Z
EnableBackupLoginteger

Indicates whether the log backup feature is enabled. Valid values:

  • 0 (default): The log backup feature is disabled.
  • 1: The log backup feature is enabled.
1
LogBackupRetentionPeriodinteger

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

7
SnapshotBackupTypestring

The snapshot backup type. Valid values:

  • Flash: single-digit second backup
  • Standard (default): standard backup
Standard
BackupIntervalinteger

The frequency at which high-frequency backup is created. Valid values:

  • -1: High-frequency backup is disabled.
  • 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.
-1
HighFrequencyBackupRetentionstring

The retention period of high-frequency backups. Unit: day.

1
BackupRetentionPolicyOnClusterDeletioninteger

The backup retention policy configured for the instance. Valid values:

  1. 0: All backup sets are immediately deleted when the instance is released.
  2. 1: Automatic backup is performed and the backup set is retained for a long period of time when the instance is released.
  3. 2: Automatic backup is performed and all backup sets are retained for a long period of time when the instance is released.

For more information, see Retain the backup files of an ApsaraDB for MongoDB instance for a long period of time.

0
SrcRegionstring

The region ID of the instance.

cn-hangzhou
DestRegionstring

The region ID of the cross-regional backup..

cn-shenzhen
CrossRetentionTypestring

The retention type of Cross-regional backup.

  • delay : retain the backup for a period of time.
  • never : retain the backup permanently.
delay
CrossRetentionValueinteger

The retention time of Cross-regional backup.

7
CrossBackupPeriodstring

The retention period of Cross-regional backup. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Monday
EnableCrossLogBackupinteger

Whether to turn on cross-regional log backup.

  • 1:turn on . Used for sharded cluster.
  • 0: turn off. Used for replicate set.
1
CrossLogRetentionTypestring

The retention type of Cross-regional log backup.

  • delay : retain the backup for a period of time.
  • never : retain the backup permanently.
delay
CrossLogRetentionValueinteger

The retention time of Cross-regional log backup.

7

Examples

Sample success responses

JSONformat

{
  "PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
  "RequestId": "5A9464CA-F7DC-5434-90B1-DF7F197C****",
  "PreferredBackupTime": "09:00Z-10:00Z",
  "BackupRetentionPeriod": "30",
  "PreferredNextBackupTime": "2024-06-19T19:11Z",
  "EnableBackupLog": 1,
  "LogBackupRetentionPeriod": 7,
  "SnapshotBackupType": "Standard",
  "BackupInterval": -1,
  "HighFrequencyBackupRetention": "1",
  "BackupRetentionPolicyOnClusterDeletion": 0,
  "SrcRegion": "cn-hangzhou",
  "DestRegion": "cn-shenzhen",
  "CrossRetentionType": "delay",
  "CrossRetentionValue": 7,
  "CrossBackupPeriod": "Monday",
  "EnableCrossLogBackup": 1,
  "CrossLogRetentionType": "delay",
  "CrossLogRetentionValue": 7
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-25The response structure of the API has changedView Change Details
2024-02-22The response structure of the API has changedView Change Details