Struct aws_sdk_ec2::model::SpotPrice
source · #[non_exhaustive]pub struct SpotPrice { /* private fields */ }
Expand description
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.
Implementations§
source§impl SpotPrice
impl SpotPrice
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
sourcepub fn product_description(&self) -> Option<&RiProductDescription>
pub fn product_description(&self) -> Option<&RiProductDescription>
A general description of the AMI.
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.
source§impl SpotPrice
impl SpotPrice
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture SpotPrice
.
Examples found in repository?
50324 50325 50326 50327 50328 50329 50330 50331 50332 50333 50334 50335 50336 50337 50338 50339 50340 50341 50342 50343 50344 50345 50346 50347 50348 50349 50350 50351 50352 50353 50354 50355 50356 50357 50358 50359 50360 50361 50362 50363 50364 50365 50366 50367 50368 50369 50370 50371 50372 50373 50374 50375 50376 50377 50378 50379 50380 50381 50382 50383 50384 50385 50386 50387 50388 50389 50390 50391 50392 50393 50394 50395 50396 50397 50398 50399 50400 50401 50402 50403
pub fn deser_structure_crate_model_spot_price(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPrice, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPrice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPrice$AvailabilityZone */ => {
let var_2362 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2362);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#SpotPrice$InstanceType */ => {
let var_2363 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2363);
}
,
s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#SpotPrice$ProductDescription */ => {
let var_2364 =
Some(
Result::<crate::model::RiProductDescription, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::RiProductDescription::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_description(var_2364);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotPrice$SpotPrice */ => {
let var_2365 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_2365);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#SpotPrice$Timestamp */ => {
let var_2366 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_2366);
}
,
_ => {}
}
}
Ok(builder.build())
}