Queries a list of protection templates by paging.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeDefenseTemplates |
list |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TemplateIds |
string |
No |
The IDs of the protection templates to query. You can specify this parameter to query the protected resources associated with multiple protection templates. Separate multiple template IDs with commas (,). |
189731,189539,189538,189531,189540,189542,189541 |
| TemplateName |
string |
No |
The name of the protection template to query. |
test |
| InstanceId |
string |
Yes |
The ID of the WAF instance. Note
You can call DescribeInstance to query the ID of the current WAF instance. |
waf_v3prepaid_public_cn-pe33b****03 |
| TemplateId |
integer |
No |
The ID of the protection template. |
39395 |
| TemplateType |
string |
No |
The templatetype of the protection template. Valid values:
|
user_default |
| DefenseScene |
string |
No |
The protection scenario. For more information, see the DefenseScene parameter in CreateDefenseRule. |
region_block |
| Resource |
string |
No |
The name of the protected object, protection group, or the ID of the protected asset. Note
This parameter is used together with the ResourceType parameter. Both parameters must have values for filtering to take effect. |
ruiqiu.cc-ecs |
| ResourceType |
string |
No |
The type of the protected resource. Note
This parameter is used together with the Resource parameter. Both parameters must have values for filtering to take effect. Valid values:
|
single |
| DefenseSubScene |
string |
No |
The sub-scenario of the protection template. Valid values:
|
basic |
| PageNumber |
integer |
No |
The page number to return in a paging query request. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paging query. Default value: 20. |
10 |
| RegionId |
string |
No |
The region where the WAF instance is deployed. Valid values:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfmvyknl****fa |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
4F26D2F1-E288-5104-8518-05E240E337A4 |
| TotalCount |
integer |
The total number of entries returned. |
100 |
| Templates |
array<object> |
The list of protection templates. |
|
|
object |
The protection template. |
||
| DefenseScene |
string |
The WAF protection scenario. Valid values:
|
whitelist |
| GmtModified |
integer |
The creation time of the protection template. The value is a timestamp in milliseconds. |
1683776070000 |
| TemplateId |
integer |
The ID of the protection template. |
56477 |
| TemplateName |
string |
The name of the protection template. |
template-blockarea1 |
| TemplateOrigin |
string |
The source of the protection template. The value is custom, which indicates user-defined. |
custom |
| TemplateStatus |
integer |
The status of the protection template. Valid values:
|
1 |
| TemplateType |
string |
The templatetype of the protection template. Valid values:
|
user_custom |
| DefenseSubScene |
string |
The sub-scenario of the protection template. Valid values:
|
basic |
| Description |
string |
The description of the template. |
testTemplate |
Examples
Success response
JSON format
{
"RequestId": "4F26D2F1-E288-5104-8518-05E240E337A4",
"TotalCount": 100,
"Templates": [
{
"DefenseScene": "whitelist",
"GmtModified": 1683776070000,
"TemplateId": 56477,
"TemplateName": "template-blockarea1",
"TemplateOrigin": "custom",
"TemplateStatus": 1,
"TemplateType": "user_custom",
"DefenseSubScene": "basic",
"Description": "testTemplate"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.