Struct aws_sdk_ec2::model::Host

source ·
#[non_exhaustive]
pub struct Host { /* private fields */ }
Expand description

Describes the properties of the Dedicated Host.

Implementations§

Whether auto-placement is on or off.

The Availability Zone of the Dedicated Host.

Information about the instances running on the Dedicated Host.

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

The ID of the Dedicated Host.

The hardware specifications of the Dedicated Host.

The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

The IDs and instance type that are currently running on the Dedicated Host.

The Dedicated Host's state.

The time that the Dedicated Host was allocated.

The time that the Dedicated Host was released.

Any tags assigned to the Dedicated Host.

Indicates whether host recovery is enabled or disabled for the Dedicated Host.

Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is on, the Dedicated Host supports multiple instance types in the instance family. If the value is off, the Dedicated Host supports a single instance type only.

The ID of the Amazon Web Services account that owns the Dedicated Host.

The ID of the Availability Zone in which the Dedicated Host is allocated.

Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is true, the host is in a host resource group; otherwise, it is not.

The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.

Creates a new builder-style object to manufacture Host.

Examples found in repository?
src/xml_deser.rs (line 45852)
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903
45904
45905
45906
45907
45908
45909
45910
45911
45912
45913
45914
45915
45916
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
pub fn deser_structure_crate_model_host(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Host, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::Host::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("autoPlacement") /* AutoPlacement com.amazonaws.ec2#Host$AutoPlacement */ =>  {
                let var_2051 =
                    Some(
                        Result::<crate::model::AutoPlacement, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::AutoPlacement::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_auto_placement(var_2051);
            }
            ,
            s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Host$AvailabilityZone */ =>  {
                let var_2052 =
                    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_2052);
            }
            ,
            s if s.matches("availableCapacity") /* AvailableCapacity com.amazonaws.ec2#Host$AvailableCapacity */ =>  {
                let var_2053 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_available_capacity(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_available_capacity(var_2053);
            }
            ,
            s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#Host$ClientToken */ =>  {
                let var_2054 =
                    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_client_token(var_2054);
            }
            ,
            s if s.matches("hostId") /* HostId com.amazonaws.ec2#Host$HostId */ =>  {
                let var_2055 =
                    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_host_id(var_2055);
            }
            ,
            s if s.matches("hostProperties") /* HostProperties com.amazonaws.ec2#Host$HostProperties */ =>  {
                let var_2056 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_host_properties(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_host_properties(var_2056);
            }
            ,
            s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Host$HostReservationId */ =>  {
                let var_2057 =
                    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_host_reservation_id(var_2057);
            }
            ,
            s if s.matches("instances") /* Instances com.amazonaws.ec2#Host$Instances */ =>  {
                let var_2058 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_host_instance_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_instances(var_2058);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#Host$State */ =>  {
                let var_2059 =
                    Some(
                        Result::<crate::model::AllocationState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::AllocationState::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_2059);
            }
            ,
            s if s.matches("allocationTime") /* AllocationTime com.amazonaws.ec2#Host$AllocationTime */ =>  {
                let var_2060 =
                    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_allocation_time(var_2060);
            }
            ,
            s if s.matches("releaseTime") /* ReleaseTime com.amazonaws.ec2#Host$ReleaseTime */ =>  {
                let var_2061 =
                    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_release_time(var_2061);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Host$Tags */ =>  {
                let var_2062 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_2062);
            }
            ,
            s if s.matches("hostRecovery") /* HostRecovery com.amazonaws.ec2#Host$HostRecovery */ =>  {
                let var_2063 =
                    Some(
                        Result::<crate::model::HostRecovery, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::HostRecovery::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_host_recovery(var_2063);
            }
            ,
            s if s.matches("allowsMultipleInstanceTypes") /* AllowsMultipleInstanceTypes com.amazonaws.ec2#Host$AllowsMultipleInstanceTypes */ =>  {
                let var_2064 =
                    Some(
                        Result::<crate::model::AllowsMultipleInstanceTypes, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::AllowsMultipleInstanceTypes::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_allows_multiple_instance_types(var_2064);
            }
            ,
            s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Host$OwnerId */ =>  {
                let var_2065 =
                    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_owner_id(var_2065);
            }
            ,
            s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#Host$AvailabilityZoneId */ =>  {
                let var_2066 =
                    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_id(var_2066);
            }
            ,
            s if s.matches("memberOfServiceLinkedResourceGroup") /* MemberOfServiceLinkedResourceGroup com.amazonaws.ec2#Host$MemberOfServiceLinkedResourceGroup */ =>  {
                let var_2067 =
                    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_member_of_service_linked_resource_group(var_2067);
            }
            ,
            s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Host$OutpostArn */ =>  {
                let var_2068 =
                    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_outpost_arn(var_2068);
            }
            ,
            _ => {}
        }
    }
    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