DescribeBackupPolicy

Updated at:

Queries the backup policy of a MongoDB instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dds:DescribeBackupPolicy

get

*dbinstance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The instance ID.

dds-bp16cb162771****

InstanceType

string

No

The instance type. Valid values:

  • replicate: replica set instance

  • sharding: sharded cluster instance

sharding

SrcRegion

string

No

The region where the instance is deployed.

cn-beijing

Response elements

Element

Type

Description

Example

object

The response data.

BackupInterval

integer

The high-frequency backup frequency. Valid values:

  • -1: high-frequency backup is disabled

  • 15: every 15 minutes

  • 30: every 30 minutes

  • 60: every 1 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

BackupRetentionPeriod

string

The backup retention period in days.

30

BackupRetentionPolicyOnClusterDeletion

integer

The backup data retention policy. Valid values:

  • 0: All backup sets of the instance are immediately deleted when the instance is released.

  • 1: An automatic backup is created when the instance is released, and the backup set is retained for long-term retention (LTR).

  • 2: An automatic backup is created when the instance is released, and all backup sets of the cluster are retained for long-term retention (LTR).

For more information, see Long-term retention backup.

0

CrossBackupPeriod

string

The days of the week when geo-redundancy backups are performed. Valid values:

  • Monday: Monday

  • Tuesday: Tuesday

  • Wednesday: Wednesday

  • Thursday: Thursday

  • Friday: Friday

  • Saturday: Saturday

  • Sunday: Sunday

Note

Required for geo-redundancy backups.

Monday

CrossLogRetentionType

string

The retention type for cross-region log backups. Valid values:

  • delay: retained for a specified period

  • never: never expires

delay

CrossLogRetentionValue

integer

The retention period for cross-region log backups.

7

CrossRetentionType

string

The retention type for geo-redundancy backups. Valid values:

  • delay: retained for a specified period

  • never: never expires

delay

CrossRetentionValue

integer

The retention period for geo-redundancy backups.

7

DestRegion

string

The region where geo-redundancy backups are stored.

cn-shenzhen

EnableBackupLog

integer

Specifies whether to enable log backup. Valid values:

  • 0: disabled (default)

  • 1: enabled

1

EnableCrossLogBackup

integer

Specifies whether cross-region log backup is enabled.

Note

Required for geo-redundancy backups.

  • 1: enabled (must be set to 1 for sharded cluster instances)

  • 0: disabled (must be set to 0 for replica set instances)

1

HighFrequencyBackupRetention

string

The retention period for high-frequency backups, in days.

1

LogBackupRetentionPeriod

integer

The retention period for log backups, in days. Valid values: 7 to 730.

7

PreferredBackupPeriod

string

The backup cycle. Valid values:

  • Monday: Monday

  • Tuesday: Tuesday

  • Wednesday: Wednesday

  • Thursday: Thursday

  • Friday: Friday

  • Saturday: Saturday

  • Sunday: Sunday

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

PreferredBackupTime

string

The backup time. The format is HH:mmZ-HH:mmZ (UTC time).

09:00Z-10:00Z

PreferredNextBackupTime

string

The time of the next regular backup. The format is yyyy-mm-ddthh:mmz (UTC time).

2024-06-19T19:11Z

PreserveOneEachHour

boolean

Specifies whether to enable sparse backup within an hour. Valid values:

  • true: When the backup frequency is set to minutes, all snapshots taken within 1 hour from the current time are retained. For snapshots taken more than 1 hour but within 24 hours from the current time, only the first snapshot after the hour is retained.

  • false: Sparse backup within an hour is disabled. All snapshots within the high-frequency backup retention period are retained.

false

RequestId

string

The ID of the request.

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

SnapshotBackupType

string

The snapshot backup type. Valid values:

  • Flash: backup within seconds

  • Standard: standard backup (default)

Standard

SrcRegion

string

The region where the source instance is deployed.

cn-hangzhou

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.