All Products
Search
Document Center

PolarDB:DescribeBackupPolicy

Last Updated:Jun 10, 2026

Mengkueri kebijakan cadangan otomatis dari Kluster PolarDB Basis Data Relasional Cloud-Native.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeBackupPolicy

get

*dbcluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

ID Kluster.

Catatan

Panggil operasi DescribeDBClusters untuk mengkueri detail semua kluster di suatu Wilayah, termasuk ID Kluster.

pc-*************

Elemen respons

Element

Type

Description

Example

object

PreferredBackupPeriod

string

The backup cycle. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Catatan

This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

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

DataLevel1BackupRetentionPeriod

string

The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.

Catatan

This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

7

RequestId

string

The request ID.

EADFCE0F-9FB5-4685-B395-1440B******

PreferredBackupTime

string

The time range when an automatic backup is performed. The time is in the HH:mmZ-HH:mmZ format. The time is displayed in UTC.

07:00Z-08:00Z

BackupRetentionPolicyOnClusterDeletion

string

The policy to retain backups when you delete a cluster:

  • ALL: Retains all backups permanently.

  • LATEST: Retains the last backup permanently.

  • NONE (Default): Does not retain backup sets.

NONE

PreferredNextBackupTime

string

The time of the next backup. The time is in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC.

2020-11-16T07:30Z

DataLevel2BackupRetentionPeriod

string

The retention period of level-2 backups. Valid values:

  • 0: The level-2 backup feature is disabled.

  • 30 to 7300: The retention period of level-2 backups in days.

  • -1: The level-2 backups are permanently retained.

Catatan
    • When you create a cluster, the default value is 0. This means the level-2 backup feature is disabled.

    • This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

0

BackupFrequency

string

The backup frequency. Valid values:

  • Normal (Default): Standard backup. A backup is performed once a day.

  • 2/24H: Enhanced backup. A backup is performed every 2 hours.

  • 3/24H: Enhanced backup. A backup is performed every 3 hours.

  • 4/24H: Enhanced backup. A backup is performed every 4 hours.

Catatan
  • If you enable enhanced backup, all backups that are completed within 24 hours are retained. For backups that are completed more than 24 hours ago, the system retains only the first backup that is completed after 00:00 every day. Other backups are deleted.

  • If you enable enhanced backup, the PreferredBackupPeriod parameter is automatically set to all days of the week (Monday to Sunday).

Normal

DataLevel1BackupFrequency

string

The backup frequency. Valid values:

  • Normal (Default): Standard backup. A backup is performed once a day.

  • 2/24H: High-frequency backup. A backup is performed every 2 hours.

  • 3/24H: High-frequency backup. A backup is performed every 3 hours.

  • 4/24H: High-frequency backup. A backup is performed every 4 hours.

Catatan
    • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

    • This parameter is not supported if the cross-region backup feature is unavailable in the region where your PolarDB for MySQL cluster resides. For more information about the regions that support cross-region backup, see Overview.

    • This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

Normal

DataLevel1BackupPeriod

string

The cycle of a level-1 backup. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Catatan
    • Select at least two days. Separate multiple values with commas (,).

    • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

    • This parameter is not supported if the cross-region backup feature is unavailable in the region where your PolarDB for MySQL cluster resides. For more information about the regions that support cross-region backup, see Overview.

    • This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

Monday,Tuesday

DataLevel1BackupTime

string

The time range when an automatic backup is performed. The time is in the hh:mmZ-hh:mmZ format and is displayed in UTC. The specified time range must be a 1-hour interval on the hour, such as 14:00Z-15:00Z.

Catatan
  • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

  • This parameter is not supported if the cross-region backup feature is unavailable in the region where your PolarDB for MySQL cluster resides. For more information about the regions that support cross-region backup, see Overview.

15:00Z-16:00Z

DataLevel2BackupPeriod

string

The cycle of a level-2 backup. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Catatan
    • Select at least two days. Separate multiple values with commas (,).

    • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

    • This parameter is not supported if the cross-region backup feature is unavailable in the region where your PolarDB for MySQL cluster resides. For more information about the regions that support cross-region backup, see Overview.

    • This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

Monday,Tuesday

DataLevel2BackupAnotherRegionRetentionPeriod

string

The retention period of cross-region level-2 backups. Valid values:

  • 0: The level-2 backup feature is disabled.

  • 30 to 7300: The retention period of level-2 backups in days.

  • -1: The level-2 backups are permanently retained.

Catatan
    • When you create a cluster, the default value is 0. This means the cross-region backup feature for level-2 backups is disabled.

    • This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

30

DataLevel2BackupAnotherRegionRegion

string

The destination region of the cross-region level-2 backup. For more information about the regions that support cross-region backup, see Overview.

