Queries protected objects by paging.
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 |
No |
Instance ID of the WAF instance. Note
You can call the DescribeInstance operation to query instance ID of the WAF instance. |
waf_cdnsdf3**** |
| PageNumber |
integer |
No |
The page number to return when paging is used. Default value: 1, which indicates the first page. |
1 |
| PageSize |
integer |
No |
The number of entries per page when paging is used. Default value: 10, which indicates that 10 entries are returned on each page. |
10 |
| Query |
string |
No |
The query conditions. The value is a JSON string. Note
The query results vary based on the query conditions. For more information, see Query parameter description. |
{\"product\":\"waf\"} |
| Tag |
array<object> |
No |
The list of resource tags. A maximum of 20 tags can be specified. |
|
|
object |
No |
The resource tag, which consists of a tag key and a tag value. |
||
| 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 where the WAF instance is deployed. Valid values:
|
cn-hangzhou |
Query parameter description
Parameter description
| Name | Type | Required | Example | Description |
| product | String | No | waf | The asset type. Valid values: - waf: connected to WAF through CNAME or other methods. - alb: connected through Application Load Balancer (ALB). - clb: connected through Classic Load Balancer (CLB). - ecs: connected through ECS. - mse: connected through Microservices Engine (MSE). - fc: connected through Function Compute (FC). |
| resourceLike | String | No | example.aliyundoc.c | The name of the protected object. You can set this parameter to perform a fuzzy query on protected objects that are connected to WAF. |
| resource | String | No | example.aliyundoc.com-waf | The name of the protected object. You can set this parameter to perform an exact query on protected objects that are connected to WAF. |
| resourceIn | String | No | example1.aliyundoc.com,example2.aliyundoc.com | The names of multiple protected objects. You can set this parameter to query multiple protected objects that are connected to WAF. Separate multiple protected objects with commas (,). |
| instanceId | String | No | alb-nifa24**** | The instance ID of the protected object. You can set this parameter to perform an exact query on the instance ID of a protected object that is connected to WAF. |
| domain | String | No | example.aliyundoc.com | The domain name of the protected object. You can set this parameter to perform an exact query on the domain name of a protected object that is connected to WAF. |
| resourceGroup | String | No | group1 | The protection group to query. |
| inGroup | Boolean | No | true | Specifies whether the protected object has been added to the protection group. |
| ownerUserId | String | No | 135********23 | The ID of the Alibaba Cloud account to which the protected object belongs. You can set this parameter to perform an exact query on WAF protected objects that belong to a specific account in a multi-account scenario. |
| orderBy | String | No | resource | The sorting method for protected objects. Valid values: - resource: sorted by protected object name. - gmtModified: sorted by modification time. |
| desc | Boolean | No | true | The sorting order. Valid values: - false: ascending order. - true: 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 struct. |
||
| TotalCount |
integer |
The total number of entries returned. |
73 |
| RequestId |
string |
The request ID. |
618F2626-DB27-5187-8C6C-4E61A491**** |
| Resources |
array<object> |
The list of protected objects. |
|
|
array<object> |
The protected object information. |
||
| Pattern |
string |
The protection mode of the protected object. |
domain |
| Description |
string |
The description. |
test |
| XffStatus |
integer |
Indicates whether XFF proxy is enabled for the protected object. |
1 |
| GmtModified |
integer |
The time when the protected object was last modified. Unit: milliseconds. |
1665633032000 |
| Resource |
string |
The name of the protected object. |
alb-rencs*** |
| AcwV3SecureStatus |
integer |
The status of the secure attribute for the slider 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 for the tracking cookie.
|
0 |
| ResourceManagerResourceGroupId |
string |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
| GmtCreate |
integer |
The time when the protected object was created. Unit: milliseconds. |
1652149203187 |
| OwnerUserId |
string |
The Alibaba Cloud account to which the protected object asset belongs in a multi-account management feature scenario. |
135*********46 |
| ResourceOrigin |
string |
The origin of the protected object. |
custom |
| ResourceGroup |
string |
The name of the protection group to which the protected object is added. |
test |
| Detail |
object |
The detailed description of the protected object. Different key-value pairs in the map represent different attributes of the protected object. |
{"domain":"eou.eleme.cn","uri":"/"} |
| CustomHeaders |
array |
The custom XFF headers used to obtain the originating IP address of the client. If XFF is set to 1 and this field is empty, the first IP address in the XFF header is used as the originating IP address of the client. |
|
|
string |
The custom header field information. |
afbfbajf |
|
| ResponseHeaders |
array<object> |
The response header parameters. |
|
|
object |
The response header parameters. |
||
| 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 instance ID of the WAF instance. |
waf_v2_public_cn-k***** |
| ResourceStatus |
string |
The status of the protected object. Valid values:
|
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"
}
],
"InstanceId": "waf_v2_public_cn-k*****",
"ResourceStatus": ""
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.