#[non_exhaustive]pub struct FleetLaunchTemplateOverridesRequestBuilder { /* private fields */ }
Expand description
A builder for FleetLaunchTemplateOverridesRequest
.
Implementations§
Source§impl FleetLaunchTemplateOverridesRequestBuilder
impl FleetLaunchTemplateOverridesRequestBuilder
Sourcepub fn instance_type(self, input: InstanceType) -> Self
pub fn instance_type(self, input: InstanceType) -> Self
The instance type.
mac1.metal
is not supported as a launch template override.
If you specify InstanceType
, you can't specify InstanceRequirements
.
Sourcepub fn set_instance_type(self, input: Option<InstanceType>) -> Self
pub fn set_instance_type(self, input: Option<InstanceType>) -> Self
The instance type.
mac1.metal
is not supported as a launch template override.
If you specify InstanceType
, you can't specify InstanceRequirements
.
Sourcepub fn get_instance_type(&self) -> &Option<InstanceType>
pub fn get_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, input: impl Into<String>) -> Self
pub fn max_price(self, input: impl Into<String>) -> Self
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 set_max_price(self, input: Option<String>) -> Self
pub fn set_max_price(self, input: Option<String>) -> Self
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 get_max_price(&self) -> &Option<String>
pub fn get_max_price(&self) -> &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.
Sourcepub fn subnet_id(self, input: impl Into<String>) -> Self
pub fn subnet_id(self, input: impl Into<String>) -> Self
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 set_subnet_id(self, input: Option<String>) -> Self
pub fn set_subnet_id(self, input: Option<String>) -> Self
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 get_subnet_id(&self) -> &Option<String>
pub fn get_subnet_id(&self) -> &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.
Sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which to launch the instances.
Sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which to launch the instances.
Sourcepub fn get_availability_zone(&self) -> &Option<String>
pub fn get_availability_zone(&self) -> &Option<String>
The Availability Zone in which to launch the instances.
Sourcepub fn weighted_capacity(self, input: f64) -> Self
pub fn weighted_capacity(self, input: f64) -> Self
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 set_weighted_capacity(self, input: Option<f64>) -> Self
pub fn set_weighted_capacity(self, input: Option<f64>) -> Self
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 get_weighted_capacity(&self) -> &Option<f64>
pub fn get_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, input: f64) -> Self
pub fn priority(self, input: f64) -> Self
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 set_priority(self, input: Option<f64>) -> Self
pub fn set_priority(self, input: Option<f64>) -> Self
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 get_priority(&self) -> &Option<f64>
pub fn get_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, input: Placement) -> Self
pub fn placement(self, input: Placement) -> Self
The location where the instance launched, if applicable.
Sourcepub fn set_placement(self, input: Option<Placement>) -> Self
pub fn set_placement(self, input: Option<Placement>) -> Self
The location where the instance launched, if applicable.
Sourcepub fn get_placement(&self) -> &Option<Placement>
pub fn get_placement(&self) -> &Option<Placement>
The location where the instance launched, if applicable.
Sourcepub fn block_device_mappings(
self,
input: FleetBlockDeviceMappingRequest,
) -> Self
pub fn block_device_mappings( self, input: FleetBlockDeviceMappingRequest, ) -> Self
Appends an item to block_device_mappings
.
To override the contents of this collection use set_block_device_mappings
.
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.
Sourcepub fn set_block_device_mappings(
self,
input: Option<Vec<FleetBlockDeviceMappingRequest>>,
) -> Self
pub fn set_block_device_mappings( self, input: Option<Vec<FleetBlockDeviceMappingRequest>>, ) -> Self
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.
Sourcepub fn get_block_device_mappings(
&self,
) -> &Option<Vec<FleetBlockDeviceMappingRequest>>
pub fn get_block_device_mappings( &self, ) -> &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.
Sourcepub fn instance_requirements(self, input: InstanceRequirementsRequest) -> Self
pub fn instance_requirements(self, input: InstanceRequirementsRequest) -> Self
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 set_instance_requirements(
self,
input: Option<InstanceRequirementsRequest>,
) -> Self
pub fn set_instance_requirements( self, input: Option<InstanceRequirementsRequest>, ) -> Self
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 get_instance_requirements(&self) -> &Option<InstanceRequirementsRequest>
pub fn get_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, input: impl Into<String>) -> Self
pub fn image_id(self, input: impl Into<String>) -> Self
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.
Sourcepub fn set_image_id(self, input: Option<String>) -> Self
pub fn set_image_id(self, input: Option<String>) -> Self
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.
Sourcepub fn get_image_id(&self) -> &Option<String>
pub fn get_image_id(&self) -> &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.
Sourcepub fn build(self) -> FleetLaunchTemplateOverridesRequest
pub fn build(self) -> FleetLaunchTemplateOverridesRequest
Consumes the builder and constructs a FleetLaunchTemplateOverridesRequest
.
Trait Implementations§
Source§impl Clone for FleetLaunchTemplateOverridesRequestBuilder
impl Clone for FleetLaunchTemplateOverridesRequestBuilder
Source§fn clone(&self) -> FleetLaunchTemplateOverridesRequestBuilder
fn clone(&self) -> FleetLaunchTemplateOverridesRequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for FleetLaunchTemplateOverridesRequestBuilder
impl Default for FleetLaunchTemplateOverridesRequestBuilder
Source§fn default() -> FleetLaunchTemplateOverridesRequestBuilder
fn default() -> FleetLaunchTemplateOverridesRequestBuilder
Source§impl PartialEq for FleetLaunchTemplateOverridesRequestBuilder
impl PartialEq for FleetLaunchTemplateOverridesRequestBuilder
Source§fn eq(&self, other: &FleetLaunchTemplateOverridesRequestBuilder) -> bool
fn eq(&self, other: &FleetLaunchTemplateOverridesRequestBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for FleetLaunchTemplateOverridesRequestBuilder
Auto Trait Implementations§
impl Freeze for FleetLaunchTemplateOverridesRequestBuilder
impl RefUnwindSafe for FleetLaunchTemplateOverridesRequestBuilder
impl Send for FleetLaunchTemplateOverridesRequestBuilder
impl Sync for FleetLaunchTemplateOverridesRequestBuilder
impl Unpin for FleetLaunchTemplateOverridesRequestBuilder
impl UnwindSafe for FleetLaunchTemplateOverridesRequestBuilder
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);