aws_sdk_ec2/operation/modify_instance_attribute/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::modify_instance_attribute::_modify_instance_attribute_output::ModifyInstanceAttributeOutputBuilder;
3
4pub use crate::operation::modify_instance_attribute::_modify_instance_attribute_input::ModifyInstanceAttributeInputBuilder;
5
6impl crate::operation::modify_instance_attribute::builders::ModifyInstanceAttributeInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::modify_instance_attribute::ModifyInstanceAttributeOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::modify_instance_attribute::ModifyInstanceAttributeError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.modify_instance_attribute();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ModifyInstanceAttribute`.
24///
25/// <p>Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.</p>
26/// <p><b>Note: </b>Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the <code>ModifyNetworkInterfaceAttribute</code> action.</p>
27/// <p>To modify some attributes, the instance must be stopped. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html">Modify a stopped instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
28#[derive(::std::clone::Clone, ::std::fmt::Debug)]
29pub struct ModifyInstanceAttributeFluentBuilder {
30    handle: ::std::sync::Arc<crate::client::Handle>,
31    inner: crate::operation::modify_instance_attribute::builders::ModifyInstanceAttributeInputBuilder,
32    config_override: ::std::option::Option<crate::config::Builder>,
33}
34impl
35    crate::client::customize::internal::CustomizableSend<
36        crate::operation::modify_instance_attribute::ModifyInstanceAttributeOutput,
37        crate::operation::modify_instance_attribute::ModifyInstanceAttributeError,
38    > for ModifyInstanceAttributeFluentBuilder
39{
40    fn send(
41        self,
42        config_override: crate::config::Builder,
43    ) -> crate::client::customize::internal::BoxFuture<
44        crate::client::customize::internal::SendResult<
45            crate::operation::modify_instance_attribute::ModifyInstanceAttributeOutput,
46            crate::operation::modify_instance_attribute::ModifyInstanceAttributeError,
47        >,
48    > {
49        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
50    }
51}
52impl ModifyInstanceAttributeFluentBuilder {
53    /// Creates a new `ModifyInstanceAttributeFluentBuilder`.
54    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
55        Self {
56            handle,
57            inner: ::std::default::Default::default(),
58            config_override: ::std::option::Option::None,
59        }
60    }
61    /// Access the ModifyInstanceAttribute as a reference.
62    pub fn as_input(&self) -> &crate::operation::modify_instance_attribute::builders::ModifyInstanceAttributeInputBuilder {
63        &self.inner
64    }
65    /// Sends the request and returns the response.
66    ///
67    /// If an error occurs, an `SdkError` will be returned with additional details that
68    /// can be matched against.
69    ///
70    /// By default, any retryable failures will be retried twice. Retry behavior
71    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
72    /// set when configuring the client.
73    pub async fn send(
74        self,
75    ) -> ::std::result::Result<
76        crate::operation::modify_instance_attribute::ModifyInstanceAttributeOutput,
77        ::aws_smithy_runtime_api::client::result::SdkError<
78            crate::operation::modify_instance_attribute::ModifyInstanceAttributeError,
79            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
80        >,
81    > {
82        let input = self
83            .inner
84            .build()
85            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
86        let runtime_plugins = crate::operation::modify_instance_attribute::ModifyInstanceAttribute::operation_runtime_plugins(
87            self.handle.runtime_plugins.clone(),
88            &self.handle.conf,
89            self.config_override,
90        );
91        crate::operation::modify_instance_attribute::ModifyInstanceAttribute::orchestrate(&runtime_plugins, input).await
92    }
93
94    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
95    pub fn customize(
96        self,
97    ) -> crate::client::customize::CustomizableOperation<
98        crate::operation::modify_instance_attribute::ModifyInstanceAttributeOutput,
99        crate::operation::modify_instance_attribute::ModifyInstanceAttributeError,
100        Self,
101    > {
102        crate::client::customize::CustomizableOperation::new(self)
103    }
104    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
105        self.set_config_override(::std::option::Option::Some(config_override.into()));
106        self
107    }
108
109    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
110        self.config_override = config_override;
111        self
112    }
113    /// <p>Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is <code>true</code>, source/destination checks are enabled; otherwise, they are disabled. The default value is <code>true</code>. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.</p>
114    pub fn source_dest_check(mut self, input: crate::types::AttributeBooleanValue) -> Self {
115        self.inner = self.inner.source_dest_check(input);
116        self
117    }
118    /// <p>Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is <code>true</code>, source/destination checks are enabled; otherwise, they are disabled. The default value is <code>true</code>. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.</p>
119    pub fn set_source_dest_check(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
120        self.inner = self.inner.set_source_dest_check(input);
121        self
122    }
123    /// <p>Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is <code>true</code>, source/destination checks are enabled; otherwise, they are disabled. The default value is <code>true</code>. You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.</p>
124    pub fn get_source_dest_check(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
125        self.inner.get_source_dest_check()
126    }
127    /// <p>Indicates whether an instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html">Enable stop protection for your instance</a>.</p>
128    /// <p></p>
129    pub fn disable_api_stop(mut self, input: crate::types::AttributeBooleanValue) -> Self {
130        self.inner = self.inner.disable_api_stop(input);
131        self
132    }
133    /// <p>Indicates whether an instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html">Enable stop protection for your instance</a>.</p>
134    /// <p></p>
135    pub fn set_disable_api_stop(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
136        self.inner = self.inner.set_disable_api_stop(input);
137        self
138    }
139    /// <p>Indicates whether an instance is enabled for stop protection. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html">Enable stop protection for your instance</a>.</p>
140    /// <p></p>
141    pub fn get_disable_api_stop(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
142        self.inner.get_disable_api_stop()
143    }
144    /// <p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
145    pub fn dry_run(mut self, input: bool) -> Self {
146        self.inner = self.inner.dry_run(input);
147        self
148    }
149    /// <p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
150    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
151        self.inner = self.inner.set_dry_run(input);
152        self
153    }
154    /// <p>Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
155    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
156        self.inner.get_dry_run()
157    }
158    /// <p>The ID of the instance.</p>
159    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.instance_id(input.into());
161        self
162    }
163    /// <p>The ID of the instance.</p>
164    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.inner = self.inner.set_instance_id(input);
166        self
167    }
168    /// <p>The ID of the instance.</p>
169    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
170        self.inner.get_instance_id()
171    }
172    /// <p>The name of the attribute to modify.</p><important>
173    /// <p>You can modify the following attributes only: <code>disableApiTermination</code> | <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>instanceInitiatedShutdownBehavior</code> | <code>blockDeviceMapping</code> | <code>userData</code> | <code>sourceDestCheck</code> | <code>groupSet</code> | <code>ebsOptimized</code> | <code>sriovNetSupport</code> | <code>enaSupport</code> | <code>nvmeSupport</code> | <code>disableApiStop</code> | <code>enclaveOptions</code></p>
174    /// </important>
175    pub fn attribute(mut self, input: crate::types::InstanceAttributeName) -> Self {
176        self.inner = self.inner.attribute(input);
177        self
178    }
179    /// <p>The name of the attribute to modify.</p><important>
180    /// <p>You can modify the following attributes only: <code>disableApiTermination</code> | <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>instanceInitiatedShutdownBehavior</code> | <code>blockDeviceMapping</code> | <code>userData</code> | <code>sourceDestCheck</code> | <code>groupSet</code> | <code>ebsOptimized</code> | <code>sriovNetSupport</code> | <code>enaSupport</code> | <code>nvmeSupport</code> | <code>disableApiStop</code> | <code>enclaveOptions</code></p>
181    /// </important>
182    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::InstanceAttributeName>) -> Self {
183        self.inner = self.inner.set_attribute(input);
184        self
185    }
186    /// <p>The name of the attribute to modify.</p><important>
187    /// <p>You can modify the following attributes only: <code>disableApiTermination</code> | <code>instanceType</code> | <code>kernel</code> | <code>ramdisk</code> | <code>instanceInitiatedShutdownBehavior</code> | <code>blockDeviceMapping</code> | <code>userData</code> | <code>sourceDestCheck</code> | <code>groupSet</code> | <code>ebsOptimized</code> | <code>sriovNetSupport</code> | <code>enaSupport</code> | <code>nvmeSupport</code> | <code>disableApiStop</code> | <code>enclaveOptions</code></p>
188    /// </important>
189    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::InstanceAttributeName> {
190        self.inner.get_attribute()
191    }
192    /// <p>A new value for the attribute. Use only with the <code>kernel</code>, <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or <code>instanceInitiatedShutdownBehavior</code> attribute.</p>
193    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.inner = self.inner.value(input.into());
195        self
196    }
197    /// <p>A new value for the attribute. Use only with the <code>kernel</code>, <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or <code>instanceInitiatedShutdownBehavior</code> attribute.</p>
198    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.inner = self.inner.set_value(input);
200        self
201    }
202    /// <p>A new value for the attribute. Use only with the <code>kernel</code>, <code>ramdisk</code>, <code>userData</code>, <code>disableApiTermination</code>, or <code>instanceInitiatedShutdownBehavior</code> attribute.</p>
203    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
204        self.inner.get_value()
205    }
206    ///
207    /// Appends an item to `BlockDeviceMappings`.
208    ///
209    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
210    ///
211    /// <p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is deleted when the instance is terminated. You can't modify the <code>DeleteOnTermination</code> attribute for volumes that are attached to Fargate tasks.</p>
212    /// <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM">Update the block device mapping when launching an instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
213    pub fn block_device_mappings(mut self, input: crate::types::InstanceBlockDeviceMappingSpecification) -> Self {
214        self.inner = self.inner.block_device_mappings(input);
215        self
216    }
217    /// <p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is deleted when the instance is terminated. You can't modify the <code>DeleteOnTermination</code> attribute for volumes that are attached to Fargate tasks.</p>
218    /// <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM">Update the block device mapping when launching an instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
219    pub fn set_block_device_mappings(
220        mut self,
221        input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMappingSpecification>>,
222    ) -> Self {
223        self.inner = self.inner.set_block_device_mappings(input);
224        self
225    }
226    /// <p>Modifies the <code>DeleteOnTermination</code> attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for <code>DeleteOnTermination</code>, the default is <code>true</code> and the volume is deleted when the instance is terminated. You can't modify the <code>DeleteOnTermination</code> attribute for volumes that are attached to Fargate tasks.</p>
227    /// <p>To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM">Update the block device mapping when launching an instance</a> in the <i>Amazon EC2 User Guide</i>.</p>
228    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMappingSpecification>> {
229        self.inner.get_block_device_mappings()
230    }
231    /// <p>Enable or disable termination protection for the instance. If the value is <code>true</code>, you can't terminate the instance using the Amazon EC2 console, command line interface, or API. You can't enable termination protection for Spot Instances.</p>
232    pub fn disable_api_termination(mut self, input: crate::types::AttributeBooleanValue) -> Self {
233        self.inner = self.inner.disable_api_termination(input);
234        self
235    }
236    /// <p>Enable or disable termination protection for the instance. If the value is <code>true</code>, you can't terminate the instance using the Amazon EC2 console, command line interface, or API. You can't enable termination protection for Spot Instances.</p>
237    pub fn set_disable_api_termination(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
238        self.inner = self.inner.set_disable_api_termination(input);
239        self
240    }
241    /// <p>Enable or disable termination protection for the instance. If the value is <code>true</code>, you can't terminate the instance using the Amazon EC2 console, command line interface, or API. You can't enable termination protection for Spot Instances.</p>
242    pub fn get_disable_api_termination(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
243        self.inner.get_disable_api_termination()
244    }
245    /// <p>Changes the instance type to the specified value. 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>. If the instance type is not valid, the error returned is <code>InvalidInstanceAttributeValue</code>.</p>
246    pub fn instance_type(mut self, input: crate::types::AttributeValue) -> Self {
247        self.inner = self.inner.instance_type(input);
248        self
249    }
250    /// <p>Changes the instance type to the specified value. 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>. If the instance type is not valid, the error returned is <code>InvalidInstanceAttributeValue</code>.</p>
251    pub fn set_instance_type(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
252        self.inner = self.inner.set_instance_type(input);
253        self
254    }
255    /// <p>Changes the instance type to the specified value. 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>. If the instance type is not valid, the error returned is <code>InvalidInstanceAttributeValue</code>.</p>
256    pub fn get_instance_type(&self) -> &::std::option::Option<crate::types::AttributeValue> {
257        self.inner.get_instance_type()
258    }
259    /// <p>Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
260    pub fn kernel(mut self, input: crate::types::AttributeValue) -> Self {
261        self.inner = self.inner.kernel(input);
262        self
263    }
264    /// <p>Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
265    pub fn set_kernel(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
266        self.inner = self.inner.set_kernel(input);
267        self
268    }
269    /// <p>Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
270    pub fn get_kernel(&self) -> &::std::option::Option<crate::types::AttributeValue> {
271        self.inner.get_kernel()
272    }
273    /// <p>Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
274    pub fn ramdisk(mut self, input: crate::types::AttributeValue) -> Self {
275        self.inner = self.inner.ramdisk(input);
276        self
277    }
278    /// <p>Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
279    pub fn set_ramdisk(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
280        self.inner = self.inner.set_ramdisk(input);
281        self
282    }
283    /// <p>Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html">PV-GRUB</a>.</p>
284    pub fn get_ramdisk(&self) -> &::std::option::Option<crate::types::AttributeValue> {
285        self.inner.get_ramdisk()
286    }
287    /// <p>Changes the instance's user data to the specified value. User data must be base64-encoded. Depending on the tool or SDK that you're using, the base64-encoding might be performed for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work with instance user data</a>.</p>
288    pub fn user_data(mut self, input: crate::types::BlobAttributeValue) -> Self {
289        self.inner = self.inner.user_data(input);
290        self
291    }
292    /// <p>Changes the instance's user data to the specified value. User data must be base64-encoded. Depending on the tool or SDK that you're using, the base64-encoding might be performed for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work with instance user data</a>.</p>
293    pub fn set_user_data(mut self, input: ::std::option::Option<crate::types::BlobAttributeValue>) -> Self {
294        self.inner = self.inner.set_user_data(input);
295        self
296    }
297    /// <p>Changes the instance's user data to the specified value. User data must be base64-encoded. Depending on the tool or SDK that you're using, the base64-encoding might be performed for you. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work with instance user data</a>.</p>
298    pub fn get_user_data(&self) -> &::std::option::Option<crate::types::BlobAttributeValue> {
299        self.inner.get_user_data()
300    }
301    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
302    pub fn instance_initiated_shutdown_behavior(mut self, input: crate::types::AttributeValue) -> Self {
303        self.inner = self.inner.instance_initiated_shutdown_behavior(input);
304        self
305    }
306    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
307    pub fn set_instance_initiated_shutdown_behavior(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
308        self.inner = self.inner.set_instance_initiated_shutdown_behavior(input);
309        self
310    }
311    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
312    pub fn get_instance_initiated_shutdown_behavior(&self) -> &::std::option::Option<crate::types::AttributeValue> {
313        self.inner.get_instance_initiated_shutdown_behavior()
314    }
315    ///
316    /// Appends an item to `Groups`.
317    ///
318    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
319    ///
320    /// <p>Replaces the security groups of the instance with the specified security groups. You must specify the ID of at least one security group, even if it's just the default security group for the VPC.</p>
321    pub fn groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322        self.inner = self.inner.groups(input.into());
323        self
324    }
325    /// <p>Replaces the security groups of the instance with the specified security groups. You must specify the ID of at least one security group, even if it's just the default security group for the VPC.</p>
326    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
327        self.inner = self.inner.set_groups(input);
328        self
329    }
330    /// <p>Replaces the security groups of the instance with the specified security groups. You must specify the ID of at least one security group, even if it's just the default security group for the VPC.</p>
331    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
332        self.inner.get_groups()
333    }
334    /// <p>Specifies whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
335    pub fn ebs_optimized(mut self, input: crate::types::AttributeBooleanValue) -> Self {
336        self.inner = self.inner.ebs_optimized(input);
337        self
338    }
339    /// <p>Specifies whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
340    pub fn set_ebs_optimized(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
341        self.inner = self.inner.set_ebs_optimized(input);
342        self
343    }
344    /// <p>Specifies whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.</p>
345    pub fn get_ebs_optimized(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
346        self.inner.get_ebs_optimized()
347    }
348    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
349    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
350    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
351    pub fn sriov_net_support(mut self, input: crate::types::AttributeValue) -> Self {
352        self.inner = self.inner.sriov_net_support(input);
353        self
354    }
355    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
356    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
357    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
358    pub fn set_sriov_net_support(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
359        self.inner = self.inner.set_sriov_net_support(input);
360        self
361    }
362    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
363    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
364    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
365    pub fn get_sriov_net_support(&self) -> &::std::option::Option<crate::types::AttributeValue> {
366        self.inner.get_sriov_net_support()
367    }
368    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the instance.</p>
369    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
370    pub fn ena_support(mut self, input: crate::types::AttributeBooleanValue) -> Self {
371        self.inner = self.inner.ena_support(input);
372        self
373    }
374    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the instance.</p>
375    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
376    pub fn set_ena_support(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
377        self.inner = self.inner.set_ena_support(input);
378        self
379    }
380    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the instance.</p>
381    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
382    pub fn get_ena_support(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
383        self.inner.get_ena_support()
384    }
385}