AWS Storage Gateway
User Guide (API Version 2012-06-30)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

DeleteVolume

Description

This operation deletes the specified gateway volume that you created previously using either the CreateCachediSCSIVolume or CreateStorediSCSIVolume operation. For gateway-stored volumes, the local disk that was configured as the storage volume is not deleted. You can reuse the local disk to create another storage volume.

Before you delete a gateway volume, make sure there are no iSCSI connections to the volume you are deleting. You should also make sure there is no snapshot in progress. You can use the Amazon Elastic Compute Cloud (Amazon EC2) API to query snapshots on the volume you are deleting and check the snapshot status. For more information, go to DescribeSnapshots in Amazon Elastic Compute Cloud API Reference.

In the request, you must provide the Amazon Resource Name (ARN) of the storage volume you want to delete.

Request

Syntax

POST / HTTP/1.1 
Host: storagegateway.region.amazonaws.com
Authorization: authorization
Content-Type: application/x-amz-json-1.1
x-amz-date: date
x-amz-target: StorageGateway_20120630.DeleteVolume

{
 "VolumeARN": "String"
}

JSON Fields

VolumeARN

The Amazon Resource Name (ARN) of the volume. Use the ListVolumes operation to return a list of gateway volumes.

Required: yes

Type: String

Response

Syntax

HTTP/1.1 200 OK
x-amzn-RequestId: x-amzn-RequestId
Content-Type: application/x-amz-json-1.1
Content-length: payloadLength
Date: date

{
 "VolumeARN": "String"
}

JSON Fields

VolumeARN

The Amazon Resource Name (ARN) of the storage volume that was deleted. It is the same ARN you provided in the request.

Type: String

Errors

This operation returns the following error codes in addition to exceptions common to all operations. For information about these errors and common exceptions, see Error Responses.

  • GatewayInternalError

  • GatewayNotConnected

  • GatewayNotFound

  • GatewayProxyNetworkConnectionBusy

  • InternalError

  • InvalidParameters

  • NotSupported

  • SnapshotInProgressException

  • TargetNotFound

  • VolumeIdInvalid

  • VolumeInUse

  • VolumeNotFound

Examples

Example Request

The following example shows a request that deletes a volume.

POST / HTTP/1.1 
Host: storagegateway.us-east-1.amazonaws.com
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-1/storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2
x-amz-date: 20120912T120000Z
x-amz-target: StorageGateway_20120630.DeleteVolume

{
  "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/volume/vol-1122AABB"
}

Example Response

HTTP/1.1 200 OK
x-amzn-RequestId: gur28r2rqlgb8vvs0mq17hlgij1q8glle1qeu3kpgg6f0kstauu0
Date: Wed, 12 Sep 2012 12:00:02 GMT
Content-Type: application/x-amz-json-1.1
Content-length: 104

{
  "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/volume/vol-1122AABB"
}