#[non_exhaustive]pub struct FleetLaunchTemplateOverridesRequest {
pub instance_type: Option<InstanceType>,
pub max_price: Option<String>,
pub subnet_id: Option<String>,
pub availability_zone: Option<String>,
pub weighted_capacity: Option<f64>,
pub priority: Option<f64>,
pub placement: Option<Placement>,
pub block_device_mappings: Option<Vec<FleetBlockDeviceMappingRequest>>,
pub instance_requirements: Option<InstanceRequirementsRequest>,
pub image_id: Option<String>,
}
Expand description
Describes overrides for a launch template.
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.instance_type: Option<InstanceType>
The instance type.
mac1.metal
is not supported as a launch template override.
If you specify InstanceType
, you can't specify InstanceRequirements
.
max_price: Option<String>
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an InvalidParameterValue
error message.
subnet_id: Option<String>
The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2
). A request of type instant
can have only one subnet ID.
availability_zone: Option<String>
The Availability Zone in which to launch the instances.
weighted_capacity: Option<f64>
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.
If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowest-price
and price-capacity-optimized
allocation strategies is per unit hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested TargetCapacity
, resulting in only 1 instance being launched, the price used is per instance hour.
priority: Option<f64>
The priority for the launch template override. The highest priority is launched first.
If the On-Demand AllocationStrategy
is set to prioritized
, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
If the Spot AllocationStrategy
is set to capacity-optimized-prioritized
, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
Valid values are whole numbers starting at 0
. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
placement: Option<Placement>
The location where the instance launched, if applicable.
block_device_mappings: Option<Vec<FleetBlockDeviceMappingRequest>>
The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch.
Supported only for fleets of type instant
.
For more information, see Block device mappings for volumes on Amazon EC2 instances in the Amazon EC2 User Guide.
instance_requirements: Option<InstanceRequirementsRequest>
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
image_id: Option<String>
The ID of the AMI in the format ami-17characters00000
.
Alternatively, you can specify a Systems Manager parameter, using one of the following formats. The Systems Manager parameter will resolve to an AMI ID on launch.
To reference a public parameter:
-
resolve:ssm:public-parameter
To reference a parameter stored in the same account:
-
resolve:ssm:parameter-name
-
resolve:ssm:parameter-name:version-number
-
resolve:ssm:parameter-name:label
To reference a parameter shared from another Amazon Web Services account:
-
resolve:ssm:parameter-ARN
-
resolve:ssm:parameter-ARN:version-number
-
resolve:ssm:parameter-ARN:label
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
This parameter is only available for fleets of type instant
. For fleets of type maintain
and request
, you must specify the AMI ID in the launch template.
Implementations§
Source§impl FleetLaunchTemplateOverridesRequest
impl FleetLaunchTemplateOverridesRequest
Sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
mac1.metal
is not supported as a launch template override.
If you specify InstanceType
, you can't specify InstanceRequirements
.
Sourcepub fn max_price(&self) -> Option<&str>
pub fn max_price(&self) -> Option<&str>
The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
If you specify a maximum price, it must be more than USD $0.001. Specifying a value below USD $0.001 will result in an InvalidParameterValue
error message.
Sourcepub fn subnet_id(&self) -> Option<&str>
pub fn subnet_id(&self) -> Option<&str>
The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2
). A request of type instant
can have only one subnet ID.
Sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone in which to launch the instances.
Sourcepub fn weighted_capacity(&self) -> Option<f64>
pub fn weighted_capacity(&self) -> Option<f64>
The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.
If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
When specifying weights, the price used in the lowest-price
and price-capacity-optimized
allocation strategies is per unit hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested TargetCapacity
, resulting in only 1 instance being launched, the price used is per instance hour.
Sourcepub fn priority(&self) -> Option<f64>
pub fn priority(&self) -> Option<f64>
The priority for the launch template override. The highest priority is launched first.
If the On-Demand AllocationStrategy
is set to prioritized
, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
If the Spot AllocationStrategy
is set to capacity-optimized-prioritized
, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
Valid values are whole numbers starting at 0
. The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
Sourcepub fn placement(&self) -> Option<&Placement>
pub fn placement(&self) -> Option<&Placement>
The location where the instance launched, if applicable.
Sourcepub fn block_device_mappings(&self) -> &[FleetBlockDeviceMappingRequest]
pub fn block_device_mappings(&self) -> &[FleetBlockDeviceMappingRequest]
The block device mappings, which define the EBS volumes and instance store volumes to attach to the instance at launch.
Supported only for fleets of type instant
.
For more information, see Block device mappings for volumes on Amazon EC2 instances in the Amazon EC2 User Guide.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .block_device_mappings.is_none()
.
Sourcepub fn instance_requirements(&self) -> Option<&InstanceRequirementsRequest>
pub fn instance_requirements(&self) -> Option<&InstanceRequirementsRequest>
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
If you specify InstanceRequirements
, you can't specify InstanceType
.
Sourcepub fn image_id(&self) -> Option<&str>
pub fn image_id(&self) -> Option<&str>
The ID of the AMI in the format ami-17characters00000
.
Alternatively, you can specify a Systems Manager parameter, using one of the following formats. The Systems Manager parameter will resolve to an AMI ID on launch.
To reference a public parameter:
-
resolve:ssm:public-parameter
To reference a parameter stored in the same account:
-
resolve:ssm:parameter-name
-
resolve:ssm:parameter-name:version-number
-
resolve:ssm:parameter-name:label
To reference a parameter shared from another Amazon Web Services account:
-
resolve:ssm:parameter-ARN
-
resolve:ssm:parameter-ARN:version-number
-
resolve:ssm:parameter-ARN:label
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
This parameter is only available for fleets of type instant
. For fleets of type maintain
and request
, you must specify the AMI ID in the launch template.
Source§impl FleetLaunchTemplateOverridesRequest
impl FleetLaunchTemplateOverridesRequest
Sourcepub fn builder() -> FleetLaunchTemplateOverridesRequestBuilder
pub fn builder() -> FleetLaunchTemplateOverridesRequestBuilder
Creates a new builder-style object to manufacture FleetLaunchTemplateOverridesRequest
.
Trait Implementations§
Source§impl Clone for FleetLaunchTemplateOverridesRequest
impl Clone for FleetLaunchTemplateOverridesRequest
Source§fn clone(&self) -> FleetLaunchTemplateOverridesRequest
fn clone(&self) -> FleetLaunchTemplateOverridesRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for FleetLaunchTemplateOverridesRequest
impl PartialEq for FleetLaunchTemplateOverridesRequest
Source§fn eq(&self, other: &FleetLaunchTemplateOverridesRequest) -> bool
fn eq(&self, other: &FleetLaunchTemplateOverridesRequest) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for FleetLaunchTemplateOverridesRequest
Auto Trait Implementations§
impl Freeze for FleetLaunchTemplateOverridesRequest
impl RefUnwindSafe for FleetLaunchTemplateOverridesRequest
impl Send for FleetLaunchTemplateOverridesRequest
impl Sync for FleetLaunchTemplateOverridesRequest
impl Unpin for FleetLaunchTemplateOverridesRequest
impl UnwindSafe for FleetLaunchTemplateOverridesRequest
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);