#[non_exhaustive]pub struct TaskManagedEbsVolumeConfigurationBuilder { /* private fields */ }
Expand description
A builder for TaskManagedEbsVolumeConfiguration
.
Implementations§
source§impl TaskManagedEbsVolumeConfigurationBuilder
impl TaskManagedEbsVolumeConfigurationBuilder
sourcepub fn encrypted(self, input: bool) -> Self
pub fn encrypted(self, input: bool) -> Self
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.
sourcepub fn set_encrypted(self, input: Option<bool>) -> Self
pub fn set_encrypted(self, input: Option<bool>) -> Self
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.
sourcepub fn get_encrypted(&self) -> &Option<bool>
pub fn get_encrypted(&self) -> &Option<bool>
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.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
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.
sourcepub fn get_kms_key_id(&self) -> &Option<String>
pub fn get_kms_key_id(&self) -> &Option<String>
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.
sourcepub fn volume_type(self, input: impl Into<String>) -> Self
pub fn volume_type(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_volume_type(self, input: Option<String>) -> Self
pub fn set_volume_type(self, input: Option<String>) -> Self
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.
sourcepub fn get_volume_type(&self) -> &Option<String>
pub fn get_volume_type(&self) -> &Option<String>
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.
sourcepub fn size_in_gib(self, input: i32) -> Self
pub fn size_in_gib(self, input: i32) -> Self
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
sourcepub fn set_size_in_gib(self, input: Option<i32>) -> Self
pub fn set_size_in_gib(self, input: Option<i32>) -> Self
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
sourcepub fn get_size_in_gib(&self) -> &Option<i32>
pub fn get_size_in_gib(&self) -> &Option<i32>
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
sourcepub fn snapshot_id(self, input: impl Into<String>) -> Self
pub fn snapshot_id(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_snapshot_id(self, input: Option<String>) -> Self
pub fn set_snapshot_id(self, input: Option<String>) -> Self
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.
sourcepub fn get_snapshot_id(&self) -> &Option<String>
pub fn get_snapshot_id(&self) -> &Option<String>
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.
sourcepub fn iops(self, input: i32) -> Self
pub fn iops(self, input: i32) -> Self
The number of I/O operations per second (IOPS). For gp3
, io1
, and io2
volumes, this represents the number of IOPS that are provisioned for the volume. For gp2
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
and io2
volume types. The default for gp3
volumes is 3,000 IOPS
. This parameter is not supported for st1
, sc1
, or standard
volume types.
This parameter maps 1:1 with the Iops
parameter of the CreateVolume API in the Amazon EC2 API Reference.
sourcepub fn set_iops(self, input: Option<i32>) -> Self
pub fn set_iops(self, input: Option<i32>) -> Self
The number of I/O operations per second (IOPS). For gp3
, io1
, and io2
volumes, this represents the number of IOPS that are provisioned for the volume. For gp2
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
and io2
volume types. The default for gp3
volumes is 3,000 IOPS
. This parameter is not supported for st1
, sc1
, or standard
volume types.
This parameter maps 1:1 with the Iops
parameter of the CreateVolume API in the Amazon EC2 API Reference.
sourcepub fn get_iops(&self) -> &Option<i32>
pub fn get_iops(&self) -> &Option<i32>
The number of I/O operations per second (IOPS). For gp3
, io1
, and io2
volumes, this represents the number of IOPS that are provisioned for the volume. For gp2
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
and io2
volume types. The default for gp3
volumes is 3,000 IOPS
. This parameter is not supported for st1
, sc1
, or standard
volume types.
This parameter maps 1:1 with the Iops
parameter of the CreateVolume API in the Amazon EC2 API Reference.
sourcepub fn throughput(self, input: i32) -> Self
pub fn throughput(self, input: i32) -> Self
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.
sourcepub fn set_throughput(self, input: Option<i32>) -> Self
pub fn set_throughput(self, input: Option<i32>) -> Self
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.
sourcepub fn get_throughput(&self) -> &Option<i32>
pub fn get_throughput(&self) -> &Option<i32>
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.
sourcepub fn tag_specifications(self, input: EbsTagSpecification) -> Self
pub fn tag_specifications(self, input: EbsTagSpecification) -> Self
Appends an item to tag_specifications
.
To override the contents of this collection use set_tag_specifications
.
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.
sourcepub fn set_tag_specifications(
self,
input: Option<Vec<EbsTagSpecification>>
) -> Self
pub fn set_tag_specifications( self, input: Option<Vec<EbsTagSpecification>> ) -> Self
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.
sourcepub fn get_tag_specifications(&self) -> &Option<Vec<EbsTagSpecification>>
pub fn get_tag_specifications(&self) -> &Option<Vec<EbsTagSpecification>>
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.
sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
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.
sourcepub fn get_role_arn(&self) -> &Option<String>
pub fn get_role_arn(&self) -> &Option<String>
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.
sourcepub fn termination_policy(
self,
input: TaskManagedEbsVolumeTerminationPolicy
) -> Self
pub fn termination_policy( self, input: TaskManagedEbsVolumeTerminationPolicy ) -> Self
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.
sourcepub fn set_termination_policy(
self,
input: Option<TaskManagedEbsVolumeTerminationPolicy>
) -> Self
pub fn set_termination_policy( self, input: Option<TaskManagedEbsVolumeTerminationPolicy> ) -> Self
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.
sourcepub fn get_termination_policy(
&self
) -> &Option<TaskManagedEbsVolumeTerminationPolicy>
pub fn get_termination_policy( &self ) -> &Option<TaskManagedEbsVolumeTerminationPolicy>
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.
sourcepub fn filesystem_type(self, input: TaskFilesystemType) -> Self
pub fn filesystem_type(self, input: TaskFilesystemType) -> Self
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
, and xfs
. If no value is specified, the xfs
filesystem type is used by default.
sourcepub fn set_filesystem_type(self, input: Option<TaskFilesystemType>) -> Self
pub fn set_filesystem_type(self, input: Option<TaskFilesystemType>) -> Self
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
, and xfs
. If no value is specified, the xfs
filesystem type is used by default.
sourcepub fn get_filesystem_type(&self) -> &Option<TaskFilesystemType>
pub fn get_filesystem_type(&self) -> &Option<TaskFilesystemType>
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
, and xfs
. If no value is specified, the xfs
filesystem type is used by default.
sourcepub fn build(self) -> Result<TaskManagedEbsVolumeConfiguration, BuildError>
pub fn build(self) -> Result<TaskManagedEbsVolumeConfiguration, BuildError>
Consumes the builder and constructs a TaskManagedEbsVolumeConfiguration
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for TaskManagedEbsVolumeConfigurationBuilder
impl Clone for TaskManagedEbsVolumeConfigurationBuilder
source§fn clone(&self) -> TaskManagedEbsVolumeConfigurationBuilder
fn clone(&self) -> TaskManagedEbsVolumeConfigurationBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for TaskManagedEbsVolumeConfigurationBuilder
impl Default for TaskManagedEbsVolumeConfigurationBuilder
source§fn default() -> TaskManagedEbsVolumeConfigurationBuilder
fn default() -> TaskManagedEbsVolumeConfigurationBuilder
source§impl PartialEq for TaskManagedEbsVolumeConfigurationBuilder
impl PartialEq for TaskManagedEbsVolumeConfigurationBuilder
source§fn eq(&self, other: &TaskManagedEbsVolumeConfigurationBuilder) -> bool
fn eq(&self, other: &TaskManagedEbsVolumeConfigurationBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.