DescribePolicys
1. API Description
This API is used to get a list of protection strategies.
2. Input Parameters
The following request parameter list only provides API request parameters.
policyIds
No
Array of String
Filter by the list of protection strategy IDs.
You can query up to 100 protection strategy IDs in each request.
policyName
No
String
Filter by the protection strategy name.
This field supports fuzzy search.
pageSize
No
Integer
Number of items in the current page result.
Default: 20.
pageNum
No
Integer
Number of pages returned.
tagKeys
No
Array of String
Search by tag key.
You can query up to 20 tag keys in each request.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
totalCount
Integer
Number of disks meeting the filtering conditions.
4. Code Example
Get a list of protection strategies.
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribePolicys
<Common Request Params>
Request:
{
"policyIds": ["policyId1","policyId2"],
"name": "xxxx",
"pageSize": 10,
"pageNum": 1
}
Response:
{
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"response": {
"requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
"totalCount": 1,
"dataSet": [
{
"policyId": "<policyId>",
"policyName": "policyName",
"resourceGroupId": "<resourceGroupId>",
"resourceGroupName": "Default Resource Group",
"createTime": "2025-05-01T01:01:01Z",
"tags":null
}
]
}
}5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
No error codes related to the API business logic. For other error codes, see Common Error Codes.
Last updated