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.

Creates a volume on a specified gateway. This operation is only supported in the stored volume gateway architecture.

The size of the volume to create is inferred from the disk size. You can choose to preserve existing data on the disk, create volume from an existing snapshot, or create an empty volume. If you choose to create an empty gateway volume, then any existing data on the disk is erased.

In the request you must specify the gateway and the disk information on which you are creating the volume. In response, the gateway creates the volume and returns volume information such as the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

Note:

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

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

Syntax

C#
public virtual CreateStorediSCSIVolumeResponse CreateStorediSCSIVolume(
         CreateStorediSCSIVolumeRequest request
)
Parameters
request
Type: Amazon.StorageGateway.Model.CreateStorediSCSIVolumeRequest

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

Return Value
The response from the CreateStorediSCSIVolume 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

Creates a stored volume on a specified stored gateway.

To create a stored iSCSI volume


var response = client.CreateStorediSCSIVolume(new CreateStorediSCSIVolumeRequest 
{
    DiskId = "pci-0000:03:00.0-scsi-0:0:0:0",
    GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B",
    NetworkInterfaceId = "10.1.1.1",
    PreserveExistingData = true,
    SnapshotId = "snap-f47b7b94",
    TargetName = "my-volume"
});

string targetARN = response.TargetARN;
string volumeARN = response.VolumeARN;
long volumeSizeInBytes = response.VolumeSizeInBytes;

            

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