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
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 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 | |