Lists backup gateways owned by an Amazon Web Services account in an Amazon Web Services Region. The returned list is ordered by gateway Amazon Resource Name (ARN).
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
The maximum number of gateways to list.
-
next_token
(Optional[NextToken], default:
None
)
–
The next item following a partial list of returned resources. For example, if a request is made to return MaxResults number of resources, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
Raises:
Source code in docs_src/capo_backup_gateway/_services/async_backup_gateway.py
| async def list_gateways(
self,
*,
config_overrides: Optional[AsyncBackupGatewayClientConfig] = None,
max_results: Optional[
"capo_backup_gateway.types.max_results.MaxResults"
] = None,
next_token: Optional["capo_backup_gateway.types.next_token.NextToken"] = None,
) -> "capo_backup_gateway.types.list_gateways_output.ListGatewaysOutput":
"""<p>Lists backup gateways owned by an Amazon Web Services account in an Amazon Web Services Region. The returned list is ordered by gateway Amazon Resource Name (ARN).</p>
Args:
max_results: <p>The maximum number of gateways to list.</p>
next_token: <p>The next item following a partial list of returned resources. For example, if a request is made to return <code>MaxResults</code> number of resources, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
Raises:
capo_backup_gateway.errors.internal_server_exception.InternalServerException: <p>The operation did not succeed because an internal error occurred. Try again later.</p>
capo_backup_gateway.errors.throttling_exception.ThrottlingException: <p>TPS has been limited to protect against intentional or unintentional high request volumes.</p>
capo_backup_gateway.errors.validation_exception.ValidationException: <p>The operation did not succeed because a validation error occurred.</p>
capo_backup_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_backup_gateway.types.list_gateways_input.ListGatewaysInput]",
) -> AsyncOperationResponse[
"capo_backup_gateway.types.list_gateways_output.ListGatewaysOutput"
]:
import capo_backup_gateway._operations.backup_on_premises_v20210101.list_gateways
(
output,
http_response,
) = await capo_backup_gateway._operations.backup_on_premises_v20210101.list_gateways.async_list_gateways(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListGateways")
)
input_: capo_backup_gateway.types.list_gateways_input.ListGatewaysInput = {}
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
|