Lists gateways owned by an Amazon Web Services account in an Amazon Web Services Region specified in the request. The returned list is ordered by gateway Amazon Resource Name (ARN).
By default, the operation returns a maximum of 100 gateways. This operation supports pagination that allows you to optionally reduce the number of gateways returned in a response.
If you have more gateways than are returned in a response (that is, the response returns only a truncated list of your gateways), the response contains a marker that you can specify in your next request to fetch the next page of gateways.
Parameters:
-
marker
(Optional[Marker], default:
None
)
–
An opaque string that indicates the position at which to begin the returned list of gateways.
-
limit
(Optional[PositiveIntObject], default:
None
)
–
Specifies that the list of gateways returned be limited to the specified number of items.
Raises:
-
InternalServerError
–
An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException
–
An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To lists region specific gateways per AWS account
Lists gateways owned by an AWS account in a specified region as requested. Results are sorted by gateway ARN up to a maximum of 100 gateways.
>>> client.list_gateways(marker='1', limit=2)
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
| def list_gateways(
self,
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
marker: Optional["capo_storage_gateway.types.marker.Marker"] = None,
limit: Optional[
"capo_storage_gateway.types.positive_int_object.PositiveIntObject"
] = None,
) -> "capo_storage_gateway.types.list_gateways_output.ListGatewaysOutput":
"""<p>Lists gateways owned by an Amazon Web Services account in an Amazon Web Services Region specified in the request. The returned list is ordered by gateway Amazon Resource Name (ARN).</p> <p>By default, the operation returns a maximum of 100 gateways. This operation supports pagination that allows you to optionally reduce the number of gateways returned in a response.</p> <p>If you have more gateways than are returned in a response (that is, the response returns only a truncated list of your gateways), the response contains a marker that you can specify in your next request to fetch the next page of gateways.</p>
Args:
marker: <p>An opaque string that indicates the position at which to begin the returned list of gateways.</p>
limit: <p>Specifies that the list of gateways returned be limited to the specified number of items.</p>
Raises:
capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To lists region specific gateways per AWS account
Lists gateways owned by an AWS account in a specified region as requested. Results are sorted by gateway ARN up to a maximum of 100 gateways.
>>> client.list_gateways(marker='1', limit=2)
"""
def _handler(
req: "OperationRequest[capo_storage_gateway.types.list_gateways_input.ListGatewaysInput]",
) -> OperationResponse[
"capo_storage_gateway.types.list_gateways_output.ListGatewaysOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.list_gateways
output, http_response = (
capo_storage_gateway._operations.storage_gateway_20130630.list_gateways.list_gateways(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListGateways")
)
input_: capo_storage_gateway.types.list_gateways_input.ListGatewaysInput = {}
if marker is not None:
input_["marker"] = marker
if limit is not None:
input_["limit"] = limit
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|