All Products
Search
Document Center

Backup and Disaster Recovery Center:ListProtectionPolicies

Last Updated:Aug 02, 2025

Retrieves a list of protection policies.

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 support 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

bdrc:ListProtectionPolicies

list

*All Resource

*

None

None

Request syntax

GET /api/v1/protection-policies HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ProtectionPolicyRegionId

string

No

The region ID of the protection policy.

cn-hangzhou

MaxResults

integer

No

The maximum number of results to return.

10

NextToken

string

No

The paging token.

cae**********699

ProtectionPolicyId

string

No

The protection policy ID.

p-123***7890

Response parameters

Parameter

Type

Description

Example

object

The response struct.

RequestId

string

The request ID.

5B2F09BF-CEBD-5A7E-AC01-E7F86169A5E5

Data

object

The data returned.

Content

array<object>

The response parameters.

object

The collection of records returned by this request.

ProtectionPolicyRegionId

string

The region ID of the protection policy.

cn-hangzhou

ProtectionPolicyId

string

The protection policy ID.

p-123***7890

ProtectionPolicyName

string

The protection policy name.

MyProtectionPolicy

BoundResourceCategoryIds

array

The attached resource category IDs.

string

The list of associated resource category IDs.

rc-123***7890

SubProtectionPolicies

array<object>

The sub-protection policies.

object

The sub-protection policy.

SubProtectionPolicyType

string

The sub-protection policy type.

ECS_AUTO_SNAPSHOT_POLICY

Config

string

The sub-protection policy configuration.

{\"autoSnapshotPolicyId\":\"sp-123***7890\"}

LatestApplyTime

integer

The time when the policy was last applied.

1742167218

LatestTaskId

string

The task ID of the latest policy application.

t-123***7890

LatestApplySummary

object

The summary of the latest application result.

CompleteTime

integer

The time when the task was completed. Unix timestamp format, in seconds.

1742167218

ResourceCount

array<object>

The count of resources by type.

object

The count of resources by type.

ResourceType

string

The resource type.

ACS::OTS::Instance

Count

integer

The count of resources by type.

1

ApplyStatusCount

array<object>

The count statistics of application status.

object

ApplyStatus

string

The application status.

FAILED

Count

integer

The count of resources by type.

3

NextToken

string

The paging token.

CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAOTzWWYAAAAACjMDLgAAADFTNzMyZDMwMzAzMDM4NzA3NTcwMzY2MjMwNzY2ODcyMzAzMTY2Nzg3ODY5MzY=

MaxResults

integer

The maximum number of results requested.

10

TotalCount

integer

The total number of entries returned.

5

Examples

Success response

JSON format

{
  "RequestId": "5B2F09BF-CEBD-5A7E-AC01-E7F86169A5E5",
  "Data": {
    "Content": [
      {
        "ProtectionPolicyRegionId": "cn-hangzhou",
        "ProtectionPolicyId": "p-123***7890",
        "ProtectionPolicyName": "MyProtectionPolicy",
        "BoundResourceCategoryIds": [
          "rc-123***7890"
        ],
        "SubProtectionPolicies": [
          {
            "SubProtectionPolicyType": "ECS_AUTO_SNAPSHOT_POLICY",
            "Config": "{\\\"autoSnapshotPolicyId\\\":\\\"sp-123***7890\\\"}"
          }
        ],
        "LatestApplyTime": 1742167218,
        "LatestTaskId": "t-123***7890",
        "LatestApplySummary": {
          "CompleteTime": 1742167218,
          "ResourceCount": [
            {
              "ResourceType": "ACS::OTS::Instance",
              "Count": 1
            }
          ],
          "ApplyStatusCount": [
            {
              "ApplyStatus": "FAILED",
              "Count": 3
            }
          ]
        }
      }
    ],
    "NextToken": "CAESGgoSChAKDGNvbXBsZXRlVGltZRABCgQiAggAGAAiQAoJAOTzWWYAAAAACjMDLgAAADFTNzMyZDMwMzAzMDM4NzA3NTcwMzY2MjMwNzY2ODcyMzAzMTY2Nzg3ODY5MzY=",
    "MaxResults": 10,
    "TotalCount": 5
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.