DescribePolicyBindings

Updated at:

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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: ECS instance backup.

  • OSS: OSS backup.

  • NAS: Alibaba Cloud NAS backup.

  • COMMON_NAS: On-premises NAS backup.

  • ECS_FILE: ECS File Backup Standard Edition.

  • File: On-premises file backup.

  • COMMON_FILE_SYSTEM: CPFS backup.

  • OTS: Tablestore backup.

  • CPFS: Agentless CPFS backup.

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:

  • PolicyId: The backup policy ID.

  • DataSourceId: The ECS instance ID.

  • DataSourceType: The data source type.

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:

  • 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: Within a range. The value is a JSON array in the [lower_bound,upper_bound] format.

  • IN: In a set. The value is an array.

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: Disabled.

  • false: Enabled.

true

Source

string

The backup source.

  • If SourceType is set to OSS, this parameter specifies the prefix to back up. If this parameter is not specified, the root directory of the entire bucket is backed up.

  • If SourceType is set to ECS_FILE or File, this parameter specifies the file directory to back up. If this parameter is not specified, all directories are backed up.

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 {start}{end}{bandwidth}. Multiple throttling configurations are separated by delimiters, and the configured time ranges cannot overlap.

  • start: The start hour.

  • end: The end hour.

  • bandwidth: The bandwidth limit, in KB/s.

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: Creates an application-consistent snapshot.

  • false: Creates a file system-consistent snapshot. Default value: true.

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.

  • We recommend that you use an inventory to improve incremental backup performance when backing up more than 100 million OSS objects. Storage fees generated by inventory files are charged separately by OSS.

  • It takes time to generate an OSS inventory file. Backups may fail before the inventory file is generated. You can wait for the next backup cycle.

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:

  • NO_CLEANUP: Does not delete the file.

  • DELETE_CURRENT: Deletes the current file.

  • DELETE_CURRENT_AND_PREVIOUS: Deletes all files.

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:

  • true: Enabled.

  • false: Disabled.

false

AdvPolicy

boolean

Specifies whether to use the advanced policy. Valid values:

  • true: Used.

  • false: Not used.

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: Switches to a full backup upon failure.

  • false: Does not switch to a full backup upon failure.

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: Switches to a full backup upon failure.

  • false: Does not switch to a full backup upon failure.

true

FetchSliceSize

integer

The sub-task slice size (number of files).

100000

SourceType

string

The data source type. Valid values:

  • UDM_ECS: ECS instance backup.

  • OSS: OSS backup.

  • NAS: Alibaba Cloud NAS backup.

  • COMMON_NAS: On-premises NAS backup.

  • ECS_FILE: ECS File Backup Standard Edition.

  • File: On-premises file backup.

  • COMMON_FILE_SYSTEM: CPFS backup.

  • OTS: Tablestore backup.

  • CPFS: Agentless CPFS backup.

UDM_ECS

CrossAccountType

string

The cross-account backup type. Valid values:

  • SELF_ACCOUNT: Same-account backup.

  • CROSS_ACCOUNT: Cross-account backup.

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: Matches both the tag key and the tag value.

  • NOT: Matches the tag key but not the tag value.

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: Successful.

  • false: Failed.

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.