All Products
Search
Document Center

Cloud Backup:DescribePolicyBindings

Last Updated:Dec 20, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Query one or more data sources bound to a policy, or query one or more 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
NextTokenstringNo

Token required to fetch the next page of policy and data source associations.

caeba0bbb2be03f84eb48b699f0a
MaxResultsintegerNo

Number of results per query.

Range: 10~100. Default: 10.

10
PolicyIdstringNo

Policy ID.

po-000************hky
DataSourceIdsarrayNo

List of data source IDs.

stringNo

Data source ID.

i-uf6************68n
SourceTypestringNo

Data source type. Possible values:

  • UDM_ECS: Indicates ECS full machine backup.
UDM_ECS
Filtersarray<object>No

Query filters.

objectNo

Query filters.

KeystringNo

Key in the query filter. Possible values include:

  • PolicyId: Backup policy ID
  • DataSourceId: ECS instance ID
  • DataSourceType: Data source type
DataSourceType
OperatorstringNo

Matching method. Default is IN. This refers to the matching operation (Operator) supported by the Key and Value in the filter. Possible values include:

  • EQUAL: Equal to
  • NOT_EQUAL: Not equal to
  • GREATER_THAN: Greater than
  • GREATER_THAN_OR_EQUAL: Greater than or equal to
  • LESS_THAN: Less than
  • LESS_THAN_OR_EQUAL: Less than or equal to
  • BETWEEN: Range, where value is a JSON array [lower_bound, upper_bound].
  • IN: In the set, where value is an array.
IN
ValuesarrayNo

Values to be matched in the query filter.

stringNo

Values to be matched in the query filter.

UDM_ECS

Response parameters

ParameterTypeDescriptionExample
object

DescribePolicyBindingsResponse

PolicyBindingsarray<object>

List of bound policies.

Dataobject

Details of the bound policy.

CreatedTimelong

Creation time. UNIX timestamp, in seconds.

1661399570
UpdatedTimelong

Update time. UNIX timestamp, in seconds.

1653611573
PolicyBindingIdstring

Bound policy ID.

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

Bound policy description.

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

Policy ID.

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

Data source ID.

i-8vb************5ly
Sourcestring
  • When SourceType is OSS, it indicates the prefix to be backed up. If not specified, it means backing up the entire root directory of the Bucket.
  • When SourceType is ECS_FILE or File, it indicates the file directory to be backed up. If not specified, it means backing up all directories.
backup/
Includestring

This parameter is required only when SourceType is ECS_FILE or File. It specifies the file types to be backed up, and all files of these types will be backed up. Supports up to 255 characters.

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

This parameter is required only when SourceType is ECS_FILE or File. It specifies the file types that should not be backed up, and all files of these types will be excluded. Supports up to 255 characters.

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

This parameter is required only when SourceType is ECS_FILE or File. It specifies the backup traffic control. The format is {start}{end}{bandwidth}. Multiple traffic control configurations are separated by commas, and the configured times must not overlap.

  • start: Start hour.
  • end: End hour.
  • bandwidth: Limit rate, in KB/s.
0:24:10240
AdvancedOptionsobject

Advanced options.

UdmDetailobject

Advanced options for full machine backup.

ExcludeDiskIdListarray

List of disk IDs that do not need protection. This parameter is ignored if DiskIdList is not empty.

ExcludeDiskIdListstring

Disk ID that does not need protection.

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

List of disk IDs that need protection. This value is empty when protecting all disks.

DiskIdListstring

Disk ID that needs protection.

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

Indicates whether to create a snapshot consistency group. Only supported when all disk types are ESSD.

true
RamRoleNamestring

This parameter is required when AppConsistent is true. It specifies the RAM role name needed for creating an application-consistent snapshot.

AliyunECSInstanceForHbrRole
PreScriptPathstring

This parameter is required when AppConsistent is true. It specifies the path of the freeze script to be executed before creating an application-consistent snapshot.

/tmp/prescript.sh
PostScriptPathstring

This parameter is required when AppConsistent is true. It specifies the path of the unfreeze script to be executed after creating an application-consistent snapshot.

/tmp/postscript.sh
EnableFsFreezeboolean

