Struct rusoto_ec2::RequestSpotInstancesRequest
source · [−]pub struct RequestSpotInstancesRequest {Show 13 fields
pub availability_zone_group: Option<String>,
pub block_duration_minutes: Option<i64>,
pub client_token: Option<String>,
pub dry_run: Option<bool>,
pub instance_count: Option<i64>,
pub instance_interruption_behavior: Option<String>,
pub launch_group: Option<String>,
pub launch_specification: Option<RequestSpotLaunchSpecification>,
pub spot_price: Option<String>,
pub tag_specifications: Option<Vec<TagSpecification>>,
pub type_: Option<String>,
pub valid_from: Option<String>,
pub valid_until: Option<String>,
}
Expand description
Contains the parameters for RequestSpotInstances.
Fields
availability_zone_group: Option<String>
The user-specified name for a logical grouping of requests.
When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to requests for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.
If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the request is expired, or the maximum price you specified falls below current Spot price), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.
Default: Instances are launched in any available Availability Zone.
block_duration_minutes: Option<i64>
The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).
The duration period starts as soon as your Spot Instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot Instance for termination and provides a Spot Instance termination notice, which gives the instance a two-minute warning before it terminates.
You can't specify an Availability Zone group or a launch group if you specify a duration.
New accounts or accounts with no previous billing history with AWS are not eligible for Spot Instances with a defined duration (also known as Spot blocks).
client_token: Option<String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon EC2 User Guide for Linux Instances.
dry_run: Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
instance_count: Option<i64>
The maximum number of Spot Instances to launch.
Default: 1
instance_interruption_behavior: Option<String>
The behavior when a Spot Instance is interrupted. The default is terminate
.
launch_group: Option<String>
The instance launch group. Launch groups are Spot Instances that launch together and terminate together.
Default: Instances are launched and terminated individually
launch_specification: Option<RequestSpotLaunchSpecification>
The launch specification.
spot_price: Option<String>
The maximum price per hour that you are willing to pay for a Spot Instance. The default is the On-Demand price.
tag_specifications: Option<Vec<TagSpecification>>
The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType
must be spot-instances-request
, otherwise the Spot Instance request fails. To tag the Spot Instance request after it has been created, see CreateTags.
type_: Option<String>
The Spot Instance request type.
Default: one-time
valid_from: Option<String>
The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.
The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.
valid_until: Option<String>
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.
Trait Implementations
sourceimpl Clone for RequestSpotInstancesRequest
impl Clone for RequestSpotInstancesRequest
sourcefn clone(&self) -> RequestSpotInstancesRequest
fn clone(&self) -> RequestSpotInstancesRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RequestSpotInstancesRequest
impl Debug for RequestSpotInstancesRequest
sourceimpl Default for RequestSpotInstancesRequest
impl Default for RequestSpotInstancesRequest
sourcefn default() -> RequestSpotInstancesRequest
fn default() -> RequestSpotInstancesRequest
Returns the “default value” for a type. Read more
sourceimpl PartialEq<RequestSpotInstancesRequest> for RequestSpotInstancesRequest
impl PartialEq<RequestSpotInstancesRequest> for RequestSpotInstancesRequest
sourcefn eq(&self, other: &RequestSpotInstancesRequest) -> bool
fn eq(&self, other: &RequestSpotInstancesRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RequestSpotInstancesRequest) -> bool
fn ne(&self, other: &RequestSpotInstancesRequest) -> bool
This method tests for !=
.
impl StructuralPartialEq for RequestSpotInstancesRequest
Auto Trait Implementations
impl RefUnwindSafe for RequestSpotInstancesRequest
impl Send for RequestSpotInstancesRequest
impl Sync for RequestSpotInstancesRequest
impl Unpin for RequestSpotInstancesRequest
impl UnwindSafe for RequestSpotInstancesRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more