Retrieves a list of protection policies.
Try it now
Test
RAM authorization
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.1Request 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.