# CfnVolumeProps

Properties for defining a `CfnVolume`.

Extends: CfnVolumeProps
Used as props by: CfnVolume

- Source: Generated code
- Type last changed: v2.272.0 · 30 Sep 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_storagegateway as storagegateway } from 'aws-cdk-lib';
const cfnVolumeProps: storagegateway.CfnVolumeProps = {
  gatewayArn: 'gatewayArn',
  networkInterfaceId: 'networkInterfaceId',
  targetName: 'targetName',
  volumeSizeInBytes: 123,

  // the properties below are optional
  kmsEncrypted: false,
  kmsKey: 'kmsKey',
  snapshotId: 'snapshotId',
  sourceVolumeArn: 'sourceVolumeArn',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `gatewayArn`: string (required) — The Amazon Resource Name (ARN) of the gateway on which to create the volume.

- `kmsEncrypted`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Set to true to use Amazon S3 server-side encryption with your own KMS key, or false to use a key managed by Amazon S3.

- `kmsKey`: string — The Amazon Resource Name (ARN) of a symmetric customer master key (CMK) used for Amazon S3 server-side encryption.

- `networkInterfaceId`: string (required) — The network interface of the gateway on which to expose the iSCSI target.

  Only IPv4 addresses are accepted.

- `snapshotId`: string — The snapshot ID of the snapshot to restore as the new cached volume (e.g., snap-1122aabb).

- `sourceVolumeArn`: string — The ARN of an existing volume from which to create the new volume.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of up to 50 tags to assign to the volume.

- `targetName`: string (required) — The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN.

- `volumeSizeInBytes`: number (required) — The size of the volume in bytes.
