All Products
Search
Document Center

Cloud Backup:UpdatePolicyBinding

Last Updated:Jun 11, 2026

Memperbarui asosiasi antara kebijakan cadangan dan sumber data.

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

update

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

PolicyId

string

Yes

ID kebijakan cadangan.

po-000************ky9

DataSourceId

string

Yes

ID sumber data.

i-bp1************dtv

SourceType

string

Yes

Jenis sumber data. Nilai valid:

  • UDM_ECS: Cadangan Instance ECS.

UDM_ECS

PolicyBindingDescription

string

No

Deskripsi pengikatan kebijakan.

po-000************5xx-i-2ze************nw4

Disabled

boolean

No

Apakah akan menonaktifkan kebijakan cadangan untuk sumber data.

  • true: Kebijakan cadangan dinonaktifkan.

  • false: Kebijakan cadangan tidak dinonaktifkan.

true

Source

string

No

Parameter ini memiliki arti berbeda berdasarkan nilai SourceType.

  • OSS: Awalan objek yang ingin Anda cadangkan. Jika Anda tidak menentukan parameter ini, seluruh bucket akan dicadangkan. Hanya satu awalan yang didukung. Untuk mencadangkan direktori /backup, tetapkan parameter ini ke /backup.

  • ECS_FILE: Jalur ke file yang ingin Anda cadangkan. Jika Anda tidak menentukan parameter ini, semua file akan dicadangkan. Anda dapat menentukan beberapa jalur. Untuk mencadangkan file di jalur /a dan /b, tetapkan parameter ini ke ["/a", "/b"].

  • File: Jalur ke file yang ingin Anda cadangkan. Jika Anda tidak menentukan parameter ini, semua file akan dicadangkan. Anda dapat menentukan beberapa jalur. Untuk mencadangkan file di direktori /a dan /b, tetapkan parameter ini ke ["/a", "/b"].

  • COMMON_FILE_SYSTEM: Wajib. Jalur cadangan. Anda dapat menentukan beberapa jalur. Untuk mencadangkan jalur /a dan /b, tetapkan parameter ini ke ["/a", "/b"]. Untuk mencadangkan direktori root, tetapkan parameter ini ke ["/"].

  • COMMON_NAS: Wajib. Jalur cadangan. Hanya satu jalur yang didukung. Untuk mencadangkan jalur /a, tetapkan parameter ini ke ["/a"]. Untuk mencadangkan direktori root, tetapkan parameter ini ke ["/"].

  • OTS: Daftar tabel yang ingin Anda cadangkan. Jika Anda tidak menentukan parameter ini, semua tabel akan dicadangkan. Anda dapat menentukan beberapa tabel. Untuk mencadangkan Tabel a dan Tabel b, tetapkan parameter ini ke ["a", "b"].

backup/

Include

string

No

Parameter ini hanya tersedia jika Anda menetapkan SourceType ke ECS_FILE, File, NAS, COMMON_NAS, atau COMMON_FILE_SYSTEM. Parameter ini menentukan jenis file yang akan dicadangkan. Semua file dengan jenis yang ditentukan akan dicadangkan. Nilai dapat memiliki panjang hingga 255 karakter.

