async def list_email_contacts(
self,
*,
config_overrides: Optional[AsyncNotificationsContactsClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_notificationscontacts.types.list_email_contacts_response.ListEmailContactsResponse":
"""<p>Lists all email contacts created under the Account.</p>
Args:
max_results: <p>The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.</p>
next_token: <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.</p>
Raises:
capo_notificationscontacts.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_notificationscontacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_notificationscontacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_notificationscontacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_notificationscontacts.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_notificationscontacts.types.list_email_contacts_request.ListEmailContactsRequest]",
) -> AsyncOperationResponse[
"capo_notificationscontacts.types.list_email_contacts_response.ListEmailContactsResponse"
]:
import capo_notificationscontacts._operations.notifications_contacts.list_email_contacts
(
output,
http_response,
) = await capo_notificationscontacts._operations.notifications_contacts.list_email_contacts.async_list_email_contacts(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_notificationscontacts.types.list_email_contacts_response.ListEmailContactsResponse",
) -> dict[str, Any]:
import capo_notificationscontacts.types.list_email_contacts_response
return capo_notificationscontacts.types.list_email_contacts_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListEmailContacts", redact_output=_redact_output),
)
input_: capo_notificationscontacts.types.list_email_contacts_request.ListEmailContactsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output