#[non_exhaustive]pub struct ServiceManagedEbsVolumeConfiguration {
pub encrypted: Option<bool>,
pub kms_key_id: Option<String>,
pub volume_type: Option<String>,
pub size_in_gib: Option<i32>,
pub snapshot_id: Option<String>,
pub iops: Option<i32>,
pub throughput: Option<i32>,
pub tag_specifications: Option<Vec<EbsTagSpecification>>,
pub role_arn: String,
pub filesystem_type: Option<TaskFilesystemType>,
}Expand description
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.
Many of these parameters map 1:1 with the Amazon EBS CreateVolume API request parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encrypted: 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.
kms_key_id: 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.
volume_type: 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:
standardThe magnetic volume type is not supported on Fargate.
size_in_gib: 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.
-
gp2andgp3: 1-16,384 -
io1andio2: 4-16,384 -
st1andsc1: 125-16,384 -
standard: 1-1,024
snapshot_id: 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.
iops: 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.
throughput: 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.
tag_specifications: 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.
role_arn: StringThe 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.
filesystem_type: 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.
Implementations§
source§impl ServiceManagedEbsVolumeConfiguration
impl ServiceManagedEbsVolumeConfiguration
sourcepub fn encrypted(&self) -> Option<bool>
pub fn 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) -> Option<&str>
pub fn kms_key_id(&self) -> Option<&str>
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) -> Option<&str>
pub fn volume_type(&self) -> Option<&str>
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:
standardThe magnetic volume type is not supported on Fargate.
sourcepub fn size_in_gib(&self) -> Option<i32>
pub fn 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.
-
gp2andgp3: 1-16,384 -
io1andio2: 4-16,384 -
st1andsc1: 125-16,384 -
standard: 1-1,024
sourcepub fn snapshot_id(&self) -> Option<&str>
pub fn snapshot_id(&self) -> Option<&str>
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) -> Option<i32>
pub fn 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) -> Option<i32>
pub fn 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) -> &[EbsTagSpecification]
pub fn tag_specifications(&self) -> &[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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tag_specifications.is_none().
sourcepub fn role_arn(&self) -> &str
pub fn role_arn(&self) -> &str
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 filesystem_type(&self) -> Option<&TaskFilesystemType>
pub fn 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.
source§impl ServiceManagedEbsVolumeConfiguration
impl ServiceManagedEbsVolumeConfiguration
sourcepub fn builder() -> ServiceManagedEbsVolumeConfigurationBuilder
pub fn builder() -> ServiceManagedEbsVolumeConfigurationBuilder
Creates a new builder-style object to manufacture ServiceManagedEbsVolumeConfiguration.
Trait Implementations§
source§impl Clone for ServiceManagedEbsVolumeConfiguration
impl Clone for ServiceManagedEbsVolumeConfiguration
source§fn clone(&self) -> ServiceManagedEbsVolumeConfiguration
fn clone(&self) -> ServiceManagedEbsVolumeConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl PartialEq for ServiceManagedEbsVolumeConfiguration
impl PartialEq for ServiceManagedEbsVolumeConfiguration
source§fn eq(&self, other: &ServiceManagedEbsVolumeConfiguration) -> bool
fn eq(&self, other: &ServiceManagedEbsVolumeConfiguration) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServiceManagedEbsVolumeConfiguration
Auto Trait Implementations§
impl Freeze for ServiceManagedEbsVolumeConfiguration
impl RefUnwindSafe for ServiceManagedEbsVolumeConfiguration
impl Send for ServiceManagedEbsVolumeConfiguration
impl Sync for ServiceManagedEbsVolumeConfiguration
impl Unpin for ServiceManagedEbsVolumeConfiguration
impl UnwindSafe for ServiceManagedEbsVolumeConfiguration
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more