#[non_exhaustive]pub struct LaunchTemplateCapacityReservationSpecificationResponse { /* private fields */ }
Expand description
Information about the Capacity Reservation targeting option.
Implementations§
source§impl LaunchTemplateCapacityReservationSpecificationResponse
impl LaunchTemplateCapacityReservationSpecificationResponse
sourcepub fn capacity_reservation_preference(
&self
) -> Option<&CapacityReservationPreference>
pub fn capacity_reservation_preference(
&self
) -> Option<&CapacityReservationPreference>
Indicates the instance's Capacity Reservation preferences. Possible preferences include:
-
open
- The instance can run in anyopen
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.
sourcepub fn capacity_reservation_target(
&self
) -> Option<&CapacityReservationTargetResponse>
pub fn capacity_reservation_target(
&self
) -> Option<&CapacityReservationTargetResponse>
Information about the target Capacity Reservation or Capacity Reservation group.
source§impl LaunchTemplateCapacityReservationSpecificationResponse
impl LaunchTemplateCapacityReservationSpecificationResponse
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LaunchTemplateCapacityReservationSpecificationResponse
.
Examples found in repository?
src/xml_deser.rs (line 53014)
53006 53007 53008 53009 53010 53011 53012 53013 53014 53015 53016 53017 53018 53019 53020 53021 53022 53023 53024 53025 53026 53027 53028 53029 53030 53031 53032 53033 53034 53035 53036 53037 53038 53039 53040 53041 53042 53043 53044 53045
pub fn deser_structure_crate_model_launch_template_capacity_reservation_specification_response(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::LaunchTemplateCapacityReservationSpecificationResponse,
aws_smithy_xml::decode::XmlDecodeError,
> {
#[allow(unused_mut)]
let mut builder =
crate::model::LaunchTemplateCapacityReservationSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationPreference") /* CapacityReservationPreference com.amazonaws.ec2#LaunchTemplateCapacityReservationSpecificationResponse$CapacityReservationPreference */ => {
let var_2529 =
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_2529);
}
,
s if s.matches("capacityReservationTarget") /* CapacityReservationTarget com.amazonaws.ec2#LaunchTemplateCapacityReservationSpecificationResponse$CapacityReservationTarget */ => {
let var_2530 =
Some(
crate::xml_deser::deser_structure_crate_model_capacity_reservation_target_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_target(var_2530);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LaunchTemplateCapacityReservationSpecificationResponse
impl Clone for LaunchTemplateCapacityReservationSpecificationResponse
source§fn clone(&self) -> LaunchTemplateCapacityReservationSpecificationResponse
fn clone(&self) -> LaunchTemplateCapacityReservationSpecificationResponse
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