Struct aws_sdk_ec2::model::InstanceCapacity
source · #[non_exhaustive]pub struct InstanceCapacity { /* private fields */ }
Expand description
Information about the number of instances that can be launched onto the Dedicated Host.
Implementations§
source§impl InstanceCapacity
impl InstanceCapacity
sourcepub fn available_capacity(&self) -> Option<i32>
pub fn available_capacity(&self) -> Option<i32>
The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.
sourcepub fn instance_type(&self) -> Option<&str>
pub fn instance_type(&self) -> Option<&str>
The instance type supported by the Dedicated Host.
sourcepub fn total_capacity(&self) -> Option<i32>
pub fn total_capacity(&self) -> Option<i32>
The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.
source§impl InstanceCapacity
impl InstanceCapacity
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceCapacity
.
Examples found in repository?
src/xml_deser.rs (line 68746)
68742 68743 68744 68745 68746 68747 68748 68749 68750 68751 68752 68753 68754 68755 68756 68757 68758 68759 68760 68761 68762 68763 68764 68765 68766 68767 68768 68769 68770 68771 68772 68773 68774 68775 68776 68777 68778 68779 68780 68781 68782 68783 68784 68785 68786 68787 68788 68789 68790 68791 68792 68793 68794 68795 68796
pub fn deser_structure_crate_model_instance_capacity(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceCapacity, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceCapacity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availableCapacity") /* AvailableCapacity com.amazonaws.ec2#InstanceCapacity$AvailableCapacity */ => {
let var_3388 =
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_capacity(var_3388);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#InstanceCapacity$InstanceType */ => {
let var_3389 =
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_3389);
}
,
s if s.matches("totalCapacity") /* TotalCapacity com.amazonaws.ec2#InstanceCapacity$TotalCapacity */ => {
let var_3390 =
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_capacity(var_3390);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceCapacity
impl Clone for InstanceCapacity
source§fn clone(&self) -> InstanceCapacity
fn clone(&self) -> InstanceCapacity
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