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

Describes overrides for a launch template.

Implementations§

The instance type.

If you specify InstanceType, you can't specify InstanceRequirements.

The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

The ID of the subnet in which to launch the instances.

The Availability Zone in which to launch the instances.

The number of units provided by the specified instance type.

The priority for the launch template override. The highest priority is launched first.

If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

If the Spot AllocationStrategy is set to capacity-optimized-prioritized, EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

Valid values are whole numbers starting at 0. The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

The location where the instance launched, if applicable.

The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

If you specify InstanceRequirements, you can't specify InstanceType.

The ID of the AMI. An AMI is required to launch an instance. The AMI ID must be specified here or in the launch template.

Creates a new builder-style object to manufacture FleetLaunchTemplateOverrides.

Examples found in repository?
src/xml_deser.rs (line 64189)
64185
64186
64187
64188
64189
64190
64191
64192
64193
64194
64195
64196
64197
64198
64199
64200
64201
64202
64203
64204
64205
64206
64207
64208
64209
64210
64211
64212
64213
64214
64215
64216
64217
64218
64219
64220
64221
64222
64223
64224
64225
64226
64227
64228
64229
64230
64231
64232
64233
64234
64235
64236
64237
64238
64239
64240
64241
64242
64243
64244
64245
64246
64247
64248
64249
64250
64251
64252
64253
64254
64255
64256
64257
64258
64259
64260
64261
64262
64263
64264
64265
64266
64267
64268
64269
64270
64271
64272
64273
64274
64275
64276
64277
64278
64279
64280
64281
64282
64283
64284
64285
64286
64287
64288
64289
64290
64291
64292
64293
64294
64295
64296
64297
64298
64299
64300
64301
64302
64303
64304
64305
64306
64307
64308
64309
64310
64311
64312
pub fn deser_structure_crate_model_fleet_launch_template_overrides(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetLaunchTemplateOverrides, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::FleetLaunchTemplateOverrides::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetLaunchTemplateOverrides$InstanceType */ =>  {
                let var_3156 =
                    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_3156);
            }
            ,
            s if s.matches("maxPrice") /* MaxPrice com.amazonaws.ec2#FleetLaunchTemplateOverrides$MaxPrice */ =>  {
                let var_3157 =
                    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_max_price(var_3157);
            }
            ,
            s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#FleetLaunchTemplateOverrides$SubnetId */ =>  {
                let var_3158 =
                    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_subnet_id(var_3158);
            }
            ,
            s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetLaunchTemplateOverrides$AvailabilityZone */ =>  {
                let var_3159 =
                    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_3159);
            }
            ,
            s if s.matches("weightedCapacity") /* WeightedCapacity com.amazonaws.ec2#FleetLaunchTemplateOverrides$WeightedCapacity */ =>  {
                let var_3160 =
                    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_weighted_capacity(var_3160);
            }
            ,
            s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetLaunchTemplateOverrides$Priority */ =>  {
                let var_3161 =
                    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_priority(var_3161);
            }
            ,
            s if s.matches("placement") /* Placement com.amazonaws.ec2#FleetLaunchTemplateOverrides$Placement */ =>  {
                let var_3162 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_placement_response(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_placement(var_3162);
            }
            ,
            s if s.matches("instanceRequirements") /* InstanceRequirements com.amazonaws.ec2#FleetLaunchTemplateOverrides$InstanceRequirements */ =>  {
                let var_3163 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_instance_requirements(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_instance_requirements(var_3163);
            }
            ,
            s if s.matches("imageId") /* ImageId com.amazonaws.ec2#FleetLaunchTemplateOverrides$ImageId */ =>  {
                let var_3164 =
                    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_image_id(var_3164);
            }
            ,
            _ => {}
        }
    }
    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