DescribeAdvancedBackupPolicy

Updated at:

Queries advanced backup policies.

Operation description

Queries advanced backup policies. This operation is supported only for cloud disk replica set and cloud disk sharded cluster instances.

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:DescribeAdvancedBackupPolicy

get

*Instance

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

None None

Request parameters

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

The instance ID.

dds-bp18b0934e70****

Response elements

Element

Type

Description

Example

object

AdvancedBackupDataPolicies

array<object>

The list of backup policies.

object

ActionType

string

The action type.

Valid values:

  • DELETE :

    Delete.

  • CREATE :

    Create.

  • UPDATE :

    Update.

xx

BackupPolicy

string

The scheduling type of the advanced policy. Valid values:

  • dayOfWeek: weekly scheduling

  • dayOfMonth: monthly scheduling

  • dayOfYear: yearly scheduling

  • backupInterval: fixed-interval scheduling (high-frequency backup)

Valid values:

  • dayOfWeek :

    Weekly scheduling.

  • dayOfMonth :

    Monthly scheduling.

  • dayOfYear :

    Yearly scheduling.

  • backupInterval :

    Fixed-interval scheduling (high-frequency backup)

dayOfWeek

DestRegion

string

The destination region of the backup policy.

cn-beijing

DestType

string

The destination type of the backup policy. Valid values:

  • level1: same-region backup

  • level2Cross: cross-region backup

Valid values:

  • level1 :

    Same-region backup.

  • level2Cross :

    Cross-region backup.

level1

PolicyId

string

The ID of the backup policy.

xxxxxx

PreferredBackupPeriod

string

The backup cycle.

  • When BackupPolicy is set to dayOfWeek, the values 1, 2, 3, 4, 5, 6, and 7 represent Monday to Sunday.

  • When BackupPolicy is set to dayOfMonth, the values 1, 3, and -1 represent the 1st, 3rd, and last day of each month.

  • When BackupPolicy is set to dayOfYear, the value 01-07 represents January 7.

  • When BackupPolicy is set to backupInterval, the value 30 represents a backup every 30 minutes.

1,2,3

PreserveOneEachHour

boolean

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

  • true: When the backup frequency is minute-level, 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 each hour is retained.

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

False

RetentionPeriod

integer

The number of days for which backups are retained.

7

RetentionType

string

The retention epoch type of the backup set. Valid values:

  • never: long-term retention (LTR)

  • delay: fixed-day retention

Valid values:

  • never :

    Long-term retention (LTR).

  • delay :

    Fixed-day retention.

delay

SrcRegion

string

The region where the instance resides.

cn-beijing

SrcType

string

The source type of the backup policy. Valid values:

  • db: same-region backup

  • level1: cross-region backup

Valid values:

  • level1 :

    Cross-region backup.

  • db :

    Same-region backup.

db

AdvancedBackupLogPolicies

array<object>

The list of log backup policies.

object

DestRegion

string

The destination region of the log backup policy.

cn-guangzhou

DestType

string

The destination type of the log backup policy. Valid values:

  • level1: same-region backup

  • level2Cross: cross-region backup

Valid values:

  • level1 :

    Same-region backup.

  • level2Cross :

    Cross-region backup.

RDS

EnableLogBackup

integer

Specifies whether log backup is enabled. Valid values:

  • 1: enabled

  • 0: disabled

Valid values:

  • 0 :

    Disabled.

  • 1 :

    Enabled.

1

PolicyId

string

The ID of the log backup policy. This parameter is returned only for cross-region log backup policies.

xxxx

RetentionPeriod

string

The number of days for which log backups are retained. This parameter takes effect only when RetentionType is set to delay.

4

RetentionType

string

The retention epoch type of log backups. Valid values:

  • never: long-term retention (LTR)

  • delay: fixed-day retention

Valid values:

  • never :

    Long-term retention (LTR).

  • delay :

    Fixed-day retention.

delay

SrcRegion

string

The region where the source instance resides.

cn-hangzhou

SrcType

string

The source type of the log backup policy. Valid values:

  • db: same-region backup

  • level1: cross-region backup

Valid values:

  • level1 :

    Cross-region backup.

  • db :

    Same-region backup.

et

BackupRetentionPolicyOnClusterDeletion

integer

The data retention policy. Valid values:

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

  • 1: The last backup set is retained for long-term retention (LTR) when the instance is released.

  • 2: All backup sets are retained for long-term retention (LTR) when the instance is released.

Valid values:

  • 0 :

    Delete all backup sets immediately.

  • 1 :

    Retain the last backup set for long-term retention (LTR).

  • 2 :

    Retain all backup sets for long-term retention (LTR).

2

DBInstanceId

string

The instance ID.

dds-bp14bf67a76d****

PreferredBackupTime

string

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

09:00Z-10:00Z

PreferredNextBackupTime

string

The time range for starting a backup. The time is in the HH:mmZ-HH:mmZ format (UTC). Example: 01:00Z-02:00Z. The backup starts within this time range.

2024-06-19T19:11Z

RequestId

string

The request ID.

111E7B16-0A87-4CBA-B271-F34AD61E099F

SnapshotBackupType

string

The snapshot backup type. Valid values:

  • Flash: backup within seconds

  • Standard: standard backup

Valid values:

  • Standard :

    Standard backup.

  • Flash :

    Backup within seconds.

Standard

Examples

Success response

JSON format

{
  "AdvancedBackupDataPolicies": [
    {
      "ActionType": " xx",
      "BackupPolicy": "dayOfWeek",
      "DestRegion": "cn-beijing",
      "DestType": "level1",
      "PolicyId": "xxxxxx",
      "PreferredBackupPeriod": "1,2,3",
      "PreserveOneEachHour": true,
      "RetentionPeriod": 7,
      "RetentionType": "delay",
      "SrcRegion": "cn-beijing",
      "SrcType": "db"
    }
  ],
  "AdvancedBackupLogPolicies": [
    {
      "DestRegion": "cn-guangzhou",
      "DestType": "RDS",
      "EnableLogBackup": 1,
      "PolicyId": "xxxx",
      "RetentionPeriod": "4",
      "RetentionType": "delay",
      "SrcRegion": "cn-hangzhou",
      "SrcType": "et"
    }
  ],
  "BackupRetentionPolicyOnClusterDeletion": 2,
  "DBInstanceId": "dds-bp14bf67a76d****",
  "PreferredBackupTime": "09:00Z-10:00Z",
  "PreferredNextBackupTime": "2024-06-19T19:11Z",
  "RequestId": "111E7B16-0A87-4CBA-B271-F34AD61E099F",
  "SnapshotBackupType": "Standard"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidPreferredBackupPeriod.Malformed Specified parameter PreferredBackupPeriod is not valid.
400 InvalidPreferredBackupTime.Malformed Specified parameter PreferredBackupTime is not valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.