CfnVolumePropsMixin
- class aws_cdk.mixins_preview.aws_ec2.mixins.CfnVolumePropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies an Amazon Elastic Block Store (Amazon EBS) volume.
You can create an empty volume, a volume from a snapshot, or a volume copy from an existing source volume. .. epigraph:
- When you use AWS CloudFormation to update an Amazon EBS volume that modifies ``Iops`` , ``Size`` , or ``VolumeType`` , there is a cooldown period before another operation can occur. This can cause your stack to report being in ``UPDATE_IN_PROGRESS`` or ``UPDATE_ROLLBACK_IN_PROGRESS`` for long periods of time. Some common scenarios when you might encounter a cooldown period for Amazon EBS include: - You successfully update an Amazon EBS volume and the update succeeds. When you attempt another update within the cooldown window, that update will be subject to a cooldown period. - You successfully update an Amazon EBS volume and the update succeeds but another change in your ``update-stack`` call fails. The rollback will be subject to a cooldown period. For more information, see `Requirements for EBS volume modifications <https://docs.aws.amazon.com/ebs/latest/userguide/modify-volume-requirements.html>`_ . - Amazon EBS does not support sizing down an Amazon EBS volume. AWS CloudFormation does not attempt to modify an Amazon EBS volume to a smaller size on rollback.
DeletionPolicy attribute
To control how AWS CloudFormation handles the volume when the stack is deleted, set a deletion policy for your volume. You can choose to retain the volume, to delete the volume, or to create a snapshot of the volume. For more information, see DeletionPolicy attribute . .. epigraph:
If you set a deletion policy that creates a snapshot, all tags on the volume are included in the snapshot.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-volume.html
- CloudformationResource:
AWS::EC2::Volume
- 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_props_mixin = ec2_mixins.CfnVolumePropsMixin(ec2_mixins.CfnVolumeMixinProps( auto_enable_io=False, availability_zone="availabilityZone", availability_zone_id="availabilityZoneId", encrypted=False, iops=123, kms_key_id="kmsKeyId", multi_attach_enabled=False, outpost_arn="outpostArn", size=123, snapshot_id="snapshotId", source_volume_id="sourceVolumeId", tags=[CfnTag( key="key", value="value" )], throughput=123, volume_initialization_rate=123, volume_type="volumeType" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::EC2::Volume.- Parameters:
props (
Union[CfnVolumeMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['autoEnableIo', 'availabilityZone', 'availabilityZoneId', 'encrypted', 'iops', 'kmsKeyId', 'multiAttachEnabled', 'outpostArn', 'size', 'snapshotId', 'sourceVolumeId', 'tags', 'throughput', 'volumeInitializationRate', 'volumeType']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental