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

Describes the instance type.

Implementations§

The instance type. For more information, see Instance types in the Amazon EC2 User Guide.

Indicates whether the instance type is current generation.

Indicates whether the instance type is eligible for the free tier.

Indicates whether the instance type is offered for spot or On-Demand.

The supported root device types.

The supported virtualization types.

Indicates whether the instance is a bare metal instance type.

The hypervisor for the instance type.

Describes the processor.

Describes the vCPU configurations for the instance type.

Describes the memory for the instance type.

Indicates whether instance storage is supported.

Describes the instance storage for the instance type.

Describes the Amazon EBS settings for the instance type.

Describes the network settings for the instance type.

Describes the GPU accelerator settings for the instance type.

Describes the FPGA accelerator settings for the instance type.

Describes the placement group settings for the instance type.

Describes the Inference accelerator settings for the instance type.

Indicates whether On-Demand hibernation is supported.

Indicates whether the instance type is a burstable performance instance type.

Indicates whether Dedicated Hosts are supported on the instance type.

Indicates whether auto recovery is supported.

The supported boot modes. For more information, see Boot modes in the Amazon EC2 User Guide.

Creates a new builder-style object to manufacture InstanceTypeInfo.

Examples found in repository?
src/xml_deser.rs (line 47287)
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
pub fn deser_structure_crate_model_instance_type_info(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceTypeInfo, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::InstanceTypeInfo::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#InstanceTypeInfo$InstanceType */ =>  {
                let var_2151 =
                    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_2151);
            }
            ,
            s if s.matches("currentGeneration") /* CurrentGeneration com.amazonaws.ec2#InstanceTypeInfo$CurrentGeneration */ =>  {
                let var_2152 =
                    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#CurrentGenerationFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_current_generation(var_2152);
            }
            ,
            s if s.matches("freeTierEligible") /* FreeTierEligible com.amazonaws.ec2#InstanceTypeInfo$FreeTierEligible */ =>  {
                let var_2153 =
                    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#FreeTierEligibleFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_free_tier_eligible(var_2153);
            }
            ,
            s if s.matches("supportedUsageClasses") /* SupportedUsageClasses com.amazonaws.ec2#InstanceTypeInfo$SupportedUsageClasses */ =>  {
                let var_2154 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_usage_class_type_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_supported_usage_classes(var_2154);
            }
            ,
            s if s.matches("supportedRootDeviceTypes") /* SupportedRootDeviceTypes com.amazonaws.ec2#InstanceTypeInfo$SupportedRootDeviceTypes */ =>  {
                let var_2155 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_root_device_type_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_supported_root_device_types(var_2155);
            }
            ,
            s if s.matches("supportedVirtualizationTypes") /* SupportedVirtualizationTypes com.amazonaws.ec2#InstanceTypeInfo$SupportedVirtualizationTypes */ =>  {
                let var_2156 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_virtualization_type_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_supported_virtualization_types(var_2156);
            }
            ,
            s if s.matches("bareMetal") /* BareMetal com.amazonaws.ec2#InstanceTypeInfo$BareMetal */ =>  {
                let var_2157 =
                    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#BareMetalFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_bare_metal(var_2157);
            }
            ,
            s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#InstanceTypeInfo$Hypervisor */ =>  {
                let var_2158 =
                    Some(
                        Result::<crate::model::InstanceTypeHypervisor, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::InstanceTypeHypervisor::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_hypervisor(var_2158);
            }
            ,
            s if s.matches("processorInfo") /* ProcessorInfo com.amazonaws.ec2#InstanceTypeInfo$ProcessorInfo */ =>  {
                let var_2159 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_processor_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_processor_info(var_2159);
            }
            ,
            s if s.matches("vCpuInfo") /* VCpuInfo com.amazonaws.ec2#InstanceTypeInfo$VCpuInfo */ =>  {
                let var_2160 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_v_cpu_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_v_cpu_info(var_2160);
            }
            ,
            s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#InstanceTypeInfo$MemoryInfo */ =>  {
                let var_2161 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_memory_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_memory_info(var_2161);
            }
            ,
            s if s.matches("instanceStorageSupported") /* InstanceStorageSupported com.amazonaws.ec2#InstanceTypeInfo$InstanceStorageSupported */ =>  {
                let var_2162 =
                    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#InstanceStorageFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_instance_storage_supported(var_2162);
            }
            ,
            s if s.matches("instanceStorageInfo") /* InstanceStorageInfo com.amazonaws.ec2#InstanceTypeInfo$InstanceStorageInfo */ =>  {
                let var_2163 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_instance_storage_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_instance_storage_info(var_2163);
            }
            ,
            s if s.matches("ebsInfo") /* EbsInfo com.amazonaws.ec2#InstanceTypeInfo$EbsInfo */ =>  {
                let var_2164 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_ebs_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_ebs_info(var_2164);
            }
            ,
            s if s.matches("networkInfo") /* NetworkInfo com.amazonaws.ec2#InstanceTypeInfo$NetworkInfo */ =>  {
                let var_2165 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_network_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_network_info(var_2165);
            }
            ,
            s if s.matches("gpuInfo") /* GpuInfo com.amazonaws.ec2#InstanceTypeInfo$GpuInfo */ =>  {
                let var_2166 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_gpu_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_gpu_info(var_2166);
            }
            ,
            s if s.matches("fpgaInfo") /* FpgaInfo com.amazonaws.ec2#InstanceTypeInfo$FpgaInfo */ =>  {
                let var_2167 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_fpga_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_fpga_info(var_2167);
            }
            ,
            s if s.matches("placementGroupInfo") /* PlacementGroupInfo com.amazonaws.ec2#InstanceTypeInfo$PlacementGroupInfo */ =>  {
                let var_2168 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_placement_group_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_placement_group_info(var_2168);
            }
            ,
            s if s.matches("inferenceAcceleratorInfo") /* InferenceAcceleratorInfo com.amazonaws.ec2#InstanceTypeInfo$InferenceAcceleratorInfo */ =>  {
                let var_2169 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_inference_accelerator_info(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_inference_accelerator_info(var_2169);
            }
            ,
            s if s.matches("hibernationSupported") /* HibernationSupported com.amazonaws.ec2#InstanceTypeInfo$HibernationSupported */ =>  {
                let var_2170 =
                    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#HibernationFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_hibernation_supported(var_2170);
            }
            ,
            s if s.matches("burstablePerformanceSupported") /* BurstablePerformanceSupported com.amazonaws.ec2#InstanceTypeInfo$BurstablePerformanceSupported */ =>  {
                let var_2171 =
                    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#BurstablePerformanceFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_burstable_performance_supported(var_2171);
            }
            ,
            s if s.matches("dedicatedHostsSupported") /* DedicatedHostsSupported com.amazonaws.ec2#InstanceTypeInfo$DedicatedHostsSupported */ =>  {
                let var_2172 =
                    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#DedicatedHostFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_dedicated_hosts_supported(var_2172);
            }
            ,
            s if s.matches("autoRecoverySupported") /* AutoRecoverySupported com.amazonaws.ec2#InstanceTypeInfo$AutoRecoverySupported */ =>  {
                let var_2173 =
                    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#AutoRecoveryFlag`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_auto_recovery_supported(var_2173);
            }
            ,
            s if s.matches("supportedBootModes") /* SupportedBootModes com.amazonaws.ec2#InstanceTypeInfo$SupportedBootModes */ =>  {
                let var_2174 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_boot_mode_type_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_supported_boot_modes(var_2174);
            }
            ,
            _ => {}
        }
    }
    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