List the accelerators for an Amazon Web Services account.
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The number of Global Accelerator objects that you want to return with this call. The default value is 10.
-
next_token
(Optional[GenericString], default:
None
)
–
The token for the next set of results. You receive this token from a previous call.
Raises:
Source code in docs_src/capo_global_accelerator/_services/async_global_accelerator.py
| async def list_accelerators(
self,
*,
config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
max_results: Optional[
"capo_global_accelerator.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_global_accelerator.types.generic_string.GenericString"
] = None,
) -> "capo_global_accelerator.types.list_accelerators_response.ListAcceleratorsResponse":
"""<p>List the accelerators for an Amazon Web Services account. </p>
Args:
max_results: <p>The number of Global Accelerator objects that you want to return with this call. The default value is 10.</p>
next_token: <p>The token for the next set of results. You receive this token from a previous call.</p>
Raises:
capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
capo_global_accelerator.errors.invalid_next_token_exception.InvalidNextTokenException: <p>There isn't another item to return.</p>
capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_global_accelerator.types.list_accelerators_request.ListAcceleratorsRequest]",
) -> AsyncOperationResponse[
"capo_global_accelerator.types.list_accelerators_response.ListAcceleratorsResponse"
]:
import capo_global_accelerator._operations.global_accelerator_v20180706.list_accelerators
(
output,
http_response,
) = await capo_global_accelerator._operations.global_accelerator_v20180706.list_accelerators.async_list_accelerators(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListAccelerators")
)
input_: capo_global_accelerator.types.list_accelerators_request.ListAcceleratorsRequest = {}
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
|