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

Describes a schedule that is available for your Scheduled Instances.

Implementations§

The Availability Zone.

The number of available instances.

The time period for the first schedule to start.

The hourly price for a single instance.

The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

The maximum term. The only possible value is 365 days.

The minimum term. The only possible value is 365 days.

The network platform (EC2-Classic or EC2-VPC).

The platform (Linux/UNIX or Windows).

The purchase token. This token expires in two hours.

The schedule recurrence.

The number of hours in the schedule.

The total number of hours for a single instance for the entire term.

Creates a new builder-style object to manufacture ScheduledInstanceAvailability.

Examples found in repository?
src/xml_deser.rs (line 48913)
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030
49031
49032
49033
49034
49035
49036
49037
49038
49039
49040
49041
49042
49043
49044
49045
49046
49047
49048
49049
49050
49051
49052
49053
49054
49055
49056
49057
49058
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
pub fn deser_structure_crate_model_scheduled_instance_availability(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstanceAvailability, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::ScheduledInstanceAvailability::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstanceAvailability$AvailabilityZone */ =>  {
                let var_2264 =
                    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_2264);
            }
            ,
            s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#ScheduledInstanceAvailability$AvailableInstanceCount */ =>  {
                let var_2265 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_available_instance_count(var_2265);
            }
            ,
            s if s.matches("firstSlotStartTime") /* FirstSlotStartTime com.amazonaws.ec2#ScheduledInstanceAvailability$FirstSlotStartTime */ =>  {
                let var_2266 =
                    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_first_slot_start_time(var_2266);
            }
            ,
            s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstanceAvailability$HourlyPrice */ =>  {
                let var_2267 =
                    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_hourly_price(var_2267);
            }
            ,
            s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstanceAvailability$InstanceType */ =>  {
                let var_2268 =
                    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_instance_type(var_2268);
            }
            ,
            s if s.matches("maxTermDurationInDays") /* MaxTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MaxTermDurationInDays */ =>  {
                let var_2269 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_max_term_duration_in_days(var_2269);
            }
            ,
            s if s.matches("minTermDurationInDays") /* MinTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MinTermDurationInDays */ =>  {
                let var_2270 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_min_term_duration_in_days(var_2270);
            }
            ,
            s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstanceAvailability$NetworkPlatform */ =>  {
                let var_2271 =
                    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_network_platform(var_2271);
            }
            ,
            s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstanceAvailability$Platform */ =>  {
                let var_2272 =
                    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_platform(var_2272);
            }
            ,
            s if s.matches("purchaseToken") /* PurchaseToken com.amazonaws.ec2#ScheduledInstanceAvailability$PurchaseToken */ =>  {
                let var_2273 =
                    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_purchase_token(var_2273);
            }
            ,
            s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstanceAvailability$Recurrence */ =>  {
                let var_2274 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_scheduled_instance_recurrence(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_recurrence(var_2274);
            }
            ,
            s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstanceAvailability$SlotDurationInHours */ =>  {
                let var_2275 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_slot_duration_in_hours(var_2275);
            }
            ,
            s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstanceAvailability$TotalScheduledInstanceHours */ =>  {
                let var_2276 =
                    Some(
                         {
                            <i32 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 (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_total_scheduled_instance_hours(var_2276);
            }
            ,
            _ => {}
        }
    }
    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