Mengambil daftar kebijakan perlindungan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:ListProtectionPolicies |
list |
*All Resource
|
None | None |
Sintaks permintaan
GET /api/v1/protection-policies HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ProtectionPolicyRegionId |
string |
No |
ID Wilayah kebijakan perlindungan. |
cn-hangzhou |
| MaxResults |
integer |
No |
Jumlah maksimum hasil yang dikembalikan. |
10 |
| NextToken |
string |
No |
Token paginasi. |
cae**********699 |
| ProtectionPolicyId |
string |
No |
ID kebijakan perlindungan. |
p-123***7890 |
Elemen respons
|
Element |
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. |
|
|
array<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 |
Contoh
Respons sukses
JSONformat
{
"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
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.