Interface ServiceManagedEBSVolumeConfiguration.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<ServiceManagedEBSVolumeConfiguration.Builder,
,ServiceManagedEBSVolumeConfiguration> SdkBuilder<ServiceManagedEBSVolumeConfiguration.Builder,
,ServiceManagedEBSVolumeConfiguration> SdkPojo
- Enclosing class:
ServiceManagedEBSVolumeConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionIndicates whether the volume should be encrypted.filesystemType
(String filesystemType) The filesystem type for the volume.filesystemType
(TaskFilesystemType filesystemType) The filesystem type for the volume.The number of I/O operations per second (IOPS).The Amazon Resource Name (ARN) identifier of the Amazon Web Services Key Management Service key to use for Amazon EBS encryption.The ARN of the IAM role to associate with this volume.The size of the volume in GiB.snapshotId
(String snapshotId) The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service.tagSpecifications
(Collection<EBSTagSpecification> tagSpecifications) The tags to apply to the volume.tagSpecifications
(Consumer<EBSTagSpecification.Builder>... tagSpecifications) The tags to apply to the volume.tagSpecifications
(EBSTagSpecification... tagSpecifications) The tags to apply to the volume.throughput
(Integer throughput) The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s.volumeInitializationRate
(Integer 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.volumeType
(String volumeType) The volume type.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
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 theEncrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Parameters:
encrypted
- Indicates whether the volume should be encrypted. If you turn on Region-level Amazon EBS encryption by default but set this value asfalse
, 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 theEncrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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
KmsKeyId
parameter 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.
- Parameters:
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 theKmsKeyId
parameter 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:
- Returns a reference to this object so that method calls can be chained together.
-
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.
- Parameters:
volumeType
- The volume type. This parameter maps 1:1 with theVolumeType
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:
- Returns a reference to this object so that method calls can be chained together.
-
-
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
- Parameters:
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 theSize
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:
- Returns a reference to this object so that method calls can be chained together.
-
-
snapshotId
The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service. You must specify either
snapshotId
orsizeInGiB
in your volume configuration. This parameter maps 1:1 with theSnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Parameters:
snapshotId
- The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service. You must specify eithersnapshotId
orsizeInGiB
in your volume configuration. This parameter maps 1:1 with theSnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
volumeInitializationRate
ServiceManagedEBSVolumeConfiguration.Builder volumeInitializationRate(Integer 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.- Parameters:
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 asnapshotId
. For more information, see Initialize Amazon EBS volumes in the Amazon EBS User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.- Parameters:
iops
- The number of I/O operations per second (IOPS). Forgp3
,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:
- Returns a reference to this object so that method calls can be chained together.
-
-
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.- Parameters:
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 theThroughput
parameter of the CreateVolume API in the Amazon EC2 API Reference.This parameter is only supported for the
gp3
volume type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
ServiceManagedEBSVolumeConfiguration.Builder tagSpecifications(Collection<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.- Parameters:
tagSpecifications
- The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with theTagSpecifications.N
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
ServiceManagedEBSVolumeConfiguration.Builder tagSpecifications(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.- Parameters:
tagSpecifications
- The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with theTagSpecifications.N
parameter of the CreateVolume API in the Amazon EC2 API Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
ServiceManagedEBSVolumeConfiguration.Builder tagSpecifications(Consumer<EBSTagSpecification.Builder>... tagSpecifications) The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the
This is a convenience method that creates an instance of theTagSpecifications.N
parameter of the CreateVolume API in the Amazon EC2 API Reference.EBSTagSpecification.Builder
avoiding the need to create one manually viaEBSTagSpecification.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totagSpecifications(List<EBSTagSpecification>)
.- Parameters:
tagSpecifications
- a consumer that will call methods onEBSTagSpecification.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.- Parameters:
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-managedAmazonECSInfrastructureRolePolicyForVolumes
IAM policy with this role. For more information, see Amazon ECS infrastructure IAM role in the Amazon ECS Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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, thexfs
filesystem type is used by default.The available Windows filesystem types are
NTFS
.- Parameters:
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, thexfs
filesystem type is used by default.The available Windows filesystem types are
NTFS
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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, thexfs
filesystem type is used by default.The available Windows filesystem types are
NTFS
.- Parameters:
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, thexfs
filesystem type is used by default.The available Windows filesystem types are
NTFS
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-