list_protections
async
¶
list_protections(
*,
config_overrides: Optional[AsyncShieldClientConfig] = None,
next_token: Optional[Token] = None,
max_results: Optional[MaxResults] = None,
inclusion_filters: Optional[InclusionProtectionFilters] = None,
) -> ListProtectionsResponse
Retrieves Protection objects for the account. You can retrieve all protections or you can provide filtering criteria and retrieve just the subset of protections that match the criteria.
Parameters:
-
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.
-
inclusion_filters(Optional[InclusionProtectionFilters], default:None) –Narrows the set of protections that the call retrieves. You can retrieve a single protection by providing its name or the ARN (Amazon Resource Name) of its protected resource. You can also retrieve all protections for a specific resource type. You can provide up to one criteria per filter type. Shield Advanced returns protections that exactly match all of the filter criteria that you provide.
Raises:
-
InternalErrorException–Exception that indicates that a problem occurred with the service infrastructure. You can retry the request.
-
InvalidPaginationTokenException–Exception that indicates that the
NextTokenspecified in the request is invalid. Submit the request using theNextTokenvalue that was returned in the prior response. -
ResourceNotFoundException–Exception indicating the specified resource does not exist. If available, this exception includes details in additional properties.
-
UnknownServiceError–The service returned an error code this client does not model.