Class TaskManagedEBSVolumeConfiguration
- java.lang.Object
-
- software.amazon.awssdk.services.ecs.model.TaskManagedEBSVolumeConfiguration
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<TaskManagedEBSVolumeConfiguration.Builder,TaskManagedEBSVolumeConfiguration>
@Generated("software.amazon.awssdk:codegen") public final class TaskManagedEBSVolumeConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<TaskManagedEBSVolumeConfiguration.Builder,TaskManagedEBSVolumeConfiguration>
The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TaskManagedEBSVolumeConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaskManagedEBSVolumeConfiguration.Builder
builder()
Boolean
encrypted()
Indicates whether the volume should be encrypted.boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
TaskFilesystemType
filesystemType()
The Linux filesystem type for the volume.String
filesystemTypeAsString()
The Linux filesystem type for the volume.<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
boolean
hasTagSpecifications()
For responses, this returns true if the service returned a value for the TagSpecifications property.Integer
iops()
The number of I/O operations per second (IOPS).String
kmsKeyId()
The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.String
roleArn()
The ARN of the IAM role to associate with this volume.List<SdkField<?>>
sdkFields()
static Class<? extends TaskManagedEBSVolumeConfiguration.Builder>
serializableBuilderClass()
Integer
sizeInGiB()
The size of the volume in GiB.String
snapshotId()
The snapshot that Amazon ECS uses to create the volume.List<EBSTagSpecification>
tagSpecifications()
The tags to apply to the volume.TaskManagedEBSVolumeTerminationPolicy
terminationPolicy()
The termination policy for the volume when the task exits.Integer
throughput()
The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.TaskManagedEBSVolumeConfiguration.Builder
toBuilder()
String
toString()
Returns a string representation of this object.String
volumeType()
The volume type.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
encrypted
public final Boolean encrypted()
Indicates whether the volume should be encrypted. If no value is specified, encryption is turned on by default. This parameter maps 1:1 with the
Encrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Indicates whether the volume should be encrypted. If no value is specified, encryption is turned on by
default. This parameter maps 1:1 with the
Encrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference.
-
kmsKeyId
public final String kmsKeyId()
The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption. When encryption is turned on and no Amazon Web Services Key Management Service key is specified, the default Amazon Web Services managed key for Amazon EBS volumes is used. This parameter maps 1:1 with the
KmsKeyId
parameter of the CreateVolume API in the Amazon EC2 API Reference.Amazon Web Services authenticates the Amazon Web Services Key Management Service key asynchronously. Therefore, if you specify an ID, alias, or ARN that is invalid, the action can appear to complete, but eventually fails.
- Returns:
- The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use
for Amazon EBS encryption. When encryption is turned on and no Amazon Web Services Key Management Service
key is specified, the default Amazon Web Services managed key for Amazon EBS volumes is used. This
parameter maps 1:1 with the
KmsKeyId
parameter of the CreateVolume API in the Amazon EC2 API Reference.Amazon Web Services authenticates the Amazon Web Services Key Management Service key asynchronously. Therefore, if you specify an ID, alias, or ARN that is invalid, the action can appear to complete, but eventually fails.
-
volumeType
public final String volumeType()
The volume type. This parameter maps 1:1 with the
VolumeType
parameter of the CreateVolume API in the Amazon EC2 API Reference. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide.The following are the supported volume types.
-
General Purpose SSD:
gp2
|gp3
-
Provisioned IOPS SSD:
io1
|io2
-
Throughput Optimized HDD:
st1
-
Cold HDD:
sc1
-
Magnetic:
standard
The magnetic volume type is not supported on Fargate.
- Returns:
- The volume type. This parameter maps 1:1 with the
VolumeType
parameter of the CreateVolume API in the Amazon EC2 API Reference. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide.The following are the supported volume types.
-
General Purpose SSD:
gp2
|gp3
-
Provisioned IOPS SSD:
io1
|io2
-
Throughput Optimized HDD:
st1
-
Cold HDD:
sc1
-
Magnetic:
standard
The magnetic volume type is not supported on Fargate.
-
-
-
sizeInGiB
public final Integer sizeInGiB()
The size of the volume in GiB. You must specify either a volume size or a snapshot ID. If you specify a snapshot ID, the snapshot size is used for the volume size by default. You can optionally specify a volume size greater than or equal to the snapshot size. This parameter maps 1:1 with the
Size
parameter of the CreateVolume API in the Amazon EC2 API Reference.The following are the supported volume size values for each volume type.
-
gp2
andgp3
: 1-16,384 -
io1
andio2
: 4-16,384 -
st1
andsc1
: 125-16,384 -
standard
: 1-1,024
- Returns:
- The size of the volume in GiB. You must specify either a volume size or a snapshot ID. If you specify a
snapshot ID, the snapshot size is used for the volume size by default. You can optionally specify a
volume size greater than or equal to the snapshot size. This parameter maps 1:1 with the
Size
parameter of the CreateVolume API in the Amazon EC2 API Reference.The following are the supported volume size values for each volume type.
-
gp2
andgp3
: 1-16,384 -
io1
andio2
: 4-16,384 -
st1
andsc1
: 125-16,384 -
standard
: 1-1,024
-
-
-
snapshotId
public final String snapshotId()
The snapshot that Amazon ECS uses to create the volume. You must specify either a snapshot ID or a volume size. This parameter maps 1:1 with the
SnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- The snapshot that Amazon ECS uses to create the volume. You must specify either a snapshot ID or a volume
size. This parameter maps 1:1 with the
SnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.
-
iops
public final Integer iops()
The number of I/O operations per second (IOPS). For
gp3
,io1
, andio2
volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2
volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.The following are the supported values for each volume type.
-
gp3
: 3,000 - 16,000 IOPS -
io1
: 100 - 64,000 IOPS -
io2
: 100 - 256,000 IOPS
This parameter is required for
io1
andio2
volume types. The default forgp3
volumes is3,000 IOPS
. This parameter is not supported forst1
,sc1
, orstandard
volume types.This parameter maps 1:1 with the
Iops
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- The number of I/O operations per second (IOPS). For
gp3
,io1
, andio2
volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2
volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.The following are the supported values for each volume type.
-
gp3
: 3,000 - 16,000 IOPS -
io1
: 100 - 64,000 IOPS -
io2
: 100 - 256,000 IOPS
This parameter is required for
io1
andio2
volume types. The default forgp3
volumes is3,000 IOPS
. This parameter is not supported forst1
,sc1
, orstandard
volume types.This parameter maps 1:1 with the
Iops
parameter of the CreateVolume API in the Amazon EC2 API Reference. -
-
-
throughput
public final Integer throughput()
The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps 1:1 with the
Throughput
parameter of the CreateVolume API in the Amazon EC2 API Reference.This parameter is only supported for the
gp3
volume type.- Returns:
- The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps
1:1 with the
Throughput
parameter of the CreateVolume API in the Amazon EC2 API Reference.This parameter is only supported for the
gp3
volume type.
-
hasTagSpecifications
public final boolean hasTagSpecifications()
For responses, this returns true if the service returned a value for the TagSpecifications property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tagSpecifications
public final List<EBSTagSpecification> tagSpecifications()
The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the
TagSpecifications.N
parameter of the CreateVolume API in the Amazon EC2 API Reference.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTagSpecifications()
method.- Returns:
- The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps
1:1 with the
TagSpecifications.N
parameter of the CreateVolume API in the Amazon EC2 API Reference.
-
roleArn
public final String roleArn()
The ARN of the IAM role to associate with this volume. This is the Amazon ECS infrastructure IAM role that is used to manage your Amazon Web Services infrastructure. We recommend using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.- Returns:
- The ARN of the IAM role to associate with this volume. This is the Amazon ECS infrastructure IAM role
that is used to manage your Amazon Web Services infrastructure. We recommend using the Amazon ECS-managed
AmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.
-
terminationPolicy
public final TaskManagedEBSVolumeTerminationPolicy terminationPolicy()
The termination policy for the volume when the task exits. This provides a way to control whether Amazon ECS terminates the Amazon EBS volume when the task stops.
- Returns:
- The termination policy for the volume when the task exits. This provides a way to control whether Amazon ECS terminates the Amazon EBS volume when the task stops.
-
filesystemType
public final TaskFilesystemType filesystemType()
The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. If there is a filesystem type mismatch, the task will fail to start.
The available filesystem types are
ext3
,ext4
, andxfs
. If no value is specified, thexfs
filesystem type is used by default.If the service returns an enum value that is not available in the current SDK version,
filesystemType
will returnTaskFilesystemType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromfilesystemTypeAsString()
.- Returns:
- The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same
filesystem type that the volume was using when the snapshot was created. If there is a filesystem type
mismatch, the task will fail to start.
The available filesystem types are
ext3
,ext4
, andxfs
. If no value is specified, thexfs
filesystem type is used by default. - See Also:
TaskFilesystemType
-
filesystemTypeAsString
public final String filesystemTypeAsString()
The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. If there is a filesystem type mismatch, the task will fail to start.
The available filesystem types are
ext3
,ext4
, andxfs
. If no value is specified, thexfs
filesystem type is used by default.If the service returns an enum value that is not available in the current SDK version,
filesystemType
will returnTaskFilesystemType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromfilesystemTypeAsString()
.- Returns:
- The Linux filesystem type for the volume. For volumes created from a snapshot, you must specify the same
filesystem type that the volume was using when the snapshot was created. If there is a filesystem type
mismatch, the task will fail to start.
The available filesystem types are
ext3
,ext4
, andxfs
. If no value is specified, thexfs
filesystem type is used by default. - See Also:
TaskFilesystemType
-
toBuilder
public TaskManagedEBSVolumeConfiguration.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<TaskManagedEBSVolumeConfiguration.Builder,TaskManagedEBSVolumeConfiguration>
-
builder
public static TaskManagedEBSVolumeConfiguration.Builder builder()
-
serializableBuilderClass
public static Class<? extends TaskManagedEBSVolumeConfiguration.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-