Class CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnService.ServiceManagedEBSVolumeConfigurationProperty>
- Enclosing interface:
CfnService.ServiceManagedEBSVolumeConfigurationProperty
CfnService.ServiceManagedEBSVolumeConfigurationProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getEncrypted()
encrypted
(IResolvable encrypted) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getEncrypted()
filesystemType
(String filesystemType) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getIops()
Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getKmsKeyId()
Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getRoleArn()
Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getSizeInGiB()
snapshotId
(String snapshotId) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getSnapshotId()
tagSpecifications
(List<? extends Object> tagSpecifications) tagSpecifications
(IResolvable tagSpecifications) throughput
(Number throughput) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getThroughput()
volumeType
(String volumeType) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getVolumeType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
roleArn
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder roleArn(String roleArn) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getRoleArn()
- Parameters:
roleArn
- The ARN of the IAM role to associate with this volume. This parameter is required. This is the Amazon ECS infrastructure IAM role that is used to manage your AWS 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:
this
-
encrypted
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder encrypted(Boolean encrypted) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getEncrypted()
- Parameters:
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 theEncrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference .- Returns:
this
-
encrypted
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder encrypted(IResolvable encrypted) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getEncrypted()
- Parameters:
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 theEncrypted
parameter of the CreateVolume API in the Amazon EC2 API Reference .- Returns:
this
-
filesystemType
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder filesystemType(String filesystemType) - Parameters:
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.- Returns:
this
-
iops
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder iops(Number iops) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getIops()
- 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 IOPSio1
: 100 - 64,000 IOPSio2
: 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:
this
-
kmsKeyId
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder kmsKeyId(String kmsKeyId) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getKmsKeyId()
- Parameters:
kmsKeyId
- The Amazon Resource Name (ARN) identifier of the AWS Key Management Service key to use for Amazon EBS encryption. When encryption is turned on and no AWS Key Management Service key is specified, the default AWS managed key for Amazon EBS volumes is used. This parameter maps 1:1 with theKmsKeyId
parameter of the CreateVolume API in the Amazon EC2 API Reference .AWS authenticates the AWS 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:
this
-
sizeInGiB
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder sizeInGiB(Number sizeInGiB) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getSizeInGiB()
- 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,384io1
andio2
: 4-16,384st1
andsc1
: 125-16,384standard
: 1-1,024
- Returns:
this
-
snapshotId
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder snapshotId(String snapshotId) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getSnapshotId()
- Parameters:
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 theSnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference .- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder tagSpecifications(IResolvable tagSpecifications) - 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:
this
-
tagSpecifications
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder tagSpecifications(List<? extends Object> tagSpecifications) - 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:
this
-
throughput
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder throughput(Number throughput) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getThroughput()
- 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:
this
-
volumeType
@Stability(Stable) public CfnService.ServiceManagedEBSVolumeConfigurationProperty.Builder volumeType(String volumeType) Sets the value ofCfnService.ServiceManagedEBSVolumeConfigurationProperty.getVolumeType()
- 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.
- General Purpose SSD:
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnService.ServiceManagedEBSVolumeConfigurationProperty>
- Returns:
- a new instance of
CfnService.ServiceManagedEBSVolumeConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-