AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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

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.

Note:

For PCL this operation is only available in asynchronous form. Please refer to ShutdownGatewayAsync.

Namespace: Amazon.StorageGateway
Assembly: AWSSDK.StorageGateway.dll
Version: 3.x.y.z

Syntax

C#
public virtual ShutdownGatewayResponse ShutdownGateway(
         ShutdownGatewayRequest request
)
Parameters
request
Type: Amazon.StorageGateway.Model.ShutdownGatewayRequest

Container for the necessary parameters to execute the ShutdownGateway service method.

Return Value
The response from the ShutdownGateway service method, as returned by StorageGateway.

Exceptions

ExceptionCondition
InternalServerErrorException 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.

Examples

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

To shut down a gateway service


var response = client.ShutdownGateway(new ShutdownGatewayRequest 
{
    GatewayARN = "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"
});

string gatewayARN = response.GatewayARN;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also