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><note>
173    /// <p>When changing the instance type: If the original instance type is configured for configurable bandwidth, and the desired instance type doesn't support configurable bandwidth, first set the existing bandwidth configuration to <code>default</code> using the <code>ModifyInstanceNetworkPerformanceOptions</code> operation.</p>
174    /// </note> <important>
175    /// <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>
176    /// </important>
177    pub fn attribute(mut self, input: crate::types::InstanceAttributeName) -> Self {
178        self.inner = self.inner.attribute(input);
179        self
180    }
181    /// <p>The name of the attribute to modify.</p><note>
182    /// <p>When changing the instance type: If the original instance type is configured for configurable bandwidth, and the desired instance type doesn't support configurable bandwidth, first set the existing bandwidth configuration to <code>default</code> using the <code>ModifyInstanceNetworkPerformanceOptions</code> operation.</p>
183    /// </note> <important>
184    /// <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>
185    /// </important>
186    pub fn set_attribute(mut self, input: ::std::option::Option<crate::types::InstanceAttributeName>) -> Self {
187        self.inner = self.inner.set_attribute(input);
188        self
189    }
190    /// <p>The name of the attribute to modify.</p><note>
191    /// <p>When changing the instance type: If the original instance type is configured for configurable bandwidth, and the desired instance type doesn't support configurable bandwidth, first set the existing bandwidth configuration to <code>default</code> using the <code>ModifyInstanceNetworkPerformanceOptions</code> operation.</p>
192    /// </note> <important>
193    /// <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>
194    /// </important>
195    pub fn get_attribute(&self) -> &::std::option::Option<crate::types::InstanceAttributeName> {
196        self.inner.get_attribute()
197    }
198    /// <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>
199    pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.inner = self.inner.value(input.into());
201        self
202    }
203    /// <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>
204    pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.inner = self.inner.set_value(input);
206        self
207    }
208    /// <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>
209    pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
210        self.inner.get_value()
211    }
212    ///
213    /// Appends an item to `BlockDeviceMappings`.
214    ///
215    /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
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 Amazon Web Services-managed resources.</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 block_device_mappings(mut self, input: crate::types::InstanceBlockDeviceMappingSpecification) -> Self {
220        self.inner = self.inner.block_device_mappings(input);
221        self
222    }
223    /// <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 Amazon Web Services-managed resources.</p>
224    /// <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>
225    pub fn set_block_device_mappings(
226        mut self,
227        input: ::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMappingSpecification>>,
228    ) -> Self {
229        self.inner = self.inner.set_block_device_mappings(input);
230        self
231    }
232    /// <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 Amazon Web Services-managed resources.</p>
233    /// <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>
234    pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InstanceBlockDeviceMappingSpecification>> {
235        self.inner.get_block_device_mappings()
236    }
237    /// <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>
238    pub fn disable_api_termination(mut self, input: crate::types::AttributeBooleanValue) -> Self {
239        self.inner = self.inner.disable_api_termination(input);
240        self
241    }
242    /// <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>
243    pub fn set_disable_api_termination(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
244        self.inner = self.inner.set_disable_api_termination(input);
245        self
246    }
247    /// <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>
248    pub fn get_disable_api_termination(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
249        self.inner.get_disable_api_termination()
250    }
251    /// <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>
252    pub fn instance_type(mut self, input: crate::types::AttributeValue) -> Self {
253        self.inner = self.inner.instance_type(input);
254        self
255    }
256    /// <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>
257    pub fn set_instance_type(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
258        self.inner = self.inner.set_instance_type(input);
259        self
260    }
261    /// <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>
262    pub fn get_instance_type(&self) -> &::std::option::Option<crate::types::AttributeValue> {
263        self.inner.get_instance_type()
264    }
265    /// <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>
266    pub fn kernel(mut self, input: crate::types::AttributeValue) -> Self {
267        self.inner = self.inner.kernel(input);
268        self
269    }
270    /// <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>
271    pub fn set_kernel(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
272        self.inner = self.inner.set_kernel(input);
273        self
274    }
275    /// <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>
276    pub fn get_kernel(&self) -> &::std::option::Option<crate::types::AttributeValue> {
277        self.inner.get_kernel()
278    }
279    /// <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>
280    pub fn ramdisk(mut self, input: crate::types::AttributeValue) -> Self {
281        self.inner = self.inner.ramdisk(input);
282        self
283    }
284    /// <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>
285    pub fn set_ramdisk(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
286        self.inner = self.inner.set_ramdisk(input);
287        self
288    }
289    /// <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>
290    pub fn get_ramdisk(&self) -> &::std::option::Option<crate::types::AttributeValue> {
291        self.inner.get_ramdisk()
292    }
293    /// <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>
294    pub fn user_data(mut self, input: crate::types::BlobAttributeValue) -> Self {
295        self.inner = self.inner.user_data(input);
296        self
297    }
298    /// <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>
299    pub fn set_user_data(mut self, input: ::std::option::Option<crate::types::BlobAttributeValue>) -> Self {
300        self.inner = self.inner.set_user_data(input);
301        self
302    }
303    /// <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>
304    pub fn get_user_data(&self) -> &::std::option::Option<crate::types::BlobAttributeValue> {
305        self.inner.get_user_data()
306    }
307    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
308    pub fn instance_initiated_shutdown_behavior(mut self, input: crate::types::AttributeValue) -> Self {
309        self.inner = self.inner.instance_initiated_shutdown_behavior(input);
310        self
311    }
312    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
313    pub fn set_instance_initiated_shutdown_behavior(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
314        self.inner = self.inner.set_instance_initiated_shutdown_behavior(input);
315        self
316    }
317    /// <p>Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).</p>
318    pub fn get_instance_initiated_shutdown_behavior(&self) -> &::std::option::Option<crate::types::AttributeValue> {
319        self.inner.get_instance_initiated_shutdown_behavior()
320    }
321    ///
322    /// Appends an item to `Groups`.
323    ///
324    /// To override the contents of this collection use [`set_groups`](Self::set_groups).
325    ///
326    /// <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>
327    pub fn groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
328        self.inner = self.inner.groups(input.into());
329        self
330    }
331    /// <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>
332    pub fn set_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
333        self.inner = self.inner.set_groups(input);
334        self
335    }
336    /// <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>
337    pub fn get_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
338        self.inner.get_groups()
339    }
340    /// <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>
341    pub fn ebs_optimized(mut self, input: crate::types::AttributeBooleanValue) -> Self {
342        self.inner = self.inner.ebs_optimized(input);
343        self
344    }
345    /// <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>
346    pub fn set_ebs_optimized(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
347        self.inner = self.inner.set_ebs_optimized(input);
348        self
349    }
350    /// <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>
351    pub fn get_ebs_optimized(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
352        self.inner.get_ebs_optimized()
353    }
354    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
355    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
356    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
357    pub fn sriov_net_support(mut self, input: crate::types::AttributeValue) -> Self {
358        self.inner = self.inner.sriov_net_support(input);
359        self
360    }
361    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
362    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
363    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
364    pub fn set_sriov_net_support(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
365        self.inner = self.inner.set_sriov_net_support(input);
366        self
367    }
368    /// <p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.</p>
369    /// <p>There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.</p>
370    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
371    pub fn get_sriov_net_support(&self) -> &::std::option::Option<crate::types::AttributeValue> {
372        self.inner.get_sriov_net_support()
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 ena_support(mut self, input: crate::types::AttributeBooleanValue) -> Self {
377        self.inner = self.inner.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 set_ena_support(mut self, input: ::std::option::Option<crate::types::AttributeBooleanValue>) -> Self {
383        self.inner = self.inner.set_ena_support(input);
384        self
385    }
386    /// <p>Set to <code>true</code> to enable enhanced networking with ENA for the instance.</p>
387    /// <p>This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.</p>
388    pub fn get_ena_support(&self) -> &::std::option::Option<crate::types::AttributeBooleanValue> {
389        self.inner.get_ena_support()
390    }
391}