Struct aws_sdk_ec2::model::HostProperties
source · #[non_exhaustive]pub struct HostProperties { /* private fields */ }
Expand description
Describes the properties of a Dedicated Host.
Implementations§
source§impl HostProperties
impl HostProperties
sourcepub fn instance_type(&self) -> Option<&str>
pub fn instance_type(&self) -> Option<&str>
The instance type supported by the Dedicated Host. For example, m5.large
. If the host supports multiple instance types, no instanceType is returned.
sourcepub fn instance_family(&self) -> Option<&str>
pub fn instance_family(&self) -> Option<&str>
The instance family supported by the Dedicated Host. For example, m5
.
sourcepub fn total_v_cpus(&self) -> Option<i32>
pub fn total_v_cpus(&self) -> Option<i32>
The total number of vCPUs on the Dedicated Host.
source§impl HostProperties
impl HostProperties
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture HostProperties
.
Examples found in repository?
src/xml_deser.rs (line 59128)
59124 59125 59126 59127 59128 59129 59130 59131 59132 59133 59134 59135 59136 59137 59138 59139 59140 59141 59142 59143 59144 59145 59146 59147 59148 59149 59150 59151 59152 59153 59154 59155 59156 59157 59158 59159 59160 59161 59162 59163 59164 59165 59166 59167 59168 59169 59170 59171 59172 59173 59174 59175 59176 59177 59178 59179 59180 59181 59182 59183 59184 59185 59186 59187 59188 59189 59190 59191 59192 59193 59194 59195 59196 59197 59198 59199 59200 59201 59202 59203 59204 59205 59206
pub fn deser_structure_crate_model_host_properties(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2880 =
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_cores(var_2880);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2881 =
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_2881);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2882 =
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_family(var_2882);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2883 =
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_sockets(var_2883);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2884 =
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_v_cpus(var_2884);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for HostProperties
impl Clone for HostProperties
source§fn clone(&self) -> HostProperties
fn clone(&self) -> HostProperties
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more