All Products
Search
Document Center

Web Application Firewall:DescribeDefenseResources

Last Updated:Apr 23, 2024

Queries protected objects by page.

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-waf:DescribeDefenseResourcesList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

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****
ResourceManagerResourceGroupIdstringNo

The ID of the resource group.

rg-acfm***q
PageNumberintegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Default value: 10.

10
RegionIdstringNo

The region where the WAF instance resides. Valid values:

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

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\"}
Tagobject []No

The tags of the resources that you want to query. You can specify up to 20 tags.

KeystringNo

The key of the tag.

Tagkey1
ValuestringNo

The value of the tag.

TagValue1

Query parameters

Parameter description
ParameterTypeRequiredExampleDescription
productStringNowafThe asset type of the protected object. Valid values:- waf: The protected object is added to WAF in CNAME record mode or other modes.- alb: The protected object is an Application Load Balancer (ALB) instance that is added to WAF in cloud native mode.- clb: The protected object is a Classic Load Balancer (CLB) instance that is added to WAF in cloud native mode.- ecs: The protected object is an Elastic Compute Service (ECS) instance that is added to WAF in cloud native mode.- mse: The protected object is a Microservices Engine (MSE) instance that is added to WAF in cloud native mode.- fc: The protected object is a custom domain name in Function Compute that is added to WAF in cloud native mode.
resourceLikeStringNoexample.aliyundoc.cThe name of the protected object that you want to query. You can specify this parameter to query a protected object by using fuzzy matching.
resourceStringNoexample.aliyundoc.com-wafThe name of the protected object that you want to query. You can specify this parameter to query a protected object by using exact matching.
resourceInStringNoexample1.aliyundoc.com,example2.aliyundoc.comThe protected objects that you want to query. You can specify this parameter to query multiple protected objects. Separate the protected objects with commas (,).
instanceIdStringNoalb-nifa24****The instance ID of the protected object that you want to query. You can specify this parameter to query the ID of a protected object by using exact matching.
domainStringNoexample.aliyundoc.comThe domain name of the protected object that you want to query. You can specify this parameter to query the domain name of a protected object by using exact matching.
resourceGroupStringNogroup1The protected object group to which the protected object that you want to query belongs.
inGroupBooleanNotrueSpecifies whether the protected object is added to a protected object group.
orderByStringNoresourceThe method that you want to use to sort the protected objects. Valid values:- resource: sorts the protected objects by name.- gmtModified: sorts the protected objects by creation time.
descBooleanNotrueSpecifies whether to sort the protected objects in ascending or descending order. Valid values:- false: sorts the protected objects in ascending order.- true: sorts the 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",
}

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

618F2626-DB27-5187-8C6C-4E61A491DF29
Resourcesobject []

The protected objects.

GmtCreatelong

The time when the protected object was created. Unit: milliseconds.

1652149203187
GmtModifiedlong

The time when the protected object was modified. Unit: milliseconds.

1665633032000
Productstring

The name of the cloud service.

alb
Resourcestring

The name of the protected object.

alb-rencs***
ResourceGroupstring

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

test
ResourceOriginstring

The origin of the protected object.

custom
Descriptionstring

The description of the protected object.

test
Detailobject

The details of the protected object. Different key-value pairs indicate different attributes of the protected object.

Patternstring

The pattern in which the protected object is protected.

domain
XffStatusinteger

Indicates whether the X-Forwarded-For (XFF) proxy is enabled.

1
CustomHeadersarray

The custom XFF headers 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 headers are used as the originating IP addresses of clients.

string

The information about the custom header.

afbfbajf
ResourceManagerResourceGroupIdstring

The ID of the Alibaba Cloud resource group.

rg-acfm***q
AcwCookieStatusinteger

The status of the tracking cookie.

  • 0: disabled.
  • 1: enabled.
1
AcwSecureStatusinteger

The status of the secure attribute in the tracking cookie.

  • 0: disabled.
  • 1: enabled.
0
AcwV3SecureStatusinteger

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

  • 0: disabled.
  • 1: enabled.
0
OwnerUserIdstring

The ID of the Alibaba Cloud account to which the resource belongs.

135*********46
TotalCountlong

The total number of entries that are returned.

73

Examples

Sample success responses

JSONformat

{
  "RequestId": "618F2626-DB27-5187-8C6C-4E61A491DF29",
  "Resources": [
    {
      "GmtCreate": 1652149203187,
      "GmtModified": 1665633032000,
      "Product": "alb",
      "Resource": "alb-rencs***",
      "ResourceGroup": "test",
      "ResourceOrigin": "custom",
      "Description": "test",
      "Detail": {
        "test": "test",
        "test2": 1
      },
      "Pattern": "domain",
      "XffStatus": 1,
      "CustomHeaders": [
        "afbfbajf"
      ],
      "ResourceManagerResourceGroupId": "rg-acfm***q",
      "AcwCookieStatus": 1,
      "AcwSecureStatus": 0,
      "AcwV3SecureStatus": 0,
      "OwnerUserId": "135*********46"
    }
  ],
  "TotalCount": 73
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-03-21The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.
2023-08-24The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.