Struct aws_sdk_ec2::model::FleetCapacityReservation
source · #[non_exhaustive]pub struct FleetCapacityReservation { /* private fields */ }
Expand description
Information about a Capacity Reservation in a Capacity Reservation Fleet.
Implementations§
source§impl FleetCapacityReservation
impl FleetCapacityReservation
sourcepub fn capacity_reservation_id(&self) -> Option<&str>
pub fn capacity_reservation_id(&self) -> Option<&str>
The ID of the Capacity Reservation.
sourcepub fn availability_zone_id(&self) -> Option<&str>
pub fn availability_zone_id(&self) -> Option<&str>
The ID of the Availability Zone in which the Capacity Reservation reserves capacity.
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type for which the Capacity Reservation reserves capacity.
sourcepub fn instance_platform(&self) -> Option<&CapacityReservationInstancePlatform>
pub fn instance_platform(&self) -> Option<&CapacityReservationInstancePlatform>
The type of operating system for which the Capacity Reservation reserves capacity.
sourcepub fn availability_zone(&self) -> Option<&str>
pub fn availability_zone(&self) -> Option<&str>
The Availability Zone in which the Capacity Reservation reserves capacity.
sourcepub fn total_instance_count(&self) -> Option<i32>
pub fn total_instance_count(&self) -> Option<i32>
The total number of instances for which the Capacity Reservation reserves capacity.
sourcepub fn fulfilled_capacity(&self) -> Option<f64>
pub fn fulfilled_capacity(&self) -> Option<f64>
The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.
sourcepub fn ebs_optimized(&self) -> Option<bool>
pub fn ebs_optimized(&self) -> Option<bool>
Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.
sourcepub fn create_date(&self) -> Option<&DateTime>
pub fn create_date(&self) -> Option<&DateTime>
The date and time at which the Capacity Reservation was created.
sourcepub fn weight(&self) -> Option<f64>
pub fn weight(&self) -> Option<f64>
The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.
sourcepub fn priority(&self) -> Option<i32>
pub fn priority(&self) -> Option<i32>
The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.
source§impl FleetCapacityReservation
impl FleetCapacityReservation
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture FleetCapacityReservation
.
Examples found in repository?
40136 40137 40138 40139 40140 40141 40142 40143 40144 40145 40146 40147 40148 40149 40150 40151 40152 40153 40154 40155 40156 40157 40158 40159 40160 40161 40162 40163 40164 40165 40166 40167 40168 40169 40170 40171 40172 40173 40174 40175 40176 40177 40178 40179 40180 40181 40182 40183 40184 40185 40186 40187 40188 40189 40190 40191 40192 40193 40194 40195 40196 40197 40198 40199 40200 40201 40202 40203 40204 40205 40206 40207 40208 40209 40210 40211 40212 40213 40214 40215 40216 40217 40218 40219 40220 40221 40222 40223 40224 40225 40226 40227 40228 40229 40230 40231 40232 40233 40234 40235 40236 40237 40238 40239 40240 40241 40242 40243 40244 40245 40246 40247 40248 40249 40250 40251 40252 40253 40254 40255 40256 40257 40258 40259 40260 40261 40262 40263 40264 40265 40266 40267 40268 40269 40270 40271 40272 40273 40274 40275 40276 40277 40278 40279 40280 40281 40282 40283 40284 40285 40286 40287 40288 40289 40290 40291 40292 40293 40294 40295 40296 40297 40298 40299 40300 40301 40302 40303
pub fn deser_structure_crate_model_fleet_capacity_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetCapacityReservation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetCapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#FleetCapacityReservation$CapacityReservationId */ => {
let var_1712 =
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_capacity_reservation_id(var_1712);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZoneId */ => {
let var_1713 =
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_availability_zone_id(var_1713);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetCapacityReservation$InstanceType */ => {
let var_1714 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1714);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#FleetCapacityReservation$InstancePlatform */ => {
let var_1715 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_1715);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetCapacityReservation$AvailabilityZone */ => {
let var_1716 =
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_availability_zone(var_1716);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#FleetCapacityReservation$TotalInstanceCount */ => {
let var_1717 =
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_instance_count(var_1717);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetCapacityReservation$FulfilledCapacity */ => {
let var_1718 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_fulfilled_capacity(var_1718);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#FleetCapacityReservation$EbsOptimized */ => {
let var_1719 =
Some(
{
<bool 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 (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1719);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#FleetCapacityReservation$CreateDate */ => {
let var_1720 =
Some(
aws_smithy_types::DateTime::from_str(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
, aws_smithy_types::date_time::Format::DateTime
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_date(var_1720);
}
,
s if s.matches("weight") /* Weight com.amazonaws.ec2#FleetCapacityReservation$Weight */ => {
let var_1721 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#DoubleWithConstraints`)"))
}
?
)
;
builder = builder.set_weight(var_1721);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetCapacityReservation$Priority */ => {
let var_1722 =
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#IntegerWithConstraints`)"))
}
?
)
;
builder = builder.set_priority(var_1722);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for FleetCapacityReservation
impl Clone for FleetCapacityReservation
source§fn clone(&self) -> FleetCapacityReservation
fn clone(&self) -> FleetCapacityReservation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more