Queries API security events.
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:DescribeApisecEvents | get | *All Resources * |
| 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_v2_public_cn-5y***d31 |
EventId | string | No | The ID of the API security event. | 18ba94fea9***e66ba0557b7b91 |
ApiFormat | string | No | The API. | /apisec/v1/register.php |
MatchedHost | string | No | The domain name or IP address of the API. | a.aliyun.com |
EventTag | string | No | The type of the event. Note
You can call the DescribeApisecRules operation to query the supported event types.
| ObtainSensitiveUnauthorized |
StartTs | long | No | The beginning of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds. | 1683648000 |
EndTs | long | No | The end of the time range to query. This value is a UNIX timestamp in UTC. Unit: seconds. | 1683703260 |
OrderKey | string | No | The name of the sorting field. Valid values:
| startTs |
OrderWay | string | No | The sorting method. Valid values:
| desc |
PageNumber | long | No | The page number. Default value: 1. | 1 |
PageSize | long | No | The number of entries per page. Default value: 10. | 10 |
ApiTag | string | No | The business purpose of the API. Note
You can call the DescribeApisecRules operation to query the business purpose of the API.
| SendMail |
Origin | string | No | The source of the event type. Valid values:
| default |
EventLevel | string | No | The severity level of the event. Valid values:
| low |
UserStatus | string | No | The event status. Valid values:
| Ignore |
AttackIp | string | No | The Attack source IP. | 42.224.*.* |
ApiId | string | No | The ID of the event-related API. | 820b860***6205da93b935b28 |
ClusterId | string | No | The ID of the hybrid cloud cluster. Note
For hybrid cloud scenarios only, you can call the DescribeHybridCloudClusters operation to query the hybrid cloud clusters.
| 428 |
RegionId | string | No | The region in which the WAF instance is deployed. Valid values:
| cn-hangzhou |
ResourceManagerResourceGroupId | string | No | The ID of the Alibaba Cloud resource group. | rg-acfm***q |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 3,
"RequestId": "12F4CC8F-7E9F-5E4D-BF7C-BD1EDDE0C282",
"Data": [
{
"Origin": "custom",
"EventLevel": "medium",
"StartTs": 1683648000,
"EventInfo": "{}",
"ApiFormat": "/apisec/v1/register.php",
"ApiTag": "SendMail",
"UserStatus": "Ignore",
"Follow": 0,
"RequestData": "{}",
"EventId": "c82cb276847e9c96f9597d9f4b0cdcff",
"AttackIp": "104.234.140.33",
"AttackIpInfo": "[{\\\"ip\\\":\\\"72.*.*.119\\\",\\\"country_id\\\":\\\"US\\\",\\\"region_id\\\":\\\"\\\",\\\"cnt\\\":\\\"2100\\\"}]",
"EndTs": 1683703260,
"AttackCntInfo": "{\\\"1717498320\\\":500,\\\"1717498380\\\":529,\\\"1717498440\\\":20,\\\"1717498260\\\":518,\\\"1717498200\\\":481,\\\"1717498140\\\":52}",
"AllCnt": 10,
"RemoteRegion": "110000",
"ResponseData": "{}",
"AttackClient": "Chrome",
"EventTag": "ObtainSensitiveUnauthorized",
"MatchedHost": "a.aliyun.com",
"Note": "Notified",
"ApiId": "2ecc1cf67b91853bc55545052ccf06a8",
"RemoteCountry": "US"
}
]
}
Error codes
For a list of error codes, visit the Service error codes.