Class CfnVolumePropsMixin
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnVolumePropsMixin
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable,software.constructs.IMixin
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-03-11T13:19:58.809Z")
@Stability(Stable)
public class CfnVolumePropsMixin
extends Mixin
implements software.constructs.IMixin
Specifies 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.
- When you use AWS CloudFormation to update an Amazon EBS volume that modifies
Iops,Size, orVolumeType, there is a cooldown period before another operation can occur. This can cause your stack to report being inUPDATE_IN_PROGRESSorUPDATE_ROLLBACK_IN_PROGRESSfor 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-stackcall fails. The rollback will be subject to a cooldown period.For more information, see Requirements for EBS volume modifications .
- 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 .
If you set a deletion policy that creates a snapshot, all tags on the volume are included in the snapshot.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cfnpropertymixins.services.ec2.*;
import software.amazon.awscdk.*;
IMergeStrategy mergeStrategy;
CfnVolumePropsMixin cfnVolumePropsMixin = CfnVolumePropsMixin.Builder.create(CfnVolumeMixinProps.builder()
.autoEnableIo(false)
.availabilityZone("availabilityZone")
.availabilityZoneId("availabilityZoneId")
.encrypted(false)
.iops(123)
.kmsKeyId("kmsKeyId")
.multiAttachEnabled(false)
.outpostArn("outpostArn")
.size(123)
.snapshotId("snapshotId")
.sourceVolumeId("sourceVolumeId")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.throughput(123)
.volumeInitializationRate(123)
.volumeType("volumeType")
.build())
.strategy(mergeStrategy)
.build();
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IMixin
software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreate a mixin to apply properties toAWS::EC2::Volume.CfnVolumePropsMixin(CfnVolumeMixinProps props, CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::EC2::Volume.protectedCfnVolumePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnVolumePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTo(software.constructs.IConstruct construct) Apply the mixin properties to the construct.protected CfnVolumeMixinPropsgetProps()protected IMergeStrategysupports(software.constructs.IConstruct construct) Check if this mixin supports the given construct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_PROPERTY_KEYS
-
-
Constructor Details
-
CfnVolumePropsMixin
protected CfnVolumePropsMixin(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVolumePropsMixin
protected CfnVolumePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVolumePropsMixin
@Stability(Stable) public CfnVolumePropsMixin(@NotNull CfnVolumeMixinProps props, @Nullable CfnPropertyMixinOptions options) Create a mixin to apply properties toAWS::EC2::Volume.- Parameters:
props- L1 properties to apply. This parameter is required.options- Mixin options.
-
CfnVolumePropsMixin
Create a mixin to apply properties toAWS::EC2::Volume.- Parameters:
props- L1 properties to apply. This parameter is required.
-
-
Method Details
-
applyTo
@Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct) Apply the mixin properties to the construct. -
supports
@Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct) Check if this mixin supports the given construct. -
getProps
-
getStrategy
-