list_attacks
¶
list_attacks(
*,
config_overrides: Optional[ShieldClientConfig] = 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/shield.py
1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 | |