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.

Deletes a gateway. To specify which gateway to delete, use the Amazon Resource Name (ARN) of the gateway in your request. The operation deletes the gateway; however, it does not delete the gateway virtual machine (VM) from your host computer.

After you delete a gateway, you cannot reactivate it. Completed snapshots of the gateway volumes are not deleted upon deleting the gateway, however, pending snapshots will not complete. After you delete a gateway, your next step is to remove it from your environment.

You no longer pay software charges after the gateway is deleted; however, your existing Amazon EBS snapshots persist and you will continue to be billed for these snapshots. You can choose to remove all remaining Amazon EBS snapshots by canceling your Amazon EC2 subscription.  If you prefer not to cancel your Amazon EC2 subscription, you can delete your snapshots using the Amazon EC2 console. For more information, see the Storage Gateway detail page.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to DeleteGatewayAsync.

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

Syntax

C#
public abstract DeleteGatewayResponse DeleteGateway(
         DeleteGatewayRequest request
)

Parameters

request
Type: Amazon.StorageGateway.Model.DeleteGatewayRequest

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

Return Value


The response from the DeleteGateway 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 deletes the gateway, but not the gateway's VM from the host computer.

To delete a gatgeway


var client = new AmazonStorageGatewayClient();
var response = client.DeleteGateway(new DeleteGatewayRequest 
{
    GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"
});

string gatewayARN = response.GatewayARN;

            

Version Information

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

See Also