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 the specified storage volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API. This operation is only supported in the cached volume and stored volume types. For stored volume gateways, 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 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 the 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.
For .NET Core this operation is only available in asynchronous form. Please refer to DeleteVolumeAsync.
Namespace: Amazon.StorageGateway
Assembly: AWSSDK.StorageGateway.dll
Version: 3.x.y.z
public abstract DeleteVolumeResponse DeleteVolume( DeleteVolumeRequest request )
Container for the necessary parameters to execute the DeleteVolume service method.
Exception | Condition |
---|---|
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. |
Deletes the specified gateway volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API.
var client = new AmazonStorageGatewayClient(); var response = client.DeleteVolume(new DeleteVolumeRequest { VolumeARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" }); string volumeARN = response.VolumeARN;
.NET Framework:
Supported in: 4.5 and newer, 3.5