interface VolumeProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.EC2.CfnInstance.VolumeProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnInstance_VolumeProperty |
Java | software.amazon.awscdk.services.ec2.CfnInstance.VolumeProperty |
Python | aws_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
| Name | Type | Description |
|---|---|---|
| device | string | The device name (for example, /dev/sdh or xvdh ). |
| volume | string | The 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.

.NET
Go
Java
Python
TypeScript