Lists address lists for this account.
Parameters:
-
next_token
(Optional[PaginationToken], default:
None
)
–
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
-
page_size
(Optional[PageSize], default:
None
)
–
The maximum number of address list resources that are returned per call. You can use NextToken to retrieve the next page of address lists.
Raises:
-
AccessDeniedException
–
Occurs when a user is denied access to a specific resource or action.
-
ThrottlingException
–
Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.
-
ValidationException
–
The request validation has failed. For details, see the accompanying error message.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_mailmanager/_services/async_mail_manager.py
| async def list_address_lists(
self,
*,
config_overrides: Optional[AsyncMailManagerClientConfig] = None,
next_token: Optional[
"capo_mailmanager.types.pagination_token.PaginationToken"
] = None,
page_size: Optional["capo_mailmanager.types.page_size.PageSize"] = None,
) -> "capo_mailmanager.types.list_address_lists_response.ListAddressListsResponse":
"""<p>Lists address lists for this account.</p>
Args:
next_token: <p>If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.</p>
page_size: <p>The maximum number of address list resources that are returned per call. You can use NextToken to retrieve the next page of address lists.</p>
Raises:
capo_mailmanager.errors.access_denied_exception.AccessDeniedException: <p>Occurs when a user is denied access to a specific resource or action.</p>
capo_mailmanager.errors.throttling_exception.ThrottlingException: <p>Occurs when a service's request rate limit is exceeded, resulting in throttling of further requests.</p>
capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mailmanager.types.list_address_lists_request.ListAddressListsRequest]",
) -> AsyncOperationResponse[
"capo_mailmanager.types.list_address_lists_response.ListAddressListsResponse"
]:
import capo_mailmanager._operations.mail_manager_svc.list_address_lists
(
output,
http_response,
) = await capo_mailmanager._operations.mail_manager_svc.list_address_lists.async_list_address_lists(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAddressLists")
)
input_: capo_mailmanager.types.list_address_lists_request.ListAddressListsRequest = {}
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
|