Struct aws_sdk_ec2::model::PriceSchedule
source · #[non_exhaustive]pub struct PriceSchedule { /* private fields */ }
Expand description
Describes the price for a Reserved Instance.
Implementations§
source§impl PriceSchedule
impl PriceSchedule
sourcepub fn active(&self) -> Option<bool>
pub fn active(&self) -> Option<bool>
The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.
A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.
sourcepub fn currency_code(&self) -> Option<&CurrencyCodeValues>
pub fn currency_code(&self) -> Option<&CurrencyCodeValues>
The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD
.
source§impl PriceSchedule
impl PriceSchedule
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture PriceSchedule
.
Examples found in repository?
64041 64042 64043 64044 64045 64046 64047 64048 64049 64050 64051 64052 64053 64054 64055 64056 64057 64058 64059 64060 64061 64062 64063 64064 64065 64066 64067 64068 64069 64070 64071 64072 64073 64074 64075 64076 64077 64078 64079 64080 64081 64082 64083 64084 64085 64086 64087 64088 64089 64090 64091 64092 64093 64094 64095 64096 64097 64098 64099 64100 64101 64102 64103 64104 64105 64106 64107 64108 64109 64110 64111
pub fn deser_structure_crate_model_price_schedule(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PriceSchedule, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PriceSchedule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("active") /* Active com.amazonaws.ec2#PriceSchedule$Active */ => {
let var_3149 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_active(var_3149);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#PriceSchedule$CurrencyCode */ => {
let var_3150 =
Some(
Result::<crate::model::CurrencyCodeValues, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CurrencyCodeValues::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_3150);
}
,
s if s.matches("price") /* Price com.amazonaws.ec2#PriceSchedule$Price */ => {
let var_3151 =
Some(
{
<f64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_price(var_3151);
}
,
s if s.matches("term") /* Term com.amazonaws.ec2#PriceSchedule$Term */ => {
let var_3152 =
Some(
{
<i64 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_term(var_3152);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for PriceSchedule
impl Clone for PriceSchedule
source§fn clone(&self) -> PriceSchedule
fn clone(&self) -> PriceSchedule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more