public static final class EbsDeviceProps.Builder
extends java.lang.Object
EbsDeviceProps
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
EbsDeviceProps |
build()
Builds the configured instance.
|
EbsDeviceProps.Builder |
deleteOnTermination(java.lang.Boolean deleteOnTermination)
Sets the value of
EbsDeviceProps.getDeleteOnTermination() |
EbsDeviceProps.Builder |
encrypted(java.lang.Boolean encrypted)
Sets the value of
EbsDeviceOptions.getEncrypted() |
EbsDeviceProps.Builder |
iops(java.lang.Number iops)
Sets the value of
EbsDeviceProps.getIops() |
EbsDeviceProps.Builder |
kmsKey(IKey kmsKey)
Sets the value of
EbsDeviceOptions.getKmsKey() |
EbsDeviceProps.Builder |
snapshotId(java.lang.String snapshotId)
Sets the value of
EbsDeviceProps.getSnapshotId() |
EbsDeviceProps.Builder |
volumeSize(java.lang.Number volumeSize)
Sets the value of
EbsDeviceSnapshotOptions.getVolumeSize() |
EbsDeviceProps.Builder |
volumeType(EbsDeviceVolumeType volumeType)
Sets the value of
EbsDeviceProps.getVolumeType() |
public EbsDeviceProps.Builder snapshotId(java.lang.String snapshotId)
EbsDeviceProps.getSnapshotId()
snapshotId
- The snapshot ID of the volume to use.this
public EbsDeviceProps.Builder volumeSize(java.lang.Number volumeSize)
EbsDeviceSnapshotOptions.getVolumeSize()
volumeSize
- The volume size, in Gibibytes (GiB).
If you specify volumeSize, it must be equal or greater than the size of the snapshot.this
public EbsDeviceProps.Builder deleteOnTermination(java.lang.Boolean deleteOnTermination)
EbsDeviceProps.getDeleteOnTermination()
deleteOnTermination
- Indicates whether to delete the volume when the instance is terminated.this
public EbsDeviceProps.Builder iops(java.lang.Number iops)
EbsDeviceProps.getIops()
iops
- The number of I/O operations per second (IOPS) to provision for the volume.
Must only be set for {@link volumeType}: {@link EbsDeviceVolumeType.IO1}
The maximum ratio of IOPS to volume size (in GiB) is 50:1, so for 5,000 provisioned IOPS, you need at least 100 GiB storage on the volume.
this
public EbsDeviceProps.Builder volumeType(EbsDeviceVolumeType volumeType)
EbsDeviceProps.getVolumeType()
volumeType
- The EBS volume type.this
public EbsDeviceProps.Builder encrypted(java.lang.Boolean encrypted)
EbsDeviceOptions.getEncrypted()
encrypted
- Specifies whether the EBS volume is encrypted.
Encrypted EBS volumes can only be attached to instances that support Amazon EBS encryptionthis
public EbsDeviceProps.Builder kmsKey(IKey kmsKey)
EbsDeviceOptions.getKmsKey()
kmsKey
- The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption.
You have to ensure that the KMS CMK has the correct permissions to be used by the service launching the ec2 instances.this
public EbsDeviceProps build()
EbsDeviceProps
java.lang.NullPointerException
- if any required attribute was not provided