aws-cdk-lib.aws_ec2.VolumeAttributes

interface VolumeAttributes

LanguageType name
.NETAmazon.CDK.AWS.EC2.VolumeAttributes
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#VolumeAttributes
Javasoftware.amazon.awscdk.services.ec2.VolumeAttributes
Pythonaws_cdk.aws_ec2.VolumeAttributes
TypeScript (source)aws-cdk-lib » aws_ec2 » VolumeAttributes

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

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';
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

NameTypeDescription
availabilityZonestringThe availability zone that the EBS Volume is contained within (ex: us-west-2a).
volumeIdstringThe EBS Volume's ID.
encryptionKey?IKeyThe customer-managed encryption key that is used to encrypt the Volume.

availabilityZone

Type: string

The availability zone that the EBS Volume is contained within (ex: us-west-2a).


volumeId

Type: string

The EBS Volume's ID.


encryptionKey?

Type: IKey (optional, default: None -- The EBS Volume is not using a customer-managed KMS key for encryption.)

The customer-managed encryption key that is used to encrypt the Volume.