Class CfnVolume
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
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.
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.
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 .
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.services.ec2.*; CfnVolume cfnVolume = CfnVolume.Builder.create(this, "MyCfnVolume") .availabilityZone("availabilityZone") // the properties below are optional .autoEnableIo(false) .encrypted(false) .iops(123) .kmsKeyId("kmsKeyId") .multiAttachEnabled(false) .outpostArn("outpostArn") .size(123) .snapshotId("snapshotId") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .throughput(123) .volumeType("volumeType") .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnVolume
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnVolume
(software.amazon.jsii.JsiiObjectRef objRef) CfnVolume
(software.constructs.Construct scope, String id, CfnVolumeProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe ID of the volume.Indicates whether the volume is auto-enabled for I/O operations.The ID of the Availability Zone in which to create the volume.Indicates whether the volume should be encrypted.getIops()
The number of I/O operations per second (IOPS).The identifier of the AWS KMS key to use for Amazon EBS encryption.Indicates whether Amazon EBS Multi-Attach is enabled.The Amazon Resource Name (ARN) of the Outpost.getSize()
The size of the volume, in GiBs.The snapshot from which to create the volume.getTags()
Tag Manager which manages the tags for this resource.The tags to apply to the volume during creation.The throughput to provision for a volume, with a maximum of 1,000 MiB/s.The volume type.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAutoEnableIo
(Boolean value) Indicates whether the volume is auto-enabled for I/O operations.void
setAutoEnableIo
(IResolvable value) Indicates whether the volume is auto-enabled for I/O operations.void
setAvailabilityZone
(String value) The ID of the Availability Zone in which to create the volume.void
setEncrypted
(Boolean value) Indicates whether the volume should be encrypted.void
setEncrypted
(IResolvable value) Indicates whether the volume should be encrypted.void
The number of I/O operations per second (IOPS).void
setKmsKeyId
(String value) The identifier of the AWS KMS key to use for Amazon EBS encryption.void
setMultiAttachEnabled
(Boolean value) Indicates whether Amazon EBS Multi-Attach is enabled.void
setMultiAttachEnabled
(IResolvable value) Indicates whether Amazon EBS Multi-Attach is enabled.void
setOutpostArn
(String value) The Amazon Resource Name (ARN) of the Outpost.void
The size of the volume, in GiBs.void
setSnapshotId
(String value) The snapshot from which to create the volume.void
setTagsRaw
(List<CfnTag> value) The tags to apply to the volume during creation.void
setThroughput
(Number value) The throughput to provision for a volume, with a maximum of 1,000 MiB/s.void
setVolumeType
(String value) The volume type.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnVolume
protected CfnVolume(software.amazon.jsii.JsiiObjectRef objRef) -
CfnVolume
protected CfnVolume(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnVolume
@Stability(Stable) public CfnVolume(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnVolumeProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrVolumeId
The ID of the volume. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAvailabilityZone
The ID of the Availability Zone in which to create the volume. -
setAvailabilityZone
The ID of the Availability Zone in which to create the volume. -
getAutoEnableIo
Indicates whether the volume is auto-enabled for I/O operations. -
setAutoEnableIo
Indicates whether the volume is auto-enabled for I/O operations. -
setAutoEnableIo
Indicates whether the volume is auto-enabled for I/O operations. -
getEncrypted
Indicates whether the volume should be encrypted. -
setEncrypted
Indicates whether the volume should be encrypted. -
setEncrypted
Indicates whether the volume should be encrypted. -
getIops
The number of I/O operations per second (IOPS). -
setIops
The number of I/O operations per second (IOPS). -
getKmsKeyId
The identifier of the AWS KMS key to use for Amazon EBS encryption. -
setKmsKeyId
The identifier of the AWS KMS key to use for Amazon EBS encryption. -
getMultiAttachEnabled
Indicates whether Amazon EBS Multi-Attach is enabled. -
setMultiAttachEnabled
Indicates whether Amazon EBS Multi-Attach is enabled. -
setMultiAttachEnabled
Indicates whether Amazon EBS Multi-Attach is enabled. -
getOutpostArn
The Amazon Resource Name (ARN) of the Outpost. -
setOutpostArn
The Amazon Resource Name (ARN) of the Outpost. -
getSize
The size of the volume, in GiBs. -
setSize
The size of the volume, in GiBs. -
getSnapshotId
The snapshot from which to create the volume. -
setSnapshotId
The snapshot from which to create the volume. -
getTagsRaw
The tags to apply to the volume during creation. -
setTagsRaw
The tags to apply to the volume during creation. -
getThroughput
The throughput to provision for a volume, with a maximum of 1,000 MiB/s. -
setThroughput
The throughput to provision for a volume, with a maximum of 1,000 MiB/s. -
getVolumeType
The volume type.This parameter can be one of the following values:.
-
setVolumeType
The volume type.This parameter can be one of the following values:.
-