#[non_exhaustive]
pub struct CapacityReservationSpecificationResponse { /* private fields */ }
Expand description

Describes the instance's Capacity Reservation targeting preferences. The action returns the capacityReservationPreference response element if the instance is configured to run in On-Demand capacity, or if it is configured in run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). The action returns the capacityReservationTarget response element if the instance explicily targets a specific Capacity Reservation or Capacity Reservation group.

Implementations§

Describes the instance's Capacity Reservation preferences. Possible preferences include:

  • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

  • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

Information about the targeted Capacity Reservation or Capacity Reservation group.

Creates a new builder-style object to manufacture CapacityReservationSpecificationResponse.

Examples found in repository?
src/xml_deser.rs (line 62990)
62983
62984
62985
62986
62987
62988
62989
62990
62991
62992
62993
62994
62995
62996
62997
62998
62999
63000
63001
63002
63003
63004
63005
63006
63007
63008
63009
63010
63011
63012
63013
63014
63015
63016
63017
63018
63019
63020
63021
pub fn deser_structure_crate_model_capacity_reservation_specification_response(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
    crate::model::CapacityReservationSpecificationResponse,
    aws_smithy_xml::decode::XmlDecodeError,
> {
    #[allow(unused_mut)]
    let mut builder = crate::model::CapacityReservationSpecificationResponse::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("capacityReservationPreference") /* CapacityReservationPreference com.amazonaws.ec2#CapacityReservationSpecificationResponse$CapacityReservationPreference */ =>  {
                let var_3068 =
                    Some(
                        Result::<crate::model::CapacityReservationPreference, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::CapacityReservationPreference::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_capacity_reservation_preference(var_3068);
            }
            ,
            s if s.matches("capacityReservationTarget") /* CapacityReservationTarget com.amazonaws.ec2#CapacityReservationSpecificationResponse$CapacityReservationTarget */ =>  {
                let var_3069 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_capacity_reservation_target_response(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_capacity_reservation_target(var_3069);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more