describe_attack_statistics
()¶Provides information about the number and type of attacks Shield has detected in the last year for all resources that belong to your account, regardless of whether you've defined Shield protections for them. This operation is available to Shield customers as well as to Shield Advanced customers.
The operation returns data for the time range of midnight UTC, one year ago, to midnight UTC, today. For example, if the current time is 2020-10-26 15:39:32 PDT
, equal to 2020-10-26 22:39:32 UTC
, then the time range for the attack data returned is from 2019-10-26 00:00:00 UTC
to 2020-10-26 00:00:00 UTC
.
The time range indicates the period covered by the attack statistics data items.
See also: AWS API Documentation
Request Syntax
response = client.describe_attack_statistics()
{
'TimeRange': {
'FromInclusive': datetime(2015, 1, 1),
'ToExclusive': datetime(2015, 1, 1)
},
'DataItems': [
{
'AttackVolume': {
'BitsPerSecond': {
'Max': 123.0
},
'PacketsPerSecond': {
'Max': 123.0
},
'RequestsPerSecond': {
'Max': 123.0
}
},
'AttackCount': 123
},
]
}
Response Structure
The time range of the attack.
The start time, in Unix time in seconds.
The end time, in Unix time in seconds.
The data that describes the attacks detected during the time period.
A single attack statistics data record. This is returned by DescribeAttackStatistics along with a time range indicating the time period that the attack statistics apply to.
Information about the volume of attacks during the time period. If the accompanying AttackCount
is zero, this setting might be empty.
A statistics object that uses bits per second as the unit. This is included for network level attacks.
The maximum attack volume observed for the given unit.
A statistics object that uses packets per second as the unit. This is included for network level attacks.
The maximum attack volume observed for the given unit.
A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.
The maximum attack volume observed for the given unit.
The number of attacks detected during the time period. This is always present, but might be zero.
Exceptions
Shield.Client.exceptions.InternalErrorException