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 , 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 .

  • 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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for CfnVolumePropsMixin.

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IMixin

    software.constructs.IMixin.Jsii$Default, software.constructs.IMixin.Jsii$Proxy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final List<String>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Create a mixin to apply properties to AWS::EC2::Volume.
     
    Create a mixin to apply properties to AWS::EC2::Volume.
    protected
    CfnVolumePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    CfnVolumePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyTo(software.constructs.IConstruct construct)
    Apply the mixin properties to the construct.
     
    protected IMergeStrategy
     
    supports(software.constructs.IConstruct construct)
    Check if this mixin supports the given construct.

    Methods inherited from class software.amazon.awscdk.Mixin

    isMixin

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> 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 to AWS::EC2::Volume.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnVolumePropsMixin

      @Stability(Stable) public CfnVolumePropsMixin(@NotNull CfnVolumeMixinProps props)
      Create a mixin to apply properties to AWS::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.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnVolumeMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()