Skip to content
v2.273.0

VolumeAttributes Struct ​

Attributes required to import an existing EBS Volume into the Stack.

Example ​

ts
// 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';
import { aws_kms as kms } from 'aws-cdk-lib';

declare const key: kms.Key;
const volumeAttributes: ec2.VolumeAttributes = {
  availabilityZone: 'availabilityZone',
  volumeId: 'volumeId',

  // the properties below are optional
  encryptionKey: key,
};

Properties ​

availabilityZonestringavailability_zonestravailabilityZoneStringAvailabilityZonestringAvailabilityZone*stringrequired#
The availability zone that the EBS Volume is contained within (ex: us-west-2a).
encryptionKeyIKeyencryption_keyIKeyencryptionKeyIKeyEncryptionKeyIKeyEncryptionKeyIKey= None -- The EBS Volume is not us…#
The customer-managed encryption key that is used to encrypt the Volume.
default

Default: None -- The EBS Volume is not using a customer-managed KMS key for encryption.

volumeIdstringvolume_idstrvolumeIdStringVolumeIdstringVolumeId*stringrequired#
The EBS Volume's ID.