Queries the information about a protected object.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeDefenseResource |
get |
*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 query the ID of the WAF instance. |
waf_v3prepaid_public_cn-4xl****i60i |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
| Resource |
string |
Yes |
The name of the protected object that you want to query. Only exact queries are supported. |
example.aliyundoc.com-waf |
| RegionId |
string |
No |
The region of the WAF instance. Valid values:
|
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| RequestId |
string |
The request ID. |
439AADF2-368C-5E98-B14E-3086****0573 |
| Resource |
object |
The protected object. |
|
| GmtCreate |
integer |
The time when the protected object was created. Unit: milliseconds. |
1607493144000 |
| GmtModified |
integer |
The time when the protected object was modified. Unit: milliseconds. |
1691720010000 |
| Product |
string |
The name of the cloud service. Valid values: |
alb |
| Resource |
string |
The name of the protected object. |
alb-rencs*** |
| ResourceGroup |
string |
The name of the protected object group to which the protected object belongs. |
example_resource_group |
| Detail |
object |
The details of the protected object. Different key-value pairs indicate different attributes of the protected object. |
{ "product": "waf", "domain": "demo.aliyundoc****.com" } |
| Pattern |
string |
The pattern used for the protected object. |
domain |
| XffStatus |
integer |
Indicates whether a Layer 7 proxy is deployed in front of WAF, such as Anti-DDoS Proxy and Alibaba Cloud CDN. Valid values:
|
0 |
| CustomHeaders |
array |
The custom header fields. Note
When XffStatus = 1, the first IP address in the specified header field is used as the client source IP address to prevent X-Forwarded-For (XFF) spoofing. If multiple header fields are specified, they are tried in sequence to obtain the source IP address. If the first header field does not contain a source IP address, the second header field is tried, and so on. If no source IP address is obtained from all specified header fields, the first IP address in the X-Forwarded-For header field is used. When XffStatus = 1, the first IP address is obtained. |
|
|
string |
The custom header field. |
x-forwarded-for |
|
| ResourceOrigin |
string |
The origin of the protected object. Valid values:
|
custom |
| Description |
string |
The description. |
This is Description |
| ResourceManagerResourceGroupId |
string |
The resource group ID. |
rg-acfmoiy****p2oq |
| AcwCookieStatus |
integer |
The status of the tracking cookie.
|
0 |
| AcwSecureStatus |
integer |
The status of the secure attribute of the tracking cookie.
|
0 |
| AcwV3SecureStatus |
integer |
The status of the secure attribute of the slider CAPTCHA cookie.
|
0 |
| OwnerUserId |
string |
The user ID to which the protected object belongs. |
170457******9107 |
| ResponseHeaders |
array<object> |
The response headers. |
|
|
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
{
"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",
"ResponseHeaders": [
{
"Key": "Header-Key\n",
"Value": "Header-Value\n"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.