Queries the details of 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
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. The protected object must have been added to WAF. |
example.aliyundoc.com-waf |
| RegionId |
string |
No |
The region where the WAF instance resides. Valid values:
|
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| RequestId |
string |
The ID of the request. |
439AADF2-368C-5E98-B14E-3086****0573 |
| Resource |
object |
The details of the protected object. |
|
| GmtCreate |
integer |
The time when the protected object was created. This value is a UNIX timestamp. Unit: milliseconds. |
1607493144000 |
| GmtModified |
integer |
The time when the protected object was modified. This value is a UNIX timestamp. Unit: milliseconds. |
1691720010000 |
| Product |
string |
The type of cloud service to which the protected object belongs. |
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. The fields vary based on the cloud service type. |
{ "product": "waf", "domain": "demo.aliyundoc****.com" } |
| Pattern |
string |
The protection pattern of the protected object. |
domain |
| XffStatus |
integer |
Indicates whether a Layer 7 proxy such as Anti-DDoS or CDN is enabled in front of WAF. Valid values:
|
0 |
| CustomHeaders |
array |
The list of custom header fields used to identify the actual client IP address. Note
This parameter takes effect only when XffStatus is set to 1. WAF uses the first IP address in the specified header fields as the client source IP address to prevent X-Forwarded-For (XFF) spoofing. If multiple headers are specified, WAF checks them in order. If the first header does not contain a source IP address, WAF checks the next header. If none of the specified headers contain a source IP address, WAF uses the first IP address in the X-Forwarded-For header. |
|
|
string |
The specified header field used to identify the client IP address. |
x-forwarded-for |
|
| ResourceOrigin |
string |
The origin of the protected object. Valid values:
|
custom |
| Description |
string |
The description of the protected object. |
This is Description |
| ResourceManagerResourceGroupId |
string |
The ID of the Alibaba Cloud resource group. |
rg-acfmoiy****p2oq |
| AcwCookieStatus |
integer |
Indicates whether the tracking cookie feature is enabled. Valid values:
|
0 |
| AcwSecureStatus |
integer |
Indicates whether the secure attribute of the tracking cookie is enabled. Valid values:
|
0 |
| AcwV3SecureStatus |
integer |
Indicates whether the secure attribute of the slider CAPTCHA cookie is enabled. Valid values:
|
0 |
| OwnerUserId |
string |
The ID of the Alibaba Cloud account to which the protected object belongs. |
170457******9107 |
| ResponseHeaders |
array<object> |
The custom response headers configured for the protected object. |
|
|
object |
The custom response header. |
||
| Key |
string |
The key of the custom response header. |
Header-Key |
| Value |
string |
The value of the custom response header. |
Header-Value |
| InstanceId |
string |
The ID of the WAF instance. |
Examples
Success response
JSON format
{
"RequestId": "439AADF2-368C-5E98-B14E-3086****0573",
"Resource": {
"GmtCreate": 1607493144000,
"GmtModified": 1691720010000,
"Product": "alb",
"Resource": "alb-rencs***",
"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",
"Value": "Header-Value"
}
],
"InstanceId": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.