aws-cdk-lib.aws_ec2.CfnInstance.VolumeProperty

interface VolumeProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnInstance.VolumeProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnInstance_VolumeProperty
Javasoftware.amazon.awscdk.services.ec2.CfnInstance.VolumeProperty
Pythonaws_cdk.aws_ec2.CfnInstance.VolumeProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnInstance » VolumeProperty

Specifies a volume to attach to an instance.

Volume is an embedded property of the AWS::EC2::Instance resource.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const volumeProperty: ec2.CfnInstance.VolumeProperty = {
  device: 'device',
  volumeId: 'volumeId',
};

Properties

NameTypeDescription
devicestringThe device name (for example, /dev/sdh or xvdh ).
volumeIdstringThe ID of the EBS volume.

device

Type: string

The device name (for example, /dev/sdh or xvdh ).


volumeId

Type: string

The ID of the EBS volume.

The volume and instance must be within the same Availability Zone.