Queries protected objects by page.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:DescribeDefenseResources |
list |
*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 |
Query
Parameters
| Parameter | Type | Required | Example | Description |
| product | String | No | waf | The 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. |
| resourceLike | String | No | example.aliyundoc.c | The name of the protected object that you want to query. Fuzzy match is supported. |
| resource | String | No | example.aliyundoc.com-waf | The name of the protected object that you want to query. Exact match is supported. |
| resourceIn | String | No | example1.aliyundoc.com,example2.aliyundoc.com | The protected objects that you want to query. You can specify this parameter to query multiple protected objects. Separate multiple protected objects with commas (,). |
| instanceId | String | No | alb-nifa24**** | The instance ID of the protected object that you want to query. Exact match is supported. |
| domain | String | No | example.aliyundoc.com | The domain name of the protected object that you want to query. Exact match is supported. |
| resourceGroup | String | No | group1 | The protected object group to which the protected object belongs. |
| inGroup | Boolean | No | true | Specifies whether the protected object is added to a protected object group. |
| ownerUserId | String | No | 135********23 | 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. |
| orderBy | String | No | resource | The 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. |
| desc | Boolean | No | true | Specifies 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 |
| Product |
string |
The name of the cloud service. |
alb |
| AcwCookieStatus |
integer |
The status of the tracking cookie.
|
1 |
| AcwSecureStatus |
integer |
The status of the secure attribute of the tracking cookie.
|
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.