list_attacks
async
¶
list_attacks(
*,
config_overrides: Optional[AsyncShieldClientConfig] = None,
resource_arns: Optional[ResourceArnFilterList] = None,
start_time: Optional[TimeRange] = None,
end_time: Optional[TimeRange] = None,
next_token: Optional[Token] = None,
max_results: Optional[MaxResults] = None,
) -> ListAttacksResponse
Returns all ongoing DDoS attacks or all DDoS attacks during a specified time period.
Parameters:
-
resource_arns(Optional[ResourceArnFilterList], default:None) –The ARNs (Amazon Resource Names) of the resources that were attacked. If you leave this blank, all applicable resources for this account will be included.
-
start_time(Optional[TimeRange], default:None) –The start of the time period for the attacks. This is a
timestamptype. The request syntax listing for this call indicates anumbertype, but you can provide the time in any valid timestamp format setting. -
end_time(Optional[TimeRange], default:None) –The end of the time period for the attacks. This is a
timestamptype. The request syntax listing for this call indicates anumbertype, but you can provide the time in any valid timestamp format setting. -
next_token(Optional[Token], default:None) –When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects, Shield Advanced includes a
NextTokenvalue in the response. You can retrieve the next batch of objects by requesting the list again and providing the token that was returned by the prior call in your request.You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the
MaxResultssetting. Shield Advanced will not return more thanMaxResultsobjects, but may return fewer, even if more objects are still available.Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a
NextTokenvalue.On your first call to a list operation, leave this setting empty.
-
max_results(Optional[MaxResults], default:None) –The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a
NextTokenvalue in the response.The default setting is 20.
Raises:
-
InternalErrorException–Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.
-
InvalidOperationException–Exception that indicates that the operation would not cause any change to occur.
-
InvalidParameterException–Exception that indicates that the parameters passed to the API are invalid. If available, this exception includes details in additional properties.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_shield/_services/async_shield.py
1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 | |