Skip to main content

aws_sdk_ec2/types/
_instance_requirements.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.</p>
4/// <p>You must specify <code>VCpuCount</code> and <code>MemoryMiB</code>. All other attributes are optional. Any unspecified optional attribute is set to its default.</p>
5/// <p>When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.</p>
6/// <p>To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:</p>
7/// <ul>
8/// <li>
9/// <p><code>AllowedInstanceTypes</code> - The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes.</p></li>
10/// <li>
11/// <p><code>ExcludedInstanceTypes</code> - The instance types to exclude from the list, even if they match your specified attributes.</p></li>
12/// </ul><note>
13/// <p>If you specify <code>InstanceRequirements</code>, you can't specify <code>InstanceType</code>.</p>
14/// <p>Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance-wizard.html">launch instance wizard</a> or with the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html">RunInstances API</a>, you can't specify <code>InstanceRequirements</code>.</p>
15/// </note>
16/// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html">Create mixed instances group using attribute-based instance type selection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>, and also <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html">Specify attributes for instance type selection for EC2 Fleet or Spot Fleet</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html">Spot placement score</a> in the <i>Amazon EC2 User Guide</i>.</p>
17#[non_exhaustive]
18#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
19pub struct InstanceRequirements {
20    /// <p>The minimum and maximum number of vCPUs.</p>
21    pub v_cpu_count: ::std::option::Option<crate::types::VCpuCountRange>,
22    /// <p>The minimum and maximum amount of memory, in MiB.</p>
23    pub memory_mib: ::std::option::Option<crate::types::MemoryMiB>,
24    /// <p>The CPU manufacturers to include.</p>
25    /// <ul>
26    /// <li>
27    /// <p>For instance types with Intel CPUs, specify <code>intel</code>.</p></li>
28    /// <li>
29    /// <p>For instance types with AMD CPUs, specify <code>amd</code>.</p></li>
30    /// <li>
31    /// <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p></li>
32    /// <li>
33    /// <p>For instance types with Apple CPUs, specify <code>apple</code>.</p></li>
34    /// </ul><note>
35    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
36    /// </note>
37    /// <p>Default: Any manufacturer</p>
38    pub cpu_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>,
39    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
40    /// <p>Default: No minimum or maximum limits</p>
41    pub memory_gib_per_v_cpu: ::std::option::Option<crate::types::MemoryGiBPerVCpu>,
42    /// <p>The instance types to exclude.</p>
43    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
44    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p><note>
45    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
46    /// </note>
47    /// <p>Default: No excluded instance types</p>
48    pub excluded_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
49    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
50    /// <p>For current generation instance types, specify <code>current</code>.</p>
51    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
52    /// <p>Default: Current and previous generation instance types</p>
53    pub instance_generations: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>,
54    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.</p>
55    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
56    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
57    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
58    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
59    /// </note>
60    /// <p>Default: <code>100</code></p>
61    pub spot_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
62    /// <p>\[Price protection\] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
63    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
64    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
65    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
66    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
67    /// </note>
68    /// <p>Default: <code>20</code></p>
69    pub on_demand_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
70    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
71    /// <ul>
72    /// <li>
73    /// <p>To include bare metal instance types, specify <code>included</code>.</p></li>
74    /// <li>
75    /// <p>To require only bare metal instance types, specify <code>required</code>.</p></li>
76    /// <li>
77    /// <p>To exclude bare metal instance types, specify <code>excluded</code>.</p></li>
78    /// </ul>
79    /// <p>Default: <code>excluded</code></p>
80    pub bare_metal: ::std::option::Option<crate::types::BareMetal>,
81    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
82    /// <ul>
83    /// <li>
84    /// <p>To include burstable performance instance types, specify <code>included</code>.</p></li>
85    /// <li>
86    /// <p>To require only burstable performance instance types, specify <code>required</code>.</p></li>
87    /// <li>
88    /// <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p></li>
89    /// </ul>
90    /// <p>Default: <code>excluded</code></p>
91    pub burstable_performance: ::std::option::Option<crate::types::BurstablePerformance>,
92    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
93    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
94    /// <p>Default: <code>false</code></p>
95    pub require_hibernate_support: ::std::option::Option<bool>,
96    /// <p>The minimum and maximum number of network interfaces.</p>
97    /// <p>Default: No minimum or maximum limits</p>
98    pub network_interface_count: ::std::option::Option<crate::types::NetworkInterfaceCount>,
99    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
100    /// <ul>
101    /// <li>
102    /// <p>To include instance types with instance store volumes, specify <code>included</code>.</p></li>
103    /// <li>
104    /// <p>To require only instance types with instance store volumes, specify <code>required</code>.</p></li>
105    /// <li>
106    /// <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p></li>
107    /// </ul>
108    /// <p>Default: <code>included</code></p>
109    pub local_storage: ::std::option::Option<crate::types::LocalStorage>,
110    /// <p>The type of local storage that is required.</p>
111    /// <ul>
112    /// <li>
113    /// <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p></li>
114    /// <li>
115    /// <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p></li>
116    /// </ul>
117    /// <p>Default: <code>hdd</code> and <code>ssd</code></p>
118    pub local_storage_types: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>,
119    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
120    /// <p>Default: No minimum or maximum limits</p>
121    pub total_local_storage_gb: ::std::option::Option<crate::types::TotalLocalStorageGb>,
122    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
123    /// <p>Default: No minimum or maximum limits</p>
124    pub baseline_ebs_bandwidth_mbps: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>,
125    /// <p>The accelerator types that must be on the instance type.</p>
126    /// <ul>
127    /// <li>
128    /// <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p></li>
129    /// <li>
130    /// <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p></li>
131    /// <li>
132    /// <p>For instance types with Inference accelerators, specify <code>inference</code>.</p></li>
133    /// <li>
134    /// <p>For instance types with Media accelerators, specify <code>media</code>.</p></li>
135    /// </ul>
136    /// <p>Default: Any accelerator type</p>
137    pub accelerator_types: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>,
138    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
139    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
140    /// <p>Default: No minimum or maximum limits</p>
141    pub accelerator_count: ::std::option::Option<crate::types::AcceleratorCount>,
142    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
143    /// <ul>
144    /// <li>
145    /// <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p></li>
146    /// <li>
147    /// <p>For instance types with AMD devices, specify <code>amd</code>.</p></li>
148    /// <li>
149    /// <p>For instance types with Habana devices, specify <code>habana</code>.</p></li>
150    /// <li>
151    /// <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p></li>
152    /// <li>
153    /// <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p></li>
154    /// </ul>
155    /// <p>Default: Any manufacturer</p>
156    pub accelerator_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>,
157    /// <p>The accelerators that must be on the instance type.</p>
158    /// <ul>
159    /// <li>
160    /// <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p></li>
161    /// <li>
162    /// <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p></li>
163    /// <li>
164    /// <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p></li>
165    /// <li>
166    /// <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p></li>
167    /// <li>
168    /// <p>For instance types with Amazon Web Services Inferentia2 chips, specify <code>inferentia2</code>.</p></li>
169    /// <li>
170    /// <p>For instance types with Habana Gaudi HL-205 GPUs, specify <code>gaudi-hl-205</code>.</p></li>
171    /// <li>
172    /// <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p></li>
173    /// <li>
174    /// <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p></li>
175    /// <li>
176    /// <p>For instance types with NVIDIA L4 GPUs, specify <code>l4</code>.</p></li>
177    /// <li>
178    /// <p>For instance types with NVIDIA L40S GPUs, specify <code>l40s</code>.</p></li>
179    /// <li>
180    /// <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p></li>
181    /// <li>
182    /// <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p></li>
183    /// <li>
184    /// <p>For instance types with Amazon Web Services Trainium chips, specify <code>trainium</code>.</p></li>
185    /// <li>
186    /// <p>For instance types with Amazon Web Services Trainium2 chips, specify <code>trainium2</code>.</p></li>
187    /// <li>
188    /// <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p></li>
189    /// <li>
190    /// <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p></li>
191    /// <li>
192    /// <p>For instance types with Xilinx U30 cards, specify <code>u30</code>.</p></li>
193    /// <li>
194    /// <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p></li>
195    /// <li>
196    /// <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p></li>
197    /// </ul>
198    /// <p>Default: Any accelerator</p>
199    pub accelerator_names: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>,
200    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
201    /// <p>Default: No minimum or maximum limits</p>
202    pub accelerator_total_memory_mib: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>,
203    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
204    /// <p>Default: No minimum or maximum limits</p>
205    pub network_bandwidth_gbps: ::std::option::Option<crate::types::NetworkBandwidthGbps>,
206    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
207    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
208    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p><note>
209    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
210    /// </note>
211    /// <p>Default: All instance types</p>
212    pub allowed_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
213    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
214    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
215    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.</p><note>
216    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
217    /// </note>
218    pub max_spot_price_as_percentage_of_optimal_on_demand_price: ::std::option::Option<i32>,
219    /// <p>The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection">Performance protection</a> in the <i>Amazon EC2 User Guide</i>.</p>
220    pub baseline_performance_factors: ::std::option::Option<crate::types::BaselinePerformanceFactors>,
221    /// <p>Specifies whether instance types must support encrypting in-transit traffic between instances. For more information, including the supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data-protection.html#encryption-transit">Encryption in transit</a> in the <i>Amazon EC2 User Guide</i>.</p>
222    /// <p>Default: <code>false</code></p>
223    pub require_encryption_in_transit: ::std::option::Option<bool>,
224}
225impl InstanceRequirements {
226    /// <p>The minimum and maximum number of vCPUs.</p>
227    pub fn v_cpu_count(&self) -> ::std::option::Option<&crate::types::VCpuCountRange> {
228        self.v_cpu_count.as_ref()
229    }
230    /// <p>The minimum and maximum amount of memory, in MiB.</p>
231    pub fn memory_mib(&self) -> ::std::option::Option<&crate::types::MemoryMiB> {
232        self.memory_mib.as_ref()
233    }
234    /// <p>The CPU manufacturers to include.</p>
235    /// <ul>
236    /// <li>
237    /// <p>For instance types with Intel CPUs, specify <code>intel</code>.</p></li>
238    /// <li>
239    /// <p>For instance types with AMD CPUs, specify <code>amd</code>.</p></li>
240    /// <li>
241    /// <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p></li>
242    /// <li>
243    /// <p>For instance types with Apple CPUs, specify <code>apple</code>.</p></li>
244    /// </ul><note>
245    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
246    /// </note>
247    /// <p>Default: Any manufacturer</p>
248    ///
249    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.cpu_manufacturers.is_none()`.
250    pub fn cpu_manufacturers(&self) -> &[crate::types::CpuManufacturer] {
251        self.cpu_manufacturers.as_deref().unwrap_or_default()
252    }
253    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
254    /// <p>Default: No minimum or maximum limits</p>
255    pub fn memory_gib_per_v_cpu(&self) -> ::std::option::Option<&crate::types::MemoryGiBPerVCpu> {
256        self.memory_gib_per_v_cpu.as_ref()
257    }
258    /// <p>The instance types to exclude.</p>
259    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
260    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p><note>
261    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
262    /// </note>
263    /// <p>Default: No excluded instance types</p>
264    ///
265    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.excluded_instance_types.is_none()`.
266    pub fn excluded_instance_types(&self) -> &[::std::string::String] {
267        self.excluded_instance_types.as_deref().unwrap_or_default()
268    }
269    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
270    /// <p>For current generation instance types, specify <code>current</code>.</p>
271    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
272    /// <p>Default: Current and previous generation instance types</p>
273    ///
274    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.instance_generations.is_none()`.
275    pub fn instance_generations(&self) -> &[crate::types::InstanceGeneration] {
276        self.instance_generations.as_deref().unwrap_or_default()
277    }
278    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.</p>
279    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
280    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
281    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
282    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
283    /// </note>
284    /// <p>Default: <code>100</code></p>
285    pub fn spot_max_price_percentage_over_lowest_price(&self) -> ::std::option::Option<i32> {
286        self.spot_max_price_percentage_over_lowest_price
287    }
288    /// <p>\[Price protection\] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
289    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
290    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
291    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
292    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
293    /// </note>
294    /// <p>Default: <code>20</code></p>
295    pub fn on_demand_max_price_percentage_over_lowest_price(&self) -> ::std::option::Option<i32> {
296        self.on_demand_max_price_percentage_over_lowest_price
297    }
298    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
299    /// <ul>
300    /// <li>
301    /// <p>To include bare metal instance types, specify <code>included</code>.</p></li>
302    /// <li>
303    /// <p>To require only bare metal instance types, specify <code>required</code>.</p></li>
304    /// <li>
305    /// <p>To exclude bare metal instance types, specify <code>excluded</code>.</p></li>
306    /// </ul>
307    /// <p>Default: <code>excluded</code></p>
308    pub fn bare_metal(&self) -> ::std::option::Option<&crate::types::BareMetal> {
309        self.bare_metal.as_ref()
310    }
311    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
312    /// <ul>
313    /// <li>
314    /// <p>To include burstable performance instance types, specify <code>included</code>.</p></li>
315    /// <li>
316    /// <p>To require only burstable performance instance types, specify <code>required</code>.</p></li>
317    /// <li>
318    /// <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p></li>
319    /// </ul>
320    /// <p>Default: <code>excluded</code></p>
321    pub fn burstable_performance(&self) -> ::std::option::Option<&crate::types::BurstablePerformance> {
322        self.burstable_performance.as_ref()
323    }
324    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
325    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
326    /// <p>Default: <code>false</code></p>
327    pub fn require_hibernate_support(&self) -> ::std::option::Option<bool> {
328        self.require_hibernate_support
329    }
330    /// <p>The minimum and maximum number of network interfaces.</p>
331    /// <p>Default: No minimum or maximum limits</p>
332    pub fn network_interface_count(&self) -> ::std::option::Option<&crate::types::NetworkInterfaceCount> {
333        self.network_interface_count.as_ref()
334    }
335    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
336    /// <ul>
337    /// <li>
338    /// <p>To include instance types with instance store volumes, specify <code>included</code>.</p></li>
339    /// <li>
340    /// <p>To require only instance types with instance store volumes, specify <code>required</code>.</p></li>
341    /// <li>
342    /// <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p></li>
343    /// </ul>
344    /// <p>Default: <code>included</code></p>
345    pub fn local_storage(&self) -> ::std::option::Option<&crate::types::LocalStorage> {
346        self.local_storage.as_ref()
347    }
348    /// <p>The type of local storage that is required.</p>
349    /// <ul>
350    /// <li>
351    /// <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p></li>
352    /// <li>
353    /// <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p></li>
354    /// </ul>
355    /// <p>Default: <code>hdd</code> and <code>ssd</code></p>
356    ///
357    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.local_storage_types.is_none()`.
358    pub fn local_storage_types(&self) -> &[crate::types::LocalStorageType] {
359        self.local_storage_types.as_deref().unwrap_or_default()
360    }
361    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
362    /// <p>Default: No minimum or maximum limits</p>
363    pub fn total_local_storage_gb(&self) -> ::std::option::Option<&crate::types::TotalLocalStorageGb> {
364        self.total_local_storage_gb.as_ref()
365    }
366    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
367    /// <p>Default: No minimum or maximum limits</p>
368    pub fn baseline_ebs_bandwidth_mbps(&self) -> ::std::option::Option<&crate::types::BaselineEbsBandwidthMbps> {
369        self.baseline_ebs_bandwidth_mbps.as_ref()
370    }
371    /// <p>The accelerator types that must be on the instance type.</p>
372    /// <ul>
373    /// <li>
374    /// <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p></li>
375    /// <li>
376    /// <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p></li>
377    /// <li>
378    /// <p>For instance types with Inference accelerators, specify <code>inference</code>.</p></li>
379    /// <li>
380    /// <p>For instance types with Media accelerators, specify <code>media</code>.</p></li>
381    /// </ul>
382    /// <p>Default: Any accelerator type</p>
383    ///
384    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accelerator_types.is_none()`.
385    pub fn accelerator_types(&self) -> &[crate::types::AcceleratorType] {
386        self.accelerator_types.as_deref().unwrap_or_default()
387    }
388    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
389    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
390    /// <p>Default: No minimum or maximum limits</p>
391    pub fn accelerator_count(&self) -> ::std::option::Option<&crate::types::AcceleratorCount> {
392        self.accelerator_count.as_ref()
393    }
394    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
395    /// <ul>
396    /// <li>
397    /// <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p></li>
398    /// <li>
399    /// <p>For instance types with AMD devices, specify <code>amd</code>.</p></li>
400    /// <li>
401    /// <p>For instance types with Habana devices, specify <code>habana</code>.</p></li>
402    /// <li>
403    /// <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p></li>
404    /// <li>
405    /// <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p></li>
406    /// </ul>
407    /// <p>Default: Any manufacturer</p>
408    ///
409    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accelerator_manufacturers.is_none()`.
410    pub fn accelerator_manufacturers(&self) -> &[crate::types::AcceleratorManufacturer] {
411        self.accelerator_manufacturers.as_deref().unwrap_or_default()
412    }
413    /// <p>The accelerators that must be on the instance type.</p>
414    /// <ul>
415    /// <li>
416    /// <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p></li>
417    /// <li>
418    /// <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p></li>
419    /// <li>
420    /// <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p></li>
421    /// <li>
422    /// <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p></li>
423    /// <li>
424    /// <p>For instance types with Amazon Web Services Inferentia2 chips, specify <code>inferentia2</code>.</p></li>
425    /// <li>
426    /// <p>For instance types with Habana Gaudi HL-205 GPUs, specify <code>gaudi-hl-205</code>.</p></li>
427    /// <li>
428    /// <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p></li>
429    /// <li>
430    /// <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p></li>
431    /// <li>
432    /// <p>For instance types with NVIDIA L4 GPUs, specify <code>l4</code>.</p></li>
433    /// <li>
434    /// <p>For instance types with NVIDIA L40S GPUs, specify <code>l40s</code>.</p></li>
435    /// <li>
436    /// <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p></li>
437    /// <li>
438    /// <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p></li>
439    /// <li>
440    /// <p>For instance types with Amazon Web Services Trainium chips, specify <code>trainium</code>.</p></li>
441    /// <li>
442    /// <p>For instance types with Amazon Web Services Trainium2 chips, specify <code>trainium2</code>.</p></li>
443    /// <li>
444    /// <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p></li>
445    /// <li>
446    /// <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p></li>
447    /// <li>
448    /// <p>For instance types with Xilinx U30 cards, specify <code>u30</code>.</p></li>
449    /// <li>
450    /// <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p></li>
451    /// <li>
452    /// <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p></li>
453    /// </ul>
454    /// <p>Default: Any accelerator</p>
455    ///
456    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accelerator_names.is_none()`.
457    pub fn accelerator_names(&self) -> &[crate::types::AcceleratorName] {
458        self.accelerator_names.as_deref().unwrap_or_default()
459    }
460    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
461    /// <p>Default: No minimum or maximum limits</p>
462    pub fn accelerator_total_memory_mib(&self) -> ::std::option::Option<&crate::types::AcceleratorTotalMemoryMiB> {
463        self.accelerator_total_memory_mib.as_ref()
464    }
465    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
466    /// <p>Default: No minimum or maximum limits</p>
467    pub fn network_bandwidth_gbps(&self) -> ::std::option::Option<&crate::types::NetworkBandwidthGbps> {
468        self.network_bandwidth_gbps.as_ref()
469    }
470    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
471    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
472    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p><note>
473    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
474    /// </note>
475    /// <p>Default: All instance types</p>
476    ///
477    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allowed_instance_types.is_none()`.
478    pub fn allowed_instance_types(&self) -> &[::std::string::String] {
479        self.allowed_instance_types.as_deref().unwrap_or_default()
480    }
481    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
482    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
483    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.</p><note>
484    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
485    /// </note>
486    pub fn max_spot_price_as_percentage_of_optimal_on_demand_price(&self) -> ::std::option::Option<i32> {
487        self.max_spot_price_as_percentage_of_optimal_on_demand_price
488    }
489    /// <p>The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection">Performance protection</a> in the <i>Amazon EC2 User Guide</i>.</p>
490    pub fn baseline_performance_factors(&self) -> ::std::option::Option<&crate::types::BaselinePerformanceFactors> {
491        self.baseline_performance_factors.as_ref()
492    }
493    /// <p>Specifies whether instance types must support encrypting in-transit traffic between instances. For more information, including the supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data-protection.html#encryption-transit">Encryption in transit</a> in the <i>Amazon EC2 User Guide</i>.</p>
494    /// <p>Default: <code>false</code></p>
495    pub fn require_encryption_in_transit(&self) -> ::std::option::Option<bool> {
496        self.require_encryption_in_transit
497    }
498}
499impl InstanceRequirements {
500    /// Creates a new builder-style object to manufacture [`InstanceRequirements`](crate::types::InstanceRequirements).
501    pub fn builder() -> crate::types::builders::InstanceRequirementsBuilder {
502        crate::types::builders::InstanceRequirementsBuilder::default()
503    }
504}
505
506/// A builder for [`InstanceRequirements`](crate::types::InstanceRequirements).
507#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
508#[non_exhaustive]
509pub struct InstanceRequirementsBuilder {
510    pub(crate) v_cpu_count: ::std::option::Option<crate::types::VCpuCountRange>,
511    pub(crate) memory_mib: ::std::option::Option<crate::types::MemoryMiB>,
512    pub(crate) cpu_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>,
513    pub(crate) memory_gib_per_v_cpu: ::std::option::Option<crate::types::MemoryGiBPerVCpu>,
514    pub(crate) excluded_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
515    pub(crate) instance_generations: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>,
516    pub(crate) spot_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
517    pub(crate) on_demand_max_price_percentage_over_lowest_price: ::std::option::Option<i32>,
518    pub(crate) bare_metal: ::std::option::Option<crate::types::BareMetal>,
519    pub(crate) burstable_performance: ::std::option::Option<crate::types::BurstablePerformance>,
520    pub(crate) require_hibernate_support: ::std::option::Option<bool>,
521    pub(crate) network_interface_count: ::std::option::Option<crate::types::NetworkInterfaceCount>,
522    pub(crate) local_storage: ::std::option::Option<crate::types::LocalStorage>,
523    pub(crate) local_storage_types: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>,
524    pub(crate) total_local_storage_gb: ::std::option::Option<crate::types::TotalLocalStorageGb>,
525    pub(crate) baseline_ebs_bandwidth_mbps: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>,
526    pub(crate) accelerator_types: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>,
527    pub(crate) accelerator_count: ::std::option::Option<crate::types::AcceleratorCount>,
528    pub(crate) accelerator_manufacturers: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>,
529    pub(crate) accelerator_names: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>,
530    pub(crate) accelerator_total_memory_mib: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>,
531    pub(crate) network_bandwidth_gbps: ::std::option::Option<crate::types::NetworkBandwidthGbps>,
532    pub(crate) allowed_instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
533    pub(crate) max_spot_price_as_percentage_of_optimal_on_demand_price: ::std::option::Option<i32>,
534    pub(crate) baseline_performance_factors: ::std::option::Option<crate::types::BaselinePerformanceFactors>,
535    pub(crate) require_encryption_in_transit: ::std::option::Option<bool>,
536}
537impl InstanceRequirementsBuilder {
538    /// <p>The minimum and maximum number of vCPUs.</p>
539    pub fn v_cpu_count(mut self, input: crate::types::VCpuCountRange) -> Self {
540        self.v_cpu_count = ::std::option::Option::Some(input);
541        self
542    }
543    /// <p>The minimum and maximum number of vCPUs.</p>
544    pub fn set_v_cpu_count(mut self, input: ::std::option::Option<crate::types::VCpuCountRange>) -> Self {
545        self.v_cpu_count = input;
546        self
547    }
548    /// <p>The minimum and maximum number of vCPUs.</p>
549    pub fn get_v_cpu_count(&self) -> &::std::option::Option<crate::types::VCpuCountRange> {
550        &self.v_cpu_count
551    }
552    /// <p>The minimum and maximum amount of memory, in MiB.</p>
553    pub fn memory_mib(mut self, input: crate::types::MemoryMiB) -> Self {
554        self.memory_mib = ::std::option::Option::Some(input);
555        self
556    }
557    /// <p>The minimum and maximum amount of memory, in MiB.</p>
558    pub fn set_memory_mib(mut self, input: ::std::option::Option<crate::types::MemoryMiB>) -> Self {
559        self.memory_mib = input;
560        self
561    }
562    /// <p>The minimum and maximum amount of memory, in MiB.</p>
563    pub fn get_memory_mib(&self) -> &::std::option::Option<crate::types::MemoryMiB> {
564        &self.memory_mib
565    }
566    /// Appends an item to `cpu_manufacturers`.
567    ///
568    /// To override the contents of this collection use [`set_cpu_manufacturers`](Self::set_cpu_manufacturers).
569    ///
570    /// <p>The CPU manufacturers to include.</p>
571    /// <ul>
572    /// <li>
573    /// <p>For instance types with Intel CPUs, specify <code>intel</code>.</p></li>
574    /// <li>
575    /// <p>For instance types with AMD CPUs, specify <code>amd</code>.</p></li>
576    /// <li>
577    /// <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p></li>
578    /// <li>
579    /// <p>For instance types with Apple CPUs, specify <code>apple</code>.</p></li>
580    /// </ul><note>
581    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
582    /// </note>
583    /// <p>Default: Any manufacturer</p>
584    pub fn cpu_manufacturers(mut self, input: crate::types::CpuManufacturer) -> Self {
585        let mut v = self.cpu_manufacturers.unwrap_or_default();
586        v.push(input);
587        self.cpu_manufacturers = ::std::option::Option::Some(v);
588        self
589    }
590    /// <p>The CPU manufacturers to include.</p>
591    /// <ul>
592    /// <li>
593    /// <p>For instance types with Intel CPUs, specify <code>intel</code>.</p></li>
594    /// <li>
595    /// <p>For instance types with AMD CPUs, specify <code>amd</code>.</p></li>
596    /// <li>
597    /// <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p></li>
598    /// <li>
599    /// <p>For instance types with Apple CPUs, specify <code>apple</code>.</p></li>
600    /// </ul><note>
601    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
602    /// </note>
603    /// <p>Default: Any manufacturer</p>
604    pub fn set_cpu_manufacturers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>>) -> Self {
605        self.cpu_manufacturers = input;
606        self
607    }
608    /// <p>The CPU manufacturers to include.</p>
609    /// <ul>
610    /// <li>
611    /// <p>For instance types with Intel CPUs, specify <code>intel</code>.</p></li>
612    /// <li>
613    /// <p>For instance types with AMD CPUs, specify <code>amd</code>.</p></li>
614    /// <li>
615    /// <p>For instance types with Amazon Web Services CPUs, specify <code>amazon-web-services</code>.</p></li>
616    /// <li>
617    /// <p>For instance types with Apple CPUs, specify <code>apple</code>.</p></li>
618    /// </ul><note>
619    /// <p>Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.</p>
620    /// </note>
621    /// <p>Default: Any manufacturer</p>
622    pub fn get_cpu_manufacturers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CpuManufacturer>> {
623        &self.cpu_manufacturers
624    }
625    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
626    /// <p>Default: No minimum or maximum limits</p>
627    pub fn memory_gib_per_v_cpu(mut self, input: crate::types::MemoryGiBPerVCpu) -> Self {
628        self.memory_gib_per_v_cpu = ::std::option::Option::Some(input);
629        self
630    }
631    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
632    /// <p>Default: No minimum or maximum limits</p>
633    pub fn set_memory_gib_per_v_cpu(mut self, input: ::std::option::Option<crate::types::MemoryGiBPerVCpu>) -> Self {
634        self.memory_gib_per_v_cpu = input;
635        self
636    }
637    /// <p>The minimum and maximum amount of memory per vCPU, in GiB.</p>
638    /// <p>Default: No minimum or maximum limits</p>
639    pub fn get_memory_gib_per_v_cpu(&self) -> &::std::option::Option<crate::types::MemoryGiBPerVCpu> {
640        &self.memory_gib_per_v_cpu
641    }
642    /// Appends an item to `excluded_instance_types`.
643    ///
644    /// To override the contents of this collection use [`set_excluded_instance_types`](Self::set_excluded_instance_types).
645    ///
646    /// <p>The instance types to exclude.</p>
647    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
648    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p><note>
649    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
650    /// </note>
651    /// <p>Default: No excluded instance types</p>
652    pub fn excluded_instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
653        let mut v = self.excluded_instance_types.unwrap_or_default();
654        v.push(input.into());
655        self.excluded_instance_types = ::std::option::Option::Some(v);
656        self
657    }
658    /// <p>The instance types to exclude.</p>
659    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
660    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p><note>
661    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
662    /// </note>
663    /// <p>Default: No excluded instance types</p>
664    pub fn set_excluded_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
665        self.excluded_instance_types = input;
666        self
667    }
668    /// <p>The instance types to exclude.</p>
669    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to exclude an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
670    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.</p><note>
671    /// <p>If you specify <code>ExcludedInstanceTypes</code>, you can't specify <code>AllowedInstanceTypes</code>.</p>
672    /// </note>
673    /// <p>Default: No excluded instance types</p>
674    pub fn get_excluded_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
675        &self.excluded_instance_types
676    }
677    /// Appends an item to `instance_generations`.
678    ///
679    /// To override the contents of this collection use [`set_instance_generations`](Self::set_instance_generations).
680    ///
681    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
682    /// <p>For current generation instance types, specify <code>current</code>.</p>
683    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
684    /// <p>Default: Current and previous generation instance types</p>
685    pub fn instance_generations(mut self, input: crate::types::InstanceGeneration) -> Self {
686        let mut v = self.instance_generations.unwrap_or_default();
687        v.push(input);
688        self.instance_generations = ::std::option::Option::Some(v);
689        self
690    }
691    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
692    /// <p>For current generation instance types, specify <code>current</code>.</p>
693    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
694    /// <p>Default: Current and previous generation instance types</p>
695    pub fn set_instance_generations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>>) -> Self {
696        self.instance_generations = input;
697        self
698    }
699    /// <p>Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
700    /// <p>For current generation instance types, specify <code>current</code>.</p>
701    /// <p>For previous generation instance types, specify <code>previous</code>.</p>
702    /// <p>Default: Current and previous generation instance types</p>
703    pub fn get_instance_generations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceGeneration>> {
704        &self.instance_generations
705    }
706    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.</p>
707    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
708    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
709    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
710    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
711    /// </note>
712    /// <p>Default: <code>100</code></p>
713    pub fn spot_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
714        self.spot_max_price_percentage_over_lowest_price = ::std::option::Option::Some(input);
715        self
716    }
717    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.</p>
718    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
719    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
720    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
721    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
722    /// </note>
723    /// <p>Default: <code>100</code></p>
724    pub fn set_spot_max_price_percentage_over_lowest_price(mut self, input: ::std::option::Option<i32>) -> Self {
725        self.spot_max_price_percentage_over_lowest_price = input;
726        self
727    }
728    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage higher than an identified Spot price. The identified Spot price is the Spot price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified Spot price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose Spot price exceeds your specified threshold.</p>
729    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
730    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
731    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
732    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
733    /// </note>
734    /// <p>Default: <code>100</code></p>
735    pub fn get_spot_max_price_percentage_over_lowest_price(&self) -> &::std::option::Option<i32> {
736        &self.spot_max_price_percentage_over_lowest_price
737    }
738    /// <p>\[Price protection\] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
739    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
740    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
741    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
742    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
743    /// </note>
744    /// <p>Default: <code>20</code></p>
745    pub fn on_demand_max_price_percentage_over_lowest_price(mut self, input: i32) -> Self {
746        self.on_demand_max_price_percentage_over_lowest_price = ::std::option::Option::Some(input);
747        self
748    }
749    /// <p>\[Price protection\] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
750    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
751    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
752    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
753    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
754    /// </note>
755    /// <p>Default: <code>20</code></p>
756    pub fn set_on_demand_max_price_percentage_over_lowest_price(mut self, input: ::std::option::Option<i32>) -> Self {
757        self.on_demand_max_price_percentage_over_lowest_price = input;
758        self
759    }
760    /// <p>\[Price protection\] The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
761    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
762    /// <p>To turn off price protection, specify a high value, such as <code>999999</code>.</p>
763    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a> and <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html">GetInstanceTypesFromInstanceRequirements</a>.</p><note>
764    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.</p>
765    /// </note>
766    /// <p>Default: <code>20</code></p>
767    pub fn get_on_demand_max_price_percentage_over_lowest_price(&self) -> &::std::option::Option<i32> {
768        &self.on_demand_max_price_percentage_over_lowest_price
769    }
770    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
771    /// <ul>
772    /// <li>
773    /// <p>To include bare metal instance types, specify <code>included</code>.</p></li>
774    /// <li>
775    /// <p>To require only bare metal instance types, specify <code>required</code>.</p></li>
776    /// <li>
777    /// <p>To exclude bare metal instance types, specify <code>excluded</code>.</p></li>
778    /// </ul>
779    /// <p>Default: <code>excluded</code></p>
780    pub fn bare_metal(mut self, input: crate::types::BareMetal) -> Self {
781        self.bare_metal = ::std::option::Option::Some(input);
782        self
783    }
784    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
785    /// <ul>
786    /// <li>
787    /// <p>To include bare metal instance types, specify <code>included</code>.</p></li>
788    /// <li>
789    /// <p>To require only bare metal instance types, specify <code>required</code>.</p></li>
790    /// <li>
791    /// <p>To exclude bare metal instance types, specify <code>excluded</code>.</p></li>
792    /// </ul>
793    /// <p>Default: <code>excluded</code></p>
794    pub fn set_bare_metal(mut self, input: ::std::option::Option<crate::types::BareMetal>) -> Self {
795        self.bare_metal = input;
796        self
797    }
798    /// <p>Indicates whether bare metal instance types must be included, excluded, or required.</p>
799    /// <ul>
800    /// <li>
801    /// <p>To include bare metal instance types, specify <code>included</code>.</p></li>
802    /// <li>
803    /// <p>To require only bare metal instance types, specify <code>required</code>.</p></li>
804    /// <li>
805    /// <p>To exclude bare metal instance types, specify <code>excluded</code>.</p></li>
806    /// </ul>
807    /// <p>Default: <code>excluded</code></p>
808    pub fn get_bare_metal(&self) -> &::std::option::Option<crate::types::BareMetal> {
809        &self.bare_metal
810    }
811    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
812    /// <ul>
813    /// <li>
814    /// <p>To include burstable performance instance types, specify <code>included</code>.</p></li>
815    /// <li>
816    /// <p>To require only burstable performance instance types, specify <code>required</code>.</p></li>
817    /// <li>
818    /// <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p></li>
819    /// </ul>
820    /// <p>Default: <code>excluded</code></p>
821    pub fn burstable_performance(mut self, input: crate::types::BurstablePerformance) -> Self {
822        self.burstable_performance = ::std::option::Option::Some(input);
823        self
824    }
825    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
826    /// <ul>
827    /// <li>
828    /// <p>To include burstable performance instance types, specify <code>included</code>.</p></li>
829    /// <li>
830    /// <p>To require only burstable performance instance types, specify <code>required</code>.</p></li>
831    /// <li>
832    /// <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p></li>
833    /// </ul>
834    /// <p>Default: <code>excluded</code></p>
835    pub fn set_burstable_performance(mut self, input: ::std::option::Option<crate::types::BurstablePerformance>) -> Self {
836        self.burstable_performance = input;
837        self
838    }
839    /// <p>Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html">Burstable performance instances</a>.</p>
840    /// <ul>
841    /// <li>
842    /// <p>To include burstable performance instance types, specify <code>included</code>.</p></li>
843    /// <li>
844    /// <p>To require only burstable performance instance types, specify <code>required</code>.</p></li>
845    /// <li>
846    /// <p>To exclude burstable performance instance types, specify <code>excluded</code>.</p></li>
847    /// </ul>
848    /// <p>Default: <code>excluded</code></p>
849    pub fn get_burstable_performance(&self) -> &::std::option::Option<crate::types::BurstablePerformance> {
850        &self.burstable_performance
851    }
852    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
853    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
854    /// <p>Default: <code>false</code></p>
855    pub fn require_hibernate_support(mut self, input: bool) -> Self {
856        self.require_hibernate_support = ::std::option::Option::Some(input);
857        self
858    }
859    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
860    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
861    /// <p>Default: <code>false</code></p>
862    pub fn set_require_hibernate_support(mut self, input: ::std::option::Option<bool>) -> Self {
863        self.require_hibernate_support = input;
864        self
865    }
866    /// <p>Indicates whether instance types must support hibernation for On-Demand Instances.</p>
867    /// <p>This parameter is not supported for <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html">GetSpotPlacementScores</a>.</p>
868    /// <p>Default: <code>false</code></p>
869    pub fn get_require_hibernate_support(&self) -> &::std::option::Option<bool> {
870        &self.require_hibernate_support
871    }
872    /// <p>The minimum and maximum number of network interfaces.</p>
873    /// <p>Default: No minimum or maximum limits</p>
874    pub fn network_interface_count(mut self, input: crate::types::NetworkInterfaceCount) -> Self {
875        self.network_interface_count = ::std::option::Option::Some(input);
876        self
877    }
878    /// <p>The minimum and maximum number of network interfaces.</p>
879    /// <p>Default: No minimum or maximum limits</p>
880    pub fn set_network_interface_count(mut self, input: ::std::option::Option<crate::types::NetworkInterfaceCount>) -> Self {
881        self.network_interface_count = input;
882        self
883    }
884    /// <p>The minimum and maximum number of network interfaces.</p>
885    /// <p>Default: No minimum or maximum limits</p>
886    pub fn get_network_interface_count(&self) -> &::std::option::Option<crate::types::NetworkInterfaceCount> {
887        &self.network_interface_count
888    }
889    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
890    /// <ul>
891    /// <li>
892    /// <p>To include instance types with instance store volumes, specify <code>included</code>.</p></li>
893    /// <li>
894    /// <p>To require only instance types with instance store volumes, specify <code>required</code>.</p></li>
895    /// <li>
896    /// <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p></li>
897    /// </ul>
898    /// <p>Default: <code>included</code></p>
899    pub fn local_storage(mut self, input: crate::types::LocalStorage) -> Self {
900        self.local_storage = ::std::option::Option::Some(input);
901        self
902    }
903    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
904    /// <ul>
905    /// <li>
906    /// <p>To include instance types with instance store volumes, specify <code>included</code>.</p></li>
907    /// <li>
908    /// <p>To require only instance types with instance store volumes, specify <code>required</code>.</p></li>
909    /// <li>
910    /// <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p></li>
911    /// </ul>
912    /// <p>Default: <code>included</code></p>
913    pub fn set_local_storage(mut self, input: ::std::option::Option<crate::types::LocalStorage>) -> Self {
914        self.local_storage = input;
915        self
916    }
917    /// <p>Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html">Amazon EC2 instance store</a> in the <i>Amazon EC2 User Guide</i>.</p>
918    /// <ul>
919    /// <li>
920    /// <p>To include instance types with instance store volumes, specify <code>included</code>.</p></li>
921    /// <li>
922    /// <p>To require only instance types with instance store volumes, specify <code>required</code>.</p></li>
923    /// <li>
924    /// <p>To exclude instance types with instance store volumes, specify <code>excluded</code>.</p></li>
925    /// </ul>
926    /// <p>Default: <code>included</code></p>
927    pub fn get_local_storage(&self) -> &::std::option::Option<crate::types::LocalStorage> {
928        &self.local_storage
929    }
930    /// Appends an item to `local_storage_types`.
931    ///
932    /// To override the contents of this collection use [`set_local_storage_types`](Self::set_local_storage_types).
933    ///
934    /// <p>The type of local storage that is required.</p>
935    /// <ul>
936    /// <li>
937    /// <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p></li>
938    /// <li>
939    /// <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p></li>
940    /// </ul>
941    /// <p>Default: <code>hdd</code> and <code>ssd</code></p>
942    pub fn local_storage_types(mut self, input: crate::types::LocalStorageType) -> Self {
943        let mut v = self.local_storage_types.unwrap_or_default();
944        v.push(input);
945        self.local_storage_types = ::std::option::Option::Some(v);
946        self
947    }
948    /// <p>The type of local storage that is required.</p>
949    /// <ul>
950    /// <li>
951    /// <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p></li>
952    /// <li>
953    /// <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p></li>
954    /// </ul>
955    /// <p>Default: <code>hdd</code> and <code>ssd</code></p>
956    pub fn set_local_storage_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>>) -> Self {
957        self.local_storage_types = input;
958        self
959    }
960    /// <p>The type of local storage that is required.</p>
961    /// <ul>
962    /// <li>
963    /// <p>For instance types with hard disk drive (HDD) storage, specify <code>hdd</code>.</p></li>
964    /// <li>
965    /// <p>For instance types with solid state drive (SSD) storage, specify <code>ssd</code>.</p></li>
966    /// </ul>
967    /// <p>Default: <code>hdd</code> and <code>ssd</code></p>
968    pub fn get_local_storage_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LocalStorageType>> {
969        &self.local_storage_types
970    }
971    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
972    /// <p>Default: No minimum or maximum limits</p>
973    pub fn total_local_storage_gb(mut self, input: crate::types::TotalLocalStorageGb) -> Self {
974        self.total_local_storage_gb = ::std::option::Option::Some(input);
975        self
976    }
977    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
978    /// <p>Default: No minimum or maximum limits</p>
979    pub fn set_total_local_storage_gb(mut self, input: ::std::option::Option<crate::types::TotalLocalStorageGb>) -> Self {
980        self.total_local_storage_gb = input;
981        self
982    }
983    /// <p>The minimum and maximum amount of total local storage, in GB.</p>
984    /// <p>Default: No minimum or maximum limits</p>
985    pub fn get_total_local_storage_gb(&self) -> &::std::option::Option<crate::types::TotalLocalStorageGb> {
986        &self.total_local_storage_gb
987    }
988    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
989    /// <p>Default: No minimum or maximum limits</p>
990    pub fn baseline_ebs_bandwidth_mbps(mut self, input: crate::types::BaselineEbsBandwidthMbps) -> Self {
991        self.baseline_ebs_bandwidth_mbps = ::std::option::Option::Some(input);
992        self
993    }
994    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
995    /// <p>Default: No minimum or maximum limits</p>
996    pub fn set_baseline_ebs_bandwidth_mbps(mut self, input: ::std::option::Option<crate::types::BaselineEbsBandwidthMbps>) -> Self {
997        self.baseline_ebs_bandwidth_mbps = input;
998        self
999    }
1000    /// <p>The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS–optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
1001    /// <p>Default: No minimum or maximum limits</p>
1002    pub fn get_baseline_ebs_bandwidth_mbps(&self) -> &::std::option::Option<crate::types::BaselineEbsBandwidthMbps> {
1003        &self.baseline_ebs_bandwidth_mbps
1004    }
1005    /// Appends an item to `accelerator_types`.
1006    ///
1007    /// To override the contents of this collection use [`set_accelerator_types`](Self::set_accelerator_types).
1008    ///
1009    /// <p>The accelerator types that must be on the instance type.</p>
1010    /// <ul>
1011    /// <li>
1012    /// <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p></li>
1013    /// <li>
1014    /// <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p></li>
1015    /// <li>
1016    /// <p>For instance types with Inference accelerators, specify <code>inference</code>.</p></li>
1017    /// <li>
1018    /// <p>For instance types with Media accelerators, specify <code>media</code>.</p></li>
1019    /// </ul>
1020    /// <p>Default: Any accelerator type</p>
1021    pub fn accelerator_types(mut self, input: crate::types::AcceleratorType) -> Self {
1022        let mut v = self.accelerator_types.unwrap_or_default();
1023        v.push(input);
1024        self.accelerator_types = ::std::option::Option::Some(v);
1025        self
1026    }
1027    /// <p>The accelerator types that must be on the instance type.</p>
1028    /// <ul>
1029    /// <li>
1030    /// <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p></li>
1031    /// <li>
1032    /// <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p></li>
1033    /// <li>
1034    /// <p>For instance types with Inference accelerators, specify <code>inference</code>.</p></li>
1035    /// <li>
1036    /// <p>For instance types with Media accelerators, specify <code>media</code>.</p></li>
1037    /// </ul>
1038    /// <p>Default: Any accelerator type</p>
1039    pub fn set_accelerator_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>>) -> Self {
1040        self.accelerator_types = input;
1041        self
1042    }
1043    /// <p>The accelerator types that must be on the instance type.</p>
1044    /// <ul>
1045    /// <li>
1046    /// <p>For instance types with FPGA accelerators, specify <code>fpga</code>.</p></li>
1047    /// <li>
1048    /// <p>For instance types with GPU accelerators, specify <code>gpu</code>.</p></li>
1049    /// <li>
1050    /// <p>For instance types with Inference accelerators, specify <code>inference</code>.</p></li>
1051    /// <li>
1052    /// <p>For instance types with Media accelerators, specify <code>media</code>.</p></li>
1053    /// </ul>
1054    /// <p>Default: Any accelerator type</p>
1055    pub fn get_accelerator_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorType>> {
1056        &self.accelerator_types
1057    }
1058    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
1059    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
1060    /// <p>Default: No minimum or maximum limits</p>
1061    pub fn accelerator_count(mut self, input: crate::types::AcceleratorCount) -> Self {
1062        self.accelerator_count = ::std::option::Option::Some(input);
1063        self
1064    }
1065    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
1066    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
1067    /// <p>Default: No minimum or maximum limits</p>
1068    pub fn set_accelerator_count(mut self, input: ::std::option::Option<crate::types::AcceleratorCount>) -> Self {
1069        self.accelerator_count = input;
1070        self
1071    }
1072    /// <p>The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.</p>
1073    /// <p>To exclude accelerator-enabled instance types, set <code>Max</code> to <code>0</code>.</p>
1074    /// <p>Default: No minimum or maximum limits</p>
1075    pub fn get_accelerator_count(&self) -> &::std::option::Option<crate::types::AcceleratorCount> {
1076        &self.accelerator_count
1077    }
1078    /// Appends an item to `accelerator_manufacturers`.
1079    ///
1080    /// To override the contents of this collection use [`set_accelerator_manufacturers`](Self::set_accelerator_manufacturers).
1081    ///
1082    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
1083    /// <ul>
1084    /// <li>
1085    /// <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p></li>
1086    /// <li>
1087    /// <p>For instance types with AMD devices, specify <code>amd</code>.</p></li>
1088    /// <li>
1089    /// <p>For instance types with Habana devices, specify <code>habana</code>.</p></li>
1090    /// <li>
1091    /// <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p></li>
1092    /// <li>
1093    /// <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p></li>
1094    /// </ul>
1095    /// <p>Default: Any manufacturer</p>
1096    pub fn accelerator_manufacturers(mut self, input: crate::types::AcceleratorManufacturer) -> Self {
1097        let mut v = self.accelerator_manufacturers.unwrap_or_default();
1098        v.push(input);
1099        self.accelerator_manufacturers = ::std::option::Option::Some(v);
1100        self
1101    }
1102    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
1103    /// <ul>
1104    /// <li>
1105    /// <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p></li>
1106    /// <li>
1107    /// <p>For instance types with AMD devices, specify <code>amd</code>.</p></li>
1108    /// <li>
1109    /// <p>For instance types with Habana devices, specify <code>habana</code>.</p></li>
1110    /// <li>
1111    /// <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p></li>
1112    /// <li>
1113    /// <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p></li>
1114    /// </ul>
1115    /// <p>Default: Any manufacturer</p>
1116    pub fn set_accelerator_manufacturers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>>) -> Self {
1117        self.accelerator_manufacturers = input;
1118        self
1119    }
1120    /// <p>Indicates whether instance types must have accelerators by specific manufacturers.</p>
1121    /// <ul>
1122    /// <li>
1123    /// <p>For instance types with Amazon Web Services devices, specify <code>amazon-web-services</code>.</p></li>
1124    /// <li>
1125    /// <p>For instance types with AMD devices, specify <code>amd</code>.</p></li>
1126    /// <li>
1127    /// <p>For instance types with Habana devices, specify <code>habana</code>.</p></li>
1128    /// <li>
1129    /// <p>For instance types with NVIDIA devices, specify <code>nvidia</code>.</p></li>
1130    /// <li>
1131    /// <p>For instance types with Xilinx devices, specify <code>xilinx</code>.</p></li>
1132    /// </ul>
1133    /// <p>Default: Any manufacturer</p>
1134    pub fn get_accelerator_manufacturers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorManufacturer>> {
1135        &self.accelerator_manufacturers
1136    }
1137    /// Appends an item to `accelerator_names`.
1138    ///
1139    /// To override the contents of this collection use [`set_accelerator_names`](Self::set_accelerator_names).
1140    ///
1141    /// <p>The accelerators that must be on the instance type.</p>
1142    /// <ul>
1143    /// <li>
1144    /// <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p></li>
1145    /// <li>
1146    /// <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p></li>
1147    /// <li>
1148    /// <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p></li>
1149    /// <li>
1150    /// <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p></li>
1151    /// <li>
1152    /// <p>For instance types with Amazon Web Services Inferentia2 chips, specify <code>inferentia2</code>.</p></li>
1153    /// <li>
1154    /// <p>For instance types with Habana Gaudi HL-205 GPUs, specify <code>gaudi-hl-205</code>.</p></li>
1155    /// <li>
1156    /// <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p></li>
1157    /// <li>
1158    /// <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p></li>
1159    /// <li>
1160    /// <p>For instance types with NVIDIA L4 GPUs, specify <code>l4</code>.</p></li>
1161    /// <li>
1162    /// <p>For instance types with NVIDIA L40S GPUs, specify <code>l40s</code>.</p></li>
1163    /// <li>
1164    /// <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p></li>
1165    /// <li>
1166    /// <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p></li>
1167    /// <li>
1168    /// <p>For instance types with Amazon Web Services Trainium chips, specify <code>trainium</code>.</p></li>
1169    /// <li>
1170    /// <p>For instance types with Amazon Web Services Trainium2 chips, specify <code>trainium2</code>.</p></li>
1171    /// <li>
1172    /// <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p></li>
1173    /// <li>
1174    /// <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p></li>
1175    /// <li>
1176    /// <p>For instance types with Xilinx U30 cards, specify <code>u30</code>.</p></li>
1177    /// <li>
1178    /// <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p></li>
1179    /// <li>
1180    /// <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p></li>
1181    /// </ul>
1182    /// <p>Default: Any accelerator</p>
1183    pub fn accelerator_names(mut self, input: crate::types::AcceleratorName) -> Self {
1184        let mut v = self.accelerator_names.unwrap_or_default();
1185        v.push(input);
1186        self.accelerator_names = ::std::option::Option::Some(v);
1187        self
1188    }
1189    /// <p>The accelerators that must be on the instance type.</p>
1190    /// <ul>
1191    /// <li>
1192    /// <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p></li>
1193    /// <li>
1194    /// <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p></li>
1195    /// <li>
1196    /// <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p></li>
1197    /// <li>
1198    /// <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p></li>
1199    /// <li>
1200    /// <p>For instance types with Amazon Web Services Inferentia2 chips, specify <code>inferentia2</code>.</p></li>
1201    /// <li>
1202    /// <p>For instance types with Habana Gaudi HL-205 GPUs, specify <code>gaudi-hl-205</code>.</p></li>
1203    /// <li>
1204    /// <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p></li>
1205    /// <li>
1206    /// <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p></li>
1207    /// <li>
1208    /// <p>For instance types with NVIDIA L4 GPUs, specify <code>l4</code>.</p></li>
1209    /// <li>
1210    /// <p>For instance types with NVIDIA L40S GPUs, specify <code>l40s</code>.</p></li>
1211    /// <li>
1212    /// <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p></li>
1213    /// <li>
1214    /// <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p></li>
1215    /// <li>
1216    /// <p>For instance types with Amazon Web Services Trainium chips, specify <code>trainium</code>.</p></li>
1217    /// <li>
1218    /// <p>For instance types with Amazon Web Services Trainium2 chips, specify <code>trainium2</code>.</p></li>
1219    /// <li>
1220    /// <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p></li>
1221    /// <li>
1222    /// <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p></li>
1223    /// <li>
1224    /// <p>For instance types with Xilinx U30 cards, specify <code>u30</code>.</p></li>
1225    /// <li>
1226    /// <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p></li>
1227    /// <li>
1228    /// <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p></li>
1229    /// </ul>
1230    /// <p>Default: Any accelerator</p>
1231    pub fn set_accelerator_names(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>>) -> Self {
1232        self.accelerator_names = input;
1233        self
1234    }
1235    /// <p>The accelerators that must be on the instance type.</p>
1236    /// <ul>
1237    /// <li>
1238    /// <p>For instance types with NVIDIA A10G GPUs, specify <code>a10g</code>.</p></li>
1239    /// <li>
1240    /// <p>For instance types with NVIDIA A100 GPUs, specify <code>a100</code>.</p></li>
1241    /// <li>
1242    /// <p>For instance types with NVIDIA H100 GPUs, specify <code>h100</code>.</p></li>
1243    /// <li>
1244    /// <p>For instance types with Amazon Web Services Inferentia chips, specify <code>inferentia</code>.</p></li>
1245    /// <li>
1246    /// <p>For instance types with Amazon Web Services Inferentia2 chips, specify <code>inferentia2</code>.</p></li>
1247    /// <li>
1248    /// <p>For instance types with Habana Gaudi HL-205 GPUs, specify <code>gaudi-hl-205</code>.</p></li>
1249    /// <li>
1250    /// <p>For instance types with NVIDIA GRID K520 GPUs, specify <code>k520</code>.</p></li>
1251    /// <li>
1252    /// <p>For instance types with NVIDIA K80 GPUs, specify <code>k80</code>.</p></li>
1253    /// <li>
1254    /// <p>For instance types with NVIDIA L4 GPUs, specify <code>l4</code>.</p></li>
1255    /// <li>
1256    /// <p>For instance types with NVIDIA L40S GPUs, specify <code>l40s</code>.</p></li>
1257    /// <li>
1258    /// <p>For instance types with NVIDIA M60 GPUs, specify <code>m60</code>.</p></li>
1259    /// <li>
1260    /// <p>For instance types with AMD Radeon Pro V520 GPUs, specify <code>radeon-pro-v520</code>.</p></li>
1261    /// <li>
1262    /// <p>For instance types with Amazon Web Services Trainium chips, specify <code>trainium</code>.</p></li>
1263    /// <li>
1264    /// <p>For instance types with Amazon Web Services Trainium2 chips, specify <code>trainium2</code>.</p></li>
1265    /// <li>
1266    /// <p>For instance types with NVIDIA T4 GPUs, specify <code>t4</code>.</p></li>
1267    /// <li>
1268    /// <p>For instance types with NVIDIA T4G GPUs, specify <code>t4g</code>.</p></li>
1269    /// <li>
1270    /// <p>For instance types with Xilinx U30 cards, specify <code>u30</code>.</p></li>
1271    /// <li>
1272    /// <p>For instance types with Xilinx VU9P FPGAs, specify <code>vu9p</code>.</p></li>
1273    /// <li>
1274    /// <p>For instance types with NVIDIA V100 GPUs, specify <code>v100</code>.</p></li>
1275    /// </ul>
1276    /// <p>Default: Any accelerator</p>
1277    pub fn get_accelerator_names(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AcceleratorName>> {
1278        &self.accelerator_names
1279    }
1280    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
1281    /// <p>Default: No minimum or maximum limits</p>
1282    pub fn accelerator_total_memory_mib(mut self, input: crate::types::AcceleratorTotalMemoryMiB) -> Self {
1283        self.accelerator_total_memory_mib = ::std::option::Option::Some(input);
1284        self
1285    }
1286    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
1287    /// <p>Default: No minimum or maximum limits</p>
1288    pub fn set_accelerator_total_memory_mib(mut self, input: ::std::option::Option<crate::types::AcceleratorTotalMemoryMiB>) -> Self {
1289        self.accelerator_total_memory_mib = input;
1290        self
1291    }
1292    /// <p>The minimum and maximum amount of total accelerator memory, in MiB.</p>
1293    /// <p>Default: No minimum or maximum limits</p>
1294    pub fn get_accelerator_total_memory_mib(&self) -> &::std::option::Option<crate::types::AcceleratorTotalMemoryMiB> {
1295        &self.accelerator_total_memory_mib
1296    }
1297    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
1298    /// <p>Default: No minimum or maximum limits</p>
1299    pub fn network_bandwidth_gbps(mut self, input: crate::types::NetworkBandwidthGbps) -> Self {
1300        self.network_bandwidth_gbps = ::std::option::Option::Some(input);
1301        self
1302    }
1303    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
1304    /// <p>Default: No minimum or maximum limits</p>
1305    pub fn set_network_bandwidth_gbps(mut self, input: ::std::option::Option<crate::types::NetworkBandwidthGbps>) -> Self {
1306        self.network_bandwidth_gbps = input;
1307        self
1308    }
1309    /// <p>The minimum and maximum amount of network bandwidth, in gigabits per second (Gbps).</p>
1310    /// <p>Default: No minimum or maximum limits</p>
1311    pub fn get_network_bandwidth_gbps(&self) -> &::std::option::Option<crate::types::NetworkBandwidthGbps> {
1312        &self.network_bandwidth_gbps
1313    }
1314    /// Appends an item to `allowed_instance_types`.
1315    ///
1316    /// To override the contents of this collection use [`set_allowed_instance_types`](Self::set_allowed_instance_types).
1317    ///
1318    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
1319    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
1320    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p><note>
1321    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
1322    /// </note>
1323    /// <p>Default: All instance types</p>
1324    pub fn allowed_instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
1325        let mut v = self.allowed_instance_types.unwrap_or_default();
1326        v.push(input.into());
1327        self.allowed_instance_types = ::std::option::Option::Some(v);
1328        self
1329    }
1330    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
1331    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
1332    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p><note>
1333    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
1334    /// </note>
1335    /// <p>Default: All instance types</p>
1336    pub fn set_allowed_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
1337        self.allowed_instance_types = input;
1338        self
1339    }
1340    /// <p>The instance types to apply your specified attributes against. All other instance types are ignored, even if they match your specified attributes.</p>
1341    /// <p>You can use strings with one or more wild cards, represented by an asterisk (<code>*</code>), to allow an instance type, size, or generation. The following are examples: <code>m5.8xlarge</code>, <code>c5*.*</code>, <code>m5a.*</code>, <code>r*</code>, <code>*3*</code>.</p>
1342    /// <p>For example, if you specify <code>c5*</code>,Amazon EC2 will allow the entire C5 instance family, which includes all C5a and C5n instance types. If you specify <code>m5a.*</code>, Amazon EC2 will allow all the M5a instance types, but not the M5n instance types.</p><note>
1343    /// <p>If you specify <code>AllowedInstanceTypes</code>, you can't specify <code>ExcludedInstanceTypes</code>.</p>
1344    /// </note>
1345    /// <p>Default: All instance types</p>
1346    pub fn get_allowed_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
1347        &self.allowed_instance_types
1348    }
1349    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
1350    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1351    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.</p><note>
1352    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
1353    /// </note>
1354    pub fn max_spot_price_as_percentage_of_optimal_on_demand_price(mut self, input: i32) -> Self {
1355        self.max_spot_price_as_percentage_of_optimal_on_demand_price = ::std::option::Option::Some(input);
1356        self
1357    }
1358    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
1359    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1360    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.</p><note>
1361    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
1362    /// </note>
1363    pub fn set_max_spot_price_as_percentage_of_optimal_on_demand_price(mut self, input: ::std::option::Option<i32>) -> Self {
1364        self.max_spot_price_as_percentage_of_optimal_on_demand_price = input;
1365        self
1366    }
1367    /// <p>\[Price protection\] The price protection threshold for Spot Instances, as a percentage of an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from the lowest priced current generation instance types, and failing that, from the lowest priced previous generation instance types that match your attributes. When Amazon EC2 selects instance types with your attributes, it will exclude instance types whose price exceeds your specified threshold.</p>
1368    /// <p>The parameter accepts an integer, which Amazon EC2 interprets as a percentage.</p>
1369    /// <p>If you set <code>TargetCapacityUnitType</code> to <code>vcpu</code> or <code>memory-mib</code>, the price protection threshold is based on the per vCPU or per memory price instead of the per instance price.</p><note>
1370    /// <p>Only one of <code>SpotMaxPricePercentageOverLowestPrice</code> or <code>MaxSpotPriceAsPercentageOfOptimalOnDemandPrice</code> can be specified. If you don't specify either, Amazon EC2 will automatically apply optimal price protection to consistently select from a wide range of instance types. To indicate no price protection threshold for Spot Instances, meaning you want to consider all instance types that match your attributes, include one of these parameters and specify a high value, such as <code>999999</code>.</p>
1371    /// </note>
1372    pub fn get_max_spot_price_as_percentage_of_optimal_on_demand_price(&self) -> &::std::option::Option<i32> {
1373        &self.max_spot_price_as_percentage_of_optimal_on_demand_price
1374    }
1375    /// <p>The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection">Performance protection</a> in the <i>Amazon EC2 User Guide</i>.</p>
1376    pub fn baseline_performance_factors(mut self, input: crate::types::BaselinePerformanceFactors) -> Self {
1377        self.baseline_performance_factors = ::std::option::Option::Some(input);
1378        self
1379    }
1380    /// <p>The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection">Performance protection</a> in the <i>Amazon EC2 User Guide</i>.</p>
1381    pub fn set_baseline_performance_factors(mut self, input: ::std::option::Option<crate::types::BaselinePerformanceFactors>) -> Self {
1382        self.baseline_performance_factors = input;
1383        self
1384    }
1385    /// <p>The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Amazon EC2 uses this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. Currently, this parameter only supports CPU performance as a baseline performance factor. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html#ec2fleet-abis-performance-protection">Performance protection</a> in the <i>Amazon EC2 User Guide</i>.</p>
1386    pub fn get_baseline_performance_factors(&self) -> &::std::option::Option<crate::types::BaselinePerformanceFactors> {
1387        &self.baseline_performance_factors
1388    }
1389    /// <p>Specifies whether instance types must support encrypting in-transit traffic between instances. For more information, including the supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data-protection.html#encryption-transit">Encryption in transit</a> in the <i>Amazon EC2 User Guide</i>.</p>
1390    /// <p>Default: <code>false</code></p>
1391    pub fn require_encryption_in_transit(mut self, input: bool) -> Self {
1392        self.require_encryption_in_transit = ::std::option::Option::Some(input);
1393        self
1394    }
1395    /// <p>Specifies whether instance types must support encrypting in-transit traffic between instances. For more information, including the supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data-protection.html#encryption-transit">Encryption in transit</a> in the <i>Amazon EC2 User Guide</i>.</p>
1396    /// <p>Default: <code>false</code></p>
1397    pub fn set_require_encryption_in_transit(mut self, input: ::std::option::Option<bool>) -> Self {
1398        self.require_encryption_in_transit = input;
1399        self
1400    }
1401    /// <p>Specifies whether instance types must support encrypting in-transit traffic between instances. For more information, including the supported instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/data-protection.html#encryption-transit">Encryption in transit</a> in the <i>Amazon EC2 User Guide</i>.</p>
1402    /// <p>Default: <code>false</code></p>
1403    pub fn get_require_encryption_in_transit(&self) -> &::std::option::Option<bool> {
1404        &self.require_encryption_in_transit
1405    }
1406    /// Consumes the builder and constructs a [`InstanceRequirements`](crate::types::InstanceRequirements).
1407    pub fn build(self) -> crate::types::InstanceRequirements {
1408        crate::types::InstanceRequirements {
1409            v_cpu_count: self.v_cpu_count,
1410            memory_mib: self.memory_mib,
1411            cpu_manufacturers: self.cpu_manufacturers,
1412            memory_gib_per_v_cpu: self.memory_gib_per_v_cpu,
1413            excluded_instance_types: self.excluded_instance_types,
1414            instance_generations: self.instance_generations,
1415            spot_max_price_percentage_over_lowest_price: self.spot_max_price_percentage_over_lowest_price,
1416            on_demand_max_price_percentage_over_lowest_price: self.on_demand_max_price_percentage_over_lowest_price,
1417            bare_metal: self.bare_metal,
1418            burstable_performance: self.burstable_performance,
1419            require_hibernate_support: self.require_hibernate_support,
1420            network_interface_count: self.network_interface_count,
1421            local_storage: self.local_storage,
1422            local_storage_types: self.local_storage_types,
1423            total_local_storage_gb: self.total_local_storage_gb,
1424            baseline_ebs_bandwidth_mbps: self.baseline_ebs_bandwidth_mbps,
1425            accelerator_types: self.accelerator_types,
1426            accelerator_count: self.accelerator_count,
1427            accelerator_manufacturers: self.accelerator_manufacturers,
1428            accelerator_names: self.accelerator_names,
1429            accelerator_total_memory_mib: self.accelerator_total_memory_mib,
1430            network_bandwidth_gbps: self.network_bandwidth_gbps,
1431            allowed_instance_types: self.allowed_instance_types,
1432            max_spot_price_as_percentage_of_optimal_on_demand_price: self.max_spot_price_as_percentage_of_optimal_on_demand_price,
1433            baseline_performance_factors: self.baseline_performance_factors,
1434            require_encryption_in_transit: self.require_encryption_in_transit,
1435        }
1436    }
1437}