aws_sdk_opsworks/operation/create_instance/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_instance::_create_instance_output::CreateInstanceOutputBuilder;
3
4pub use crate::operation::create_instance::_create_instance_input::CreateInstanceInputBuilder;
5
6impl crate::operation::create_instance::builders::CreateInstanceInputBuilder {
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::create_instance::CreateInstanceOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_instance::CreateInstanceError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_instance();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateInstance`.
24///
25/// <p>Creates an instance in a specified stack. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-add.html">Adding an Instance to a Layer</a>.</p>
26/// <p><b>Required Permissions</b>: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html">Managing User Permissions</a>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct CreateInstanceFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::create_instance::builders::CreateInstanceInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::create_instance::CreateInstanceOutput,
36 crate::operation::create_instance::CreateInstanceError,
37 > for CreateInstanceFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::create_instance::CreateInstanceOutput,
45 crate::operation::create_instance::CreateInstanceError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl CreateInstanceFluentBuilder {
52 /// Creates a new `CreateInstanceFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the CreateInstance as a reference.
61 pub fn as_input(&self) -> &crate::operation::create_instance::builders::CreateInstanceInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::create_instance::CreateInstanceOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::create_instance::CreateInstanceError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::create_instance::CreateInstance::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::create_instance::CreateInstance::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::create_instance::CreateInstanceOutput,
98 crate::operation::create_instance::CreateInstanceError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>The stack ID.</p>
113 pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.stack_id(input.into());
115 self
116 }
117 /// <p>The stack ID.</p>
118 pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.inner = self.inner.set_stack_id(input);
120 self
121 }
122 /// <p>The stack ID.</p>
123 pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
124 self.inner.get_stack_id()
125 }
126 ///
127 /// Appends an item to `LayerIds`.
128 ///
129 /// To override the contents of this collection use [`set_layer_ids`](Self::set_layer_ids).
130 ///
131 /// <p>An array that contains the instance's layer IDs.</p>
132 pub fn layer_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.layer_ids(input.into());
134 self
135 }
136 /// <p>An array that contains the instance's layer IDs.</p>
137 pub fn set_layer_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
138 self.inner = self.inner.set_layer_ids(input);
139 self
140 }
141 /// <p>An array that contains the instance's layer IDs.</p>
142 pub fn get_layer_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
143 self.inner.get_layer_ids()
144 }
145 /// <p>The instance type, such as <code>t2.micro</code>. For a list of supported instance types, open the stack in the console, choose <b>Instances</b>, and choose <b>+ Instance</b>. The <b>Size</b> list contains the currently supported types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>. The parameter values that you use to specify the various types are in the <b>API Name</b> column of the <b>Available Instance Types</b> table.</p>
146 pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147 self.inner = self.inner.instance_type(input.into());
148 self
149 }
150 /// <p>The instance type, such as <code>t2.micro</code>. For a list of supported instance types, open the stack in the console, choose <b>Instances</b>, and choose <b>+ Instance</b>. The <b>Size</b> list contains the currently supported types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>. The parameter values that you use to specify the various types are in the <b>API Name</b> column of the <b>Available Instance Types</b> table.</p>
151 pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152 self.inner = self.inner.set_instance_type(input);
153 self
154 }
155 /// <p>The instance type, such as <code>t2.micro</code>. For a list of supported instance types, open the stack in the console, choose <b>Instances</b>, and choose <b>+ Instance</b>. The <b>Size</b> list contains the currently supported types. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>. The parameter values that you use to specify the various types are in the <b>API Name</b> column of the <b>Available Instance Types</b> table.</p>
156 pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
157 self.inner.get_instance_type()
158 }
159 /// <p>For load-based or time-based instances, the type. Windows stacks can use only time-based instances.</p>
160 pub fn auto_scaling_type(mut self, input: crate::types::AutoScalingType) -> Self {
161 self.inner = self.inner.auto_scaling_type(input);
162 self
163 }
164 /// <p>For load-based or time-based instances, the type. Windows stacks can use only time-based instances.</p>
165 pub fn set_auto_scaling_type(mut self, input: ::std::option::Option<crate::types::AutoScalingType>) -> Self {
166 self.inner = self.inner.set_auto_scaling_type(input);
167 self
168 }
169 /// <p>For load-based or time-based instances, the type. Windows stacks can use only time-based instances.</p>
170 pub fn get_auto_scaling_type(&self) -> &::std::option::Option<crate::types::AutoScalingType> {
171 self.inner.get_auto_scaling_type()
172 }
173 /// <p>The instance host name. The following are character limits for instance host names.</p>
174 /// <ul>
175 /// <li>
176 /// <p>Linux-based instances: 63 characters</p></li>
177 /// <li>
178 /// <p>Windows-based instances: 15 characters</p></li>
179 /// </ul>
180 pub fn hostname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.inner = self.inner.hostname(input.into());
182 self
183 }
184 /// <p>The instance host name. The following are character limits for instance host names.</p>
185 /// <ul>
186 /// <li>
187 /// <p>Linux-based instances: 63 characters</p></li>
188 /// <li>
189 /// <p>Windows-based instances: 15 characters</p></li>
190 /// </ul>
191 pub fn set_hostname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.inner = self.inner.set_hostname(input);
193 self
194 }
195 /// <p>The instance host name. The following are character limits for instance host names.</p>
196 /// <ul>
197 /// <li>
198 /// <p>Linux-based instances: 63 characters</p></li>
199 /// <li>
200 /// <p>Windows-based instances: 15 characters</p></li>
201 /// </ul>
202 pub fn get_hostname(&self) -> &::std::option::Option<::std::string::String> {
203 self.inner.get_hostname()
204 }
205 /// <p>The instance's operating system, which must be set to one of the following.</p>
206 /// <ul>
207 /// <li>
208 /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
209 /// <li>
210 /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
211 /// <li>
212 /// <p><code>CentOS Linux 7</code></p></li>
213 /// <li>
214 /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
215 /// <li>
216 /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
217 /// <li>
218 /// <p>A custom AMI: <code>Custom</code>.</p></li>
219 /// </ul>
220 /// <p>Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
221 /// <p>The default option is the current Amazon Linux version. If you set this parameter to <code>Custom</code>, you must use the <code>CreateInstance</code> action's AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is <code>Custom</code>. For more information about how to use custom AMIs with OpsWorks Stacks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p>
222 pub fn os(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223 self.inner = self.inner.os(input.into());
224 self
225 }
226 /// <p>The instance's operating system, which must be set to one of the following.</p>
227 /// <ul>
228 /// <li>
229 /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
230 /// <li>
231 /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
232 /// <li>
233 /// <p><code>CentOS Linux 7</code></p></li>
234 /// <li>
235 /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
236 /// <li>
237 /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
238 /// <li>
239 /// <p>A custom AMI: <code>Custom</code>.</p></li>
240 /// </ul>
241 /// <p>Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
242 /// <p>The default option is the current Amazon Linux version. If you set this parameter to <code>Custom</code>, you must use the <code>CreateInstance</code> action's AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is <code>Custom</code>. For more information about how to use custom AMIs with OpsWorks Stacks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p>
243 pub fn set_os(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.inner = self.inner.set_os(input);
245 self
246 }
247 /// <p>The instance's operating system, which must be set to one of the following.</p>
248 /// <ul>
249 /// <li>
250 /// <p>A supported Linux operating system: An Amazon Linux version, such as <code>Amazon Linux 2</code>, <code>Amazon Linux 2018.03</code>, <code>Amazon Linux 2017.09</code>, <code>Amazon Linux 2017.03</code>, <code>Amazon Linux 2016.09</code>, <code>Amazon Linux 2016.03</code>, <code>Amazon Linux 2015.09</code>, or <code>Amazon Linux 2015.03</code>.</p></li>
251 /// <li>
252 /// <p>A supported Ubuntu operating system, such as <code>Ubuntu 18.04 LTS</code>, <code>Ubuntu 16.04 LTS</code>, <code>Ubuntu 14.04 LTS</code>, or <code>Ubuntu 12.04 LTS</code>.</p></li>
253 /// <li>
254 /// <p><code>CentOS Linux 7</code></p></li>
255 /// <li>
256 /// <p><code>Red Hat Enterprise Linux 7</code></p></li>
257 /// <li>
258 /// <p>A supported Windows operating system, such as <code>Microsoft Windows Server 2012 R2 Base</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Express</code>, <code>Microsoft Windows Server 2012 R2 with SQL Server Standard</code>, or <code>Microsoft Windows Server 2012 R2 with SQL Server Web</code>.</p></li>
259 /// <li>
260 /// <p>A custom AMI: <code>Custom</code>.</p></li>
261 /// </ul>
262 /// <p>Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html">OpsWorks Stacks Operating Systems</a>.</p>
263 /// <p>The default option is the current Amazon Linux version. If you set this parameter to <code>Custom</code>, you must use the <code>CreateInstance</code> action's AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is <code>Custom</code>. For more information about how to use custom AMIs with OpsWorks Stacks, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p>
264 pub fn get_os(&self) -> &::std::option::Option<::std::string::String> {
265 self.inner.get_os()
266 }
267 /// <p>A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p><note>
268 /// <p>If you specify a custom AMI, you must set <code>Os</code> to <code>Custom</code>.</p>
269 /// </note>
270 pub fn ami_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.inner = self.inner.ami_id(input.into());
272 self
273 }
274 /// <p>A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p><note>
275 /// <p>If you specify a custom AMI, you must set <code>Os</code> to <code>Custom</code>.</p>
276 /// </note>
277 pub fn set_ami_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.inner = self.inner.set_ami_id(input);
279 self
280 }
281 /// <p>A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see <a href="https://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html">Using Custom AMIs</a>.</p><note>
282 /// <p>If you specify a custom AMI, you must set <code>Os</code> to <code>Custom</code>.</p>
283 /// </note>
284 pub fn get_ami_id(&self) -> &::std::option::Option<::std::string::String> {
285 self.inner.get_ami_id()
286 }
287 /// <p>The instance's Amazon EC2 key-pair name.</p>
288 pub fn ssh_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289 self.inner = self.inner.ssh_key_name(input.into());
290 self
291 }
292 /// <p>The instance's Amazon EC2 key-pair name.</p>
293 pub fn set_ssh_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.inner = self.inner.set_ssh_key_name(input);
295 self
296 }
297 /// <p>The instance's Amazon EC2 key-pair name.</p>
298 pub fn get_ssh_key_name(&self) -> &::std::option::Option<::std::string::String> {
299 self.inner.get_ssh_key_name()
300 }
301 /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
302 pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303 self.inner = self.inner.availability_zone(input.into());
304 self
305 }
306 /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
307 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
308 self.inner = self.inner.set_availability_zone(input);
309 self
310 }
311 /// <p>The instance Availability Zone. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">Regions and Endpoints</a>.</p>
312 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
313 self.inner.get_availability_zone()
314 }
315 /// <p>The instance's virtualization type, <code>paravirtual</code> or <code>hvm</code>.</p>
316 pub fn virtualization_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317 self.inner = self.inner.virtualization_type(input.into());
318 self
319 }
320 /// <p>The instance's virtualization type, <code>paravirtual</code> or <code>hvm</code>.</p>
321 pub fn set_virtualization_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322 self.inner = self.inner.set_virtualization_type(input);
323 self
324 }
325 /// <p>The instance's virtualization type, <code>paravirtual</code> or <code>hvm</code>.</p>
326 pub fn get_virtualization_type(&self) -> &::std::option::Option<::std::string::String> {
327 self.inner.get_virtualization_type()
328 }
329 /// <p>The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet.</p>
330 pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331 self.inner = self.inner.subnet_id(input.into());
332 self
333 }
334 /// <p>The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet.</p>
335 pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336 self.inner = self.inner.set_subnet_id(input);
337 self
338 }
339 /// <p>The ID of the instance's subnet. If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct OpsWorks Stacks to launch the instance in a different subnet.</p>
340 pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
341 self.inner.get_subnet_id()
342 }
343 /// <p>The instance architecture. The default option is <code>x86_64</code>. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>.</p>
344 pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
345 self.inner = self.inner.architecture(input);
346 self
347 }
348 /// <p>The instance architecture. The default option is <code>x86_64</code>. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>.</p>
349 pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
350 self.inner = self.inner.set_architecture(input);
351 self
352 }
353 /// <p>The instance architecture. The default option is <code>x86_64</code>. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html">Instance Families and Types</a>.</p>
354 pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
355 self.inner.get_architecture()
356 }
357 /// <p>The instance root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
358 pub fn root_device_type(mut self, input: crate::types::RootDeviceType) -> Self {
359 self.inner = self.inner.root_device_type(input);
360 self
361 }
362 /// <p>The instance root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
363 pub fn set_root_device_type(mut self, input: ::std::option::Option<crate::types::RootDeviceType>) -> Self {
364 self.inner = self.inner.set_root_device_type(input);
365 self
366 }
367 /// <p>The instance root device type. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device">Storage for the Root Device</a>.</p>
368 pub fn get_root_device_type(&self) -> &::std::option::Option<crate::types::RootDeviceType> {
369 self.inner.get_root_device_type()
370 }
371 ///
372 /// Appends an item to `BlockDeviceMappings`.
373 ///
374 /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
375 ///
376 /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block devices. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block Device Mapping</a>. Note that block device mappings are not supported for custom AMIs.</p>
377 pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
378 self.inner = self.inner.block_device_mappings(input);
379 self
380 }
381 /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block devices. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block Device Mapping</a>. Note that block device mappings are not supported for custom AMIs.</p>
382 pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
383 self.inner = self.inner.set_block_device_mappings(input);
384 self
385 }
386 /// <p>An array of <code>BlockDeviceMapping</code> objects that specify the instance's block devices. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block Device Mapping</a>. Note that block device mappings are not supported for custom AMIs.</p>
387 pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
388 self.inner.get_block_device_mappings()
389 }
390 /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. To control when updates are installed, set this value to <code>false</code>. You must then update your instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
391 /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
392 /// </note>
393 pub fn install_updates_on_boot(mut self, input: bool) -> Self {
394 self.inner = self.inner.install_updates_on_boot(input);
395 self
396 }
397 /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. To control when updates are installed, set this value to <code>false</code>. You must then update your instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
398 /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
399 /// </note>
400 pub fn set_install_updates_on_boot(mut self, input: ::std::option::Option<bool>) -> Self {
401 self.inner = self.inner.set_install_updates_on_boot(input);
402 self
403 }
404 /// <p>Whether to install operating system and package updates when the instance boots. The default value is <code>true</code>. To control when updates are installed, set this value to <code>false</code>. You must then update your instances manually by using <code>CreateDeployment</code> to run the <code>update_dependencies</code> stack command or by manually running <code>yum</code> (Amazon Linux) or <code>apt-get</code> (Ubuntu) on the instances.</p><note>
405 /// <p>We strongly recommend using the default value of <code>true</code> to ensure that your instances have the latest security updates.</p>
406 /// </note>
407 pub fn get_install_updates_on_boot(&self) -> &::std::option::Option<bool> {
408 self.inner.get_install_updates_on_boot()
409 }
410 /// <p>Whether to create an Amazon EBS-optimized instance.</p>
411 pub fn ebs_optimized(mut self, input: bool) -> Self {
412 self.inner = self.inner.ebs_optimized(input);
413 self
414 }
415 /// <p>Whether to create an Amazon EBS-optimized instance.</p>
416 pub fn set_ebs_optimized(mut self, input: ::std::option::Option<bool>) -> Self {
417 self.inner = self.inner.set_ebs_optimized(input);
418 self
419 }
420 /// <p>Whether to create an Amazon EBS-optimized instance.</p>
421 pub fn get_ebs_optimized(&self) -> &::std::option::Option<bool> {
422 self.inner.get_ebs_optimized()
423 }
424 /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
425 /// <ul>
426 /// <li>
427 /// <p><code>INHERIT</code> - Use the stack's default agent version setting.</p></li>
428 /// <li>
429 /// <p><i>version_number</i> - Use the specified agent version. This value overrides the stack's default setting. To update the agent version, edit the instance configuration and specify a new version. OpsWorks Stacks installs that version on the instance.</p></li>
430 /// </ul>
431 /// <p>The default setting is <code>INHERIT</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p>
432 pub fn agent_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
433 self.inner = self.inner.agent_version(input.into());
434 self
435 }
436 /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
437 /// <ul>
438 /// <li>
439 /// <p><code>INHERIT</code> - Use the stack's default agent version setting.</p></li>
440 /// <li>
441 /// <p><i>version_number</i> - Use the specified agent version. This value overrides the stack's default setting. To update the agent version, edit the instance configuration and specify a new version. OpsWorks Stacks installs that version on the instance.</p></li>
442 /// </ul>
443 /// <p>The default setting is <code>INHERIT</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p>
444 pub fn set_agent_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
445 self.inner = self.inner.set_agent_version(input);
446 self
447 }
448 /// <p>The default OpsWorks Stacks agent version. You have the following options:</p>
449 /// <ul>
450 /// <li>
451 /// <p><code>INHERIT</code> - Use the stack's default agent version setting.</p></li>
452 /// <li>
453 /// <p><i>version_number</i> - Use the specified agent version. This value overrides the stack's default setting. To update the agent version, edit the instance configuration and specify a new version. OpsWorks Stacks installs that version on the instance.</p></li>
454 /// </ul>
455 /// <p>The default setting is <code>INHERIT</code>. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call <code>DescribeAgentVersions</code>. AgentVersion cannot be set to Chef 12.2.</p>
456 pub fn get_agent_version(&self) -> &::std::option::Option<::std::string::String> {
457 self.inner.get_agent_version()
458 }
459 /// <p>The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: <code>dedicated</code>, <code>default</code>, or <code>host</code>. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Dedicated Hosts Overview</a> and <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Amazon EC2 Dedicated Hosts</a>. For more information about dedicated instances, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html">Dedicated Instances</a> and <a href="http://aws.amazon.com/ec2/purchasing-options/dedicated-instances/">Amazon EC2 Dedicated Instances</a>.</p>
460 pub fn tenancy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
461 self.inner = self.inner.tenancy(input.into());
462 self
463 }
464 /// <p>The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: <code>dedicated</code>, <code>default</code>, or <code>host</code>. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Dedicated Hosts Overview</a> and <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Amazon EC2 Dedicated Hosts</a>. For more information about dedicated instances, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html">Dedicated Instances</a> and <a href="http://aws.amazon.com/ec2/purchasing-options/dedicated-instances/">Amazon EC2 Dedicated Instances</a>.</p>
465 pub fn set_tenancy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
466 self.inner = self.inner.set_tenancy(input);
467 self
468 }
469 /// <p>The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: <code>dedicated</code>, <code>default</code>, or <code>host</code>. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Dedicated Hosts Overview</a> and <a href="http://aws.amazon.com/ec2/dedicated-hosts/">Amazon EC2 Dedicated Hosts</a>. For more information about dedicated instances, see <a href="https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/dedicated-instance.html">Dedicated Instances</a> and <a href="http://aws.amazon.com/ec2/purchasing-options/dedicated-instances/">Amazon EC2 Dedicated Instances</a>.</p>
470 pub fn get_tenancy(&self) -> &::std::option::Option<::std::string::String> {
471 self.inner.get_tenancy()
472 }
473}