You can query the data sources attached to a policy, or the policies attached 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 that is used to retrieve the next page of results. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
No |
The number of results to return for each query. Valid values: 10 to 100. Default value: 10. |
10 |
| PolicyId |
string |
No |
The policy ID. |
po-000************hky |
| DataSourceIds |
array |
No |
A list of data source IDs. |
|
|
string |
No |
The data source ID. |
i-uf6************68n |
|
| SourceType |
string |
No |
The type of the data source. Valid value:
|
UDM_ECS |
| Filters |
array<object> |
No |
The query filters. |
|
|
object |
No |
The query filters. |
||
| Key |
string |
No |
The key of the filter. Valid values:
|
DataSourceType |
| Operator |
string |
No |
The matching method. The default value is IN. This parameter specifies the operator to use for matching the key and value. Valid values:
|
IN |
| Values |
array |
No |
The value to match in the filter. |
|
|
string |
No |
The value to match in the filter. |
UDM_ECS |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
DescribePolicyBindingsResponse |
||
| PolicyBindings |
array<object> |
The list of policy bindings. |
|
|
object |
The details of the policy binding. |
||
| CreatedTime |
integer |
The time when the policy binding was created. This value is a UNIX timestamp. Unit: seconds. |
1661399570 |
| UpdatedTime |
integer |
The time when the policy binding was last updated. This value is a UNIX timestamp. Unit: seconds. |
1653611573 |
| PolicyBindingId |
string |
The ID of the policy binding. |
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 |
Indicates whether the policy is paused for the data source.
|
true |
| Source |
string |
|
backup/ |
| Include |
string |
This parameter is required only if SourceType is set to ECS_FILE or File. This parameter specifies the file types to back up. All files of the specified types are backed up. This parameter supports a maximum of 255 characters. |
[\"*.doc\",\"*.xltm\"] |
| Exclude |
string |
This parameter is required only if SourceType is set to ECS_FILE or File. This parameter specifies the file types to exclude from the backup. All files of the specified types are not backed up. This parameter supports a maximum of 255 characters. |
[\"*.doc\",\"*.xltm\"] |
| SpeedLimit |
string |
This parameter is required only if SourceType is set to ECS_FILE or File. This parameter specifies the traffic shaping settings for the backup. 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 disk IDs to exclude from the backup. This parameter is ignored if `DiskIdList` is not empty. |
|
|
string |
The ID of the disk to exclude from the backup. |
d-bp1************apo |
|
| DiskIdList |
array |
The list of disk IDs to back up. If you want to back up all disks, leave this parameter empty. |
|
|
string |
The ID of the disk to back up. |
d-bp1************apo |
|
| SnapshotGroup |
boolean |
Indicates whether to create a snapshot-consistent group. You can create a snapshot-consistent group only when all disks of the instance are Enhanced SSDs (ESSDs). |
true |
| AppConsistent |
boolean |
Indicates whether to create an application-consistent snapshot. You can create an application-consistent snapshot only when all disks of the instance are ESSDs. |
false |
| RamRoleName |
string |
This parameter is required only if AppConsistent is set to true. This parameter specifies the name of the RAM role that is required to create an application-consistent snapshot. |
AliyunECSInstanceForHbrRole |
| PreScriptPath |
string |
This parameter is required only if AppConsistent is set to true. This parameter specifies the path of the pre-freeze script that is run before the application-consistent snapshot is created. |
/tmp/prescript.sh |
| PostScriptPath |
string |
This parameter is required only if AppConsistent is set to true. This parameter specifies the path of the post-thaw script that is run after the application-consistent snapshot is created. |
/tmp/postscript.sh |
| EnableFsFreeze |
boolean |
This parameter is required only if AppConsistent is set to true. This parameter indicates whether to use the `fsfreeze` command of the Linux operating system to put the file system in a read-only state before you create an application-consistent snapshot. The default value is true. |
true |
| TimeoutInSeconds |
integer |
This parameter is required only if AppConsistent is set to true. This parameter specifies the timeout period for I/O freeze. The default value is 30 seconds. |
30 |
| EnableWriters |
boolean |
This parameter is required only if AppConsistent is set to true. Indicates whether to create an application-consistent snapshot:
Default value: true. |
true |
| DestinationKmsKeyId |
string |
The ID of a customer managed key (CMK) in the destination region. If you enable cross-region replication and specify this parameter, the cross-region backup is encrypted using the specified key. |
4ed37b1e-da51-4187-aceb-9db4f9b7148b |
| OssDetail |
object |
The advanced options for OSS backup. |
|
| InventoryId |
string |
The name of the OSS inventory. If you specify this parameter, an OSS inventory is used for performance optimization.
|
inventory_test |
| InventoryCleanupPolicy |
string |
Indicates whether to delete the inventory file after a backup. This parameter is valid only when an OSS inventory is used. Valid values:
|
DELETE_CURRENT_AND_PREVIOUS |
| IgnoreArchiveObject |
boolean |
Indicates whether to exclude archive objects from the backup job statistics and the list of failed files. |
true |
| FileDetail |
object |
The advanced options for file backup. |
|
| UseVSS |
boolean |
Indicates whether to enable the Volume Shadow Copy Service (VSS) feature. This feature is available only for Windows instances. Valid values:
|
false |
| AdvPolicy |
boolean |
Indicates whether to use an advanced policy. Valid values:
|
false |
| CommonNasDetail |
object |
The advanced options for on-premises NAS. |
|
| FullOnIncrementFail |
boolean |
Indicates whether to run a full backup if an incremental backup fails. Valid values:
|
true |
| FetchSliceSize |
integer |
The size of a backup shard, which is the 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 |
Indicates whether to run a full backup if an incremental backup fails. Valid values:
|
true |
| FetchSliceSize |
integer |
The size of a backup shard, which is the number of files. |
100000 |
| SourceType |
string |
The type of the data source. Valid value:
|
UDM_ECS |
| CrossAccountType |
string |
The type of cross-account backup. 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 that is created in the source account for cross-account backup. |
hbrcrossrole |
| CreatedByTag |
boolean |
Indicates whether the data source is automatically bound to the backup policy based on tags. |
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.
|
EQUAL |
| NextToken |
string |
The token that is used to retrieve the next page of policy bindings. |
caeba0bbb2be03f84eb48b699f0a |
| MaxResults |
integer |
The number of results returned for each query. Valid values: 10 to 100. Default value: 10. |
10 |
| TotalCount |
integer |
The total number of records. |
38 |
| Success |
boolean |
Indicates whether the request was successful.
|
true |
| Code |
string |
The return code. A value of 200 indicates that the request was successful. |
200 |
| Message |
string |
The returned message. If the request is successful, `successful` is returned. If the request fails, an error message is returned. |
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.