Class EbsDeviceProps.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.EbsDeviceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EbsDeviceProps>
- Enclosing interface:
EbsDeviceProps
@Stability(Stable)
public static final class EbsDeviceProps.Builder
extends Object
implements software.amazon.jsii.Builder<EbsDeviceProps>
A builder for
EbsDeviceProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.deleteOnTermination
(Boolean deleteOnTermination) Sets the value ofEbsDeviceOptionsBase.getDeleteOnTermination()
Sets the value ofEbsDeviceOptionsBase.getIops()
snapshotId
(String snapshotId) Sets the value ofEbsDeviceProps.getSnapshotId()
volumeSize
(Number volumeSize) Sets the value ofEbsDeviceSnapshotOptions.getVolumeSize()
volumeType
(EbsDeviceVolumeType volumeType) Sets the value ofEbsDeviceOptionsBase.getVolumeType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
snapshotId
Sets the value ofEbsDeviceProps.getSnapshotId()
- Parameters:
snapshotId
- The snapshot ID of the volume to use.- Returns:
this
-
volumeSize
Sets the value ofEbsDeviceSnapshotOptions.getVolumeSize()
- Parameters:
volumeSize
- The volume size, in Gibibytes (GiB). If you specify volumeSize, it must be equal or greater than the size of the snapshot.- Returns:
this
-
deleteOnTermination
Sets the value ofEbsDeviceOptionsBase.getDeleteOnTermination()
- Parameters:
deleteOnTermination
- Indicates whether to delete the volume when the instance is terminated.- Returns:
this
-
iops
Sets the value ofEbsDeviceOptionsBase.getIops()
- Parameters:
iops
- The number of I/O operations per second (IOPS) to provision for the volume. Must only be set forvolumeType
:invalid @link
EbsDeviceVolumeType.IO1
- Returns:
this
-
volumeType
Sets the value ofEbsDeviceOptionsBase.getVolumeType()
- Parameters:
volumeType
- The EBS volume type.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EbsDeviceProps>
- Returns:
- a new instance of
EbsDeviceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-