Catatan

This parameter is not recommended if the advanced backup feature is enabled. Use the AdvancedDataPolicies parameter instead.

cn-hangzhou

BackupPolicyLevel

string

The level of the backup policy. Valid values:

  • Normal: standard backup

  • Advanced: advanced backup

Catatan
  • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

Normal

AdvancedPolicyOption

string

The advanced backup policy option. Valid values:

  • enable: Advanced backup is enabled.

  • disable: Advanced backup is disabled. You can enable it.

  • notSupport: Advanced backup is not supported.

Catatan
  • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

disable

AdvancedDataPolicies

object

AdvancedDataPolicy

array<object>

The details of the advanced backup policy.

Catatan
  • This parameter is not supported by PolarDB for PostgreSQL (compatible with Oracle) and PolarDB for PostgreSQL.

object

PolicyId

string

The ID of the backup policy.

71930ac2e9f15e41615e10627c******

RetentionType

string

The retention period type of the backup set. The return value is:

  • never: permanent retention

  • delay: retention for a specified number of days

delay

RetentionValue

string

The number of days to retain the backup.

7

FilterType

string

The filter type for the advanced policy. The return value is:

  • crontab: recurring schedule

  • event: event-triggered schedule

crontab

FilterKey

string

The scheduling type. The return value is:

  • dayOfWeek: weekly schedule

  • dayOfMonth: monthly schedule

  • dayOfYear: yearly schedule

  • backupInterval: fixed-interval schedule

Catatan

This parameter is returned only when FilterType is set to crontab.

dayOfWeek

FilterValue

string

The backup cycle.

1,2,3,4,5,6,7

SrcType

string

The source type of the backup policy. The return value is:

  • db: database cluster

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: cross-region level-2 backup

level1

SrcRegion

string

The source region of the backup policy.

cn-beijing

DestType

string

The destination type of the backup policy. The return value is:

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: cross-region level-2 backup

level1

DestRegion

string

The destination region of the backup policy.

cn-hangzhou

DumpAction

string

The method to convert a level-1 backup to a level-2 backup. The return value is:

  • copy: copy

copy

AutoCreated

boolean

Indicates whether the backup policy is automatically generated by the system. The return value is:

  • true: The policy is generated by the system.

  • false: The policy is a custom policy.

true

OnlyPreserveOneEachHour

boolean

The hourly backup retention policy. Valid values:

  • true: Retain only the earliest backup set that is created within the hour.

  • false: Retain all backup sets.

true

OnlyPreserveOneEachDay

boolean

The 24-hour backup retention policy.

  • true: Retain only the first backup set of the day if the backup set is created more than 24 hours ago.

  • false: Retain all backup sets.

true

BakType

string

The backup type. The return value is:

  • F: full backup

F

StorageClass

string

Contoh

Respons sukses

JSONformat

{
  "PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
  "DataLevel1BackupRetentionPeriod": "7",
  "RequestId": "EADFCE0F-9FB5-4685-B395-1440B******",
  "PreferredBackupTime": "07:00Z-08:00Z",
  "BackupRetentionPolicyOnClusterDeletion": "NONE",
  "PreferredNextBackupTime": "2020-11-16T07:30Z",
  "DataLevel2BackupRetentionPeriod": "0",
  "BackupFrequency": "Normal",
  "DataLevel1BackupFrequency": "Normal",
  "DataLevel1BackupPeriod": "Monday,Tuesday",
  "DataLevel1BackupTime": "15:00Z-16:00Z",
  "DataLevel2BackupPeriod": "Monday,Tuesday",
  "DataLevel2BackupAnotherRegionRetentionPeriod": "30",
  "DataLevel2BackupAnotherRegionRegion": "cn-hangzhou",
  "BackupPolicyLevel": "Normal",
  "AdvancedPolicyOption": "disable",
  "AdvancedDataPolicies": {
    "AdvancedDataPolicy": [
      {
        "PolicyId": "71930ac2e9f15e41615e10627c******\n",
        "RetentionType": "delay",
        "RetentionValue": "7",
        "FilterType": "crontab",
        "FilterKey": "dayOfWeek",
        "FilterValue": "1,2,3,4,5,6,7",
        "SrcType": "level1",
        "SrcRegion": "cn-beijing",
        "DestType": "level1",
        "DestRegion": "cn-hangzhou",
        "DumpAction": "copy",
        "AutoCreated": true,
        "OnlyPreserveOneEachHour": true,
        "OnlyPreserveOneEachDay": true,
        "BakType": "F",
        "StorageClass": ""
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid.
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records.
404 InvalidDBClusterId.NotFound The DBInstanceId provided does not exist in our records.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.