#[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 volume_initialization_rate: Option<i32>,
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. 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.
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 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 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 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.
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:
standard
The 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.
-
gp2
andgp3
: 1-16,384 -
io1
andio2
: 4-16,384 -
st1
andsc1
: 125-16,384 -
standard
: 1-1,024
snapshot_id: Option<String>
The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service. You must specify either snapshotId
or sizeInGiB
in your volume configuration. This parameter maps 1:1 with the SnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.
volume_initialization_rate: Option<i32>
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: 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: 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.
filesystem_type: Option<TaskFilesystemType>
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
, and xfs
. If no value is specified, the xfs
filesystem type is used by default.
The available Windows filesystem types are NTFS
.
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 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 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 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.
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:
standard
The 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.
-
gp2
andgp3
: 1-16,384 -
io1
andio2
: 4-16,384 -
st1
andsc1
: 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 volumes for attachment to tasks maintained by the service. You must specify either snapshotId
or sizeInGiB
in your volume configuration. This parameter maps 1:1 with the SnapshotId
parameter of the CreateVolume API in the Amazon EC2 API Reference.
Sourcepub fn volume_initialization_rate(&self) -> Option<i32>
pub fn volume_initialization_rate(&self) -> Option<i32>
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.
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 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
, and xfs
. If no value is specified, the xfs
filesystem type is used by default.
The available Windows filesystem types are NTFS
.
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§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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);