#[non_exhaustive]pub struct SpotFleetRequestConfigData {Show 26 fields
pub allocation_strategy: Option<AllocationStrategy>,
pub on_demand_allocation_strategy: Option<OnDemandAllocationStrategy>,
pub spot_maintenance_strategies: Option<SpotMaintenanceStrategies>,
pub client_token: Option<String>,
pub excess_capacity_termination_policy: Option<ExcessCapacityTerminationPolicy>,
pub fulfilled_capacity: Option<f64>,
pub on_demand_fulfilled_capacity: Option<f64>,
pub iam_fleet_role: Option<String>,
pub launch_specifications: Option<Vec<SpotFleetLaunchSpecification>>,
pub launch_template_configs: Option<Vec<LaunchTemplateConfig>>,
pub spot_price: Option<String>,
pub target_capacity: Option<i32>,
pub on_demand_target_capacity: Option<i32>,
pub on_demand_max_total_price: Option<String>,
pub spot_max_total_price: Option<String>,
pub terminate_instances_with_expiration: Option<bool>,
pub type: Option<FleetType>,
pub valid_from: Option<DateTime>,
pub valid_until: Option<DateTime>,
pub replace_unhealthy_instances: Option<bool>,
pub instance_interruption_behavior: Option<InstanceInterruptionBehavior>,
pub load_balancers_config: Option<LoadBalancersConfig>,
pub instance_pools_to_use_count: Option<i32>,
pub context: Option<String>,
pub target_capacity_unit_type: Option<TargetCapacityUnitType>,
pub tag_specifications: Option<Vec<TagSpecification>>,
}
Expand description
Describes the configuration of a Spot Fleet request.
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.allocation_strategy: Option<AllocationStrategy>
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide.
- priceCapacityOptimized (recommended)
-
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
- capacityOptimized
-
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use
capacityOptimizedPrioritized
. Set a priority for each instance type by using thePriority
parameter forLaunchTemplateOverrides
. You can assign the same priority to differentLaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first.capacityOptimizedPrioritized
is supported only if your Spot Fleet uses a launch template. Note that if theOnDemandAllocationStrategy
is set toprioritized
, the same priority is applied when fulfilling On-Demand capacity. - diversified
-
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
- lowestPrice (not recommended)
-
We don't recommend the
lowestPrice
allocation strategy because it has the highest risk of interruption for your Spot Instances.Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
on_demand_allocation_strategy: Option<OnDemandAllocationStrategy>
The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice
.
spot_maintenance_strategies: Option<SpotMaintenanceStrategies>
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
client_token: Option<String>
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.
excess_capacity_termination_policy: Option<ExcessCapacityTerminationPolicy>
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
Supported only for fleets of type maintain
.
fulfilled_capacity: Option<f64>
The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.
on_demand_fulfilled_capacity: Option<f64>
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
iam_fleet_role: Option<String>
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration
.
launch_specifications: Option<Vec<SpotFleetLaunchSpecification>>
The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
If an AMI specified in a launch specification is deregistered or disabled, no new instances can be launched from the AMI. For fleets of type maintain
, the target capacity will not be maintained.
launch_template_configs: Option<Vec<LaunchTemplateConfig>>
The launch template and overrides. If you specify LaunchTemplateConfigs
, you can't specify LaunchSpecifications
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
spot_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.
target_capacity: Option<i32>
The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
on_demand_target_capacity: Option<i32>
The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
on_demand_max_total_price: Option<String>
The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice
parameter, the spotMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
If your fleet includes T instances that are configured as unlimited
, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The onDemandMaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for onDemandMaxTotalPrice
. For more information, see Surplus credits can incur charges in the Amazon EC2 User Guide.
spot_max_total_price: Option<String>
The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotMaxTotalPrice
parameter, the onDemandMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
If your fleet includes T instances that are configured as unlimited
, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The spotMaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for spotMaxTotalPrice
. For more information, see Surplus credits can incur charges in the Amazon EC2 User Guide.
terminate_instances_with_expiration: Option<bool>
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
type: Option<FleetType>
The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request
, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain
. instant
is listed but is not used by Spot Fleet.
valid_from: Option<DateTime>
The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.
valid_until: Option<DateTime>
The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.
replace_unhealthy_instances: Option<bool>
Indicates whether Spot Fleet should replace unhealthy instances.
instance_interruption_behavior: Option<InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted. The default is terminate
.
load_balancers_config: Option<LoadBalancersConfig>
One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.
With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.
instance_pools_to_use_count: Option<i32>
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price
. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.
context: Option<String>
Reserved.
target_capacity_unit_type: Option<TargetCapacityUnitType>
The unit for the target capacity. You can specify this parameter only when using attribute-based instance type selection.
Default: units
(the number of instances)
tag_specifications: Option<Vec<TagSpecification>>
The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the SpotFleetTagSpecification
(valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tag your resources.
Implementations§
Source§impl SpotFleetRequestConfigData
impl SpotFleetRequestConfigData
Sourcepub fn allocation_strategy(&self) -> Option<&AllocationStrategy>
pub fn allocation_strategy(&self) -> Option<&AllocationStrategy>
The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see Allocation strategies for Spot Instances in the Amazon EC2 User Guide.
- priceCapacityOptimized (recommended)
-
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
- capacityOptimized
-
Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use
capacityOptimizedPrioritized
. Set a priority for each instance type by using thePriority
parameter forLaunchTemplateOverrides
. You can assign the same priority to differentLaunchTemplateOverrides
. EC2 implements the priorities on a best-effort basis, but optimizes for capacity first.capacityOptimizedPrioritized
is supported only if your Spot Fleet uses a launch template. Note that if theOnDemandAllocationStrategy
is set toprioritized
, the same priority is applied when fulfilling On-Demand capacity. - diversified
-
Spot Fleet requests instances from all of the Spot Instance pools that you specify.
- lowestPrice (not recommended)
-
We don't recommend the
lowestPrice
allocation strategy because it has the highest risk of interruption for your Spot Instances.Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
Default: lowestPrice
Sourcepub fn on_demand_allocation_strategy(
&self,
) -> Option<&OnDemandAllocationStrategy>
pub fn on_demand_allocation_strategy( &self, ) -> Option<&OnDemandAllocationStrategy>
The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice
, Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized
, Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice
.
Sourcepub fn spot_maintenance_strategies(&self) -> Option<&SpotMaintenanceStrategies>
pub fn spot_maintenance_strategies(&self) -> Option<&SpotMaintenanceStrategies>
The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.
Sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency.
Sourcepub fn excess_capacity_termination_policy(
&self,
) -> Option<&ExcessCapacityTerminationPolicy>
pub fn excess_capacity_termination_policy( &self, ) -> Option<&ExcessCapacityTerminationPolicy>
Indicates whether running instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.
Supported only for fleets of type maintain
.
Sourcepub fn fulfilled_capacity(&self) -> Option<f64>
pub fn fulfilled_capacity(&self) -> Option<f64>
The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.
Sourcepub fn on_demand_fulfilled_capacity(&self) -> Option<f64>
pub fn on_demand_fulfilled_capacity(&self) -> Option<f64>
The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.
Sourcepub fn iam_fleet_role(&self) -> Option<&str>
pub fn iam_fleet_role(&self) -> Option<&str>
The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide. Spot Fleet can terminate Spot Instances on your behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests or when the Spot Fleet request expires, if you set TerminateInstancesWithExpiration
.
Sourcepub fn launch_specifications(&self) -> &[SpotFleetLaunchSpecification]
pub fn launch_specifications(&self) -> &[SpotFleetLaunchSpecification]
The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications
, you can't specify LaunchTemplateConfigs
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
If an AMI specified in a launch specification is deregistered or disabled, no new instances can be launched from the AMI. For fleets of type maintain
, the target capacity will not be maintained.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .launch_specifications.is_none()
.
Sourcepub fn launch_template_configs(&self) -> &[LaunchTemplateConfig]
pub fn launch_template_configs(&self) -> &[LaunchTemplateConfig]
The launch template and overrides. If you specify LaunchTemplateConfigs
, you can't specify LaunchSpecifications
. If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs
.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .launch_template_configs.is_none()
.
Sourcepub fn spot_price(&self) -> Option<&str>
pub fn spot_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.
Sourcepub fn target_capacity(&self) -> Option<i32>
pub fn target_capacity(&self) -> Option<i32>
The number of units to request for the Spot Fleet. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
Sourcepub fn on_demand_target_capacity(&self) -> Option<i32>
pub fn on_demand_target_capacity(&self) -> Option<i32>
The number of On-Demand units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O. If the request type is maintain
, you can specify a target capacity of 0 and add capacity later.
Sourcepub fn on_demand_max_total_price(&self) -> Option<&str>
pub fn on_demand_max_total_price(&self) -> Option<&str>
The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice
parameter, the spotMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
If your fleet includes T instances that are configured as unlimited
, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The onDemandMaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for onDemandMaxTotalPrice
. For more information, see Surplus credits can incur charges in the Amazon EC2 User Guide.
Sourcepub fn spot_max_total_price(&self) -> Option<&str>
pub fn spot_max_total_price(&self) -> Option<&str>
The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotMaxTotalPrice
parameter, the onDemandMaxTotalPrice
parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.
If your fleet includes T instances that are configured as unlimited
, and if their average CPU usage exceeds the baseline utilization, you will incur a charge for surplus credits. The spotMaxTotalPrice
does not account for surplus credits, and, if you use surplus credits, your final cost might be higher than what you specified for spotMaxTotalPrice
. For more information, see Surplus credits can incur charges in the Amazon EC2 User Guide.
Sourcepub fn terminate_instances_with_expiration(&self) -> Option<bool>
pub fn terminate_instances_with_expiration(&self) -> Option<bool>
Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.
Sourcepub fn type(&self) -> Option<&FleetType>
pub fn type(&self) -> Option<&FleetType>
The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request
, the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain
, the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain
. instant
is listed but is not used by Spot Fleet.
Sourcepub fn valid_from(&self) -> Option<&DateTime>
pub fn valid_from(&self) -> Option<&DateTime>
The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). By default, Amazon EC2 starts fulfilling the request immediately.
Sourcepub fn valid_until(&self) -> Option<&DateTime>
pub fn valid_until(&self) -> Option<&DateTime>
The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.
Sourcepub fn replace_unhealthy_instances(&self) -> Option<bool>
pub fn replace_unhealthy_instances(&self) -> Option<bool>
Indicates whether Spot Fleet should replace unhealthy instances.
Sourcepub fn instance_interruption_behavior(
&self,
) -> Option<&InstanceInterruptionBehavior>
pub fn instance_interruption_behavior( &self, ) -> Option<&InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted. The default is terminate
.
Sourcepub fn load_balancers_config(&self) -> Option<&LoadBalancersConfig>
pub fn load_balancers_config(&self) -> Option<&LoadBalancersConfig>
One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.
With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.
Sourcepub fn instance_pools_to_use_count(&self) -> Option<i32>
pub fn instance_pools_to_use_count(&self) -> Option<i32>
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price
. Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.
Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.
Sourcepub fn target_capacity_unit_type(&self) -> Option<&TargetCapacityUnitType>
pub fn target_capacity_unit_type(&self) -> Option<&TargetCapacityUnitType>
The unit for the target capacity. You can specify this parameter only when using attribute-based instance type selection.
Default: units
(the number of instances)
Sourcepub fn tag_specifications(&self) -> &[TagSpecification]
pub fn tag_specifications(&self) -> &[TagSpecification]
The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType
must be spot-fleet-request
, otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs
) or in the SpotFleetTagSpecification
(valid only if you use LaunchSpecifications
). For information about tagging after launch, see Tag your resources.
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()
.
Source§impl SpotFleetRequestConfigData
impl SpotFleetRequestConfigData
Sourcepub fn builder() -> SpotFleetRequestConfigDataBuilder
pub fn builder() -> SpotFleetRequestConfigDataBuilder
Creates a new builder-style object to manufacture SpotFleetRequestConfigData
.
Trait Implementations§
Source§impl Clone for SpotFleetRequestConfigData
impl Clone for SpotFleetRequestConfigData
Source§fn clone(&self) -> SpotFleetRequestConfigData
fn clone(&self) -> SpotFleetRequestConfigData
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SpotFleetRequestConfigData
impl Debug for SpotFleetRequestConfigData
Source§impl PartialEq for SpotFleetRequestConfigData
impl PartialEq for SpotFleetRequestConfigData
Source§fn eq(&self, other: &SpotFleetRequestConfigData) -> bool
fn eq(&self, other: &SpotFleetRequestConfigData) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for SpotFleetRequestConfigData
Auto Trait Implementations§
impl Freeze for SpotFleetRequestConfigData
impl RefUnwindSafe for SpotFleetRequestConfigData
impl Send for SpotFleetRequestConfigData
impl Sync for SpotFleetRequestConfigData
impl Unpin for SpotFleetRequestConfigData
impl UnwindSafe for SpotFleetRequestConfigData
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);