All Products
Search
Document Center

Web Application Firewall:DescribeTemplateResourceCount

Last Updated:Apr 24, 2024

Queries the number of protected resources for which a protection template takes effect.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the Web Application Firewall (WAF) instance.

Note You can call the DescribeInstance operation to query the ID of the WAF instance.
waf_v3prepaid_public_cn-lbj****gx08
TemplateIdsstringYes

The IDs of the protection templates that you want to query. Separate multiple template IDs with commas (,).

12345,12346
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-aekzwwkpn****5i
RegionIdstringNo

The region in which the WAF instance is deployed. Valid values:

  • cn-hangzhou: Chinese mainland.
  • ap-southeast-1: outside the Chinese mainland.
cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

B8064433-9781-5E86-806E-C1DD****1D95
ResourceCountobject []

The number of protected objects or protected object groups for which the protection template takes effect.

TemplateIdlong

The ID of the protection template.

12345
SingleCountinteger

The number of protected objects.

30
GroupCountinteger

The number of protected object groups.

30

Examples

Sample success responses

JSONformat

{
  "RequestId": "B8064433-9781-5E86-806E-C1DD****1D95",
  "ResourceCount": [
    {
      "TemplateId": 12345,
      "SingleCount": 30,
      "GroupCount": 30
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.