Skip to content

shutdown_gateway async

shutdown_gateway(
    gateway_arn: GatewayARN,
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
) -> ShutdownGatewayOutput

Shuts down a Tape Gateway or Volume Gateway. To specify which gateway to shut down, use the Amazon Resource Name (ARN) of the gateway in the body of your request.

This API action cannot be used to shut down S3 File Gateway or FSx File Gateway.

The operation shuts down the gateway service component running in the gateway's virtual machine (VM) and not the host VM.

If you want to shut down the VM, it is recommended that you first shut down the gateway component in the VM to avoid unpredictable conditions.

After the gateway is shutdown, you cannot call any other API except StartGateway, DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. Your applications cannot read from or write to the gateway's storage volumes, and there are no snapshots taken.

When you make a shutdown request, you will get a 200 OK success response immediately. However, it might take some time for the gateway to shut down. You can call the DescribeGatewayInformation API to check the status. For more information, see ActivateGateway.

If do not intend to use the gateway again, you must delete the gateway (using DeleteGateway) to no longer pay software charges associated with the gateway.

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 shut down a gateway service This operation shuts down the gateway service component running in the storage gateway's virtual machine (VM) and not the VM.

>>> await client.shutdown_gateway(gateway_arn='arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B')
Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
async def shutdown_gateway(
    self,
    gateway_arn: "capo_storage_gateway.types.gateway_arn.GatewayARN",
    *,
    config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.shutdown_gateway_output.ShutdownGatewayOutput":
    """<p>Shuts down a Tape Gateway or Volume Gateway. To specify which gateway to shut down, use the Amazon Resource Name (ARN) of the gateway in the body of your request.</p> <note> <p>This API action cannot be used to shut down S3 File Gateway or FSx File Gateway.</p> </note> <p>The operation shuts down the gateway service component running in the gateway's virtual machine (VM) and not the host VM.</p> <note> <p>If you want to shut down the VM, it is recommended that you first shut down the gateway component in the VM to avoid unpredictable conditions.</p> </note> <p>After the gateway is shutdown, you cannot call any other API except <a>StartGateway</a>, <a>DescribeGatewayInformation</a>, and <a>ListGateways</a>. For more information, see <a>ActivateGateway</a>. Your applications cannot read from or write to the gateway's storage volumes, and there are no snapshots taken.</p> <note> <p>When you make a shutdown request, you will get a <code>200 OK</code> success response immediately. However, it might take some time for the gateway to shut down. You can call the <a>DescribeGatewayInformation</a> API to check the status. For more information, see <a>ActivateGateway</a>.</p> </note> <p>If do not intend to use the gateway again, you must delete the gateway (using <a>DeleteGateway</a>) to no longer pay software charges associated with the gateway.</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 shut down a gateway service
        This operation shuts down the gateway service component running in the storage gateway's virtual machine (VM) and not the VM.

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

    async def _handler(
        req: "AsyncOperationRequest[capo_storage_gateway.types.shutdown_gateway_input.ShutdownGatewayInput]",
    ) -> AsyncOperationResponse[
        "capo_storage_gateway.types.shutdown_gateway_output.ShutdownGatewayOutput"
    ]:
        import capo_storage_gateway._operations.storage_gateway_20130630.shutdown_gateway

        (
            output,
            http_response,
        ) = await capo_storage_gateway._operations.storage_gateway_20130630.shutdown_gateway.async_shutdown_gateway(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ShutdownGateway")
    )
    input_: capo_storage_gateway.types.shutdown_gateway_input.ShutdownGatewayInput = {
        "gateway_arn": gateway_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output