CfnVolumeAttachmentPropsMixin

class aws_cdk.mixins_preview.aws_ec2.mixins.CfnVolumeAttachmentPropsMixin(props, *, strategy=None)

Bases: Mixin

Attaches an Amazon EBS volume to a running instance and exposes it to the instance with the specified device name.

Before this resource can be deleted (and therefore the volume detached), you must first unmount the volume in the instance. Failure to do so results in the volume being stuck in the busy state while it is trying to detach, which could possibly damage the file system or the data it contains.

If an Amazon EBS volume is the root device of an instance, it cannot be detached while the instance is in the “running” state. To detach the root volume, stop the instance first.

If the root volume is detached from an instance with an AWS Marketplace product code, then the product codes from that volume are no longer associated with the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volumeattachment.html

CloudformationResource:

AWS::EC2::VolumeAttachment

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins

cfn_volume_attachment_props_mixin = ec2_mixins.CfnVolumeAttachmentPropsMixin(ec2_mixins.CfnVolumeAttachmentMixinProps(
    device="device",
    instance_id="instanceId",
    volume_id="volumeId"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::EC2::VolumeAttachment.

Parameters:

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['device', 'instanceId', 'volumeId']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental