All Products
Search
Document Center

Web Application Firewall:DescribeDefenseResources

Last Updated:Jan 15, 2026

Queries protected objects by page.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-waf:DescribeDefenseResources

list

*DefenseResource

acs:yundun-waf:{#regionId}:{#accountId}:defenseresource/*

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

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

Note

You can call the DescribeInstance operation to obtain the ID of the WAF instance.

waf_cdnsdf3****

PageNumber

integer

No

The page number of the paginated results Default value: 1.

1

PageSize

integer

No

The number of results per page. Default value: 10.

10

Query

string

No

The query conditions. Specify the value of this parameter as a string in the JSON format.

Note

The results vary based on the query condition. For more information, see the "Query parameters" section in this topic.

{\"product\":\"waf\"}

Tag

array<object>

No

The tag of the resource. You can specify up to 20 tags.

object

No

Value

string

No

The tag value.

TagValue1

Key

string

No

The tag key.

Tagkey1

ResourceManagerResourceGroupId

string

No

The ID of the Alibaba Cloud resource group.

rg-acfm***q

RegionId

string

No

The region ID of the WAF instance. Valid values:

  • cn-hangzhou: The Chinese mainland.

  • ap-southeast-1: Outside the Chinese mainland.

cn-hangzhou

Query

Parameters
ParameterTypeRequiredExampleDescription
productStringNowafThe type of the protected object that you want to query. Valid values:- waf: a protected object that is added by using the CNAME record or hybrid cloud mode.- alb: an Application Load Balancer (ALB) instance.- clb: a Classic Load Balancer (CLB) instance.- ecs: an Elastic Compute Service (ECS) instance.- mse: a Microservices Engine (MSE) instance.-fc: a custom domain name bound to a web application in Function Compute.
resourceLikeStringNoexample.aliyundoc.cThe name of the protected object that you want to query. Fuzzy match is supported.
resourceStringNoexample.aliyundoc.com-wafThe name of the protected object that you want to query. Exact match is supported.
resourceInStringNoexample1.aliyundoc.com,example2.aliyundoc.comThe protected objects that you want to query. You can specify this parameter to query multiple protected objects. Separate multiple protected objects with commas (,).
instanceIdStringNoalb-nifa24****The instance ID of the protected object that you want to query. Exact match is supported.
domainStringNoexample.aliyundoc.comThe domain name of the protected object that you want to query. Exact match is supported.
resourceGroupStringNogroup1The protected object group to which the protected object belongs.
inGroupBooleanNotrueSpecifies whether the protected object is added to a protected object group.
ownerUserIdStringNo135********23The Alibaba Cloud account to which the protected object belongs. You can specify this parameter to query protected objects that belong to a specific Alibaba Cloud account. Exact match is supported.
orderByStringNoresourceThe method that you want to use to sort protected objects. Valid values:- resource: sorts protected objects by name.- gmtModified: sorts protected objects by modification time.
descBooleanNotrueSpecifies whether to sort protected objects in ascending or descending order. Valid values:- false: sorts protected objects in ascending order.- true: sorts protected objects in descending order.
Example
{
    "product ": "waf",
    "resource": "example.aliyundoc.com-waf",
    "domain": "example.aliyundoc.com",
    "resourceLike ": "example.aliyundoc.c",
    "InstaneId": "waf_cn****",
    "resourceIn": "example1.aliyundoc.com,example2.aliyundoc.com",
    "ownerUserId": "135**********41"
}

Response elements

Element

Type

Description

Example

object

The response parameters.

TotalCount

integer

The total number of entries that are returned.

73

RequestId

string

The request ID.

618F2626-DB27-5187-8C6C-4E61A491****

Resources

array<object>

The protected objects.

array<object>

Details of the protected object.

Pattern

string

The protection pattern.

domain

Description

string

The description of the protected object.

test

XffStatus

integer

Indicates whether the X-Forwarded-For (XFF) header is used.

1

GmtModified

integer

The most recent modification time of the protected object. Unit: seconds.

1665633032000

Resource

string

The name of the protected object.

alb-rencs***

AcwV3SecureStatus

integer

The status of the secure attribute of the slider CAPTCHA cookie.

  • 0: disabled. This is the default value.

  • 1: enabled.

0

Product

string

The name of the cloud service.

alb

AcwCookieStatus

integer

The status of the tracking cookie.

  • 0: disabled

  • 1: enabled. This is the default value.

1

AcwSecureStatus

integer

The status of the secure attribute of the tracking cookie.

  • 0: disabled. This is the default value.

  • 1: enabled.

0

ResourceManagerResourceGroupId

string

The ID of the resource group.

rg-acfm***q

GmtCreate

integer

The creation time of the protected object. Unit: seconds.

1652149203187

OwnerUserId

string

The Alibaba Cloud account to which the protected object belongs. You can specify this parameter to query protected objects that belong to a specific Alibaba Cloud account. Exact match is supported.

135*********46

ResourceOrigin

string

The origin of the protected object.

custom

ResourceGroup

string

The name of the protected object group to which the protected object belongs.

test

Detail

object

The description of the protected object. Different key-value pairs in a map indicate different properties of the protected object.

{"domain":"eou.eleme.cn","uri":"/"}

CustomHeaders

array

The custom header fields that are used to identify the originating IP addresses of clients. If the value of XffStatus is 1 and CustomHeaders is left empty, the first IP addresses in the XFF header fields are used as the originating IP addresses of clients.

string

The information about the custom header.

afbfbajf

ResponseHeaders

array<object>

The response header.

object

The response header.

Key

string

Specifies the key for a custom response header.

Header-Key

Value

string

Specifies the value for a custom response header.

Header-Value

Examples

Success response

JSON format

{
  "TotalCount": 73,
  "RequestId": "618F2626-DB27-5187-8C6C-4E61A491****",
  "Resources": [
    {
      "Pattern": "domain",
      "Description": "test",
      "XffStatus": 1,
      "GmtModified": 1665633032000,
      "Resource": "alb-rencs***",
      "AcwV3SecureStatus": 0,
      "Product": "alb",
      "AcwCookieStatus": 1,
      "AcwSecureStatus": 0,
      "ResourceManagerResourceGroupId": "rg-acfm***q",
      "GmtCreate": 1652149203187,
      "OwnerUserId": "135*********46",
      "ResourceOrigin": "custom",
      "ResourceGroup": "test",
      "Detail": {
        "domain": "eou.eleme.cn",
        "uri": "/"
      },
      "CustomHeaders": [
        "afbfbajf"
      ],
      "ResponseHeaders": [
        {
          "Key": "Header-Key",
          "Value": "Header-Value"
        }
      ]
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.