DescribePolicyBindings
Queries one or more data sources bound to a policy, or queries one or more policies bound to a data source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hbr:DescribePolicyBindings |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| NextToken |
string |
No |
The token used to retrieve the next page of policy and data source bindings. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
No |
The number of results returned per query. Valid values: 10 to 100. Default value: 10. |
10 |
| PolicyId |
string |
No |
The policy ID. |
po-000************hky |
| DataSourceIds |
array |
No |
The list of data source IDs. |
|
|
string |
No |
The data source ID. |
i-uf6************68n |
|
| SourceType |
string |
No |
The data source type. Valid values:
|
UDM_ECS |
| Filters |
array<object> |
No |
The query filters. |
|
|
object |
No |
The query filters. |
||
| Key |
string |
No |
The key in the query filter. Valid values:
|
DataSourceType |
| Operator |
string |
No |
The matching method. Default value: IN. This parameter specifies the matching operator for the key and value in the filter. Valid values:
|
IN |
| Values |
array |
No |
The values to be matched in the query filter. |
|
|
string |
No |
The values to be matched in the query filter. |
UDM_ECS |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
DescribePolicyBindingsResponse |
||
| PolicyBindings |
array<object> |
The list of policy bindings. |
|
|
array<object> |
The details of the policy binding. |
||
| CreatedTime |
integer |
The creation time. The value is a UNIX timestamp in seconds. |
1661399570 |
| UpdatedTime |
integer |
The update time. The value is a UNIX timestamp in seconds. |
1653611573 |
| PolicyBindingId |
string |
The policy binding ID. |
pd-000************slc |
| PolicyBindingDescription |
string |
The description of the policy binding. |
po-000************eslc-i-uf6************y5g |
| PolicyId |
string |
The policy ID. |
po-000************56y |
| DataSourceId |
string |
The data source ID. |
i-8vb************5ly |
| Disabled |
boolean |
Specifies whether the policy is disabled for the data source. Valid values:
|
true |
| Source |
string |
The backup source.
|
backup/ |
| Include |
string |
The file types to include in the backup. All files of these types are backed up. This parameter is required only when SourceType is set to ECS_FILE or File. The value can be up to 255 characters in length. |
[\"*.doc\",\"*.xltm\"] |
| Exclude |
string |
The file types to exclude from the backup. All files of these types are excluded. This parameter is required only when SourceType is set to ECS_FILE or File. The value can be up to 255 characters in length. |
[\"*.doc\",\"*.xltm\"] |
| SpeedLimit |
string |
The backup traffic throttling. This parameter is required only when SourceType is set to ECS_FILE or File. The format is
|
0:24:10240 |
| AdvancedOptions |
object |
The advanced options. |
|
| UdmDetail |
object |
The advanced options for ECS instance backup. |
|
| ExcludeDiskIdList |
array |
The list of cloud disk IDs that do not need to be protected. This parameter is ignored if DiskIdList is not empty. |
|
|
string |
The ID of the cloud disk that does not need to be protected. |
d-bp1************apo |
|
| DiskIdList |
array |
The list of cloud disk IDs to be protected. This value is empty when all cloud disks are protected. |
|
|
string |
The ID of the cloud disk to be protected. |
d-bp1************apo |
|
| SnapshotGroup |
boolean |
Specifies whether to create a snapshot-consistent group. You can create a snapshot-consistent group only when all cloud disks are ESSDs. |
true |
| AppConsistent |
boolean |
Specifies whether to enable application consistency. You can enable application consistency for snapshots only when all cloud disks are ESSDs. |
false |
| RamRoleName |
string |
The name of the RAM role configured for creating application-consistent snapshots. This parameter is required only when AppConsistent is set to true. |
AliyunECSInstanceForHbrRole |
| PreScriptPath |
string |
The path of the pre-freeze script executed before creating an application-consistent snapshot. This parameter is required only when AppConsistent is set to true. |
/tmp/prescript.sh |
| PostScriptPath |
string |
The path of the post-thaw script executed after creating an application-consistent snapshot. This parameter is required only when AppConsistent is set to true. |
/tmp/postscript.sh |
| EnableFsFreeze |
boolean |
Specifies whether to use the Linux FsFreeze mechanism to ensure read consistency of the file system before creating an application-consistent snapshot. This parameter is required only when AppConsistent is set to true. Default value: true. |
true |
| TimeoutInSeconds |
integer |
The I/O freeze timeout period. Unit: seconds. This parameter is required only when AppConsistent is set to true. Default value: 30. |
30 |
| EnableWriters |
boolean |
Specifies whether to create an application-consistent snapshot. This parameter is required only when AppConsistent is set to true. Valid values:
|
true |
| DestinationKmsKeyId |
string |
The ID of the custom KMS key in the destination region. If this field is not empty and cross-region replication is enabled, this key is used to encrypt the cross-region replication data. |
4ed37b1e-da51-4187-aceb-9db4f9b7148b |
| OssDetail |
object |
The advanced options for OSS backup. |
|
| InventoryId |
string |
The name of the OSS inventory. If this value is not empty, the OSS inventory is used for performance tuning.
|
inventory_test |
| InventoryCleanupPolicy |
string |
Specifies whether to delete the inventory file after the backup. This parameter is valid only when an OSS inventory is used. Valid values:
|
DELETE_CURRENT_AND_PREVIOUS |
| IgnoreArchiveObject |
boolean |
Excludes archive objects from task statistics and failed file lists. |
true |
| FileDetail |
object |
The advanced options for file backup. |
|
| UseVSS |
boolean |
Specifies whether to enable the Volume Shadow Copy Service (VSS) feature for Windows. Valid values:
|
false |
| AdvPolicy |
boolean |
Specifies whether to use the advanced policy. Valid values:
|
false |
| CommonNasDetail |
object |
The advanced options for on-premises NAS backup. |
|
| FullOnIncrementFail |
boolean |
Specifies whether to switch to a full backup when an incremental backup fails. Valid values:
|
true |
| FetchSliceSize |
integer |
The sub-task slice size (number of files). |
100000 |
| ClientId |
string |
The backup client ID. |
c-0001eg6mcvjs93f46s2d |
| ClusterId |
string |
The client group ID. |
cl-000gkcofngi04j6k680a |
| CommonFileSystemDetail |
object |
The advanced options for large-scale file system backup. |
|
| FullOnIncrementFail |
boolean |
Specifies whether to switch to a full backup when an incremental backup fails. Valid values:
|
true |
| FetchSliceSize |
integer |
The sub-task slice size (number of files). |
100000 |
| SourceType |
string |
The data source type. Valid values:
|
UDM_ECS |
| CrossAccountType |
string |
The cross-account backup type. Valid values:
|
CROSS_ACCOUNT |
| CrossAccountUserId |
integer |
The ID of the source account for cross-account backup. |
1480************ |
| CrossAccountRoleName |
string |
The name of the RAM role created in the source account for cross-account backup. |
hbrcrossrole |
| CreatedByTag |
boolean |
Indicates whether the resource is automatically associated through the resource tags of the backup policy. |
false |
| HitTags |
array<object> |
The matched tag rules. |
|
|
object |
|||
| Key |
string |
The tag key. |
env |
| Value |
string |
The tag value. |
prod |
| Operator |
string |
The tag matching rule. Valid values:
|
EQUAL |
| NextToken |
string |
The token used to retrieve the next page of policy and data source bindings. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
The number of results returned per query. Valid values: 10 to 100. Default value: 10. |
10 |
| TotalCount |
integer |
The total number of records. |
38 |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
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. |
5225929A-4EBD-55EE-9FE1-4A130E582A76 |
Examples
Success response
JSON format
{
"PolicyBindings": [
{
"CreatedTime": 1661399570,
"UpdatedTime": 1653611573,
"PolicyBindingId": "pd-000************slc",
"PolicyBindingDescription": "po-000************eslc-i-uf6************y5g",
"PolicyId": "po-000************56y",
"DataSourceId": "i-8vb************5ly",
"Disabled": true,
"Source": "backup/",
"Include": "[\\\"*.doc\\\",\\\"*.xltm\\\"]",
"Exclude": "[\\\"*.doc\\\",\\\"*.xltm\\\"]",
"SpeedLimit": "0:24:10240",
"AdvancedOptions": {
"UdmDetail": {
"ExcludeDiskIdList": [
"d-bp1************apo\n"
],
"DiskIdList": [
"d-bp1************apo\n"
],
"SnapshotGroup": true,
"AppConsistent": false,
"RamRoleName": "AliyunECSInstanceForHbrRole",
"PreScriptPath": "/tmp/prescript.sh",
"PostScriptPath": "/tmp/postscript.sh",
"EnableFsFreeze": true,
"TimeoutInSeconds": 30,
"EnableWriters": true,
"DestinationKmsKeyId": "4ed37b1e-da51-4187-aceb-9db4f9b7148b"
},
"OssDetail": {
"InventoryId": "inventory_test",
"InventoryCleanupPolicy": "DELETE_CURRENT_AND_PREVIOUS",
"IgnoreArchiveObject": true
},
"FileDetail": {
"UseVSS": false,
"AdvPolicy": false
},
"CommonNasDetail": {
"FullOnIncrementFail": true,
"FetchSliceSize": 100000,
"ClientId": "c-0001eg6mcvjs93f46s2d",
"ClusterId": "cl-000gkcofngi04j6k680a"
},
"CommonFileSystemDetail": {
"FullOnIncrementFail": true,
"FetchSliceSize": 100000
}
},
"SourceType": "UDM_ECS",
"CrossAccountType": "CROSS_ACCOUNT",
"CrossAccountUserId": 0,
"CrossAccountRoleName": "hbrcrossrole",
"CreatedByTag": false,
"HitTags": [
{
"Key": "env",
"Value": "prod",
"Operator": "EQUAL"
}
]
}
],
"NextToken": "caeba0bbb2be03f84eb48b699f0a",
"MaxResults": 10,
"TotalCount": 38,
"Success": true,
"Code": "200",
"Message": "successful",
"RequestId": "5225929A-4EBD-55EE-9FE1-4A130E582A76"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.