Struct aws_sdk_ec2::model::CapacityAllocation
source · #[non_exhaustive]pub struct CapacityAllocation { /* private fields */ }
Expand description
Information about instance capacity usage for a Capacity Reservation.
Implementations§
source§impl CapacityAllocation
impl CapacityAllocation
sourcepub fn allocation_type(&self) -> Option<&AllocationType>
pub fn allocation_type(&self) -> Option<&AllocationType>
The usage type. used
indicates that the instance capacity is in use by instances that are running in the Capacity Reservation.
source§impl CapacityAllocation
impl CapacityAllocation
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture CapacityAllocation
.
Examples found in repository?
src/xml_deser.rs (line 56642)
56638 56639 56640 56641 56642 56643 56644 56645 56646 56647 56648 56649 56650 56651 56652 56653 56654 56655 56656 56657 56658 56659 56660 56661 56662 56663 56664 56665 56666 56667 56668 56669 56670 56671 56672 56673 56674 56675 56676 56677 56678
pub fn deser_structure_crate_model_capacity_allocation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityAllocation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityAllocation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationType") /* AllocationType com.amazonaws.ec2#CapacityAllocation$AllocationType */ => {
let var_2751 =
Some(
Result::<crate::model::AllocationType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::AllocationType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_type(var_2751);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#CapacityAllocation$Count */ => {
let var_2752 =
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_count(var_2752);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for CapacityAllocation
impl Clone for CapacityAllocation
source§fn clone(&self) -> CapacityAllocation
fn clone(&self) -> CapacityAllocation
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