Struct aws_sdk_ec2::model::Host
source · #[non_exhaustive]pub struct Host { /* private fields */ }
Expand description
Describes the properties of the Dedicated Host.
Implementations§
source§impl Host
impl Host
sourcepub fn auto_placement(&self) -> Option<&AutoPlacement>
pub fn auto_placement(&self) -> Option<&AutoPlacement>
Whether auto-placement is on or off.
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone of the Dedicated Host.
sourcepub fn available_capacity(&self) -> Option<&AvailableCapacity>
pub fn available_capacity(&self) -> Option<&AvailableCapacity>
Information about the instances running on the Dedicated Host.
sourcepub fn client_token(&self) -> Option<&str>
pub fn client_token(&self) -> Option<&str>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
sourcepub fn host_properties(&self) -> Option<&HostProperties>
pub fn host_properties(&self) -> Option<&HostProperties>
The hardware specifications of the Dedicated Host.
sourcepub fn host_reservation_id(&self) -> Option<&str>
pub fn host_reservation_id(&self) -> Option<&str>
The reservation ID of the Dedicated Host. This returns a null
response if the Dedicated Host doesn't have an associated reservation.
sourcepub fn instances(&self) -> Option<&[HostInstance]>
pub fn instances(&self) -> Option<&[HostInstance]>
The IDs and instance type that are currently running on the Dedicated Host.
sourcepub fn state(&self) -> Option<&AllocationState>
pub fn state(&self) -> Option<&AllocationState>
The Dedicated Host's state.
sourcepub fn allocation_time(&self) -> Option<&DateTime>
pub fn allocation_time(&self) -> Option<&DateTime>
The time that the Dedicated Host was allocated.
sourcepub fn release_time(&self) -> Option<&DateTime>
pub fn release_time(&self) -> Option<&DateTime>
The time that the Dedicated Host was released.
Any tags assigned to the Dedicated Host.
sourcepub fn host_recovery(&self) -> Option<&HostRecovery>
pub fn host_recovery(&self) -> Option<&HostRecovery>
Indicates whether host recovery is enabled or disabled for the Dedicated Host.
sourcepub fn allows_multiple_instance_types(
&self
) -> Option<&AllowsMultipleInstanceTypes>
pub fn allows_multiple_instance_types(
&self
) -> Option<&AllowsMultipleInstanceTypes>
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.
sourcepub fn owner_id(&self) -> Option<&str>
pub fn owner_id(&self) -> Option<&str>
The ID of the Amazon Web Services account that owns the Dedicated Host.
sourcepub fn availability_zone_id(&self) -> Option<&str>
pub fn availability_zone_id(&self) -> Option<&str>
The ID of the Availability Zone in which the Dedicated Host is allocated.
sourcepub fn member_of_service_linked_resource_group(&self) -> Option<bool>
pub fn member_of_service_linked_resource_group(&self) -> Option<bool>
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.
sourcepub fn outpost_arn(&self) -> Option<&str>
pub fn outpost_arn(&self) -> Option<&str>
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.
source§impl Host
impl Host
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture Host
.
Examples found in repository?
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())
}