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 cached volume on a specified cached volume gateway. This operation is only supported in the cached volume gateway type.

Cache storage must be allocated to the gateway before you can create a cached volume. Use the AddCache operation to add cache storage to a gateway.

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI target name, an IP address on which to expose the target, and a unique client token. In response, the gateway creates the volume and returns information about it. This information includes the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN for this cached volume, which creates an exact copy of the existing volume’s latest recovery point. The VolumeSizeInBytes value must be equal to or larger than the size of the copied volume, in bytes.

Note:

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

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

Syntax

C#
public virtual CreateCachediSCSIVolumeResponse CreateCachediSCSIVolume(
         CreateCachediSCSIVolumeRequest request
)

Parameters

request
Type: Amazon.StorageGateway.Model.CreateCachediSCSIVolumeRequest

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

Return Value


The response from the CreateCachediSCSIVolume 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 cached volume on a specified cached gateway.

To create a cached iSCSI volume


var client = new AmazonStorageGatewayClient();
var response = client.CreateCachediSCSIVolume(new CreateCachediSCSIVolumeRequest 
{
    ClientToken = "cachedvol112233",
    GatewayARN = "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B",
    NetworkInterfaceId = "10.1.1.1",
    SnapshotId = "snap-f47b7b94",
    TargetName = "my-volume",
    VolumeSizeInBytes = 536870912000
});

string targetARN = response.TargetARN;
string volumeARN = response.VolumeARN;

            

Version Information

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

See Also