Struct aws_sdk_ec2::model::InstanceUsage
source · #[non_exhaustive]pub struct InstanceUsage { /* private fields */ }
Expand description
Information about the Capacity Reservation usage.
Implementations§
source§impl InstanceUsage
impl InstanceUsage
sourcepub fn account_id(&self) -> Option<&str>
pub fn account_id(&self) -> Option<&str>
The ID of the Amazon Web Services account that is making use of the Capacity Reservation.
sourcepub fn used_instance_count(&self) -> Option<i32>
pub fn used_instance_count(&self) -> Option<i32>
The number of instances the Amazon Web Services account currently has in the Capacity Reservation.
source§impl InstanceUsage
impl InstanceUsage
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceUsage
.
Examples found in repository?
src/xml_deser.rs (line 52150)
52146 52147 52148 52149 52150 52151 52152 52153 52154 52155 52156 52157 52158 52159 52160 52161 52162 52163 52164 52165 52166 52167 52168 52169 52170 52171 52172 52173 52174 52175 52176 52177 52178 52179 52180 52181 52182 52183 52184 52185
pub fn deser_structure_crate_model_instance_usage(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceUsage, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceUsage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accountId") /* AccountId com.amazonaws.ec2#InstanceUsage$AccountId */ => {
let var_2485 =
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_account_id(var_2485);
}
,
s if s.matches("usedInstanceCount") /* UsedInstanceCount com.amazonaws.ec2#InstanceUsage$UsedInstanceCount */ => {
let var_2486 =
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_used_instance_count(var_2486);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceUsage
impl Clone for InstanceUsage
source§fn clone(&self) -> InstanceUsage
fn clone(&self) -> InstanceUsage
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