Binds one or more data sources to a backup policy.
Operation description
- You can bind data sources to only one policy in each request.
- Elastic Compute Service (ECS) instances can be bound to only one policy.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
hbr:CreatePolicyBindings | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
PolicyId | string | No | The ID of the backup policy. | po-000************8ep |
PolicyBindingList | array<object> | No | The data sources that you want to bind to the backup policy. | |
object | No | The details of the data sources that you want to bind to the backup policy. | ||
PolicyBindingDescription | string | No | The description of the association. | Bind data sources to a backup policy |
DataSourceId | string | No | The ID of the data source. The meaning of this parameter depends on the SourceType parameter. Valid values:
| i-bp1************dl8 |
Disabled | string | No | Specifies whether to disable the backup policy for the data source. Valid values:
| true |
SourceType | string | No | The type of the data source. Valid values:
| UDM_ECS |
Source | string | No |
| backup/ |
Include | string | No | This parameter is required only if you set the SourceType parameter to ECS_FILE or File. This parameter specifies the type of files to be backed up. All files of the specified type are backed up. The value can be up to 255 characters in length. | [\"*.doc\",\"*.xltm\"] |
Exclude | string | No | This parameter is required only if you set the SourceType parameter to ECS_FILE or File. This parameter specifies the type of files that do not need to be backed up. No files of the specified type are backed up. The value can be up to 255 characters in length. | [\"*.doc\",\"*.xltm\"] |
SpeedLimit | string | No | This parameter is required only if you set the SourceType parameter to ECS_FILE or File. This parameter specifies the throttling rules. Format:
| 0:24:1024 |
AdvancedOptions | object | No | The advanced options. | |
UdmDetail | object | No | The advanced options for ECS instance backup. | |
ExcludeDiskIdList | array | No | The IDs of the disks that do not need to be protected. If the DiskIdList parameter is not empty, this parameter is ignored. | |
string | No | The ID of the disk that does not need to be protected. | d-bp1************apo | |
DiskIdList | array | No | The IDs of the disks that need to be protected. If all disks need to be protected, this parameter is empty. | |
string | No | The ID of the 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 disks are Enterprise SSDs (ESSDs). | true |
AppConsistent | boolean | No | Specifies whether to enable application consistency. You can enable application consistency only if all disks are ESSDs. | false |
RamRoleName | string | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies the name of the Resource Access Management (RAM) role that is required to create application-consistent snapshots. | AliyunECSInstanceForHbrRole |
PreScriptPath | string | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies the path of the pre-freeze scripts that are executed before application-consistent snapshots are created. | /tmp/prescript.sh |
PostScriptPath | string | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies the path of the post-thaw scripts that are executed after application-consistent snapshots are created. | /tmp/postscript.sh |
EnableFsFreeze | boolean | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies whether to enable Linux fsfreeze to put file systems into the read-only state before application-consistent snapshots are created. Default value: true. | true |
TimeoutInSeconds | long | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies the I/O freeze timeout period. Default value: 30. Unit: seconds. | 30 |
EnableWriters | boolean | No | This parameter is required only if you set the AppConsistent parameter to true. This parameter specifies whether to create application-consistent snapshots. Valid values:
Default value: true. | true |
OssDetail | object | No | The advanced options for OSS backup. | |
InventoryId | string | No | The name of the OSS inventory. If this parameter is not empty, the OSS inventory is used for performance optimization.
| oss-inventory-default |
InventoryCleanupPolicy | string | No | Specifies whether the system deletes the inventory lists when a backup is completed. This parameter is valid only when OSS inventories are used. Valid values:
| NO_CLEANUP |
FileDetail | object | No | The advanced options for file backup. | |
UseVSS | boolean | No | Specifies whether to enable the Volume Shadow Copy Service (VSS) feature. Valid values:
| true |
AdvPolicy | boolean | No | Specifies whether to use an advanced policy. Valid values:
| true |
CommonNasDetail | object | No | The advanced options for on-premises NAS backup. | |
FullOnIncrementFail | boolean | No | Specifies whether the system performs full backup if incremental backup fails. Valid values:
| true |
FetchSliceSize | long | No | The size of backup shards (the number of files). | 100000 |
ClusterId | string | No | The ID of the backup client group. When you perform on-premises NAS backup, Cloud Backup selects clients from the specified backup client group. | cl-000**************ggu |
CommonFileSystemDetail | object | No | The advanced options for CPFS backup. | |
FullOnIncrementFail | boolean | No | Specifies whether the system performs full backup if incremental backup fails. Valid values:
| true |
FetchSliceSize | long | No | The size of backup shards (the number of files). | 100000 |
CrossAccountType | string | No | Specifies whether to back up and restore data within the same Alibaba Cloud account or across Alibaba Cloud accounts. Default value: SELF_ACCOUNT. Valid values:
| SELF_ACCOUNT |
CrossAccountUserId | long | No | The ID of the source Alibaba Cloud account that authorizes the current Alibaba Cloud account to back up data across Alibaba Cloud accounts. | 144**********732 |
CrossAccountRoleName | string | No | The name of the RAM role that is created within the source Alibaba Cloud account and assigned to the current Alibaba Cloud account to authorize the current Alibaba Cloud account to back up data across Alibaba Cloud accounts. | hbrcrossrole |
Response parameters
Examples
Sample success responses
JSON
format
{
"Success": true,
"Code": "200",
"Message": "successful",
"RequestId": "82CC5B6C-72F7-5D39-92F6-67887DF9AD46"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | PolicyAlreadyBoundWithThisDataSource | This datasource has already been bound with the policy, please use another one. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-03-13 | The Error code has changed | View Change Details |