All Products
Search
Document Center

PolarDB:DescribeLogBackupPolicy

Last Updated:Jun 10, 2026

Mengkueri kebijakan retensi data untuk cadangan log 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:DescribeLogBackupPolicy

get

*dbcluster

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

ID Kluster.

Catatan

Anda dapat memanggil operasi DescribeDBClusters untuk mengkueri informasi tentang semua kluster di Wilayah tertentu, termasuk ID kluster.

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

Elemen respons

Element

Type

Description

Example

object

LogBackupRetentionPeriod

integer

The retention period of the log backup. Valid values:

  • 3 to 7300: The log backup is retained for 3 to 7300 days.

  • -1: The log backups are retained permanently.

Catatan
  • If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead.

7

RequestId

string

The request ID.

62EE0051-102B-488D-9C79-D607B8******

LogBackupAnotherRegionRetentionPeriod

string

The retention period of the cross-region log backup. Valid values:

  • 0: The cross-region log backup feature is disabled.

  • 30 to 7300: The cross-region log backup is retained for 30 to 7300 days.

  • -1: The cross-region log backups are retained permanently.

Catatan
    • When you create a cluster, the default value is 0. This value indicates that the cross-region log backup feature is disabled.

    • If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead.

0

LogBackupAnotherRegionRegion

string

The region in which the cross-region log backup is stored. For information about the regions that support cross-region backup, see Overview.

Catatan

If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead.

cn-beijing

EnableBackupLog

integer

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

  • 0: The feature is disabled.

  • 1: The feature is enabled. By default, the log backup feature is enabled and cannot be disabled.

Catatan

If the advanced backup feature is enabled, this parameter is not recommended. Use the AdvancedLogPolicies parameter instead.

1

AdvancedLogPolicies

object

AdvancedLogPolicy

array<object>

The details of the advanced log backup policy.

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

object

PolicyId

string

The ID of the log backup policy.

Catatan

This parameter is returned only for clusters for which the cross-region log backup feature is enabled.

1c75zkmqczcd1vbf6f6d05***

LogRetentionType

string

The retention type for the log backup. Valid values:

  • never: The log backups never expire.

  • delay: The log backups are retained for a specified number of days.

delay

LogRetentionValue

string

The number of days to retain log backups. Valid values:

  • 3 to 7300: The retention period in days.

  • -1: The log backups are retained permanently.

7

SrcType

string

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

  • db: database cluster

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: level-2 cross-region backup

level1

DestType

string

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

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: level-2 cross-region backup

level2

EnableLogBackup

integer

Indicates whether the log backup feature is enabled. The return value can be:

  • 1: enabled

  • 0: disabled

1

SrcRegion

string

The source region of the log backup policy.

cn-hangzhou

DestRegion

string

The destination region of the log backup policy.

cn-shanghai

Contoh

Respons sukses

JSONformat

{
  "LogBackupRetentionPeriod": 7,
  "RequestId": "62EE0051-102B-488D-9C79-D607B8******",
  "LogBackupAnotherRegionRetentionPeriod": "0",
  "LogBackupAnotherRegionRegion": "cn-beijing",
  "EnableBackupLog": 1,
  "AdvancedLogPolicies": {
    "AdvancedLogPolicy": [
      {
        "PolicyId": "1c75zkmqczcd1vbf6f6d05***",
        "LogRetentionType": "delay",
        "LogRetentionValue": "7",
        "SrcType": "level1",
        "DestType": "level2",
        "EnableLogBackup": 1,
        "SrcRegion": "cn-hangzhou",
        "DestRegion": "cn-shanghai"
      }
    ]
  }
}

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.