VolumeAttributes

class aws_cdk.aws_ec2.VolumeAttributes(*, availability_zone, volume_id, encryption_key=None)

Bases: object

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

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

  • volume_id (str) – The EBS Volume’s ID.

  • encryption_key (Optional[IKey]) – The customer-managed encryption key that is used to encrypt the Volume. Default: None – The EBS Volume is not using a customer-managed KMS key for encryption.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_kms as kms

# key: kms.Key

volume_attributes = ec2.VolumeAttributes(
    availability_zone="availabilityZone",
    volume_id="volumeId",

    # the properties below are optional
    encryption_key=key
)

Attributes

availability_zone

us-west-2a).

Type:

The availability zone that the EBS Volume is contained within (ex

encryption_key

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

Default:

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

volume_id

The EBS Volume’s ID.