Class CfnInstance.EbsBlockDeviceProperty.Builder
java.lang.Object
software.amazon.awscdk.services.opsworks.CfnInstance.EbsBlockDeviceProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.EbsBlockDeviceProperty>
- Enclosing interface:
CfnInstance.EbsBlockDeviceProperty
@Stability(Stable)
public static final class CfnInstance.EbsBlockDeviceProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.EbsBlockDeviceProperty>
A builder for
CfnInstance.EbsBlockDeviceProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deleteOnTermination
(Boolean deleteOnTermination) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getDeleteOnTermination()
deleteOnTermination
(IResolvable deleteOnTermination) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getDeleteOnTermination()
Sets the value ofCfnInstance.EbsBlockDeviceProperty.getIops()
snapshotId
(String snapshotId) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getSnapshotId()
volumeSize
(Number volumeSize) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getVolumeSize()
volumeType
(String volumeType) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getVolumeType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
deleteOnTermination
@Stability(Stable) public CfnInstance.EbsBlockDeviceProperty.Builder deleteOnTermination(Boolean deleteOnTermination) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Whether the volume is deleted on instance termination.- Returns:
this
-
deleteOnTermination
@Stability(Stable) public CfnInstance.EbsBlockDeviceProperty.Builder deleteOnTermination(IResolvable deleteOnTermination) Sets the value ofCfnInstance.EbsBlockDeviceProperty.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Whether the volume is deleted on instance termination.- Returns:
this
-
iops
Sets the value ofCfnInstance.EbsBlockDeviceProperty.getIops()
- Parameters:
iops
- The number of I/O operations per second (IOPS) that the volume supports. For more information, see EbsBlockDevice .- Returns:
this
-
snapshotId
Sets the value ofCfnInstance.EbsBlockDeviceProperty.getSnapshotId()
- Parameters:
snapshotId
- The snapshot ID.- Returns:
this
-
volumeSize
Sets the value ofCfnInstance.EbsBlockDeviceProperty.getVolumeSize()
- Parameters:
volumeSize
- The volume size, in GiB. For more information, see EbsBlockDevice .- Returns:
this
-
volumeType
Sets the value ofCfnInstance.EbsBlockDeviceProperty.getVolumeType()
- Parameters:
volumeType
- The volume type.gp2
for General Purpose (SSD) volumes,io1
for Provisioned IOPS (SSD) volumes,st1
for Throughput Optimized hard disk drives (HDD),sc1
for Cold HDD,andstandard
for Magnetic volumes.If you specify the
io1
volume type, you must also specify a value for theIops
attribute. The maximum ratio of provisioned IOPS to requested volume size (in GiB) is 50:1. AWS uses the default volume size (in GiB) specified in the AMI attributes to set IOPS to 50 x (volume size).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstance.EbsBlockDeviceProperty>
- Returns:
- a new instance of
CfnInstance.EbsBlockDeviceProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-