This parameter is required when AppConsistent is true. It indicates whether to use the Linux FsFreeze mechanism to ensure the file system is in a read-only consistent state before creating an application-consistent snapshot. The default value is true.

true
TimeoutInSecondslong

This parameter is required when AppConsistent is true. It specifies the IO freeze timeout duration. The default value is 30 seconds.

30
EnableWritersboolean

This parameter is required when AppConsistent is true. It determines whether to set an application-consistent snapshot:

  • true: Create an application-consistent snapshot
  • false: Create a file system-consistent snapshot

The default value is true.

true
DestinationKmsKeyIdstring

The custom KMS key ID in the destination region. When this field is not empty and cross-region replication is enabled, the specified key will be used for encrypting the cross-region replication.

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

Advanced options for OSS backup.

InventoryIdstring

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

  • It is recommended to use an inventory for backing up more than 100 million OSS objects to improve incremental performance. Storage costs for the inventory files are charged separately by the OSS service.
  • The generation of the OSS inventory file takes time, and the backup may fail before the inventory file is generated. You can wait for the next cycle to execute.
inventory_test
InventoryCleanupPolicystring

Whether to delete the inventory file after the backup. This is only effective when using an OSS inventory. Supported values:

  • NO_CLEANUP: Do not delete.
  • DELETE_CURRENT: Delete the current file.
  • DELETE_CURRENT_AND_PREVIOUS: Delete all files.
DELETE_CURRENT_AND_PREVIOUS
IgnoreArchiveObjectboolean

Do not prompt for archive-type objects in the task statistics and failed file list.

true
FileDetailobject

Advanced options for file backup.

UseVSSboolean

Whether to enable VSS (Windows) functionality. Values:

  • true: Enable.
  • false: Disable.
false
AdvPolicyboolean

Whether to use advanced policies. Values:

  • true: Use.
  • false: Do not use.
false
CommonNasDetailobject

Advanced options for local NAS.

FullOnIncrementFailboolean

Whether to switch to a full backup when an incremental backup fails. Values:

  • true: Switch to full backup on failure.
  • false: Do not switch to full backup on failure.
true
FetchSliceSizelong

Backup slice size (number of files).

100000
ClientIdstring

Backup client ID.

c-0001eg6mcvjs93f46s2d
ClusterIdstring

Client group ID.

cl-000gkcofngi04j6k680a
CommonFileSystemDetailobject

Advanced options for large-scale file system backup.

FullOnIncrementFailboolean

Whether to switch to a full backup when an incremental backup fails. Values:

  • true: Switch to full backup on failure.
  • false: Do not switch to full backup on failure.
true
FetchSliceSizelong

Backup shard size (number of files).

100000
SourceTypestring

Data source type, with the value range:

  • UDM_ECS: indicates ECS full machine backup
UDM_ECS
CrossAccountTypestring

Cross-account backup type. Supported values:

  • SELF_ACCOUNT: Backup within the same account
  • CROSS_ACCOUNT: Cross-account backup
CROSS_ACCOUNT
CrossAccountUserIdlong

The ID of the original account for cross-account backup.

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

The name of the role created in the RAM of the original account for cross-account backup.

hbrcrossrole
CreatedByTagboolean

Whether the resource is automatically associated through the backup policy resource tag.

false
HitTagsarray<object>

Hit tag rules.

HitTagobject
Keystring

Tag key.

env
Valuestring

Tag value.

prod
Operatorstring

Tag matching rule.

  • EQUAL: Matches both the tag key and tag value.
  • NOT: Matches the tag key but not the tag value.
EQUAL
NextTokenstring

The token required to fetch the next page of policy and data source bindings.

caeba0bbb2be03f84eb48b699f0a
MaxResultsinteger

The number of results per query.

Range: 10~100. Default: 10.

10
TotalCountlong

Total number of records.

38
Successboolean

Indicates whether the request was successful.

  • true: Success
  • false: Failure
true
Codestring

Return code, 200 indicates success.

200
Messagestring

Description of the return message. A successful response usually returns 'successful', while an error will return a corresponding error message.

successful
RequestIdstring

Request ID.

5225929A-4EBD-55EE-9FE1-4A130E582A76

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