Queries protected objects by page.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
yundun-waf:DescribeDefenseResources | list |
|
| 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**** |
ResourceManagerResourceGroupId | string | No | The ID of the resource group. | rg-acfm***q |
PageNumber | integer | No | The number of the page to return. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. Default value: 10. | 10 |
RegionId | string | No | The region where the WAF instance resides. Valid values:
| cn-hangzhou |
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 tags of the resources that you want to query. You can specify up to 20 tags. | |
object | No | |||
Key | string | No | The key of the tag. | Tagkey1 |
Value | string | No | The value of the tag. | TagValue1 |
Query parameters
Parameter description
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
product | String | No | waf | The asset type of the protected object. Valid values:- waf: The protected object is added to WAF in CNAME record mode or other modes.- alb: The protected object is an Application Load Balancer (ALB) instance that is added to WAF in cloud native mode.- clb: The protected object is a Classic Load Balancer (CLB) instance that is added to WAF in cloud native mode.- ecs: The protected object is an Elastic Compute Service (ECS) instance that is added to WAF in cloud native mode.- mse: The protected object is a Microservices Engine (MSE) instance that is added to WAF in cloud native mode.- fc: The protected object is a custom domain name in Function Compute that is added to WAF in cloud native mode. |
resourceLike | String | No | example.aliyundoc.c | The name of the protected object that you want to query. You can specify this parameter to query a protected object by using fuzzy matching. |
resource | String | No | example.aliyundoc.com-waf | The name of the protected object that you want to query. You can specify this parameter to query a protected object by using exact matching. |
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 the protected objects with commas (,). |
instanceId | String | No | alb-nifa24**** | The instance ID of the protected object that you want to query. You can specify this parameter to query the ID of a protected object by using exact matching. |
domain | String | No | example.aliyundoc.com | The domain name of the protected object that you want to query. You can specify this parameter to query the domain name of a protected object by using exact matching. |
resourceGroup | String | No | group1 | The protected object group to which the protected object that you want to query belongs. |
inGroup | Boolean | No | true | Specifies whether the protected object is added to a protected object group. |
orderBy | String | No | resource | The method that you want to use to sort the protected objects. Valid values:- resource: sorts the protected objects by name.- gmtModified: sorts the protected objects by creation time. |
desc | Boolean | No | true | Specifies whether to sort the protected objects in ascending or descending order. Valid values:- false: sorts the protected objects in ascending order.- true: sorts the 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",
}
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "618F2626-DB27-5187-8C6C-4E61A491DF29",
"Resources": [
{
"GmtCreate": 1652149203187,
"GmtModified": 1665633032000,
"Product": "alb",
"Resource": "alb-rencs***",
"ResourceGroup": "test",
"ResourceOrigin": "custom",
"Description": "test",
"Detail": {
"test": "test",
"test2": 1
},
"Pattern": "domain",
"XffStatus": 1,
"CustomHeaders": [
"afbfbajf"
],
"ResourceManagerResourceGroupId": "rg-acfm***q",
"AcwCookieStatus": 1,
"AcwSecureStatus": 0,
"AcwV3SecureStatus": 0,
"OwnerUserId": "135*********46"
}
],
"TotalCount": 73
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-09-02 | The request parameters of the API has changed | View Change Details |
2024-08-29 | The request parameters of the API has changed | View Change Details |
2024-03-21 | The response structure of the API has changed | View Change Details |
2023-08-24 | The response structure of the API has changed | View Change Details |