#[non_exhaustive]
pub struct ReservedInstancesOffering { /* private fields */ }
Expand description

Describes a Reserved Instance offering.

Implementations§

The Availability Zone in which the Reserved Instance can be used.

The duration of the Reserved Instance, in seconds.

The purchase price of the Reserved Instance.

The instance type on which the Reserved Instance can be used.

The Reserved Instance product platform description.

The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

The usage price of the Reserved Instance, per hour.

The currency of the Reserved Instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.

The tenancy of the instance.

Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is true.

If convertible it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If standard, it is not possible to perform an exchange.

The Reserved Instance offering type.

The pricing details of the Reserved Instance offering.

The recurring charge tag assigned to the resource.

Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.

Creates a new builder-style object to manufacture ReservedInstancesOffering.

Examples found in repository?
src/xml_deser.rs (line 48696)
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804
48805
48806
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
pub fn deser_structure_crate_model_reserved_instances_offering(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesOffering, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::ReservedInstancesOffering::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ReservedInstancesOffering$AvailabilityZone */ =>  {
                let var_2249 =
                    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_2249);
            }
            ,
            s if s.matches("duration") /* Duration com.amazonaws.ec2#ReservedInstancesOffering$Duration */ =>  {
                let var_2250 =
                    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_duration(var_2250);
            }
            ,
            s if s.matches("fixedPrice") /* FixedPrice com.amazonaws.ec2#ReservedInstancesOffering$FixedPrice */ =>  {
                let var_2251 =
                    Some(
                         {
                            <f32 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 (float: `com.amazonaws.ec2#Float`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_fixed_price(var_2251);
            }
            ,
            s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ReservedInstancesOffering$InstanceType */ =>  {
                let var_2252 =
                    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_2252);
            }
            ,
            s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#ReservedInstancesOffering$ProductDescription */ =>  {
                let var_2253 =
                    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_2253);
            }
            ,
            s if s.matches("reservedInstancesOfferingId") /* ReservedInstancesOfferingId com.amazonaws.ec2#ReservedInstancesOffering$ReservedInstancesOfferingId */ =>  {
                let var_2254 =
                    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_reserved_instances_offering_id(var_2254);
            }
            ,
            s if s.matches("usagePrice") /* UsagePrice com.amazonaws.ec2#ReservedInstancesOffering$UsagePrice */ =>  {
                let var_2255 =
                    Some(
                         {
                            <f32 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 (float: `com.amazonaws.ec2#Float`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_usage_price(var_2255);
            }
            ,
            s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#ReservedInstancesOffering$CurrencyCode */ =>  {
                let var_2256 =
                    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_2256);
            }
            ,
            s if s.matches("instanceTenancy") /* InstanceTenancy com.amazonaws.ec2#ReservedInstancesOffering$InstanceTenancy */ =>  {
                let var_2257 =
                    Some(
                        Result::<crate::model::Tenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::Tenancy::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_instance_tenancy(var_2257);
            }
            ,
            s if s.matches("marketplace") /* Marketplace com.amazonaws.ec2#ReservedInstancesOffering$Marketplace */ =>  {
                let var_2258 =
                    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_marketplace(var_2258);
            }
            ,
            s if s.matches("offeringClass") /* OfferingClass com.amazonaws.ec2#ReservedInstancesOffering$OfferingClass */ =>  {
                let var_2259 =
                    Some(
                        Result::<crate::model::OfferingClassType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::OfferingClassType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_offering_class(var_2259);
            }
            ,
            s if s.matches("offeringType") /* OfferingType com.amazonaws.ec2#ReservedInstancesOffering$OfferingType */ =>  {
                let var_2260 =
                    Some(
                        Result::<crate::model::OfferingTypeValues, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::OfferingTypeValues::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_offering_type(var_2260);
            }
            ,
            s if s.matches("pricingDetailsSet") /* PricingDetails com.amazonaws.ec2#ReservedInstancesOffering$PricingDetails */ =>  {
                let var_2261 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_pricing_details_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_pricing_details(var_2261);
            }
            ,
            s if s.matches("recurringCharges") /* RecurringCharges com.amazonaws.ec2#ReservedInstancesOffering$RecurringCharges */ =>  {
                let var_2262 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_recurring_charges_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_recurring_charges(var_2262);
            }
            ,
            s if s.matches("scope") /* Scope com.amazonaws.ec2#ReservedInstancesOffering$Scope */ =>  {
                let var_2263 =
                    Some(
                        Result::<crate::model::Scope, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::Scope::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_scope(var_2263);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more