Skip to content

start_gateway

start_gateway(
    gateway_arn: GatewayARN,
    *,
    config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> StartGatewayOutput

Starts a gateway that you previously shut down (see ShutdownGateway). After the gateway starts, you can then make other API calls, your applications can read from or write to the gateway's storage volumes and you will be able to take snapshot backups.

When you make a request, you will get a 200 OK success response immediately. However, it might take some time for the gateway to be ready. You should call DescribeGatewayInformation and check the status before making any additional API calls. For more information, see ActivateGateway.

To specify which gateway to start, use the Amazon Resource Name (ARN) of the gateway in your request.

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 start a gateway service Starts a gateway service that was previously shut down.

>>> client.start_gateway(gateway_arn='arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B')
Source code in docs_src/capo_storage_gateway/_services/storage_gateway.py
def start_gateway(
    self,
    gateway_arn: "capo_storage_gateway.types.gateway_arn.GatewayARN",
    *,
    config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.start_gateway_output.StartGatewayOutput":
    """<p>Starts a gateway that you previously shut down (see <a>ShutdownGateway</a>). After the gateway starts, you can then make other API calls, your applications can read from or write to the gateway's storage volumes and you will be able to take snapshot backups.</p> <note> <p>When you make a request, you will get a 200 OK success response immediately. However, it might take some time for the gateway to be ready. You should call <a>DescribeGatewayInformation</a> and check the status before making any additional API calls. For more information, see <a>ActivateGateway</a>.</p> </note> <p>To specify which gateway to start, use the Amazon Resource Name (ARN) of the gateway in your request.</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 start a gateway service
        Starts a gateway service that was previously shut down.

        >>> client.start_gateway(gateway_arn='arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B')
    """

    def _handler(
        req: "OperationRequest[capo_storage_gateway.types.start_gateway_input.StartGatewayInput]",
    ) -> OperationResponse[
        "capo_storage_gateway.types.start_gateway_output.StartGatewayOutput"
    ]:
        import capo_storage_gateway._operations.storage_gateway_20130630.start_gateway

        output, http_response = (
            capo_storage_gateway._operations.storage_gateway_20130630.start_gateway.start_gateway(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartGateway")
    )
    input_: capo_storage_gateway.types.start_gateway_input.StartGatewayInput = {
        "gateway_arn": gateway_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output