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

Information about a Capacity Reservation Fleet.

Implementations§

The ID of the Capacity Reservation Fleet.

The ARN of the Capacity Reservation Fleet.

The state of the Capacity Reservation Fleet. Possible states include:

  • submitted - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.

  • modifying - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.

  • active - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.

  • partially_fulfilled - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.

  • expiring - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.

  • expired - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.

  • cancelling - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.

  • cancelled - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.

  • failed - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.

The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see Total target capacity in the Amazon EC2 User Guide.

The capacity units that have been fulfilled.

The tenancy of the Capacity Reservation Fleet. Tenancies include:

  • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.

  • dedicated - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.

The date and time at which the Capacity Reservation Fleet expires.

The date and time at which the Capacity Reservation Fleet was created.

Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see Allocation strategy in the Amazon EC2 User Guide.

Information about the instance types for which to reserve the capacity.

The tags assigned to the Capacity Reservation Fleet.

Creates a new builder-style object to manufacture CapacityReservationFleet.

Examples found in repository?
src/xml_deser.rs (line 43214)
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
pub fn deser_structure_crate_model_capacity_reservation_fleet(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservationFleet, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::CapacityReservationFleet::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("capacityReservationFleetId") /* CapacityReservationFleetId com.amazonaws.ec2#CapacityReservationFleet$CapacityReservationFleetId */ =>  {
                let var_1864 =
                    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_fleet_id(var_1864);
            }
            ,
            s if s.matches("capacityReservationFleetArn") /* CapacityReservationFleetArn com.amazonaws.ec2#CapacityReservationFleet$CapacityReservationFleetArn */ =>  {
                let var_1865 =
                    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_fleet_arn(var_1865);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservationFleet$State */ =>  {
                let var_1866 =
                    Some(
                        Result::<crate::model::CapacityReservationFleetState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::CapacityReservationFleetState::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_1866);
            }
            ,
            s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#CapacityReservationFleet$TotalTargetCapacity */ =>  {
                let var_1867 =
                    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_target_capacity(var_1867);
            }
            ,
            s if s.matches("totalFulfilledCapacity") /* TotalFulfilledCapacity com.amazonaws.ec2#CapacityReservationFleet$TotalFulfilledCapacity */ =>  {
                let var_1868 =
                    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_total_fulfilled_capacity(var_1868);
            }
            ,
            s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservationFleet$Tenancy */ =>  {
                let var_1869 =
                    Some(
                        Result::<crate::model::FleetCapacityReservationTenancy, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::FleetCapacityReservationTenancy::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_tenancy(var_1869);
            }
            ,
            s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservationFleet$EndDate */ =>  {
                let var_1870 =
                    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_end_date(var_1870);
            }
            ,
            s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#CapacityReservationFleet$CreateTime */ =>  {
                let var_1871 =
                    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_time(var_1871);
            }
            ,
            s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservationFleet$InstanceMatchCriteria */ =>  {
                let var_1872 =
                    Some(
                        Result::<crate::model::FleetInstanceMatchCriteria, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::FleetInstanceMatchCriteria::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_instance_match_criteria(var_1872);
            }
            ,
            s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#CapacityReservationFleet$AllocationStrategy */ =>  {
                let var_1873 =
                    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_allocation_strategy(var_1873);
            }
            ,
            s if s.matches("instanceTypeSpecificationSet") /* InstanceTypeSpecifications com.amazonaws.ec2#CapacityReservationFleet$InstanceTypeSpecifications */ =>  {
                let var_1874 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_fleet_capacity_reservation_set(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_instance_type_specifications(var_1874);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservationFleet$Tags */ =>  {
                let var_1875 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_1875);
            }
            ,
            _ => {}
        }
    }
    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