Returns a list containing all of the identities (email addresses and domains) for your Amazon Web Services account in the current Amazon Web Services Region, regardless of verification status.
You can execute this operation no more than once per second.
It's recommended that for successive pagination calls of this API, you continue to the use the same parameter/value pairs as used in the original call, e.g., if you used IdentityType=Domain in the the original call and received a NextToken in the response, you should continue providing the IdentityType=Domain parameter for further NextToken calls; however, if you didn't provide the IdentityType parameter in the original call, then continue to not provide it for successive pagination calls. Using this protocol will ensure consistent results.
Parameters:
-
identity_type
(Optional[IdentityType], default:
None
)
–
The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities are listed.
-
next_token
(Optional[NextToken], default:
None
)
–
The token to use for pagination.
-
max_items
(Optional[MaxItems], default:
None
)
–
The maximum number of identities per page. Possible values are 1-1000 inclusive.
Raises:
Examples:
ListIdentities
The following example lists the email address identities that have been submitted for verification with Amazon SES:
>>> await client.list_identities(identity_type='EmailAddress', next_token='', max_items=123)
Source code in docs_src/capo_ses/_services/async_ses.py
| async def list_identities(
self,
*,
config_overrides: Optional[AsyncSESClientConfig] = None,
identity_type: Optional["capo_ses.types.identity_type.IdentityType"] = None,
next_token: Optional["capo_ses.types.next_token.NextToken"] = None,
max_items: Optional["capo_ses.types.max_items.MaxItems"] = None,
) -> "capo_ses.types.list_identities_response.ListIdentitiesResponse":
"""<p>Returns a list containing all of the identities (email addresses and domains) for your Amazon Web Services account in the current Amazon Web Services Region, regardless of verification status.</p> <p>You can execute this operation no more than once per second.</p> <note> <p>It's recommended that for successive pagination calls of this API, you continue to the use the same parameter/value pairs as used in the original call, e.g., if you used <code>IdentityType=Domain</code> in the the original call and received a <code>NextToken</code> in the response, you should continue providing the <code>IdentityType=Domain</code> parameter for further <code>NextToken</code> calls; however, if you didn't provide the <code>IdentityType</code> parameter in the original call, then continue to not provide it for successive pagination calls. Using this protocol will ensure consistent results.</p> </note>
Args:
identity_type: <p>The type of the identities to list. Possible values are "EmailAddress" and "Domain". If this parameter is omitted, then all identities are listed.</p>
next_token: <p>The token to use for pagination.</p>
max_items: <p>The maximum number of identities per page. Possible values are 1-1000 inclusive.</p>
Raises:
capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
ListIdentities
The following example lists the email address identities that have been submitted for verification with Amazon SES:
>>> await client.list_identities(identity_type='EmailAddress', next_token='', max_items=123)
"""
async def _handler(
req: "AsyncOperationRequest[capo_ses.types.list_identities_request.ListIdentitiesRequest]",
) -> AsyncOperationResponse[
"capo_ses.types.list_identities_response.ListIdentitiesResponse"
]:
import capo_ses._operations.simple_email_service.list_identities
(
output,
http_response,
) = await capo_ses._operations.simple_email_service.list_identities.async_list_identities(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListIdentities")
)
input_: capo_ses.types.list_identities_request.ListIdentitiesRequest = {}
if identity_type is not None:
input_["identity_type"] = identity_type
if next_token is not None:
input_["next_token"] = next_token
if max_items is not None:
input_["max_items"] = max_items
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|