aws_sdk_autoscaling/operation/create_auto_scaling_group/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_auto_scaling_group::_create_auto_scaling_group_output::CreateAutoScalingGroupOutputBuilder;
3
4pub use crate::operation::create_auto_scaling_group::_create_auto_scaling_group_input::CreateAutoScalingGroupInputBuilder;
5
6impl crate::operation::create_auto_scaling_group::builders::CreateAutoScalingGroupInputBuilder {
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_auto_scaling_group::CreateAutoScalingGroupOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_auto_scaling_group::CreateAutoScalingGroupError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_auto_scaling_group();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateAutoScalingGroup`.
24///
25/// <p><b>We strongly recommend using a launch template when calling this operation to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2.</b></p>
26/// <p>Creates an Auto Scaling group with the specified name and attributes.</p>
27/// <p>If you exceed your maximum limit of Auto Scaling groups, 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>
28/// <p>If you're new to Amazon EC2 Auto Scaling, see the introductory tutorials in <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/get-started-with-ec2-auto-scaling.html">Get started with Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
29/// <p>Every Auto Scaling group has three size properties (<code>DesiredCapacity</code>, <code>MaxSize</code>, and <code>MinSize</code>). Usually, you set these sizes based on a specific number of instances. However, if you configure a mixed instances policy that defines weights for the instance types, you must specify these sizes with the same units that you use for weighting instances.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct CreateAutoScalingGroupFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::create_auto_scaling_group::builders::CreateAutoScalingGroupInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::create_auto_scaling_group::CreateAutoScalingGroupOutput,
39        crate::operation::create_auto_scaling_group::CreateAutoScalingGroupError,
40    > for CreateAutoScalingGroupFluentBuilder
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_auto_scaling_group::CreateAutoScalingGroupOutput,
48            crate::operation::create_auto_scaling_group::CreateAutoScalingGroupError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl CreateAutoScalingGroupFluentBuilder {
55    /// Creates a new `CreateAutoScalingGroupFluentBuilder`.
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 CreateAutoScalingGroup as a reference.
64    pub fn as_input(&self) -> &crate::operation::create_auto_scaling_group::builders::CreateAutoScalingGroupInputBuilder {
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_auto_scaling_group::CreateAutoScalingGroupOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::create_auto_scaling_group::CreateAutoScalingGroupError,
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_auto_scaling_group::CreateAutoScalingGroup::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::create_auto_scaling_group::CreateAutoScalingGroup::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_auto_scaling_group::CreateAutoScalingGroupOutput,
101        crate::operation::create_auto_scaling_group::CreateAutoScalingGroupError,
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 Auto Scaling group. This name must be unique per Region per account.</p>
116    /// <p>The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.</p><note>
117    /// <p>You cannot use a colon (:) in the name.</p>
118    /// </note>
119    pub fn auto_scaling_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.auto_scaling_group_name(input.into());
121        self
122    }
123    /// <p>The name of the Auto Scaling group. This name must be unique per Region per account.</p>
124    /// <p>The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.</p><note>
125    /// <p>You cannot use a colon (:) in the name.</p>
126    /// </note>
127    pub fn set_auto_scaling_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.inner = self.inner.set_auto_scaling_group_name(input);
129        self
130    }
131    /// <p>The name of the Auto Scaling group. This name must be unique per Region per account.</p>
132    /// <p>The name can contain any ASCII character 33 to 126 including most punctuation characters, digits, and upper and lowercased letters.</p><note>
133    /// <p>You cannot use a colon (:) in the name.</p>
134    /// </note>
135    pub fn get_auto_scaling_group_name(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_auto_scaling_group_name()
137    }
138    /// <p>The name of the launch configuration to use to launch instances.</p>
139    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p>
140    pub fn launch_configuration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.launch_configuration_name(input.into());
142        self
143    }
144    /// <p>The name of the launch configuration to use to launch instances.</p>
145    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p>
146    pub fn set_launch_configuration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_launch_configuration_name(input);
148        self
149    }
150    /// <p>The name of the launch configuration to use to launch instances.</p>
151    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p>
152    pub fn get_launch_configuration_name(&self) -> &::std::option::Option<::std::string::String> {
153        self.inner.get_launch_configuration_name()
154    }
155    /// <p>Information used to specify the launch template and version to use to launch instances.</p>
156    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p><note>
157    /// <p>The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html">Create a launch template for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
158    /// </note>
159    pub fn launch_template(mut self, input: crate::types::LaunchTemplateSpecification) -> Self {
160        self.inner = self.inner.launch_template(input);
161        self
162    }
163    /// <p>Information used to specify the launch template and version to use to launch instances.</p>
164    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p><note>
165    /// <p>The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html">Create a launch template for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
166    /// </note>
167    pub fn set_launch_template(mut self, input: ::std::option::Option<crate::types::LaunchTemplateSpecification>) -> Self {
168        self.inner = self.inner.set_launch_template(input);
169        self
170    }
171    /// <p>Information used to specify the launch template and version to use to launch instances.</p>
172    /// <p>Conditional: You must specify either a launch template (<code>LaunchTemplate</code> or <code>MixedInstancesPolicy</code>) or a launch configuration (<code>LaunchConfigurationName</code> or <code>InstanceId</code>).</p><note>
173    /// <p>The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html">Create a launch template for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
174    /// </note>
175    pub fn get_launch_template(&self) -> &::std::option::Option<crate::types::LaunchTemplateSpecification> {
176        self.inner.get_launch_template()
177    }
178    /// <p>The mixed instances policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html">Auto Scaling groups with multiple instance types and purchase options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
179    pub fn mixed_instances_policy(mut self, input: crate::types::MixedInstancesPolicy) -> Self {
180        self.inner = self.inner.mixed_instances_policy(input);
181        self
182    }
183    /// <p>The mixed instances policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html">Auto Scaling groups with multiple instance types and purchase options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
184    pub fn set_mixed_instances_policy(mut self, input: ::std::option::Option<crate::types::MixedInstancesPolicy>) -> Self {
185        self.inner = self.inner.set_mixed_instances_policy(input);
186        self
187    }
188    /// <p>The mixed instances policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html">Auto Scaling groups with multiple instance types and purchase options</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
189    pub fn get_mixed_instances_policy(&self) -> &::std::option::Option<crate::types::MixedInstancesPolicy> {
190        self.inner.get_mixed_instances_policy()
191    }
192    /// <p>The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html">DescribeInstances</a> API operation. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html">Create an Auto Scaling group using parameters from an existing instance</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
193    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.inner = self.inner.instance_id(input.into());
195        self
196    }
197    /// <p>The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html">DescribeInstances</a> API operation. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html">Create an Auto Scaling group using parameters from an existing instance</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
198    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.inner = self.inner.set_instance_id(input);
200        self
201    }
202    /// <p>The ID of the instance used to base the launch configuration on. If specified, Amazon EC2 Auto Scaling uses the configuration values from the specified instance to create a new launch configuration. To get the instance ID, use the Amazon EC2 <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html">DescribeInstances</a> API operation. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html">Create an Auto Scaling group using parameters from an existing instance</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
203    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
204        self.inner.get_instance_id()
205    }
206    /// <p>The minimum size of the group.</p>
207    pub fn min_size(mut self, input: i32) -> Self {
208        self.inner = self.inner.min_size(input);
209        self
210    }
211    /// <p>The minimum size of the group.</p>
212    pub fn set_min_size(mut self, input: ::std::option::Option<i32>) -> Self {
213        self.inner = self.inner.set_min_size(input);
214        self
215    }
216    /// <p>The minimum size of the group.</p>
217    pub fn get_min_size(&self) -> &::std::option::Option<i32> {
218        self.inner.get_min_size()
219    }
220    /// <p>The maximum size of the group.</p><note>
221    /// <p>With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above <code>MaxSize</code> to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above <code>MaxSize</code> by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).</p>
222    /// </note>
223    pub fn max_size(mut self, input: i32) -> Self {
224        self.inner = self.inner.max_size(input);
225        self
226    }
227    /// <p>The maximum size of the group.</p><note>
228    /// <p>With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above <code>MaxSize</code> to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above <code>MaxSize</code> by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).</p>
229    /// </note>
230    pub fn set_max_size(mut self, input: ::std::option::Option<i32>) -> Self {
231        self.inner = self.inner.set_max_size(input);
232        self
233    }
234    /// <p>The maximum size of the group.</p><note>
235    /// <p>With a mixed instances policy that uses instance weighting, Amazon EC2 Auto Scaling may need to go above <code>MaxSize</code> to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above <code>MaxSize</code> by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group).</p>
236    /// </note>
237    pub fn get_max_size(&self) -> &::std::option::Option<i32> {
238        self.inner.get_max_size()
239    }
240    /// <p>The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure auto scaling. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.</p>
241    pub fn desired_capacity(mut self, input: i32) -> Self {
242        self.inner = self.inner.desired_capacity(input);
243        self
244    }
245    /// <p>The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure auto scaling. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.</p>
246    pub fn set_desired_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
247        self.inner = self.inner.set_desired_capacity(input);
248        self
249    }
250    /// <p>The desired capacity is the initial capacity of the Auto Scaling group at the time of its creation and the capacity it attempts to maintain. It can scale beyond this capacity if you configure auto scaling. This number must be greater than or equal to the minimum size of the group and less than or equal to the maximum size of the group. If you do not specify a desired capacity, the default is the minimum size of the group.</p>
251    pub fn get_desired_capacity(&self) -> &::std::option::Option<i32> {
252        self.inner.get_desired_capacity()
253    }
254    /// <p><i>Only needed if you use simple scaling policies.</i></p>
255    /// <p>The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scaling-cooldowns.html">Scaling cooldowns for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
256    /// <p>Default: <code>300</code> seconds</p>
257    pub fn default_cooldown(mut self, input: i32) -> Self {
258        self.inner = self.inner.default_cooldown(input);
259        self
260    }
261    /// <p><i>Only needed if you use simple scaling policies.</i></p>
262    /// <p>The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scaling-cooldowns.html">Scaling cooldowns for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
263    /// <p>Default: <code>300</code> seconds</p>
264    pub fn set_default_cooldown(mut self, input: ::std::option::Option<i32>) -> Self {
265        self.inner = self.inner.set_default_cooldown(input);
266        self
267    }
268    /// <p><i>Only needed if you use simple scaling policies.</i></p>
269    /// <p>The amount of time, in seconds, between one scaling activity ending and another one starting due to simple scaling policies. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scaling-cooldowns.html">Scaling cooldowns for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
270    /// <p>Default: <code>300</code> seconds</p>
271    pub fn get_default_cooldown(&self) -> &::std::option::Option<i32> {
272        self.inner.get_default_cooldown()
273    }
274    ///
275    /// Appends an item to `AvailabilityZones`.
276    ///
277    /// To override the contents of this collection use [`set_availability_zones`](Self::set_availability_zones).
278    ///
279    /// <p>A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the <code>VPCZoneIdentifier</code> property, or for attaching a network interface when an existing network interface ID is specified in a launch template.</p>
280    pub fn availability_zones(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
281        self.inner = self.inner.availability_zones(input.into());
282        self
283    }
284    /// <p>A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the <code>VPCZoneIdentifier</code> property, or for attaching a network interface when an existing network interface ID is specified in a launch template.</p>
285    pub fn set_availability_zones(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
286        self.inner = self.inner.set_availability_zones(input);
287        self
288    }
289    /// <p>A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the <code>VPCZoneIdentifier</code> property, or for attaching a network interface when an existing network interface ID is specified in a launch template.</p>
290    pub fn get_availability_zones(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
291        self.inner.get_availability_zones()
292    }
293    ///
294    /// Appends an item to `LoadBalancerNames`.
295    ///
296    /// To override the contents of this collection use [`set_load_balancer_names`](Self::set_load_balancer_names).
297    ///
298    /// <p>A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the <code>TargetGroupARNs</code> property instead.</p>
299    pub fn load_balancer_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300        self.inner = self.inner.load_balancer_names(input.into());
301        self
302    }
303    /// <p>A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the <code>TargetGroupARNs</code> property instead.</p>
304    pub fn set_load_balancer_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
305        self.inner = self.inner.set_load_balancer_names(input);
306        self
307    }
308    /// <p>A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load Balancers, Network Load Balancers, and Gateway Load Balancers, specify the <code>TargetGroupARNs</code> property instead.</p>
309    pub fn get_load_balancer_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
310        self.inner.get_load_balancer_names()
311    }
312    ///
313    /// Appends an item to `TargetGroupARNs`.
314    ///
315    /// To override the contents of this collection use [`set_target_group_arns`](Self::set_target_group_arns).
316    ///
317    /// <p>The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html">Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
318    pub fn target_group_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319        self.inner = self.inner.target_group_arns(input.into());
320        self
321    }
322    /// <p>The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html">Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
323    pub fn set_target_group_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
324        self.inner = self.inner.set_target_group_arns(input);
325        self
326    }
327    /// <p>The Amazon Resource Names (ARN) of the Elastic Load Balancing target groups to associate with the Auto Scaling group. Instances are registered as targets with the target groups. The target groups receive incoming traffic and route requests to one or more registered targets. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html">Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
328    pub fn get_target_group_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
329        self.inner.get_target_group_arns()
330    }
331    /// <p>A comma-separated value string of one or more health check types.</p>
332    /// <p>The valid values are <code>EC2</code>, <code>EBS</code>, <code>ELB</code>, and <code>VPC_LATTICE</code>. <code>EC2</code> is the default health check and cannot be disabled. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html">Health checks for instances in an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
333    /// <p>Only specify <code>EC2</code> if you must clear a value that was previously set.</p>
334    pub fn health_check_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
335        self.inner = self.inner.health_check_type(input.into());
336        self
337    }
338    /// <p>A comma-separated value string of one or more health check types.</p>
339    /// <p>The valid values are <code>EC2</code>, <code>EBS</code>, <code>ELB</code>, and <code>VPC_LATTICE</code>. <code>EC2</code> is the default health check and cannot be disabled. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html">Health checks for instances in an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
340    /// <p>Only specify <code>EC2</code> if you must clear a value that was previously set.</p>
341    pub fn set_health_check_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
342        self.inner = self.inner.set_health_check_type(input);
343        self
344    }
345    /// <p>A comma-separated value string of one or more health check types.</p>
346    /// <p>The valid values are <code>EC2</code>, <code>EBS</code>, <code>ELB</code>, and <code>VPC_LATTICE</code>. <code>EC2</code> is the default health check and cannot be disabled. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html">Health checks for instances in an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
347    /// <p>Only specify <code>EC2</code> if you must clear a value that was previously set.</p>
348    pub fn get_health_check_type(&self) -> &::std::option::Option<::std::string::String> {
349        self.inner.get_health_check_type()
350    }
351    /// <p>The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the <code>InService</code> state. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html">Set the health check grace period for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
352    /// <p>Default: <code>0</code> seconds</p>
353    pub fn health_check_grace_period(mut self, input: i32) -> Self {
354        self.inner = self.inner.health_check_grace_period(input);
355        self
356    }
357    /// <p>The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the <code>InService</code> state. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html">Set the health check grace period for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
358    /// <p>Default: <code>0</code> seconds</p>
359    pub fn set_health_check_grace_period(mut self, input: ::std::option::Option<i32>) -> Self {
360        self.inner = self.inner.set_health_check_grace_period(input);
361        self
362    }
363    /// <p>The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health status of an EC2 instance that has come into service and marking it unhealthy due to a failed health check. This is useful if your instances do not immediately pass their health checks after they enter the <code>InService</code> state. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html">Set the health check grace period for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
364    /// <p>Default: <code>0</code> seconds</p>
365    pub fn get_health_check_grace_period(&self) -> &::std::option::Option<i32> {
366        self.inner.get_health_check_grace_period()
367    }
368    /// <p>The name of the placement group into which to launch your instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
369    /// <p>A <i>cluster</i> placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.</p>
370    /// </note>
371    pub fn placement_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
372        self.inner = self.inner.placement_group(input.into());
373        self
374    }
375    /// <p>The name of the placement group into which to launch your instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
376    /// <p>A <i>cluster</i> placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.</p>
377    /// </note>
378    pub fn set_placement_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379        self.inner = self.inner.set_placement_group(input);
380        self
381    }
382    /// <p>The name of the placement group into which to launch your instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">Placement groups</a> in the <i>Amazon EC2 User Guide</i>.</p><note>
383    /// <p>A <i>cluster</i> placement group is a logical grouping of instances within a single Availability Zone. You cannot specify multiple Availability Zones and a cluster placement group.</p>
384    /// </note>
385    pub fn get_placement_group(&self) -> &::std::option::Option<::std::string::String> {
386        self.inner.get_placement_group()
387    }
388    /// <p>A comma-separated list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If you specify <code>VPCZoneIdentifier</code> with <code>AvailabilityZones</code>, the subnets that you specify must reside in those Availability Zones.</p>
389    pub fn vpc_zone_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
390        self.inner = self.inner.vpc_zone_identifier(input.into());
391        self
392    }
393    /// <p>A comma-separated list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If you specify <code>VPCZoneIdentifier</code> with <code>AvailabilityZones</code>, the subnets that you specify must reside in those Availability Zones.</p>
394    pub fn set_vpc_zone_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
395        self.inner = self.inner.set_vpc_zone_identifier(input);
396        self
397    }
398    /// <p>A comma-separated list of subnet IDs for a virtual private cloud (VPC) where instances in the Auto Scaling group can be created. If you specify <code>VPCZoneIdentifier</code> with <code>AvailabilityZones</code>, the subnets that you specify must reside in those Availability Zones.</p>
399    pub fn get_vpc_zone_identifier(&self) -> &::std::option::Option<::std::string::String> {
400        self.inner.get_vpc_zone_identifier()
401    }
402    ///
403    /// Appends an item to `TerminationPolicies`.
404    ///
405    /// To override the contents of this collection use [`set_termination_policies`](Self::set_termination_policies).
406    ///
407    /// <p>A policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html">Configure termination policies for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
408    /// <p>Valid values: <code>Default</code> | <code>AllocationStrategy</code> | <code>ClosestToNextInstanceHour</code> | <code>NewestInstance</code> | <code>OldestInstance</code> | <code>OldestLaunchConfiguration</code> | <code>OldestLaunchTemplate</code> | <code>arn:aws:lambda:region:account-id:function:my-function:my-alias</code></p>
409    pub fn termination_policies(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
410        self.inner = self.inner.termination_policies(input.into());
411        self
412    }
413    /// <p>A policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html">Configure termination policies for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
414    /// <p>Valid values: <code>Default</code> | <code>AllocationStrategy</code> | <code>ClosestToNextInstanceHour</code> | <code>NewestInstance</code> | <code>OldestInstance</code> | <code>OldestLaunchConfiguration</code> | <code>OldestLaunchTemplate</code> | <code>arn:aws:lambda:region:account-id:function:my-function:my-alias</code></p>
415    pub fn set_termination_policies(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
416        self.inner = self.inner.set_termination_policies(input);
417        self
418    }
419    /// <p>A policy or a list of policies that are used to select the instance to terminate. These policies are executed in the order that you list them. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html">Configure termination policies for Amazon EC2 Auto Scaling</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
420    /// <p>Valid values: <code>Default</code> | <code>AllocationStrategy</code> | <code>ClosestToNextInstanceHour</code> | <code>NewestInstance</code> | <code>OldestInstance</code> | <code>OldestLaunchConfiguration</code> | <code>OldestLaunchTemplate</code> | <code>arn:aws:lambda:region:account-id:function:my-function:my-alias</code></p>
421    pub fn get_termination_policies(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
422        self.inner.get_termination_policies()
423    }
424    /// <p>Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html">Use instance scale-in protection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
425    pub fn new_instances_protected_from_scale_in(mut self, input: bool) -> Self {
426        self.inner = self.inner.new_instances_protected_from_scale_in(input);
427        self
428    }
429    /// <p>Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html">Use instance scale-in protection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
430    pub fn set_new_instances_protected_from_scale_in(mut self, input: ::std::option::Option<bool>) -> Self {
431        self.inner = self.inner.set_new_instances_protected_from_scale_in(input);
432        self
433    }
434    /// <p>Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling in. For more information about preventing instances from terminating on scale in, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html">Use instance scale-in protection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
435    pub fn get_new_instances_protected_from_scale_in(&self) -> &::std::option::Option<bool> {
436        self.inner.get_new_instances_protected_from_scale_in()
437    }
438    /// <p>Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html">Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions</a> in the in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
439    pub fn capacity_rebalance(mut self, input: bool) -> Self {
440        self.inner = self.inner.capacity_rebalance(input);
441        self
442    }
443    /// <p>Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html">Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions</a> in the in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
444    pub fn set_capacity_rebalance(mut self, input: ::std::option::Option<bool>) -> Self {
445        self.inner = self.inner.set_capacity_rebalance(input);
446        self
447    }
448    /// <p>Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling attempts to launch a Spot Instance whenever Amazon EC2 notifies that a Spot Instance is at an elevated risk of interruption. After launching a new instance, it then terminates an old instance. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-capacity-rebalancing.html">Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions</a> in the in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
449    pub fn get_capacity_rebalance(&self) -> &::std::option::Option<bool> {
450        self.inner.get_capacity_rebalance()
451    }
452    ///
453    /// Appends an item to `LifecycleHookSpecificationList`.
454    ///
455    /// To override the contents of this collection use [`set_lifecycle_hook_specification_list`](Self::set_lifecycle_hook_specification_list).
456    ///
457    /// <p>One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.</p>
458    pub fn lifecycle_hook_specification_list(mut self, input: crate::types::LifecycleHookSpecification) -> Self {
459        self.inner = self.inner.lifecycle_hook_specification_list(input);
460        self
461    }
462    /// <p>One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.</p>
463    pub fn set_lifecycle_hook_specification_list(
464        mut self,
465        input: ::std::option::Option<::std::vec::Vec<crate::types::LifecycleHookSpecification>>,
466    ) -> Self {
467        self.inner = self.inner.set_lifecycle_hook_specification_list(input);
468        self
469    }
470    /// <p>One or more lifecycle hooks to add to the Auto Scaling group before instances are launched.</p>
471    pub fn get_lifecycle_hook_specification_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LifecycleHookSpecification>> {
472        self.inner.get_lifecycle_hook_specification_list()
473    }
474    ///
475    /// Appends an item to `Tags`.
476    ///
477    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
478    ///
479    /// <p>One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-tagging.html">Tag Auto Scaling groups and instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
480    pub fn tags(mut self, input: crate::types::Tag) -> Self {
481        self.inner = self.inner.tags(input);
482        self
483    }
484    /// <p>One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-tagging.html">Tag Auto Scaling groups and instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
485    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
486        self.inner = self.inner.set_tags(input);
487        self
488    }
489    /// <p>One or more tags. You can tag your Auto Scaling group and propagate the tags to the Amazon EC2 instances it launches. Tags are not propagated to Amazon EBS volumes. To add tags to Amazon EBS volumes, specify the tags in a launch template but use caution. If the launch template specifies an instance tag with a key that is also specified for the Auto Scaling group, Amazon EC2 Auto Scaling overrides the value of that instance tag with the value specified by the Auto Scaling group. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-tagging.html">Tag Auto Scaling groups and instances</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
490    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
491        self.inner.get_tags()
492    }
493    /// <p>The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named <code>AWSServiceRoleForAutoScaling</code>, which it creates if it does not exist. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html">Service-linked roles</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
494    pub fn service_linked_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
495        self.inner = self.inner.service_linked_role_arn(input.into());
496        self
497    }
498    /// <p>The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named <code>AWSServiceRoleForAutoScaling</code>, which it creates if it does not exist. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html">Service-linked roles</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
499    pub fn set_service_linked_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
500        self.inner = self.inner.set_service_linked_role_arn(input);
501        self
502    }
503    /// <p>The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon Web Services service on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role named <code>AWSServiceRoleForAutoScaling</code>, which it creates if it does not exist. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html">Service-linked roles</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
504    pub fn get_service_linked_role_arn(&self) -> &::std::option::Option<::std::string::String> {
505        self.inner.get_service_linked_role_arn()
506    }
507    /// <p>The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html">Replace Auto Scaling instances based on maximum instance lifetime</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
508    pub fn max_instance_lifetime(mut self, input: i32) -> Self {
509        self.inner = self.inner.max_instance_lifetime(input);
510        self
511    }
512    /// <p>The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html">Replace Auto Scaling instances based on maximum instance lifetime</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
513    pub fn set_max_instance_lifetime(mut self, input: ::std::option::Option<i32>) -> Self {
514        self.inner = self.inner.set_max_instance_lifetime(input);
515        self
516    }
517    /// <p>The maximum amount of time, in seconds, that an instance can be in service. The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day). For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html">Replace Auto Scaling instances based on maximum instance lifetime</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
518    pub fn get_max_instance_lifetime(&self) -> &::std::option::Option<i32> {
519        self.inner.get_max_instance_lifetime()
520    }
521    /// <p>Reserved.</p>
522    pub fn context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
523        self.inner = self.inner.context(input.into());
524        self
525    }
526    /// <p>Reserved.</p>
527    pub fn set_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
528        self.inner = self.inner.set_context(input);
529        self
530    }
531    /// <p>Reserved.</p>
532    pub fn get_context(&self) -> &::std::option::Option<::std::string::String> {
533        self.inner.get_context()
534    }
535    /// <p>The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports <code>DesiredCapacityType</code> for attribute-based instance type selection only. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html">Create a mixed instances group using attribute-based instance type selection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
536    /// <p>By default, Amazon EC2 Auto Scaling specifies <code>units</code>, which translates into number of instances.</p>
537    /// <p>Valid values: <code>units</code> | <code>vcpu</code> | <code>memory-mib</code></p>
538    pub fn desired_capacity_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
539        self.inner = self.inner.desired_capacity_type(input.into());
540        self
541    }
542    /// <p>The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports <code>DesiredCapacityType</code> for attribute-based instance type selection only. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html">Create a mixed instances group using attribute-based instance type selection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
543    /// <p>By default, Amazon EC2 Auto Scaling specifies <code>units</code>, which translates into number of instances.</p>
544    /// <p>Valid values: <code>units</code> | <code>vcpu</code> | <code>memory-mib</code></p>
545    pub fn set_desired_capacity_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
546        self.inner = self.inner.set_desired_capacity_type(input);
547        self
548    }
549    /// <p>The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports <code>DesiredCapacityType</code> for attribute-based instance type selection only. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html">Create a mixed instances group using attribute-based instance type selection</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
550    /// <p>By default, Amazon EC2 Auto Scaling specifies <code>units</code>, which translates into number of instances.</p>
551    /// <p>Valid values: <code>units</code> | <code>vcpu</code> | <code>memory-mib</code></p>
552    pub fn get_desired_capacity_type(&self) -> &::std::option::Option<::std::string::String> {
553        self.inner.get_desired_capacity_type()
554    }
555    /// <p>The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the <code>InService</code> state.</p>
556    /// <p>During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">Set the default instance warmup for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p><important>
557    /// <p>To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, <i>even if it is set to 0 seconds</i>. To remove a value that you previously set, include the property but specify <code>-1</code> for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of <code>0</code> or other nominal value.</p>
558    /// </important>
559    /// <p>Default: None</p>
560    pub fn default_instance_warmup(mut self, input: i32) -> Self {
561        self.inner = self.inner.default_instance_warmup(input);
562        self
563    }
564    /// <p>The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the <code>InService</code> state.</p>
565    /// <p>During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">Set the default instance warmup for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p><important>
566    /// <p>To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, <i>even if it is set to 0 seconds</i>. To remove a value that you previously set, include the property but specify <code>-1</code> for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of <code>0</code> or other nominal value.</p>
567    /// </important>
568    /// <p>Default: None</p>
569    pub fn set_default_instance_warmup(mut self, input: ::std::option::Option<i32>) -> Self {
570        self.inner = self.inner.set_default_instance_warmup(input);
571        self
572    }
573    /// <p>The amount of time, in seconds, until a new instance is considered to have finished initializing and resource consumption to become stable after it enters the <code>InService</code> state.</p>
574    /// <p>During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html">Set the default instance warmup for an Auto Scaling group</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p><important>
575    /// <p>To manage various warm-up settings at the group level, we recommend that you set the default instance warmup, <i>even if it is set to 0 seconds</i>. To remove a value that you previously set, include the property but specify <code>-1</code> for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of <code>0</code> or other nominal value.</p>
576    /// </important>
577    /// <p>Default: None</p>
578    pub fn get_default_instance_warmup(&self) -> &::std::option::Option<i32> {
579        self.inner.get_default_instance_warmup()
580    }
581    ///
582    /// Appends an item to `TrafficSources`.
583    ///
584    /// To override the contents of this collection use [`set_traffic_sources`](Self::set_traffic_sources).
585    ///
586    /// <p>The list of traffic sources to attach to this Auto Scaling group. You can use any of the following as traffic sources for an Auto Scaling group: Classic Load Balancer, Application Load Balancer, Gateway Load Balancer, Network Load Balancer, and VPC Lattice.</p>
587    pub fn traffic_sources(mut self, input: crate::types::TrafficSourceIdentifier) -> Self {
588        self.inner = self.inner.traffic_sources(input);
589        self
590    }
591    /// <p>The list of traffic sources to attach to this Auto Scaling group. You can use any of the following as traffic sources for an Auto Scaling group: Classic Load Balancer, Application Load Balancer, Gateway Load Balancer, Network Load Balancer, and VPC Lattice.</p>
592    pub fn set_traffic_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TrafficSourceIdentifier>>) -> Self {
593        self.inner = self.inner.set_traffic_sources(input);
594        self
595    }
596    /// <p>The list of traffic sources to attach to this Auto Scaling group. You can use any of the following as traffic sources for an Auto Scaling group: Classic Load Balancer, Application Load Balancer, Gateway Load Balancer, Network Load Balancer, and VPC Lattice.</p>
597    pub fn get_traffic_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TrafficSourceIdentifier>> {
598        self.inner.get_traffic_sources()
599    }
600    /// <p>An instance maintenance policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html">Set instance maintenance policy</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
601    pub fn instance_maintenance_policy(mut self, input: crate::types::InstanceMaintenancePolicy) -> Self {
602        self.inner = self.inner.instance_maintenance_policy(input);
603        self
604    }
605    /// <p>An instance maintenance policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html">Set instance maintenance policy</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
606    pub fn set_instance_maintenance_policy(mut self, input: ::std::option::Option<crate::types::InstanceMaintenancePolicy>) -> Self {
607        self.inner = self.inner.set_instance_maintenance_policy(input);
608        self
609    }
610    /// <p>An instance maintenance policy. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html">Set instance maintenance policy</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
611    pub fn get_instance_maintenance_policy(&self) -> &::std::option::Option<crate::types::InstanceMaintenancePolicy> {
612        self.inner.get_instance_maintenance_policy()
613    }
614    /// <p>The instance capacity distribution across Availability Zones.</p>
615    pub fn availability_zone_distribution(mut self, input: crate::types::AvailabilityZoneDistribution) -> Self {
616        self.inner = self.inner.availability_zone_distribution(input);
617        self
618    }
619    /// <p>The instance capacity distribution across Availability Zones.</p>
620    pub fn set_availability_zone_distribution(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneDistribution>) -> Self {
621        self.inner = self.inner.set_availability_zone_distribution(input);
622        self
623    }
624    /// <p>The instance capacity distribution across Availability Zones.</p>
625    pub fn get_availability_zone_distribution(&self) -> &::std::option::Option<crate::types::AvailabilityZoneDistribution> {
626        self.inner.get_availability_zone_distribution()
627    }
628    /// <p>The policy for Availability Zone impairment.</p>
629    pub fn availability_zone_impairment_policy(mut self, input: crate::types::AvailabilityZoneImpairmentPolicy) -> Self {
630        self.inner = self.inner.availability_zone_impairment_policy(input);
631        self
632    }
633    /// <p>The policy for Availability Zone impairment.</p>
634    pub fn set_availability_zone_impairment_policy(mut self, input: ::std::option::Option<crate::types::AvailabilityZoneImpairmentPolicy>) -> Self {
635        self.inner = self.inner.set_availability_zone_impairment_policy(input);
636        self
637    }
638    /// <p>The policy for Availability Zone impairment.</p>
639    pub fn get_availability_zone_impairment_policy(&self) -> &::std::option::Option<crate::types::AvailabilityZoneImpairmentPolicy> {
640        self.inner.get_availability_zone_impairment_policy()
641    }
642    /// <p>If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
643    pub fn skip_zonal_shift_validation(mut self, input: bool) -> Self {
644        self.inner = self.inner.skip_zonal_shift_validation(input);
645        self
646    }
647    /// <p>If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
648    pub fn set_skip_zonal_shift_validation(mut self, input: ::std::option::Option<bool>) -> Self {
649        self.inner = self.inner.set_skip_zonal_shift_validation(input);
650        self
651    }
652    /// <p>If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.</p>
653    pub fn get_skip_zonal_shift_validation(&self) -> &::std::option::Option<bool> {
654        self.inner.get_skip_zonal_shift_validation()
655    }
656    /// <p>The capacity reservation specification for the Auto Scaling group.</p>
657    pub fn capacity_reservation_specification(mut self, input: crate::types::CapacityReservationSpecification) -> Self {
658        self.inner = self.inner.capacity_reservation_specification(input);
659        self
660    }
661    /// <p>The capacity reservation specification for the Auto Scaling group.</p>
662    pub fn set_capacity_reservation_specification(mut self, input: ::std::option::Option<crate::types::CapacityReservationSpecification>) -> Self {
663        self.inner = self.inner.set_capacity_reservation_specification(input);
664        self
665    }
666    /// <p>The capacity reservation specification for the Auto Scaling group.</p>
667    pub fn get_capacity_reservation_specification(&self) -> &::std::option::Option<crate::types::CapacityReservationSpecification> {
668        self.inner.get_capacity_reservation_specification()
669    }
670    /// <p>The instance lifecycle policy for the Auto Scaling group. This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a <code>Retained</code> state for manual intervention instead of automatic termination.</p><note>
671    /// <p>Instances in a Retained state will continue to incur standard EC2 charges until terminated.</p>
672    /// </note>
673    pub fn instance_lifecycle_policy(mut self, input: crate::types::InstanceLifecyclePolicy) -> Self {
674        self.inner = self.inner.instance_lifecycle_policy(input);
675        self
676    }
677    /// <p>The instance lifecycle policy for the Auto Scaling group. This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a <code>Retained</code> state for manual intervention instead of automatic termination.</p><note>
678    /// <p>Instances in a Retained state will continue to incur standard EC2 charges until terminated.</p>
679    /// </note>
680    pub fn set_instance_lifecycle_policy(mut self, input: ::std::option::Option<crate::types::InstanceLifecyclePolicy>) -> Self {
681        self.inner = self.inner.set_instance_lifecycle_policy(input);
682        self
683    }
684    /// <p>The instance lifecycle policy for the Auto Scaling group. This policy controls instance behavior when an instance transitions through its lifecycle states. Configure retention triggers to specify when instances should move to a <code>Retained</code> state for manual intervention instead of automatic termination.</p><note>
685    /// <p>Instances in a Retained state will continue to incur standard EC2 charges until terminated.</p>
686    /// </note>
687    pub fn get_instance_lifecycle_policy(&self) -> &::std::option::Option<crate::types::InstanceLifecyclePolicy> {
688        self.inner.get_instance_lifecycle_policy()
689    }
690}