Returns a list of all of the email identities that are associated with your Amazon Web Services account. An identity can be either an email address or a domain. This operation returns identities that are verified as well as those that aren't. This operation returns identities that are associated with Amazon SES and Amazon Pinpoint.
Parameters:
-
filter
(Optional[IdentityFilter], default:
None
)
–
An object that contains filters to apply when listing email identities. You can filter by a substring of the identity name, by identity type, or by verification status.
-
next_token
(Optional[NextToken], default:
None
)
–
A token returned from a previous call to ListEmailIdentities to indicate the position in the list of identities.
-
page_size
(Optional[MaxItems], default:
None
)
–
The number of results to show in a single call to ListEmailIdentities. 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 0, and can be no more than 1000.
Raises:
Source code in docs_src/capo_sesv2/_services/se_sv2.py
| def list_email_identities(
self,
*,
config_overrides: Optional[SESv2ClientConfig] = None,
filter: Optional["capo_sesv2.types.identity_filter.IdentityFilter"] = 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_email_identities_response.ListEmailIdentitiesResponse":
"""<p>Returns a list of all of the email identities that are associated with your Amazon Web Services account. An identity can be either an email address or a domain. This operation returns identities that are verified as well as those that aren't. This operation returns identities that are associated with Amazon SES and Amazon Pinpoint.</p>
Args:
filter: <p>An object that contains filters to apply when listing email identities. You can filter by a substring of the identity name, by identity type, or by verification status.</p>
next_token: <p>A token returned from a previous call to <code>ListEmailIdentities</code> to indicate the position in the list of identities.</p>
page_size: <p>The number of results to show in a single call to <code>ListEmailIdentities</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 0, and can be no more than 1000.</p>
Raises:
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</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.
"""
def _handler(
req: "OperationRequest[capo_sesv2.types.list_email_identities_request.ListEmailIdentitiesRequest]",
) -> OperationResponse[
"capo_sesv2.types.list_email_identities_response.ListEmailIdentitiesResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.list_email_identities
output, http_response = (
capo_sesv2._operations.simple_email_service_v2.list_email_identities.list_email_identities(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListEmailIdentities")
)
input_: capo_sesv2.types.list_email_identities_request.ListEmailIdentitiesRequest = {}
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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|