#[non_exhaustive]pub struct SpotInstanceRequest {Show 19 fields
pub actual_block_hourly_price: Option<String>,
pub availability_zone_group: Option<String>,
pub block_duration_minutes: Option<i32>,
pub create_time: Option<DateTime>,
pub fault: Option<SpotInstanceStateFault>,
pub instance_id: Option<String>,
pub launch_group: Option<String>,
pub launch_specification: Option<LaunchSpecification>,
pub launched_availability_zone: Option<String>,
pub product_description: Option<RiProductDescription>,
pub spot_instance_request_id: Option<String>,
pub spot_price: Option<String>,
pub state: Option<SpotInstanceState>,
pub status: Option<SpotInstanceStatus>,
pub tags: Option<Vec<Tag>>,
pub type: Option<SpotInstanceType>,
pub valid_from: Option<DateTime>,
pub valid_until: Option<DateTime>,
pub instance_interruption_behavior: Option<InstanceInterruptionBehavior>,
}
Expand description
Describes a Spot Instance 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.actual_block_hourly_price: Option<String>
Deprecated.
availability_zone_group: Option<String>
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
block_duration_minutes: Option<i32>
Deprecated.
create_time: Option<DateTime>
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
fault: Option<SpotInstanceStateFault>
The fault codes for the Spot Instance request, if any.
instance_id: Option<String>
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
launch_group: Option<String>
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
launch_specification: Option<LaunchSpecification>
Additional information for launching instances.
launched_availability_zone: Option<String>
The Availability Zone in which the request is launched.
product_description: Option<RiProductDescription>
The product description associated with the Spot Instance.
spot_instance_request_id: Option<String>
The ID of the Spot Instance request.
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.
state: Option<SpotInstanceState>
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
status: Option<SpotInstanceStatus>
The status code and status message describing the Spot Instance request.
Any tags assigned to the resource.
type: Option<SpotInstanceType>
The Spot Instance request type.
valid_from: Option<DateTime>
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
valid_until: Option<DateTime>
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
-
For a persistent request, the request remains active until the
validUntil
date and time is reached. Otherwise, the request remains active until you cancel it. -
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
validUntil
date and time is reached. By default, the request is valid for 7 days from the date the request was created.
instance_interruption_behavior: Option<InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted.
Implementations§
Source§impl SpotInstanceRequest
impl SpotInstanceRequest
Sourcepub fn actual_block_hourly_price(&self) -> Option<&str>
pub fn actual_block_hourly_price(&self) -> Option<&str>
Deprecated.
Sourcepub fn availability_zone_group(&self) -> Option<&str>
pub fn availability_zone_group(&self) -> Option<&str>
The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.
Sourcepub fn block_duration_minutes(&self) -> Option<i32>
pub fn block_duration_minutes(&self) -> Option<i32>
Deprecated.
Sourcepub fn create_time(&self) -> Option<&DateTime>
pub fn create_time(&self) -> Option<&DateTime>
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Sourcepub fn fault(&self) -> Option<&SpotInstanceStateFault>
pub fn fault(&self) -> Option<&SpotInstanceStateFault>
The fault codes for the Spot Instance request, if any.
Sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
Sourcepub fn launch_group(&self) -> Option<&str>
pub fn launch_group(&self) -> Option<&str>
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Sourcepub fn launch_specification(&self) -> Option<&LaunchSpecification>
pub fn launch_specification(&self) -> Option<&LaunchSpecification>
Additional information for launching instances.
Sourcepub fn launched_availability_zone(&self) -> Option<&str>
pub fn launched_availability_zone(&self) -> Option<&str>
The Availability Zone in which the request is launched.
Sourcepub fn product_description(&self) -> Option<&RiProductDescription>
pub fn product_description(&self) -> Option<&RiProductDescription>
The product description associated with the Spot Instance.
Sourcepub fn spot_instance_request_id(&self) -> Option<&str>
pub fn spot_instance_request_id(&self) -> Option<&str>
The ID of the Spot Instance request.
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 state(&self) -> Option<&SpotInstanceState>
pub fn state(&self) -> Option<&SpotInstanceState>
The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide.
Sourcepub fn status(&self) -> Option<&SpotInstanceStatus>
pub fn status(&self) -> Option<&SpotInstanceStatus>
The status code and status message describing the Spot Instance request.
Any tags assigned to the resource.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tags.is_none()
.
Sourcepub fn type(&self) -> Option<&SpotInstanceType>
pub fn type(&self) -> Option<&SpotInstanceType>
The Spot Instance request type.
Sourcepub fn valid_from(&self) -> Option<&DateTime>
pub fn valid_from(&self) -> Option<&DateTime>
The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.
Sourcepub fn valid_until(&self) -> Option<&DateTime>
pub fn valid_until(&self) -> Option<&DateTime>
The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).
-
For a persistent request, the request remains active until the
validUntil
date and time is reached. Otherwise, the request remains active until you cancel it. -
For a one-time request, the request remains active until all instances launch, the request is canceled, or the
validUntil
date and time is reached. By default, the request is valid for 7 days from the date the request was created.
Sourcepub fn instance_interruption_behavior(
&self,
) -> Option<&InstanceInterruptionBehavior>
pub fn instance_interruption_behavior( &self, ) -> Option<&InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted.
Source§impl SpotInstanceRequest
impl SpotInstanceRequest
Sourcepub fn builder() -> SpotInstanceRequestBuilder
pub fn builder() -> SpotInstanceRequestBuilder
Creates a new builder-style object to manufacture SpotInstanceRequest
.
Trait Implementations§
Source§impl Clone for SpotInstanceRequest
impl Clone for SpotInstanceRequest
Source§fn clone(&self) -> SpotInstanceRequest
fn clone(&self) -> SpotInstanceRequest
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 SpotInstanceRequest
impl Debug for SpotInstanceRequest
Source§impl PartialEq for SpotInstanceRequest
impl PartialEq for SpotInstanceRequest
impl StructuralPartialEq for SpotInstanceRequest
Auto Trait Implementations§
impl Freeze for SpotInstanceRequest
impl RefUnwindSafe for SpotInstanceRequest
impl Send for SpotInstanceRequest
impl Sync for SpotInstanceRequest
impl Unpin for SpotInstanceRequest
impl UnwindSafe for SpotInstanceRequest
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);