All Products
Search
Document Center

Cloud Backup:DescribePoliciesV2

Last Updated:Jun 11, 2026

Mengkueri satu atau beberapa kebijakan.

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

hbr:DescribePoliciesV2

list

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

NextToken

string

No

Token yang digunakan untuk mengambil halaman kebijakan berikutnya.

caeba0bbb2be03f84eb48b699f0a

MaxResults

integer

No

Jumlah entri yang akan dikembalikan pada setiap halaman.

Nilai valid: 10 hingga 100. Nilai default: 10.

10

PolicyId

string

No

ID kebijakan.

po-000************2l6

Elemen respons

Element

Type

Description

Example

object

DescribePoliciesResponse

Policies

array<object>

The list of policies.

array<object>

The details of the policy.

CreatedTime

integer

The time when the policy was created. This value is a UNIX timestamp. Unit: seconds.

1650248136

UpdatedTime

integer

The time when the policy was updated. This value is a UNIX timestamp. Unit: seconds.

1662080404

PolicyId

string

The policy ID.

po-000************bkz

PolicyName

string

The policy name.

每天备份 + 异地备份

PolicyDescription

string

The description of the policy.

每天早上十点备份,异地复制到上海。

Rules

array<object>

The list of policy rules.

array<object>

The details of the policy rule.

RuleId

string

The rule ID.

rule-000************f1e

RuleType

string

The type of the rule. Each policy must have at least one rule of the BACKUP type and can have only one rule of the TRANSITION type. Valid values:

  • BACKUP: the backup rule.

  • TRANSITION: the lifecycle rule.

  • REPLICATION: the replication rule.

BACKUP

Schedule

string

This parameter is required only when RuleType is set to BACKUP. The backup schedule. The format is I|{startTime}|{interval}. The system runs a backup job at a specified interval, starting from the specified time. The system does not run a backup job to compensate for a missed job. If the last backup job is not complete, the next backup job is not triggered. For example, I|1631685600|P1D indicates that a backup job is run every day, starting from 2021-09-15 14:00:00.

  • startTime: The time to start the backup. This value is a UNIX timestamp. Unit: seconds.

  • interval: The backup interval. The value must be in the ISO 8601 standard. For example, PT1H indicates an interval of one hour. P1D indicates an interval of one day.

I|1648647166|P1D

BackupType

string

This parameter is required only when RuleType is set to BACKUP. The backup type. The value COMPLETE indicates a full backup.

COMPLETE

VaultId

string

This parameter is required only when RuleType is set to BACKUP. The ID of the backup vault.

v-000**************kgm

ReplicationRegionId

string

This parameter is required only when RuleType is set to REPLICATION. The ID of the destination region for replication.

cn-shanghai

Retention

integer

This parameter is required only when RuleType is set to TRANSITION or REPLICATION.

  • If RuleType is set to TRANSITION: the retention period of the backup. The minimum value is 1. Unit: days.

  • If RuleType is set to REPLICATION: the retention period of the remote backup. The minimum value is 1. Unit: days.

7

RetentionRules

array<object>

This parameter is required only when RuleType is set to TRANSITION. The list of special retention rules.

object

The special retention rule.

AdvancedRetentionType

string

The type of the special retention rule. Valid values:

  • WEEKLY: weekly backups

  • MONTHLY: monthly backups

  • YEARLY: yearly backups

YEARLY

WhichSnapshot

integer

Specifies which backup is retained. This parameter is valid only for the first backup. The value must be 1.

1

Retention

integer

The special retention period of the backup. The minimum value is 1. Unit: days.

730

ArchiveDays

integer

This parameter is required only when RuleType is set to TRANSITION. The number of days before a backup is converted to an archive backup. Unit: days.

30

KeepLatestSnapshots

integer

Specifies whether to retain at least one backup version. Valid values:

  • 0: No.

  • 1: Yes.

1

DataSourceFilters

array<object>

This parameter is required only when RuleType is set to TAG. The filter rules for data sources.

object

SourceType

string

The type of the data source. Valid values:

  • UDM_ECS: ECS instance backup

  • OSS: OSS backup

  • NAS: Alibaba Cloud NAS backup

  • ECS_FILE: ECS file backup

  • OTS: Tablestore backup

UDM_ECS

DataSourceIds

array

This parameter is deprecated.

string

This parameter is deprecated.

已废弃。

TagFilters

array<object>

This parameter is required only when RuleType is set to TAG. The filter rules for resource tags.

object

Key

string

The tag key.

env

Value

string

The tag value. If you leave this parameter empty, all tag values are matched.

prod

Operator

string

The tag matching rule. Valid values:

  • EQUAL: Matches the tag key and tag value.

  • NOT: Matches the tag key but not the tag value.

EQUAL

Immutable

boolean

This parameter is valid only when PolicyType is set toUDM_ECS_ONLY. This parameter specifies whether to enable backup locking.

true

PolicyBindingCount

integer

The number of data sources that are bound to the policy.

5

PolicyType

string

The type of the policy. Valid values:

  • STANDARD: a standard backup policy. This policy type supports all data sources except ECS instance backup.

  • UDM_ECS_ONLY: an ECS instance backup policy. This policy type supports only ECS instance backup.

STANDARD

BusinessStatus

string

The business status.

ACTIVE

NextToken

string

The token that is used to retrieve the next page of policies.

caeba0bbb2be03f84eb48b699f0a

MaxResults

integer

The number of entries returned on each page.

Valid values: 10 to 100. Default value: 10.

10

TotalCount

integer

The total number of records.

12

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Code

string

The return code. A value of 200 indicates that the request was successful.

200

Message

string

The message that is returned. If the request was successful, `successful` is returned. If the request failed, an error message is returned.

successful

RequestId

string

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

Contoh

Respons sukses

JSONformat

{
  "Policies": [
    {
      "CreatedTime": 1650248136,
      "UpdatedTime": 1662080404,
      "PolicyId": "po-000************bkz",
      "PolicyName": "每天备份 + 异地备份",
      "PolicyDescription": "每天早上十点备份,异地复制到上海。",
      "Rules": [
        {
          "RuleId": "rule-000************f1e",
          "RuleType": "BACKUP",
          "Schedule": "I|1648647166|P1D",
          "BackupType": "COMPLETE",
          "VaultId": "v-000**************kgm",
          "ReplicationRegionId": "cn-shanghai",
          "Retention": 7,
          "RetentionRules": [
            {
              "AdvancedRetentionType": "YEARLY",
              "WhichSnapshot": 1,
              "Retention": 730
            }
          ],
          "ArchiveDays": 30,
          "KeepLatestSnapshots": 1,
          "DataSourceFilters": [
            {
              "SourceType": "UDM_ECS",
              "DataSourceIds": [
                "已废弃。"
              ]
            }
          ],
          "TagFilters": [
            {
              "Key": "env",
              "Value": "prod",
              "Operator": "EQUAL"
            }
          ],
          "Immutable": true
        }
      ],
      "PolicyBindingCount": 5,
      "PolicyType": "STANDARD",
      "BusinessStatus": "ACTIVE"
    }
  ],
  "NextToken": "caeba0bbb2be03f84eb48b699f0a",
  "MaxResults": 10,
  "TotalCount": 12,
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.