aws_sdk_autoscaling/operation/create_launch_configuration/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_launch_configuration::_create_launch_configuration_output::CreateLaunchConfigurationOutputBuilder;
3
4pub use crate::operation::create_launch_configuration::_create_launch_configuration_input::CreateLaunchConfigurationInputBuilder;
5
6impl crate::operation::create_launch_configuration::builders::CreateLaunchConfigurationInputBuilder {
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_launch_configuration::CreateLaunchConfigurationOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_launch_configuration::CreateLaunchConfigurationError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_launch_configuration();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateLaunchConfiguration`.
24///
25/// <p>Creates a launch configuration.</p>
26/// <p>If you exceed your maximum limit of launch configurations, the call fails. To query this limit, call the <a href="https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html">DescribeAccountLimits</a> API. For information about updating this limit, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-quotas.html">Quotas for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
27/// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html">Launch configurations</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p><note>
28/// <p>Amazon EC2 Auto Scaling configures instances launched as part of an Auto Scaling group using either a launch template or a launch configuration. We strongly recommend that you do not use launch configurations. They do not provide full functionality for Amazon EC2 Auto Scaling or Amazon EC2. For information about using launch templates, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-templates.html">Launch templates</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
29/// </note>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct CreateLaunchConfigurationFluentBuilder {
32 handle: ::std::sync::Arc<crate::client::Handle>,
33 inner: crate::operation::create_launch_configuration::builders::CreateLaunchConfigurationInputBuilder,
34 config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37 crate::client::customize::internal::CustomizableSend<
38 crate::operation::create_launch_configuration::CreateLaunchConfigurationOutput,
39 crate::operation::create_launch_configuration::CreateLaunchConfigurationError,
40 > for CreateLaunchConfigurationFluentBuilder
41{
42 fn send(
43 self,
44 config_override: crate::config::Builder,
45 ) -> crate::client::customize::internal::BoxFuture<
46 crate::client::customize::internal::SendResult<
47 crate::operation::create_launch_configuration::CreateLaunchConfigurationOutput,
48 crate::operation::create_launch_configuration::CreateLaunchConfigurationError,
49 >,
50 > {
51 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52 }
53}
54impl CreateLaunchConfigurationFluentBuilder {
55 /// Creates a new `CreateLaunchConfigurationFluentBuilder`.
56 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57 Self {
58 handle,
59 inner: ::std::default::Default::default(),
60 config_override: ::std::option::Option::None,
61 }
62 }
63 /// Access the CreateLaunchConfiguration as a reference.
64 pub fn as_input(&self) -> &crate::operation::create_launch_configuration::builders::CreateLaunchConfigurationInputBuilder {
65 &self.inner
66 }
67 /// Sends the request and returns the response.
68 ///
69 /// If an error occurs, an `SdkError` will be returned with additional details that
70 /// can be matched against.
71 ///
72 /// By default, any retryable failures will be retried twice. Retry behavior
73 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74 /// set when configuring the client.
75 pub async fn send(
76 self,
77 ) -> ::std::result::Result<
78 crate::operation::create_launch_configuration::CreateLaunchConfigurationOutput,
79 ::aws_smithy_runtime_api::client::result::SdkError<
80 crate::operation::create_launch_configuration::CreateLaunchConfigurationError,
81 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82 >,
83 > {
84 let input = self
85 .inner
86 .build()
87 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88 let runtime_plugins = crate::operation::create_launch_configuration::CreateLaunchConfiguration::operation_runtime_plugins(
89 self.handle.runtime_plugins.clone(),
90 &self.handle.conf,
91 self.config_override,
92 );
93 crate::operation::create_launch_configuration::CreateLaunchConfiguration::orchestrate(&runtime_plugins, input).await
94 }
95
96 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97 pub fn customize(
98 self,
99 ) -> crate::client::customize::CustomizableOperation<
100 crate::operation::create_launch_configuration::CreateLaunchConfigurationOutput,
101 crate::operation::create_launch_configuration::CreateLaunchConfigurationError,
102 Self,
103 > {
104 crate::client::customize::CustomizableOperation::new(self)
105 }
106 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107 self.set_config_override(::std::option::Option::Some(config_override.into()));
108 self
109 }
110
111 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112 self.config_override = config_override;
113 self
114 }
115 /// <p>The name of the launch configuration. This name must be unique per Region per account.</p>
116 pub fn launch_configuration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.inner = self.inner.launch_configuration_name(input.into());
118 self
119 }
120 /// <p>The name of the launch configuration. This name must be unique per Region per account.</p>
121 pub fn set_launch_configuration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.inner = self.inner.set_launch_configuration_name(input);
123 self
124 }
125 /// <p>The name of the launch configuration. This name must be unique per Region per account.</p>
126 pub fn get_launch_configuration_name(&self) -> &::std::option::Option<::std::string::String> {
127 self.inner.get_launch_configuration_name()
128 }
129 /// <p>The ID of the Amazon Machine Image (AMI) that was assigned during registration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Find a Linux AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
130 /// <p>If you specify <code>InstanceId</code>, an <code>ImageId</code> is not required.</p>
131 pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.inner = self.inner.image_id(input.into());
133 self
134 }
135 /// <p>The ID of the Amazon Machine Image (AMI) that was assigned during registration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Find a Linux AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
136 /// <p>If you specify <code>InstanceId</code>, an <code>ImageId</code> is not required.</p>
137 pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.inner = self.inner.set_image_id(input);
139 self
140 }
141 /// <p>The ID of the Amazon Machine Image (AMI) that was assigned during registration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Find a Linux AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
142 /// <p>If you specify <code>InstanceId</code>, an <code>ImageId</code> is not required.</p>
143 pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
144 self.inner.get_image_id()
145 }
146 /// <p>The name of the key pair. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs and Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
147 pub fn key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148 self.inner = self.inner.key_name(input.into());
149 self
150 }
151 /// <p>The name of the key pair. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs and Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
152 pub fn set_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.inner = self.inner.set_key_name(input);
154 self
155 }
156 /// <p>The name of the key pair. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html">Amazon EC2 key pairs and Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
157 pub fn get_key_name(&self) -> &::std::option::Option<::std::string::String> {
158 self.inner.get_key_name()
159 }
160 ///
161 /// Appends an item to `SecurityGroups`.
162 ///
163 /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
164 ///
165 /// <p>A list that contains the security group IDs to assign to the instances in the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html">Control traffic to your Amazon Web Services resources using security groups</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
166 pub fn security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167 self.inner = self.inner.security_groups(input.into());
168 self
169 }
170 /// <p>A list that contains the security group IDs to assign to the instances in the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html">Control traffic to your Amazon Web Services resources using security groups</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
171 pub fn set_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
172 self.inner = self.inner.set_security_groups(input);
173 self
174 }
175 /// <p>A list that contains the security group IDs to assign to the instances in the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html">Control traffic to your Amazon Web Services resources using security groups</a> in the <i>Amazon Virtual Private Cloud User Guide</i>.</p>
176 pub fn get_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
177 self.inner.get_security_groups()
178 }
179 /// <p>Available for backward compatibility.</p>
180 pub fn classic_link_vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181 self.inner = self.inner.classic_link_vpc_id(input.into());
182 self
183 }
184 /// <p>Available for backward compatibility.</p>
185 pub fn set_classic_link_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186 self.inner = self.inner.set_classic_link_vpc_id(input);
187 self
188 }
189 /// <p>Available for backward compatibility.</p>
190 pub fn get_classic_link_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
191 self.inner.get_classic_link_vpc_id()
192 }
193 ///
194 /// Appends an item to `ClassicLinkVPCSecurityGroups`.
195 ///
196 /// To override the contents of this collection use [`set_classic_link_vpc_security_groups`](Self::set_classic_link_vpc_security_groups).
197 ///
198 /// <p>Available for backward compatibility.</p>
199 pub fn classic_link_vpc_security_groups(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.inner = self.inner.classic_link_vpc_security_groups(input.into());
201 self
202 }
203 /// <p>Available for backward compatibility.</p>
204 pub fn set_classic_link_vpc_security_groups(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
205 self.inner = self.inner.set_classic_link_vpc_security_groups(input);
206 self
207 }
208 /// <p>Available for backward compatibility.</p>
209 pub fn get_classic_link_vpc_security_groups(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
210 self.inner.get_classic_link_vpc_security_groups()
211 }
212 /// <p>The user data to make available to the launched EC2 instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Linux) and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.</p>
213 pub fn user_data(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.inner = self.inner.user_data(input.into());
215 self
216 }
217 /// <p>The user data to make available to the launched EC2 instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Linux) and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.</p>
218 pub fn set_user_data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.inner = self.inner.set_user_data(input);
220 self
221 }
222 /// <p>The user data to make available to the launched EC2 instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Linux) and <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html">Instance metadata and user data</a> (Windows). If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.</p>
223 pub fn get_user_data(&self) -> &::std::option::Option<::std::string::String> {
224 self.inner.get_user_data()
225 }
226 /// <p>The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.</p>
227 /// <p>To create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request.</p>
228 /// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html">Create a launch configuration</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
229 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.inner = self.inner.instance_id(input.into());
231 self
232 }
233 /// <p>The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.</p>
234 /// <p>To create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request.</p>
235 /// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html">Create a launch configuration</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
236 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.inner = self.inner.set_instance_id(input);
238 self
239 }
240 /// <p>The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.</p>
241 /// <p>To create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request.</p>
242 /// <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html">Create a launch configuration</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
243 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
244 self.inner.get_instance_id()
245 }
246 /// <p>Specifies the instance type of the EC2 instance. For information about available instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes">Available instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
247 /// <p>If you specify <code>InstanceId</code>, an <code>InstanceType</code> is not required.</p>
248 pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249 self.inner = self.inner.instance_type(input.into());
250 self
251 }
252 /// <p>Specifies the instance type of the EC2 instance. For information about available instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes">Available instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
253 /// <p>If you specify <code>InstanceId</code>, an <code>InstanceType</code> is not required.</p>
254 pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
255 self.inner = self.inner.set_instance_type(input);
256 self
257 }
258 /// <p>Specifies the instance type of the EC2 instance. For information about available instance types, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes">Available instance types</a> in the <i>Amazon EC2 User Guide</i>.</p>
259 /// <p>If you specify <code>InstanceId</code>, an <code>InstanceType</code> is not required.</p>
260 pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
261 self.inner.get_instance_type()
262 }
263 /// <p>The ID of the kernel associated with the AMI.</p><note>
264 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
265 /// </note>
266 pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
267 self.inner = self.inner.kernel_id(input.into());
268 self
269 }
270 /// <p>The ID of the kernel associated with the AMI.</p><note>
271 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
272 /// </note>
273 pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
274 self.inner = self.inner.set_kernel_id(input);
275 self
276 }
277 /// <p>The ID of the kernel associated with the AMI.</p><note>
278 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
279 /// </note>
280 pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
281 self.inner.get_kernel_id()
282 }
283 /// <p>The ID of the RAM disk to select.</p><note>
284 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
285 /// </note>
286 pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287 self.inner = self.inner.ramdisk_id(input.into());
288 self
289 }
290 /// <p>The ID of the RAM disk to select.</p><note>
291 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
292 /// </note>
293 pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294 self.inner = self.inner.set_ramdisk_id(input);
295 self
296 }
297 /// <p>The ID of the RAM disk to select.</p><note>
298 /// <p>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">User provided kernels</a> in the <i>Amazon EC2 User Guide</i>.</p>
299 /// </note>
300 pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
301 self.inner.get_ramdisk_id()
302 }
303 ///
304 /// Appends an item to `BlockDeviceMappings`.
305 ///
306 /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
307 ///
308 /// <p>The block device mapping entries that define the block devices to attach to the instances at launch. By default, the block devices specified in the block device mapping for the AMI are used. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p>
309 pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
310 self.inner = self.inner.block_device_mappings(input);
311 self
312 }
313 /// <p>The block device mapping entries that define the block devices to attach to the instances at launch. By default, the block devices specified in the block device mapping for the AMI are used. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p>
314 pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
315 self.inner = self.inner.set_block_device_mappings(input);
316 self
317 }
318 /// <p>The block device mapping entries that define the block devices to attach to the instances at launch. By default, the block devices specified in the block device mapping for the AMI are used. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html">Block device mappings</a> in the <i>Amazon EC2 User Guide</i>.</p>
319 pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
320 self.inner.get_block_device_mappings()
321 }
322 /// <p>Controls whether instances in this group are launched with detailed (<code>true</code>) or basic (<code>false</code>) monitoring.</p>
323 /// <p>The default value is <code>true</code> (enabled).</p><important>
324 /// <p>When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html">Configure monitoring for Auto Scaling instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
325 /// </important>
326 pub fn instance_monitoring(mut self, input: crate::types::InstanceMonitoring) -> Self {
327 self.inner = self.inner.instance_monitoring(input);
328 self
329 }
330 /// <p>Controls whether instances in this group are launched with detailed (<code>true</code>) or basic (<code>false</code>) monitoring.</p>
331 /// <p>The default value is <code>true</code> (enabled).</p><important>
332 /// <p>When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html">Configure monitoring for Auto Scaling instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
333 /// </important>
334 pub fn set_instance_monitoring(mut self, input: ::std::option::Option<crate::types::InstanceMonitoring>) -> Self {
335 self.inner = self.inner.set_instance_monitoring(input);
336 self
337 }
338 /// <p>Controls whether instances in this group are launched with detailed (<code>true</code>) or basic (<code>false</code>) monitoring.</p>
339 /// <p>The default value is <code>true</code> (enabled).</p><important>
340 /// <p>When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute and your account is charged a fee. When you disable detailed monitoring, CloudWatch generates metrics every 5 minutes. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/latest/userguide/enable-as-instance-metrics.html">Configure monitoring for Auto Scaling instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
341 /// </important>
342 pub fn get_instance_monitoring(&self) -> &::std::option::Option<crate::types::InstanceMonitoring> {
343 self.inner.get_instance_monitoring()
344 }
345 /// <p>The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-template-spot-instances.html">Request Spot Instances for fault-tolerant and flexible applications</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
346 /// <p>Valid Range: Minimum value of 0.001</p><note>
347 /// <p>When you change your maximum price by creating a new launch configuration, running instances will continue to run as long as the maximum price for those running instances is higher than the current Spot price.</p>
348 /// </note>
349 pub fn spot_price(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
350 self.inner = self.inner.spot_price(input.into());
351 self
352 }
353 /// <p>The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-template-spot-instances.html">Request Spot Instances for fault-tolerant and flexible applications</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
354 /// <p>Valid Range: Minimum value of 0.001</p><note>
355 /// <p>When you change your maximum price by creating a new launch configuration, running instances will continue to run as long as the maximum price for those running instances is higher than the current Spot price.</p>
356 /// </note>
357 pub fn set_spot_price(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
358 self.inner = self.inner.set_spot_price(input);
359 self
360 }
361 /// <p>The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot price. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-template-spot-instances.html">Request Spot Instances for fault-tolerant and flexible applications</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
362 /// <p>Valid Range: Minimum value of 0.001</p><note>
363 /// <p>When you change your maximum price by creating a new launch configuration, running instances will continue to run as long as the maximum price for those running instances is higher than the current Spot price.</p>
364 /// </note>
365 pub fn get_spot_price(&self) -> &::std::option::Option<::std::string::String> {
366 self.inner.get_spot_price()
367 }
368 /// <p>The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html">IAM role for applications that run on Amazon EC2 instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
369 pub fn iam_instance_profile(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370 self.inner = self.inner.iam_instance_profile(input.into());
371 self
372 }
373 /// <p>The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html">IAM role for applications that run on Amazon EC2 instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
374 pub fn set_iam_instance_profile(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
375 self.inner = self.inner.set_iam_instance_profile(input);
376 self
377 }
378 /// <p>The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html">IAM role for applications that run on Amazon EC2 instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
379 pub fn get_iam_instance_profile(&self) -> &::std::option::Option<::std::string::String> {
380 self.inner.get_iam_instance_profile()
381 }
382 /// <p>Specifies whether the launch configuration is optimized for EBS I/O (<code>true</code>) or not (<code>false</code>). The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-optimized by default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS-optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
383 /// <p>The default value is <code>false</code>.</p>
384 pub fn ebs_optimized(mut self, input: bool) -> Self {
385 self.inner = self.inner.ebs_optimized(input);
386 self
387 }
388 /// <p>Specifies whether the launch configuration is optimized for EBS I/O (<code>true</code>) or not (<code>false</code>). The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-optimized by default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS-optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
389 /// <p>The default value is <code>false</code>.</p>
390 pub fn set_ebs_optimized(mut self, input: ::std::option::Option<bool>) -> Self {
391 self.inner = self.inner.set_ebs_optimized(input);
392 self
393 }
394 /// <p>Specifies whether the launch configuration is optimized for EBS I/O (<code>true</code>) or not (<code>false</code>). The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-optimized by default. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html">Amazon EBS-optimized instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
395 /// <p>The default value is <code>false</code>.</p>
396 pub fn get_ebs_optimized(&self) -> &::std::option::Option<bool> {
397 self.inner.get_ebs_optimized()
398 }
399 /// <p>Specifies whether to assign a public IPv4 address to the group's instances. If the instance is launched into a default subnet, the default is to assign a public IPv4 address, unless you disabled the option to assign a public IPv4 address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IPv4 address, unless you enabled the option to assign a public IPv4 address on the subnet.</p>
400 /// <p>If you specify <code>true</code>, each instance in the Auto Scaling group receives a unique public IPv4 address. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html">Provide network connectivity for your Auto Scaling instances using Amazon VPC</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
401 /// <p>If you specify this property, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
402 pub fn associate_public_ip_address(mut self, input: bool) -> Self {
403 self.inner = self.inner.associate_public_ip_address(input);
404 self
405 }
406 /// <p>Specifies whether to assign a public IPv4 address to the group's instances. If the instance is launched into a default subnet, the default is to assign a public IPv4 address, unless you disabled the option to assign a public IPv4 address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IPv4 address, unless you enabled the option to assign a public IPv4 address on the subnet.</p>
407 /// <p>If you specify <code>true</code>, each instance in the Auto Scaling group receives a unique public IPv4 address. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html">Provide network connectivity for your Auto Scaling instances using Amazon VPC</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
408 /// <p>If you specify this property, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
409 pub fn set_associate_public_ip_address(mut self, input: ::std::option::Option<bool>) -> Self {
410 self.inner = self.inner.set_associate_public_ip_address(input);
411 self
412 }
413 /// <p>Specifies whether to assign a public IPv4 address to the group's instances. If the instance is launched into a default subnet, the default is to assign a public IPv4 address, unless you disabled the option to assign a public IPv4 address on the subnet. If the instance is launched into a nondefault subnet, the default is not to assign a public IPv4 address, unless you enabled the option to assign a public IPv4 address on the subnet.</p>
414 /// <p>If you specify <code>true</code>, each instance in the Auto Scaling group receives a unique public IPv4 address. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html">Provide network connectivity for your Auto Scaling instances using Amazon VPC</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
415 /// <p>If you specify this property, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
416 pub fn get_associate_public_ip_address(&self) -> &::std::option::Option<bool> {
417 self.inner.get_associate_public_ip_address()
418 }
419 /// <p>The tenancy of the instance, either <code>default</code> or <code>dedicated</code>. An instance with <code>dedicated</code> tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC. To launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set to <code>default</code>), you must set the value of this property to <code>dedicated</code>.</p>
420 /// <p>If you specify <code>PlacementTenancy</code>, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
421 /// <p>Valid values: <code>default</code> | <code>dedicated</code></p>
422 pub fn placement_tenancy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
423 self.inner = self.inner.placement_tenancy(input.into());
424 self
425 }
426 /// <p>The tenancy of the instance, either <code>default</code> or <code>dedicated</code>. An instance with <code>dedicated</code> tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC. To launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set to <code>default</code>), you must set the value of this property to <code>dedicated</code>.</p>
427 /// <p>If you specify <code>PlacementTenancy</code>, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
428 /// <p>Valid values: <code>default</code> | <code>dedicated</code></p>
429 pub fn set_placement_tenancy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
430 self.inner = self.inner.set_placement_tenancy(input);
431 self
432 }
433 /// <p>The tenancy of the instance, either <code>default</code> or <code>dedicated</code>. An instance with <code>dedicated</code> tenancy runs on isolated, single-tenant hardware and can only be launched into a VPC. To launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set to <code>default</code>), you must set the value of this property to <code>dedicated</code>.</p>
434 /// <p>If you specify <code>PlacementTenancy</code>, you must specify at least one subnet for <code>VPCZoneIdentifier</code> when you create your group.</p>
435 /// <p>Valid values: <code>default</code> | <code>dedicated</code></p>
436 pub fn get_placement_tenancy(&self) -> &::std::option::Option<::std::string::String> {
437 self.inner.get_placement_tenancy()
438 }
439 /// <p>The metadata options for the instances. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds">Configure the instance metadata options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
440 pub fn metadata_options(mut self, input: crate::types::InstanceMetadataOptions) -> Self {
441 self.inner = self.inner.metadata_options(input);
442 self
443 }
444 /// <p>The metadata options for the instances. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds">Configure the instance metadata options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
445 pub fn set_metadata_options(mut self, input: ::std::option::Option<crate::types::InstanceMetadataOptions>) -> Self {
446 self.inner = self.inner.set_metadata_options(input);
447 self
448 }
449 /// <p>The metadata options for the instances. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-config.html#launch-configurations-imds">Configure the instance metadata options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
450 pub fn get_metadata_options(&self) -> &::std::option::Option<crate::types::InstanceMetadataOptions> {
451 self.inner.get_metadata_options()
452 }
453}