All Products
Search
Document Center

Cloud Backup:DescribePolicyBindings

Last Updated:Nov 13, 2024

Queries one or more data sources bound to a backup policy or queries one or more backup policies bound to a data source.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
hbr:DescribePolicyBindingslist
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MaxResultsintegerNo

The number of results for each query.

Valid values: 10 to 100. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

DescribePolicyBindingsResponse

PolicyBindingsarray<object>

The association between the backup policy and data sources.

Dataobject

The details of the backup policy.

CreatedTimelong

The time when the backup policy was created. The value is a UNIX timestamp. Unit: seconds.

1661399570
UpdatedTimelong

The time when the backup policy was updated. The value is a UNIX timestamp. Unit: seconds.

1653611573
PolicyBindingIdstring

The ID of the association.

pd-000************slc
PolicyBindingDescriptionstring

The description of the association.

po-000************eslc-i-uf6************y5g
PolicyIdstring

The ID of the backup policy.

po-000************56y
DataSourceIdstring

The ID of the data source.

i-8vb************5ly
Disabledboolean

Indicates whether the backup policy is enabled for the data source. Valid values:

  • true: The backup policy is disabled.
  • false: The backup policy is enabled.
true
Sourcestring
  • If the SourceType parameter is set to OSS, set the Source parameter to the prefix of the path to the folder that you want to back up. If you do not specify the Source parameter, the entire bucket (root directory) is backed up.
  • If the SourceType parameter is set to ECS_FILE or File, set the Source parameter to the path to the files that you want to back up. If you do not specify the Source parameter, all paths backed up.
backup/
Includestring

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\"]
Excludestring

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\"]
SpeedLimitstring

This parameter is required only if you set the SourceType parameter to ECS_FILE or File. This parameter specifies the throttling rules. Format: {start}{end}{bandwidth}. Separate multiple throttling rules with vertical bars (|). The time ranges of the throttling rules cannot overlap.

  • start: the start hour.
  • end: the end hour.
  • bandwidth: the bandwidth. Unit: KB/s.
0:24:10240
AdvancedOptionsobject

The advanced options.

UdmDetailobject

The advanced options for ECS instance backup.

ExcludeDiskIdListarray

The IDs of the disks that do not need to be protected. If the DiskIdList parameter is not empty, this parameter is ignored.

ExcludeDiskIdListstring

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

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

The IDs of the disks that need to be protected. If all disks need to be protected, this parameter is empty.

DiskIdListstring

The ID of the disk that needs to be protected.

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

Indicates whether a snapshot-consistent group is created. You can create a snapshot-consistent group only if all disks are enhanced SSDs (ESSDs).

true
AppConsistentboolean

Indicates whether application consistency is enabled. You can enable application consistency only if all disks are ESSDs.

false
RamRoleNamestring

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates the name of the RAM role that is required to create application-consistent snapshots.

AliyunECSInstanceForHbrRole
PreScriptPathstring

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates the path of the pre-freeze scripts that are executed before application-consistent snapshots are created.

/tmp/prescript.sh
PostScriptPathstring

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates the path of the post-thaw scripts that are executed after application-consistent snapshots are created.

/tmp/postscript.sh
EnableFsFreezeboolean

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates whether to enable Linux fsfreeze to put file systems into the read-only state before application-consistent snapshots are created. Default value: true.

true
TimeoutInSecondslong

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates the I/O freeze timeout period. Default value: 30. Unit: seconds.

30
EnableWritersboolean

This parameter is required only if you set the AppConsistent parameter to true. This parameter indicates whether application-consistent snapshots are created. Valid values:

  • true: Application-consistent snapshots are created.
  • false: File system-consistent snapshots are created.

Default value: true.

true
DestinationKmsKeyIdstring

The ID of the custom KMS key in the destination region. If this parameter is not empty and geo-replication is enabled, the key is used for encrypted geo-replication.

4ed37b1e-da51-4187-aceb-9db4f9b7148b
OssDetailobject

The advanced options for OSS backup.

InventoryIdstring

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

  • If you want to back up more than 100 million OSS objects, we recommend that you use inventory lists to accelerate incremental backup. Storage fees for inventory lists are included into your OSS bills.
  • A certain amount of time is required for OSS to generate inventory lists. Before inventory lists are generated, OSS objects may fail to be backed up. In this case, you can back up the OSS objects in the next backup cycle.
inventory_test
InventoryCleanupPolicystring

Indicates 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: Inventory lists are not deleted.
  • DELETE_CURRENT: The current inventory list is deleted.
  • DELETE_CURRENT_AND_PREVIOUS: All inventory lists are deleted.
DELETE_CURRENT_AND_PREVIOUS
FileDetailobject

The advanced options for file backup.

UseVSSboolean

Indicates whether the Volume Shadow Copy Service (VSS) feature is enabled. Valid values:

  • true: The feature is enabled.
  • false: The feature is disabled.
false
AdvPolicyboolean

Indicates whether an advanced policy is used. Valid values:

  • true
  • false
false
CommonNasDetailobject

The advanced options for on-premises NAS backup.

FullOnIncrementFailboolean

Indicates whether the system performs full backup if incremental backup fails. Valid values:

  • true: The system performs full backup if incremental backup fails.
  • false: The system does not perform full backup if incremental backup fails.
true
FetchSliceSizelong

The size of backup shards (the number of files).

100000
ClientIdstring

The ID of the Cloud Backup client.

c-0001eg6mcvjs93f46s2d
ClusterIdstring

The ID of the client group.

cl-000gkcofngi04j6k680a
CommonFileSystemDetailobject

The advanced options for large-scale file system backup.

FullOnIncrementFailboolean

Specifies whether the system performs full backup if incremental backup fails. Valid values:

  • true: The system performs full backup if incremental backup fails.
  • false: The system does not perform full backup if incremental backup fails.
true
FetchSliceSizelong

The size of backup shards (the number of files).

100000
SourceTypestring

The type of the data source. Valid values:

  • UDM_ECS: ECS instances
UDM_ECS
CrossAccountTypestring

Indicates whether data is backed up within the same Alibaba Cloud account or across Alibaba Cloud accounts. Valid values:

  • SELF_ACCOUNT: Data is backed up within the same Alibaba Cloud account.
  • CROSS_ACCOUNT: Data is backed up across Alibaba Cloud accounts.
CROSS_ACCOUNT
CrossAccountUserIdlong

The ID of the source Alibaba Cloud account that authorizes the current Alibaba Cloud account to back up data across Alibaba Cloud accounts.

1480************
CrossAccountRoleNamestring

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
CreatedByTagboolean

Indicates whether the resource is automatically associated with the related resource tag in the backup policy.

false
HitTagsarray<object>

The matched tag rules.

HitTagobject
Keystring

The tag key.

env
Valuestring

The tag value.

prod
Operatorstring

The tag-based matching rule.

  • EQUAL: Both the tag key and tag value are matched.
  • NOT: The tag key is matched and the tag value is not matched.
EQUAL

Examples

Sample success responses

JSONformat

{
  "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

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-11-13The response structure of the API has changedView Change Details
2024-09-25The response structure of the API has changedView Change Details
2024-03-13The response structure of the API has changedView Change Details
2024-01-05The response structure of the API has changedView Change Details
2023-12-12The response structure of the API has changedView Change Details
2023-08-16The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-03-29The response structure of the API has changedView Change Details