Class ServiceManagedEBSVolumeConfiguration
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ServiceManagedEBSVolumeConfiguration.Builder,ServiceManagedEBSVolumeConfiguration>
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 in the service. For information about the supported launch types and operating systems, see Supported operating systems and launch types in the Amazon Elastic Container Service Developer Guide.
Many of these parameters map 1:1 with the Amazon EBS CreateVolume API request parameters.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final BooleanIndicates whether the volume should be encrypted.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final TaskFilesystemTypeThe filesystem type for the volume.final StringThe filesystem type for the volume.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final inthashCode()final booleanFor responses, this returns true if the service returned a value for the TagSpecifications property.final Integeriops()The number of I/O operations per second (IOPS).final StringkmsKeyId()The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.final StringroleArn()The ARN of the IAM role to associate with this volume.static Class<? extends ServiceManagedEBSVolumeConfiguration.Builder> final IntegerThe size of the volume in GiB.final StringThe snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service.final List<EBSTagSpecification> The tags to apply to the volume.final IntegerThe throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final IntegerThe rate, in MiB/s, at which data is fetched from a snapshot of an existing EBS volume to create new volumes for attachment to the tasks maintained by the service.final StringThe volume type.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
encrypted
Indicates whether the volume should be encrypted. If you turn on Region-level Amazon EBS encryption by default but set this value as
false, the setting is overridden and the volume is encrypted with the KMS key specified for Amazon EBS encryption by default. This parameter maps 1:1 with theEncryptedparameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Indicates whether the volume should be encrypted. If you turn on Region-level Amazon EBS encryption by
default but set this value as
false, the setting is overridden and the volume is encrypted with the KMS key specified for Amazon EBS encryption by default. This parameter maps 1:1 with theEncryptedparameter of the CreateVolume API in the Amazon EC2 API Reference.
-
kmsKeyId
The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption. When a key is specified using this parameter, it overrides Amazon EBS default encryption or any KMS key that you specified for cluster-level managed storage encryption. This parameter maps 1:1 with the
KmsKeyIdparameter of the CreateVolume API in the Amazon EC2 API Reference. For more information about encrypting Amazon EBS volumes attached to tasks, see Encrypt data stored in Amazon EBS volumes attached to Amazon ECS tasks.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 a key is specified using this parameter, it overrides Amazon EBS default
encryption or any KMS key that you specified for cluster-level managed storage encryption. This parameter
maps 1:1 with the
KmsKeyIdparameter of the CreateVolume API in the Amazon EC2 API Reference. For more information about encrypting Amazon EBS volumes attached to tasks, see Encrypt data stored in Amazon EBS volumes attached to Amazon ECS tasks.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
The volume type. This parameter maps 1:1 with the
VolumeTypeparameter 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:
standardThe magnetic volume type is not supported on Fargate.
- Returns:
- The volume type. This parameter maps 1:1 with the
VolumeTypeparameter 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:
standardThe magnetic volume type is not supported on Fargate.
-
-
-
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
Sizeparameter of the CreateVolume API in the Amazon EC2 API Reference.The following are the supported volume size values for each volume type.
-
gp2andgp3: 1-16,384 -
io1andio2: 4-16,384 -
st1andsc1: 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
Sizeparameter of the CreateVolume API in the Amazon EC2 API Reference.The following are the supported volume size values for each volume type.
-
gp2andgp3: 1-16,384 -
io1andio2: 4-16,384 -
st1andsc1: 125-16,384 -
standard: 1-1,024
-
-
-
snapshotId
The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service. You must specify either
snapshotIdorsizeInGiBin your volume configuration. This parameter maps 1:1 with theSnapshotIdparameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service.
You must specify either
snapshotIdorsizeInGiBin your volume configuration. This parameter maps 1:1 with theSnapshotIdparameter of the CreateVolume API in the Amazon EC2 API Reference.
-
volumeInitializationRate
The rate, in MiB/s, at which data is fetched from a snapshot of an existing EBS volume to create new volumes for attachment to the tasks maintained by the service. This property can be specified only if you specify a
snapshotId. For more information, see Initialize Amazon EBS volumes in the Amazon EBS User Guide.- Returns:
- The rate, in MiB/s, at which data is fetched from a snapshot of an existing EBS volume to create new
volumes for attachment to the tasks maintained by the service. This property can be specified only if you
specify a
snapshotId. For more information, see Initialize Amazon EBS volumes in the Amazon EBS User Guide.
-
iops
The number of I/O operations per second (IOPS). For
gp3,io1, andio2volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2volumes, 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
io1andio2volume types. The default forgp3volumes is3,000 IOPS. This parameter is not supported forst1,sc1, orstandardvolume types.This parameter maps 1:1 with the
Iopsparameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- The number of I/O operations per second (IOPS). For
gp3,io1, andio2volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2volumes, 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
io1andio2volume types. The default forgp3volumes is3,000 IOPS. This parameter is not supported forst1,sc1, orstandardvolume types.This parameter maps 1:1 with the
Iopsparameter of the CreateVolume API in the Amazon EC2 API Reference. -
-
-
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
Throughputparameter of the CreateVolume API in the Amazon EC2 API Reference.This parameter is only supported for the
gp3volume 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
Throughputparameter of the CreateVolume API in the Amazon EC2 API Reference.This parameter is only supported for the
gp3volume 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
The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the
TagSpecifications.Nparameter 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.Nparameter of the CreateVolume API in the Amazon EC2 API Reference.
-
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
AmazonECSInfrastructureRolePolicyForVolumesIAM 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
AmazonECSInfrastructureRolePolicyForVolumesIAM policy with this role. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.
-
filesystemType
The 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 tasks will fail to start.
The available Linux filesystem types are
ext3,ext4, andxfs. If no value is specified, thexfsfilesystem type is used by default.The available Windows filesystem types are
NTFS.If the service returns an enum value that is not available in the current SDK version,
filesystemTypewill returnTaskFilesystemType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromfilesystemTypeAsString().- Returns:
- The 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 tasks will fail to start.
The available Linux filesystem types are
ext3,ext4, andxfs. If no value is specified, thexfsfilesystem type is used by default.The available Windows filesystem types are
NTFS. - See Also:
-
filesystemTypeAsString
The 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 tasks will fail to start.
The available Linux filesystem types are
ext3,ext4, andxfs. If no value is specified, thexfsfilesystem type is used by default.The available Windows filesystem types are
NTFS.If the service returns an enum value that is not available in the current SDK version,
filesystemTypewill returnTaskFilesystemType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromfilesystemTypeAsString().- Returns:
- The 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 tasks will fail to start.
The available Linux filesystem types are
ext3,ext4, andxfs. If no value is specified, thexfsfilesystem type is used by default.The available Windows filesystem types are
NTFS. - See Also:
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<ServiceManagedEBSVolumeConfiguration.Builder,ServiceManagedEBSVolumeConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
public static Class<? extends ServiceManagedEBSVolumeConfiguration.Builder> serializableBuilderClass() -
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-