Lists the recommendations present in your Amazon SES account in the current Amazon Web Services Region.
You can execute this operation no more than once per second.
Parameters:
-
filter
(Optional[ListRecommendationsFilter], default:
None
)
–
Filters applied when retrieving recommendations. Can eiter be an individual filter, or combinations of STATUS and IMPACT or STATUS and TYPE
-
next_token
(Optional[NextToken], default:
None
)
–
A token returned from a previous call to ListRecommendations to indicate the position in the list of recommendations.
-
page_size
(Optional[MaxItems], default:
None
)
–
The number of results to show in a single call to ListRecommendations. If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.
The value you specify has to be at least 1, and can be no more than 100.
Raises:
Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
| async def list_recommendations(
self,
*,
config_overrides: Optional[AsyncSESv2ClientConfig] = None,
filter: Optional[
"capo_sesv2.types.list_recommendations_filter.ListRecommendationsFilter"
] = None,
next_token: Optional["capo_sesv2.types.next_token.NextToken"] = None,
page_size: Optional["capo_sesv2.types.max_items.MaxItems"] = None,
) -> "capo_sesv2.types.list_recommendations_response.ListRecommendationsResponse":
"""<p>Lists the recommendations present in your Amazon SES account in the current Amazon Web Services Region.</p> <p>You can execute this operation no more than once per second.</p>
Args:
filter: <p>Filters applied when retrieving recommendations. Can eiter be an individual filter, or combinations of <code>STATUS</code> and <code>IMPACT</code> or <code>STATUS</code> and <code>TYPE</code> </p>
next_token: <p>A token returned from a previous call to <code>ListRecommendations</code> to indicate the position in the list of recommendations.</p>
page_size: <p>The number of results to show in a single call to <code>ListRecommendations</code>. If the number of results is larger than the number you specified in this parameter, then the response includes a <code>NextToken</code> element, which you can use to obtain additional results.</p> <p>The value you specify has to be at least 1, and can be no more than 100.</p>
Raises:
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sesv2.types.list_recommendations_request.ListRecommendationsRequest]",
) -> AsyncOperationResponse[
"capo_sesv2.types.list_recommendations_response.ListRecommendationsResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.list_recommendations
(
output,
http_response,
) = await capo_sesv2._operations.simple_email_service_v2.list_recommendations.async_list_recommendations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListRecommendations")
)
input_: capo_sesv2.types.list_recommendations_request.ListRecommendationsRequest = {}
if filter is not None:
input_["filter"] = filter
if next_token is not None:
input_["next_token"] = next_token
if page_size is not None:
input_["page_size"] = page_size
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|