All Products
Search
Document Center

Cloud Backup:UpdatePolicyBinding

Last Updated:Jul 30, 2026

Modifies the association between a policy and a data source.

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

hbr:UpdatePolicyBinding

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

PolicyId

string

Yes

The policy ID.

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

DataSourceId

string

Yes

The data source ID.

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

SourceType

string

Yes

The data source type. Valid values:

  • UDM_ECS: ECS instance backup.

  • OSS: OSS backup.

  • NAS: Alibaba Cloud NAS backup.

  • COMMON_NAS: On-premises NAS backup.

  • ECS_FILE: ECS File Backup Essential Edition.

  • File: On-premises file backup.

  • COMMON_FILE_SYSTEM: CPFS backup.

  • OTS: Tablestore backup.

UDM_ECS

PolicyBindingDescription

string

No

The description of the policy binding.

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

Disabled

boolean

No

Specifies whether the policy is suspended for the data source.

  • true: Suspended.

  • false: Not suspended.

true

Source

string

No

The meaning varies depending on the SourceType value:

  • OSS: The prefix to back up. If not specified, the entire root directory of the bucket is backed up. Only a single prefix is supported. To back up /backup, set this parameter to /backup.

  • ECS_FILE: The file directories to back up. If not specified, all directories are backed up. Multiple directories are supported. To back up files in /a and /b, set this parameter to ["/a", "/b"].

  • File: The file directories to back up. If not specified, all directories are backed up. Multiple directories are supported. To back up files in /a and /b, set this parameter to ["/a", "/b"].

  • COMMON_FILE_SYSTEM: Required. The source paths to back up. Multiple paths are supported. To back up /a and /b, set this parameter to ["/a", "/b"]. To back up the root path, set this parameter to ["/"].

  • COMMON_NAS: Required. The source path to back up. Only a single path is supported. To back up /a, set this parameter to ["/a"]. To back up the root path, set this parameter to ["/"].

  • OTS: The list of data tables to back up. If not specified, all data tables are backed up. Multiple data tables are supported. To back up data tables a and b, set this parameter to ["a", "b"].

backup/

Include

string

No

This parameter is valid only when SourceType is set to ECS_FILE, File, NAS, COMMON_NAS, or COMMON_FILE_SYSTEM. Specifies the file types to back up. All files of these types are backed up. The value can be up to 255 characters in length.

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

Exclude

string

No

This parameter is valid only when SourceType is set to ECS_FILE, File, NAS, COMMON_NAS, or COMMON_FILE_SYSTEM. Specifies the file types to back up. All files of these types are backed up. The value can be up to 255 characters in length.

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

SpeedLimit

string

No

This parameter is required only when SourceType is set to ECS_FILE or File. Specifies the backup traffic control. The format is {start}{end}{bandwidth}. Multiple traffic control configurations are separated by delimiters, and the time ranges cannot overlap.

  • start: The start hour.

  • end: The end hour.

  • bandwidth: The rate limit, in KB/s.

0:24:5120

AdvancedOptions

object

No

The advanced options.

UdmDetail

object

No

The ECS instance backup details.

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 cloud disk ID that does not need to be protected.

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

DiskIdList

array

No

The list of cloud disk IDs that need to be protected. This value is empty when all cloud disks are protected.

string

No

The cloud disk ID that needs to be protected.

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

SnapshotGroup

boolean

No

Specifies whether to create a snapshot-consistent group. Snapshot-consistent groups are supported only when all cloud disk types are ESSD.

true

AppConsistent

boolean

No

Specifies whether to create an application-consistent snapshot. Application-consistent snapshots are supported only when all cloud disk types are ESSD.

false

RamRoleName

string

No

This parameter is required only when AppConsistent is set to true. The RAM role name required for creating application-consistent snapshots.

AliyunECSInstanceForHbrRole

PreScriptPath

string

No

This parameter is required only when AppConsistent is set to true. The path of the pre-freeze script to run before creating an application-consistent snapshot.

/tmp/prescript.sh

PostScriptPath

string

No

This parameter is required only when AppConsistent is set to true. The path of the post-thaw script to run after creating an application-consistent snapshot.

/tmp/postscript.sh

EnableFsFreeze

boolean

No

This parameter is required only when AppConsistent is set to true. Specifies whether to use the Linux FsFreeze mechanism to ensure the file system is in read consistency before creating an application-consistent snapshot. Default value: true.

true

TimeoutInSeconds

integer

No

This parameter is required only when AppConsistent is set to true. The I/O freeze timeout period. Unit: seconds. Default value: 30.

30

EnableWriters

boolean

No

This parameter is required only when AppConsistent is set to true. Specifies whether to create an application-consistent snapshot:

  • true: Creates an application-consistent snapshot.

  • false: Creates a file system-consistent snapshot.

Default value: true.

true

OssDetail

object

No

The OSS backup details.

InventoryId

string

No

The OSS inventory name. When this value is not empty, the OSS inventory is used for performance optimization.

  • For more than 100 million OSS objects, use an inventory to improve incremental performance. Storage fees generated by inventory files are charged separately by OSS.

  • OSS inventory files take time to generate. Backup jobs may fail before the inventory files are generated. Wait for the next cycle to execute.

30663060

InventoryCleanupPolicy

string

No

Specifies whether to delete inventory files after backup. This parameter is valid only when OSS inventory is used. Valid values:

  • NO_CLEANUP: Do not delete.

  • DELETE_CURRENT: Delete the current file.

  • DELETE_CURRENT_AND_PREVIOUS: Delete all files.

NO_CLEANUP

IgnoreArchiveObject

boolean

No

Specifies whether to exclude archive objects from job statistics and failed file lists.

true

CommonFileSystemDetail

object

No

The large-scale file system backup details.

FullOnIncrementFail

boolean

No

Specifies whether to switch to a full backup when an incremental backup fails. Valid values:

  • true: Switches to a full backup upon failure.

  • false: Does not switch to a full backup upon failure.

true

FetchSliceSize

integer

No

The sub-task slice size (number of files).

100000

Response elements

Element

Type

Description

Example

object

UpdatePolicyBindingResponse

Success

boolean

Indicates whether the request was successful.

  • true: Successful.

  • false: Failed.

true

Code

string

The return code. A value of 200 indicates success.

200

Message

string

The returned message. The value "successful" is returned for successful requests. An error message is returned for failed requests.

successful

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.