#[non_exhaustive]pub struct SpotInstanceRequestBuilder { /* private fields */ }
Expand description
A builder for SpotInstanceRequest
.
Implementations§
Source§impl SpotInstanceRequestBuilder
impl SpotInstanceRequestBuilder
Sourcepub fn actual_block_hourly_price(self, input: impl Into<String>) -> Self
pub fn actual_block_hourly_price(self, input: impl Into<String>) -> Self
Deprecated.
Sourcepub fn set_actual_block_hourly_price(self, input: Option<String>) -> Self
pub fn set_actual_block_hourly_price(self, input: Option<String>) -> Self
Deprecated.
Sourcepub fn get_actual_block_hourly_price(&self) -> &Option<String>
pub fn get_actual_block_hourly_price(&self) -> &Option<String>
Deprecated.
Sourcepub fn availability_zone_group(self, input: impl Into<String>) -> Self
pub fn availability_zone_group(self, input: impl Into<String>) -> Self
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 set_availability_zone_group(self, input: Option<String>) -> Self
pub fn set_availability_zone_group(self, input: Option<String>) -> Self
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 get_availability_zone_group(&self) -> &Option<String>
pub fn get_availability_zone_group(&self) -> &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.
Sourcepub fn block_duration_minutes(self, input: i32) -> Self
pub fn block_duration_minutes(self, input: i32) -> Self
Deprecated.
Sourcepub fn set_block_duration_minutes(self, input: Option<i32>) -> Self
pub fn set_block_duration_minutes(self, input: Option<i32>) -> Self
Deprecated.
Sourcepub fn get_block_duration_minutes(&self) -> &Option<i32>
pub fn get_block_duration_minutes(&self) -> &Option<i32>
Deprecated.
Sourcepub fn create_time(self, input: DateTime) -> Self
pub fn create_time(self, input: DateTime) -> Self
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Sourcepub fn set_create_time(self, input: Option<DateTime>) -> Self
pub fn set_create_time(self, input: Option<DateTime>) -> Self
The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
Sourcepub fn get_create_time(&self) -> &Option<DateTime>
pub fn get_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, input: SpotInstanceStateFault) -> Self
pub fn fault(self, input: SpotInstanceStateFault) -> Self
The fault codes for the Spot Instance request, if any.
Sourcepub fn set_fault(self, input: Option<SpotInstanceStateFault>) -> Self
pub fn set_fault(self, input: Option<SpotInstanceStateFault>) -> Self
The fault codes for the Spot Instance request, if any.
Sourcepub fn get_fault(&self) -> &Option<SpotInstanceStateFault>
pub fn get_fault(&self) -> &Option<SpotInstanceStateFault>
The fault codes for the Spot Instance request, if any.
Sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
Sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
Sourcepub fn get_instance_id(&self) -> &Option<String>
pub fn get_instance_id(&self) -> &Option<String>
The instance ID, if an instance has been launched to fulfill the Spot Instance request.
Sourcepub fn launch_group(self, input: impl Into<String>) -> Self
pub fn launch_group(self, input: impl Into<String>) -> Self
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Sourcepub fn set_launch_group(self, input: Option<String>) -> Self
pub fn set_launch_group(self, input: Option<String>) -> Self
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Sourcepub fn get_launch_group(&self) -> &Option<String>
pub fn get_launch_group(&self) -> &Option<String>
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Sourcepub fn launch_specification(self, input: LaunchSpecification) -> Self
pub fn launch_specification(self, input: LaunchSpecification) -> Self
Additional information for launching instances.
Sourcepub fn set_launch_specification(
self,
input: Option<LaunchSpecification>,
) -> Self
pub fn set_launch_specification( self, input: Option<LaunchSpecification>, ) -> Self
Additional information for launching instances.
Sourcepub fn get_launch_specification(&self) -> &Option<LaunchSpecification>
pub fn get_launch_specification(&self) -> &Option<LaunchSpecification>
Additional information for launching instances.
Sourcepub fn launched_availability_zone(self, input: impl Into<String>) -> Self
pub fn launched_availability_zone(self, input: impl Into<String>) -> Self
The Availability Zone in which the request is launched.
Sourcepub fn set_launched_availability_zone(self, input: Option<String>) -> Self
pub fn set_launched_availability_zone(self, input: Option<String>) -> Self
The Availability Zone in which the request is launched.
Sourcepub fn get_launched_availability_zone(&self) -> &Option<String>
pub fn get_launched_availability_zone(&self) -> &Option<String>
The Availability Zone in which the request is launched.
Sourcepub fn product_description(self, input: RiProductDescription) -> Self
pub fn product_description(self, input: RiProductDescription) -> Self
The product description associated with the Spot Instance.
Sourcepub fn set_product_description(
self,
input: Option<RiProductDescription>,
) -> Self
pub fn set_product_description( self, input: Option<RiProductDescription>, ) -> Self
The product description associated with the Spot Instance.
Sourcepub fn get_product_description(&self) -> &Option<RiProductDescription>
pub fn get_product_description(&self) -> &Option<RiProductDescription>
The product description associated with the Spot Instance.
Sourcepub fn spot_instance_request_id(self, input: impl Into<String>) -> Self
pub fn spot_instance_request_id(self, input: impl Into<String>) -> Self
The ID of the Spot Instance request.
Sourcepub fn set_spot_instance_request_id(self, input: Option<String>) -> Self
pub fn set_spot_instance_request_id(self, input: Option<String>) -> Self
The ID of the Spot Instance request.
Sourcepub fn get_spot_instance_request_id(&self) -> &Option<String>
pub fn get_spot_instance_request_id(&self) -> &Option<String>
The ID of the Spot Instance request.
Sourcepub fn spot_price(self, input: impl Into<String>) -> Self
pub fn spot_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.
Sourcepub fn set_spot_price(self, input: Option<String>) -> Self
pub fn set_spot_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.
Sourcepub fn get_spot_price(&self) -> &Option<String>
pub fn get_spot_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.
Sourcepub fn state(self, input: SpotInstanceState) -> Self
pub fn state(self, input: SpotInstanceState) -> Self
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 set_state(self, input: Option<SpotInstanceState>) -> Self
pub fn set_state(self, input: Option<SpotInstanceState>) -> Self
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 get_state(&self) -> &Option<SpotInstanceState>
pub fn get_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, input: SpotInstanceStatus) -> Self
pub fn status(self, input: SpotInstanceStatus) -> Self
The status code and status message describing the Spot Instance request.
Sourcepub fn set_status(self, input: Option<SpotInstanceStatus>) -> Self
pub fn set_status(self, input: Option<SpotInstanceStatus>) -> Self
The status code and status message describing the Spot Instance request.
Sourcepub fn get_status(&self) -> &Option<SpotInstanceStatus>
pub fn get_status(&self) -> &Option<SpotInstanceStatus>
The status code and status message describing the Spot Instance request.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Any tags assigned to the resource.
Any tags assigned to the resource.
Any tags assigned to the resource.
Sourcepub fn type(self, input: SpotInstanceType) -> Self
pub fn type(self, input: SpotInstanceType) -> Self
The Spot Instance request type.
Sourcepub fn set_type(self, input: Option<SpotInstanceType>) -> Self
pub fn set_type(self, input: Option<SpotInstanceType>) -> Self
The Spot Instance request type.
Sourcepub fn get_type(&self) -> &Option<SpotInstanceType>
pub fn get_type(&self) -> &Option<SpotInstanceType>
The Spot Instance request type.
Sourcepub fn valid_from(self, input: DateTime) -> Self
pub fn valid_from(self, input: DateTime) -> Self
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 set_valid_from(self, input: Option<DateTime>) -> Self
pub fn set_valid_from(self, input: Option<DateTime>) -> Self
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 get_valid_from(&self) -> &Option<DateTime>
pub fn get_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, input: DateTime) -> Self
pub fn valid_until(self, input: DateTime) -> Self
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 set_valid_until(self, input: Option<DateTime>) -> Self
pub fn set_valid_until(self, input: Option<DateTime>) -> Self
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 get_valid_until(&self) -> &Option<DateTime>
pub fn get_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,
input: InstanceInterruptionBehavior,
) -> Self
pub fn instance_interruption_behavior( self, input: InstanceInterruptionBehavior, ) -> Self
The behavior when a Spot Instance is interrupted.
Sourcepub fn set_instance_interruption_behavior(
self,
input: Option<InstanceInterruptionBehavior>,
) -> Self
pub fn set_instance_interruption_behavior( self, input: Option<InstanceInterruptionBehavior>, ) -> Self
The behavior when a Spot Instance is interrupted.
Sourcepub fn get_instance_interruption_behavior(
&self,
) -> &Option<InstanceInterruptionBehavior>
pub fn get_instance_interruption_behavior( &self, ) -> &Option<InstanceInterruptionBehavior>
The behavior when a Spot Instance is interrupted.
Sourcepub fn build(self) -> SpotInstanceRequest
pub fn build(self) -> SpotInstanceRequest
Consumes the builder and constructs a SpotInstanceRequest
.
Trait Implementations§
Source§impl Clone for SpotInstanceRequestBuilder
impl Clone for SpotInstanceRequestBuilder
Source§fn clone(&self) -> SpotInstanceRequestBuilder
fn clone(&self) -> SpotInstanceRequestBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SpotInstanceRequestBuilder
impl Debug for SpotInstanceRequestBuilder
Source§impl Default for SpotInstanceRequestBuilder
impl Default for SpotInstanceRequestBuilder
Source§fn default() -> SpotInstanceRequestBuilder
fn default() -> SpotInstanceRequestBuilder
impl StructuralPartialEq for SpotInstanceRequestBuilder
Auto Trait Implementations§
impl Freeze for SpotInstanceRequestBuilder
impl RefUnwindSafe for SpotInstanceRequestBuilder
impl Send for SpotInstanceRequestBuilder
impl Sync for SpotInstanceRequestBuilder
impl Unpin for SpotInstanceRequestBuilder
impl UnwindSafe for SpotInstanceRequestBuilder
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);