[\"*.doc\",\"*.xltm\"]

Exclude

string

No

Parameter ini wajib saat SourceType ditetapkan ke ECS_FILE, File, NAS, COMMON_NAS, atau COMMON_FILE_SYSTEM. Parameter ini menentukan jenis file yang akan dikecualikan dari cadangan. Nilai dapat memiliki panjang hingga 255 karakter.

[\"*.doc\",\"*.xltm\"]

SpeedLimit

string

No

Parameter ini hanya wajib jika Anda menetapkan SourceType ke ECS_FILE atau File. Parameter ini menentukan aturan pembatasan kecepatan untuk cadangan. Formatnya adalah {start}{end}{bandwidth}. Pisahkan beberapa aturan pembatasan kecepatan dengan garis vertikal (|). Periode pengatur waktu aturan tidak boleh tumpang tindih.

  • start: Jam mulai.

  • end: Jam selesai.

  • bandwidth: Kecepatan pembatasan. Unit: KB/s.

0:24:5120

AdvancedOptions

object

No

Opsi lanjutan.

UdmDetail

object

No

The details of the ECS instance backup.

ExcludeDiskIdList

array

No

The list of cloud disk IDs that do not need to be protected. This parameter is ignored when DiskIdList is not empty.

string

No

The ID of a cloud disk that does not need to be protected.

d-bp1************apo

DiskIdList

array

No

The list of cloud disk IDs that need to be protected. If you want to protect all cloud disks, leave this parameter empty.

string

No

The ID of a cloud disk that needs to be protected.

d-bp1************apo

SnapshotGroup

boolean

No

Specifies whether to create a snapshot-consistent group. You can create a snapshot-consistent group only if all disk types are Enhanced SSDs (ESSDs).

true

AppConsistent

boolean

No

Specifies whether to enable application consistency. You can enable application consistency only if all disk types are ESSDs.

false

RamRoleName

string

No

This parameter is required only if you set AppConsistent to true. This parameter specifies the name of the RAM role that is required to create application-consistent snapshots.

AliyunECSInstanceForHbrRole

PreScriptPath

string

No

This parameter is required only if you set AppConsistent to true. This parameter specifies the path to the pre-freeze script that is run before an application-consistent snapshot is created.

/tmp/prescript.sh

PostScriptPath

string

No

This parameter is required only if you set AppConsistent to true. This parameter specifies the path to the post-thaw script that is run after an application-consistent snapshot is created.

/tmp/postscript.sh

EnableFsFreeze

boolean

No

This parameter is required only if you set AppConsistent to true. This parameter specifies whether to use the FsFreeze mechanism of Linux to ensure file system read consistency before an application-consistent snapshot is created. The default value is true.

true

TimeoutInSeconds

integer

No

This parameter is required only if you set AppConsistent to true. This parameter specifies the I/O freeze timeout period. The default value is 30 seconds.

30

EnableWriters

boolean

No

This parameter is required only if you set AppConsistent to true. This parameter specifies whether to create an application-consistent snapshot:

  • true: Create an application-consistent snapshot.

  • false: Create a file system-consistent snapshot.

The default value is true.

true

OssDetail

object

No

The details of the OSS backup.

InventoryId

string

No

The name of the OSS inventory. If you specify this parameter, OSS inventory is used for performance tuning.

  • Use an inventory to improve the performance of incremental backups when you back up more than 100 million OSS objects. The storage fees for the inventory files are charged by OSS.

  • It takes time to generate an OSS inventory file. Before the inventory file is generated, the backup job may fail. You can wait for the next backup cycle to run.

30663060

InventoryCleanupPolicy

string

No

Specifies whether to delete the inventory file after a backup. This parameter is valid only when you use an OSS inventory. Valid values:

  • NO_CLEANUP: Does not delete the inventory file.

  • DELETE_CURRENT: Deletes the current file.

  • DELETE_CURRENT_AND_PREVIOUS: Deletes all files.

NO_CLEANUP

IgnoreArchiveObject

boolean

No

Specifies whether to exclude archive objects from task statistics and the list of failed files.

true

CommonFileSystemDetail

object

No

The details of the large-scale file system backup.

FullOnIncrementFail

boolean

No

Specifies whether to run a full backup if an incremental backup fails. Valid values:

  • true: Runs a full backup.

  • false: Does not run a full backup.

true

FetchSliceSize

integer

No

The size of the backup shard (the number of files).

100000

Elemen respons

Element

Type

Description

Example

object

UpdatePolicyBindingResponse

Success

boolean

Indicates whether the request was successful.

  • true: The request was successful.

  • false: The request failed.

true

Code

string

The return code. The value 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.

B6F24C46-54B9-519B-9AB8-A8988D705E67

Contoh

Respons sukses

JSONformat

{
  "Success": true,
  "Code": "200",
  "Message": "successful",
  "RequestId": "B6F24C46-54B9-519B-9AB8-A8988D705E67"
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.