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

Describes a Spot Instance request.

Implementations§

Deprecated.

The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

Deprecated.

The date and time when the Spot Instance request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).

The fault codes for the Spot Instance request, if any.

The instance ID, if an instance has been launched to fulfill the Spot Instance request.

The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

Additional information for launching instances.

The Availability Zone in which the request is launched.

The product description associated with the Spot Instance.

The ID of the Spot Instance request.

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 state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances.

The status code and status message describing the Spot Instance request.

Any tags assigned to the resource.

The Spot Instance request type.

The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time.

The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ).

  • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.

  • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.

The behavior when a Spot Instance is interrupted.

Creates a new builder-style object to manufacture SpotInstanceRequest.

Examples found in repository?
src/xml_deser.rs (line 50071)
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317
50318
50319
50320
50321
50322
pub fn deser_structure_crate_model_spot_instance_request(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotInstanceRequest, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::SpotInstanceRequest::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("actualBlockHourlyPrice") /* ActualBlockHourlyPrice com.amazonaws.ec2#SpotInstanceRequest$ActualBlockHourlyPrice */ =>  {
                let var_2343 =
                    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_actual_block_hourly_price(var_2343);
            }
            ,
            s if s.matches("availabilityZoneGroup") /* AvailabilityZoneGroup com.amazonaws.ec2#SpotInstanceRequest$AvailabilityZoneGroup */ =>  {
                let var_2344 =
                    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_group(var_2344);
            }
            ,
            s if s.matches("blockDurationMinutes") /* BlockDurationMinutes com.amazonaws.ec2#SpotInstanceRequest$BlockDurationMinutes */ =>  {
                let var_2345 =
                    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_block_duration_minutes(var_2345);
            }
            ,
            s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#SpotInstanceRequest$CreateTime */ =>  {
                let var_2346 =
                    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#DateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_create_time(var_2346);
            }
            ,
            s if s.matches("fault") /* Fault com.amazonaws.ec2#SpotInstanceRequest$Fault */ =>  {
                let var_2347 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_spot_instance_state_fault(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_fault(var_2347);
            }
            ,
            s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#SpotInstanceRequest$InstanceId */ =>  {
                let var_2348 =
                    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_instance_id(var_2348);
            }
            ,
            s if s.matches("launchGroup") /* LaunchGroup com.amazonaws.ec2#SpotInstanceRequest$LaunchGroup */ =>  {
                let var_2349 =
                    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_launch_group(var_2349);
            }
            ,
            s if s.matches("launchSpecification") /* LaunchSpecification com.amazonaws.ec2#SpotInstanceRequest$LaunchSpecification */ =>  {
                let var_2350 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_launch_specification(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_launch_specification(var_2350);
            }
            ,
            s if s.matches("launchedAvailabilityZone") /* LaunchedAvailabilityZone com.amazonaws.ec2#SpotInstanceRequest$LaunchedAvailabilityZone */ =>  {
                let var_2351 =
                    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_launched_availability_zone(var_2351);
            }
            ,
            s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#SpotInstanceRequest$ProductDescription */ =>  {
                let var_2352 =
                    Some(
                        Result::<crate::model::RiProductDescription, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::RiProductDescription::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_product_description(var_2352);
            }
            ,
            s if s.matches("spotInstanceRequestId") /* SpotInstanceRequestId com.amazonaws.ec2#SpotInstanceRequest$SpotInstanceRequestId */ =>  {
                let var_2353 =
                    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_spot_instance_request_id(var_2353);
            }
            ,
            s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotInstanceRequest$SpotPrice */ =>  {
                let var_2354 =
                    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_spot_price(var_2354);
            }
            ,
            s if s.matches("state") /* State com.amazonaws.ec2#SpotInstanceRequest$State */ =>  {
                let var_2355 =
                    Some(
                        Result::<crate::model::SpotInstanceState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::SpotInstanceState::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_state(var_2355);
            }
            ,
            s if s.matches("status") /* Status com.amazonaws.ec2#SpotInstanceRequest$Status */ =>  {
                let var_2356 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_spot_instance_status(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_status(var_2356);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SpotInstanceRequest$Tags */ =>  {
                let var_2357 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_2357);
            }
            ,
            s if s.matches("type") /* Type com.amazonaws.ec2#SpotInstanceRequest$Type */ =>  {
                let var_2358 =
                    Some(
                        Result::<crate::model::SpotInstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::SpotInstanceType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_type(var_2358);
            }
            ,
            s if s.matches("validFrom") /* ValidFrom com.amazonaws.ec2#SpotInstanceRequest$ValidFrom */ =>  {
                let var_2359 =
                    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#DateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_valid_from(var_2359);
            }
            ,
            s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#SpotInstanceRequest$ValidUntil */ =>  {
                let var_2360 =
                    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#DateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_valid_until(var_2360);
            }
            ,
            s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#SpotInstanceRequest$InstanceInterruptionBehavior */ =>  {
                let var_2361 =
                    Some(
                        Result::<crate::model::InstanceInterruptionBehavior, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::InstanceInterruptionBehavior::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_instance_interruption_behavior(var_2361);
            }
            ,
            _ => {}
        }
    }
    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