All Products
Search
Document Center

Web Application Firewall:DescribeDefenseResource

Last Updated:Apr 24, 2024

Queries the information about a protected object.

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-4xl****i60i
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-acfm***q
ResourcestringYes

The name of the protected object that you want to query. Only exact queries are supported.

example.aliyundoc.com-waf
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

The response parameters.

RequestIdstring

The request ID.

439AADF2-368C-5E98-B14E-3086****0573
Resourceobject

The information about the protected object.

GmtCreatelong

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

1607493144000
GmtModifiedlong

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

1691720010000
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.

example_resource_group
Detailobject

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

{ "product": "waf", "domain": "demo.aliyundoc****.com" }
Patternstring

The pattern used for the protected object.

domain
XffStatusinteger

Indicates whether a Layer 7 proxy is deployed in front of WAF, such as Anti-DDoS Proxy and Alibaba Cloud CDN. Valid values:

  • 0: No Layer 7 proxy is deployed.
  • 1: A Layer 7 proxy is deployed.
0
CustomHeadersarray

The custom header fields.

Note If the value of XffStatus is 1, the first IP address in the specified header field is used as the originating IP address of the client to prevent X-Forwarded-For (XFF) forgery. If you specify multiple header fields, WAF reads the values of the header fields in sequence until the originating IP address is obtained. If the originating IP address cannot be obtained, the first IP address in the XFF header field is used as the originating IP address of the client.
string

The custom header field.

x-forwarded-for
ResourceOriginstring

The origin of the protected object. Valid values:

  • custom
  • access
custom
Descriptionstring

The description of the protected object.

This is Description
ResourceManagerResourceGroupIdstring

The ID of the Alibaba Cloud resource group.

rg-acfmoiy****p2oq
AcwCookieStatusinteger

The status of the tracking cookie.

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

The status of the secure attribute of the tracking cookie.

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

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

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

The user ID (UID) of the Alibaba Cloud account to which the protected object belongs.

170457******9107

Examples

Sample success responses

JSONformat

{
  "RequestId": "439AADF2-368C-5E98-B14E-3086****0573",
  "Resource": {
    "GmtCreate": 1607493144000,
    "GmtModified": 1691720010000,
    "Product": "alb",
    "Resource": "alb-rencs***\n",
    "ResourceGroup": "example_resource_group",
    "Detail": {
      "product": "waf",
      "domain": "demo.aliyundoc****.com"
    },
    "Pattern": "domain",
    "XffStatus": 0,
    "CustomHeaders": [
      "x-forwarded-for"
    ],
    "ResourceOrigin": "custom",
    "Description": "This is Description",
    "ResourceManagerResourceGroupId": "rg-acfmoiy****p2oq",
    "AcwCookieStatus": 0,
    "AcwSecureStatus": 0,
    "AcwV3SecureStatus": 0,
    "OwnerUserId": "170457******9107"
  }
}

Error codes

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