UpdatePolicyBinding

Updated at:

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 Standard Edition.

  • File: On-premises file backup.

  • COMMON_FILE_SYSTEM: CPFS agent-based backup.

  • OTS: Tablestore backup.

  • CPFS: CPFS agentless 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. Valid values:

  • true: Suspended.

  • false: Not suspended.

true

Source

string

No

The backup source. The meaning varies based on the value of SourceType.

  • OSS: The prefix to back up. If not specified, the root directory of the entire bucket is backed up. Only a single prefix is supported. To back up objects with the data prefix, enter data instead of /data.

  • ECS_FILE: The file directories to back up. If not specified, all directories are backed up. Multiple directories can be specified. To back up files in the /a and /b directories, enter ["/a", "/b"].

  • File: The file directories to back up. If not specified, all directories are backed up. Multiple directories can be specified. To back up files in the /a and /b directories, enter ["/a", "/b"].

  • COMMON_FILE_SYSTEM: Required. The source paths. Multiple paths can be specified. To back up the /a and /b paths, enter ["/a", "/b"]. To back up the root path, enter ["/"].

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

  • OTS: The list of data tables to back up. If not specified, all data tables are backed up. Multiple data tables can be specified. To back up data tables a and b, enter ["a", "b"].

  • CPFS: Required. The source paths. Multiple paths can be specified. To back up the /a and /b paths, enter ["/a", "/b"]. To back up the root path, enter ["/"].

/src

Include

string

No

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

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

Exclude

string

No

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

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

SpeedLimit

string

No

The backup traffic throttling. This parameter is required when SourceType is set to ECS_FILE or File. The format is {start}{end}{bandwidth}. Multiple throttling configurations are separated, and the configured time periods must not overlap.

  • start: The start hour.

  • end: The end hour.

  • bandwidth: The bandwidth limit. Unit: KB/s.

0:24:5120

AdvancedOptions

object

No

The advanced options.

UdmDetail

object

No

The details of the ECS instance backup.

ExcludeDiskIdList

array

No

The IDs of the cloud disks that do not need to be protected. This parameter is ignored if DiskIdList is not empty.

string

No

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

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

DiskIdList

array

No

The IDs of the cloud disks to be protected. This value is empty when all cloud disks are protected.

string

No

The ID of the cloud disk 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 disks are ESSDs.

true

AppConsistent

boolean

No

Specifies whether to enable application consistency. Application-consistent snapshots are supported only when all cloud disks are ESSDs.

false

RamRoleName

string

No

The name of the RAM role configured to create application-consistent snapshots. This parameter is required when AppConsistent is set to true.

AliyunECSInstanceForHbrRole

PreScriptPath

string

No

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

/tmp/prescript.sh

PostScriptPath

string

No

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

/tmp/postscript.sh

EnableFsFreeze

boolean

No

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

true

TimeoutInSeconds

integer

No

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

30

EnableWriters

boolean

No

Specifies whether to configure application-consistent snapshots. This parameter is required when AppConsistent is set to true. Valid values:

  • true: Creates application-consistent snapshots.

  • false: Creates file system-consistent snapshots.

Default value: true.

true

OssDetail

object

No

The details of the OSS backup.

InventoryId

string

No

The name of the OSS inventory. If this value is not empty, the OSS inventory is used for performance tuning.

  • Use an inventory to improve incremental backup performance when backing up more than 100 million OSS objects. Storage fees generated by the inventory files are charged separately by OSS.

  • Generating OSS inventory files takes time. Backups may fail before the generation is complete. In this case, wait for the next backup cycle.

30663060

InventoryCleanupPolicy

string

No

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

  • NO_CLEANUP: Does not delete the files.

  • DELETE_CURRENT: Deletes the current file.

  • DELETE_CURRENT_AND_PREVIOUS: Deletes all files.

NO_CLEANUP

IgnoreArchiveObject

boolean

No

Excludes archived objects from task statistics and failed file lists.

true

CommonFileSystemDetail

object

No

The details of the large-scale file system backup.

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 backup slice size (number of files).

100000

Response elements

Element

Type

Description

Example

object

UpdatePolicyBindingResponse

Success

boolean

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

Code

string

The return code. A value of 200 indicates success.

200

Message

string

The return message. "successful" is returned for successful requests, and specific error messages are 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.