{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AutoScaling.CreateAutoScalingGroup
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- __We strongly recommend using a launch template when calling this
-- operation to ensure full functionality for Amazon EC2 Auto Scaling and
-- Amazon EC2.__
--
-- Creates an Auto Scaling group with the specified name and attributes.
--
-- If you exceed your maximum limit of Auto Scaling groups, the call fails.
-- To query this limit, call the DescribeAccountLimits API. For information
-- about updating this limit, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html Amazon EC2 Auto Scaling service quotas>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- For introductory exercises for creating an Auto Scaling group, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/GettingStartedTutorial.html Getting started with Amazon EC2 Auto Scaling>
-- and
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-register-lbs-with-asg.html Tutorial: Set up a scaled and load-balanced application>
-- in the /Amazon EC2 Auto Scaling User Guide/. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html Auto Scaling groups>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Every Auto Scaling group has three size parameters (@DesiredCapacity@,
-- @MaxSize@, and @MinSize@). 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.
module Amazonka.AutoScaling.CreateAutoScalingGroup
  ( -- * Creating a Request
    CreateAutoScalingGroup (..),
    newCreateAutoScalingGroup,

    -- * Request Lenses
    createAutoScalingGroup_instanceId,
    createAutoScalingGroup_context,
    createAutoScalingGroup_terminationPolicies,
    createAutoScalingGroup_healthCheckGracePeriod,
    createAutoScalingGroup_serviceLinkedRoleARN,
    createAutoScalingGroup_newInstancesProtectedFromScaleIn,
    createAutoScalingGroup_vPCZoneIdentifier,
    createAutoScalingGroup_targetGroupARNs,
    createAutoScalingGroup_maxInstanceLifetime,
    createAutoScalingGroup_defaultCooldown,
    createAutoScalingGroup_availabilityZones,
    createAutoScalingGroup_desiredCapacity,
    createAutoScalingGroup_mixedInstancesPolicy,
    createAutoScalingGroup_launchConfigurationName,
    createAutoScalingGroup_lifecycleHookSpecificationList,
    createAutoScalingGroup_healthCheckType,
    createAutoScalingGroup_launchTemplate,
    createAutoScalingGroup_capacityRebalance,
    createAutoScalingGroup_placementGroup,
    createAutoScalingGroup_loadBalancerNames,
    createAutoScalingGroup_tags,
    createAutoScalingGroup_autoScalingGroupName,
    createAutoScalingGroup_minSize,
    createAutoScalingGroup_maxSize,

    -- * Destructuring the Response
    CreateAutoScalingGroupResponse (..),
    newCreateAutoScalingGroupResponse,
  )
where

import Amazonka.AutoScaling.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateAutoScalingGroup' smart constructor.
data CreateAutoScalingGroup = CreateAutoScalingGroup'
  { -- | 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
    -- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
    -- API operation. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html Creating an Auto Scaling group using an EC2 instance>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Reserved.
    CreateAutoScalingGroup -> Maybe Text
context :: Prelude.Maybe Prelude.Text,
    -- | 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
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html Controlling which Auto Scaling instances terminate during scale in>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe [Text]
terminationPolicies :: Prelude.Maybe [Prelude.Text],
    -- | 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. During this time, any health check failures for the instance
    -- are ignored. The default value is @0@. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period Health check grace period>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    --
    -- Conditional: Required if you are adding an @ELB@ health check.
    CreateAutoScalingGroup -> Maybe Int
healthCheckGracePeriod :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the service-linked role that the Auto
    -- Scaling group uses to call other Amazon Web Services on your behalf. By
    -- default, Amazon EC2 Auto Scaling uses a service-linked role named
    -- @AWSServiceRoleForAutoScaling@, which it creates if it does not exist.
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html Service-linked roles>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Text
serviceLinkedRoleARN :: Prelude.Maybe Prelude.Text,
    -- | 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
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection Instance scale-in protection>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Bool
newInstancesProtectedFromScaleIn' :: Prelude.Maybe Prelude.Bool,
    -- | 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
    -- @VPCZoneIdentifier@ with @AvailabilityZones@, the subnets that you
    -- specify for this parameter must reside in those Availability Zones.
    --
    -- Conditional: If your account supports EC2-Classic and VPC, this
    -- parameter is required to launch instances into a VPC.
    CreateAutoScalingGroup -> Maybe Text
vPCZoneIdentifier :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Names (ARN) of the target groups to associate with
    -- the Auto Scaling group. Instances are registered as targets in a target
    -- group, and traffic is routed to the target group. For more information,
    -- see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html Elastic Load Balancing and Amazon EC2 Auto Scaling>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe [Text]
targetGroupARNs :: Prelude.Maybe [Prelude.Text],
    -- | 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
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html Replacing Auto Scaling instances based on maximum instance lifetime>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Int
maxInstanceLifetime :: Prelude.Maybe Prelude.Int,
    -- | The amount of time, in seconds, after a scaling activity completes
    -- before another scaling activity can start. The default value is @300@.
    -- This setting applies when using simple scaling policies, but not when
    -- using other scaling policies or scheduled scaling. For more information,
    -- see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html Scaling cooldowns for Amazon EC2 Auto Scaling>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Int
defaultCooldown :: Prelude.Maybe Prelude.Int,
    -- | A list of Availability Zones where instances in the Auto Scaling group
    -- can be created. This parameter is optional if you specify one or more
    -- subnets for @VPCZoneIdentifier@.
    --
    -- Conditional: If your account supports EC2-Classic and VPC, this
    -- parameter is required to launch instances into EC2-Classic.
    CreateAutoScalingGroup -> Maybe [Text]
availabilityZones :: Prelude.Maybe [Prelude.Text],
    -- | 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.
    CreateAutoScalingGroup -> Maybe Int
desiredCapacity :: Prelude.Maybe Prelude.Int,
    -- | An embedded object that specifies a mixed instances policy. The required
    -- properties must be specified. If optional properties are unspecified,
    -- their default values are used.
    --
    -- The policy includes properties that not only define the distribution of
    -- On-Demand Instances and Spot Instances, the maximum price to pay for
    -- Spot Instances, and how the Auto Scaling group allocates instance types
    -- to fulfill On-Demand and Spot capacities, but also the properties that
    -- specify the instance configuration information—the launch template and
    -- instance types. The policy can also include a weight for each instance
    -- type and different launch templates for individual instance types. For
    -- more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html Auto Scaling groups with multiple instance types and purchase options>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe MixedInstancesPolicy
mixedInstancesPolicy :: Prelude.Maybe MixedInstancesPolicy,
    -- | The name of the launch configuration to use to launch instances.
    --
    -- Conditional: You must specify either a launch template (@LaunchTemplate@
    -- or @MixedInstancesPolicy@) or a launch configuration
    -- (@LaunchConfigurationName@ or @InstanceId@).
    CreateAutoScalingGroup -> Maybe Text
launchConfigurationName :: Prelude.Maybe Prelude.Text,
    -- | One or more lifecycle hooks for the group, which specify actions to
    -- perform when Amazon EC2 Auto Scaling launches or terminates instances.
    CreateAutoScalingGroup -> Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList :: Prelude.Maybe [LifecycleHookSpecification],
    -- | The service to use for the health checks. The valid values are @EC2@
    -- (default) and @ELB@. If you configure an Auto Scaling group to use load
    -- balancer (ELB) health checks, it considers the instance unhealthy if it
    -- fails either the EC2 status checks or the load balancer health checks.
    -- For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html Health checks for Auto Scaling instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Text
healthCheckType :: Prelude.Maybe Prelude.Text,
    -- | Parameters used to specify the launch template and version to use to
    -- launch instances.
    --
    -- Conditional: You must specify either a launch template (@LaunchTemplate@
    -- or @MixedInstancesPolicy@) or a launch configuration
    -- (@LaunchConfigurationName@ or @InstanceId@).
    --
    -- The launch template that is specified must be configured for use with an
    -- Auto Scaling group. For more information, see
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html Creating a launch template for an Auto Scaling group>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe LaunchTemplateSpecification
launchTemplate :: Prelude.Maybe LaunchTemplateSpecification,
    -- | 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
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html Amazon EC2 Auto Scaling Capacity Rebalancing>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe Bool
capacityRebalance :: Prelude.Maybe Prelude.Bool,
    -- | The name of an existing placement group into which to launch your
    -- instances, if any. A placement group is a logical grouping of instances
    -- within a single Availability Zone. You cannot specify multiple
    -- Availability Zones and a placement group. For more information, see
    -- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html Placement Groups>
    -- in the /Amazon EC2 User Guide for Linux Instances/.
    CreateAutoScalingGroup -> Maybe Text
placementGroup :: Prelude.Maybe Prelude.Text,
    -- | 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 @TargetGroupARNs@ property instead.
    CreateAutoScalingGroup -> Maybe [Text]
loadBalancerNames :: Prelude.Maybe [Prelude.Text],
    -- | 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
    -- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html Tagging Auto Scaling groups and instances>
    -- in the /Amazon EC2 Auto Scaling User Guide/.
    CreateAutoScalingGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the Auto Scaling group. This name must be unique per Region
    -- per account.
    CreateAutoScalingGroup -> Text
autoScalingGroupName :: Prelude.Text,
    -- | The minimum size of the group.
    CreateAutoScalingGroup -> Int
minSize :: Prelude.Int,
    -- | The maximum size of the group.
    --
    -- With a mixed instances policy that uses instance weighting, Amazon EC2
    -- Auto Scaling may need to go above @MaxSize@ to meet your capacity
    -- requirements. In this event, Amazon EC2 Auto Scaling will never go above
    -- @MaxSize@ by more than your largest instance weight (weights that define
    -- how many units each instance contributes to the desired capacity of the
    -- group).
    CreateAutoScalingGroup -> Int
maxSize :: Prelude.Int
  }
  deriving (CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool
(CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool)
-> (CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool)
-> Eq CreateAutoScalingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool
$c/= :: CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool
== :: CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool
$c== :: CreateAutoScalingGroup -> CreateAutoScalingGroup -> Bool
Prelude.Eq, ReadPrec [CreateAutoScalingGroup]
ReadPrec CreateAutoScalingGroup
Int -> ReadS CreateAutoScalingGroup
ReadS [CreateAutoScalingGroup]
(Int -> ReadS CreateAutoScalingGroup)
-> ReadS [CreateAutoScalingGroup]
-> ReadPrec CreateAutoScalingGroup
-> ReadPrec [CreateAutoScalingGroup]
-> Read CreateAutoScalingGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAutoScalingGroup]
$creadListPrec :: ReadPrec [CreateAutoScalingGroup]
readPrec :: ReadPrec CreateAutoScalingGroup
$creadPrec :: ReadPrec CreateAutoScalingGroup
readList :: ReadS [CreateAutoScalingGroup]
$creadList :: ReadS [CreateAutoScalingGroup]
readsPrec :: Int -> ReadS CreateAutoScalingGroup
$creadsPrec :: Int -> ReadS CreateAutoScalingGroup
Prelude.Read, Int -> CreateAutoScalingGroup -> ShowS
[CreateAutoScalingGroup] -> ShowS
CreateAutoScalingGroup -> String
(Int -> CreateAutoScalingGroup -> ShowS)
-> (CreateAutoScalingGroup -> String)
-> ([CreateAutoScalingGroup] -> ShowS)
-> Show CreateAutoScalingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAutoScalingGroup] -> ShowS
$cshowList :: [CreateAutoScalingGroup] -> ShowS
show :: CreateAutoScalingGroup -> String
$cshow :: CreateAutoScalingGroup -> String
showsPrec :: Int -> CreateAutoScalingGroup -> ShowS
$cshowsPrec :: Int -> CreateAutoScalingGroup -> ShowS
Prelude.Show, (forall x. CreateAutoScalingGroup -> Rep CreateAutoScalingGroup x)
-> (forall x.
    Rep CreateAutoScalingGroup x -> CreateAutoScalingGroup)
-> Generic CreateAutoScalingGroup
forall x. Rep CreateAutoScalingGroup x -> CreateAutoScalingGroup
forall x. CreateAutoScalingGroup -> Rep CreateAutoScalingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAutoScalingGroup x -> CreateAutoScalingGroup
$cfrom :: forall x. CreateAutoScalingGroup -> Rep CreateAutoScalingGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateAutoScalingGroup' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'instanceId', 'createAutoScalingGroup_instanceId' - 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
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- API operation. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html Creating an Auto Scaling group using an EC2 instance>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'context', 'createAutoScalingGroup_context' - Reserved.
--
-- 'terminationPolicies', 'createAutoScalingGroup_terminationPolicies' - 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html Controlling which Auto Scaling instances terminate during scale in>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'healthCheckGracePeriod', 'createAutoScalingGroup_healthCheckGracePeriod' - 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. During this time, any health check failures for the instance
-- are ignored. The default value is @0@. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period Health check grace period>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Conditional: Required if you are adding an @ELB@ health check.
--
-- 'serviceLinkedRoleARN', 'createAutoScalingGroup_serviceLinkedRoleARN' - The Amazon Resource Name (ARN) of the service-linked role that the Auto
-- Scaling group uses to call other Amazon Web Services on your behalf. By
-- default, Amazon EC2 Auto Scaling uses a service-linked role named
-- @AWSServiceRoleForAutoScaling@, which it creates if it does not exist.
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html Service-linked roles>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'newInstancesProtectedFromScaleIn'', 'createAutoScalingGroup_newInstancesProtectedFromScaleIn' - 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection Instance scale-in protection>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'vPCZoneIdentifier', 'createAutoScalingGroup_vPCZoneIdentifier' - 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
-- @VPCZoneIdentifier@ with @AvailabilityZones@, the subnets that you
-- specify for this parameter must reside in those Availability Zones.
--
-- Conditional: If your account supports EC2-Classic and VPC, this
-- parameter is required to launch instances into a VPC.
--
-- 'targetGroupARNs', 'createAutoScalingGroup_targetGroupARNs' - The Amazon Resource Names (ARN) of the target groups to associate with
-- the Auto Scaling group. Instances are registered as targets in a target
-- group, and traffic is routed to the target group. For more information,
-- see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html Elastic Load Balancing and Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'maxInstanceLifetime', 'createAutoScalingGroup_maxInstanceLifetime' - 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html Replacing Auto Scaling instances based on maximum instance lifetime>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'defaultCooldown', 'createAutoScalingGroup_defaultCooldown' - The amount of time, in seconds, after a scaling activity completes
-- before another scaling activity can start. The default value is @300@.
-- This setting applies when using simple scaling policies, but not when
-- using other scaling policies or scheduled scaling. For more information,
-- see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html Scaling cooldowns for Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'availabilityZones', 'createAutoScalingGroup_availabilityZones' - A list of Availability Zones where instances in the Auto Scaling group
-- can be created. This parameter is optional if you specify one or more
-- subnets for @VPCZoneIdentifier@.
--
-- Conditional: If your account supports EC2-Classic and VPC, this
-- parameter is required to launch instances into EC2-Classic.
--
-- 'desiredCapacity', 'createAutoScalingGroup_desiredCapacity' - 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.
--
-- 'mixedInstancesPolicy', 'createAutoScalingGroup_mixedInstancesPolicy' - An embedded object that specifies a mixed instances policy. The required
-- properties must be specified. If optional properties are unspecified,
-- their default values are used.
--
-- The policy includes properties that not only define the distribution of
-- On-Demand Instances and Spot Instances, the maximum price to pay for
-- Spot Instances, and how the Auto Scaling group allocates instance types
-- to fulfill On-Demand and Spot capacities, but also the properties that
-- specify the instance configuration information—the launch template and
-- instance types. The policy can also include a weight for each instance
-- type and different launch templates for individual instance types. For
-- more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html Auto Scaling groups with multiple instance types and purchase options>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'launchConfigurationName', 'createAutoScalingGroup_launchConfigurationName' - The name of the launch configuration to use to launch instances.
--
-- Conditional: You must specify either a launch template (@LaunchTemplate@
-- or @MixedInstancesPolicy@) or a launch configuration
-- (@LaunchConfigurationName@ or @InstanceId@).
--
-- 'lifecycleHookSpecificationList', 'createAutoScalingGroup_lifecycleHookSpecificationList' - One or more lifecycle hooks for the group, which specify actions to
-- perform when Amazon EC2 Auto Scaling launches or terminates instances.
--
-- 'healthCheckType', 'createAutoScalingGroup_healthCheckType' - The service to use for the health checks. The valid values are @EC2@
-- (default) and @ELB@. If you configure an Auto Scaling group to use load
-- balancer (ELB) health checks, it considers the instance unhealthy if it
-- fails either the EC2 status checks or the load balancer health checks.
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html Health checks for Auto Scaling instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'launchTemplate', 'createAutoScalingGroup_launchTemplate' - Parameters used to specify the launch template and version to use to
-- launch instances.
--
-- Conditional: You must specify either a launch template (@LaunchTemplate@
-- or @MixedInstancesPolicy@) or a launch configuration
-- (@LaunchConfigurationName@ or @InstanceId@).
--
-- The launch template that is specified must be configured for use with an
-- Auto Scaling group. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html Creating a launch template for an Auto Scaling group>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'capacityRebalance', 'createAutoScalingGroup_capacityRebalance' - 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html Amazon EC2 Auto Scaling Capacity Rebalancing>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'placementGroup', 'createAutoScalingGroup_placementGroup' - The name of an existing placement group into which to launch your
-- instances, if any. A placement group is a logical grouping of instances
-- within a single Availability Zone. You cannot specify multiple
-- Availability Zones and a placement group. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html Placement Groups>
-- in the /Amazon EC2 User Guide for Linux Instances/.
--
-- 'loadBalancerNames', 'createAutoScalingGroup_loadBalancerNames' - 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 @TargetGroupARNs@ property instead.
--
-- 'tags', 'createAutoScalingGroup_tags' - 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html Tagging Auto Scaling groups and instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- 'autoScalingGroupName', 'createAutoScalingGroup_autoScalingGroupName' - The name of the Auto Scaling group. This name must be unique per Region
-- per account.
--
-- 'minSize', 'createAutoScalingGroup_minSize' - The minimum size of the group.
--
-- 'maxSize', 'createAutoScalingGroup_maxSize' - The maximum size of the group.
--
-- With a mixed instances policy that uses instance weighting, Amazon EC2
-- Auto Scaling may need to go above @MaxSize@ to meet your capacity
-- requirements. In this event, Amazon EC2 Auto Scaling will never go above
-- @MaxSize@ by more than your largest instance weight (weights that define
-- how many units each instance contributes to the desired capacity of the
-- group).
newCreateAutoScalingGroup ::
  -- | 'autoScalingGroupName'
  Prelude.Text ->
  -- | 'minSize'
  Prelude.Int ->
  -- | 'maxSize'
  Prelude.Int ->
  CreateAutoScalingGroup
newCreateAutoScalingGroup :: Text -> Int -> Int -> CreateAutoScalingGroup
newCreateAutoScalingGroup
  Text
pAutoScalingGroupName_
  Int
pMinSize_
  Int
pMaxSize_ =
    CreateAutoScalingGroup' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe MixedInstancesPolicy
-> Maybe Text
-> Maybe [LifecycleHookSpecification]
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe [Tag]
-> Text
-> Int
-> Int
-> CreateAutoScalingGroup
CreateAutoScalingGroup'
      { $sel:instanceId:CreateAutoScalingGroup' :: Maybe Text
instanceId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:context:CreateAutoScalingGroup' :: Maybe Text
context = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:terminationPolicies:CreateAutoScalingGroup' :: Maybe [Text]
terminationPolicies = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckGracePeriod:CreateAutoScalingGroup' :: Maybe Int
healthCheckGracePeriod = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:serviceLinkedRoleARN:CreateAutoScalingGroup' :: Maybe Text
serviceLinkedRoleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:newInstancesProtectedFromScaleIn':CreateAutoScalingGroup' :: Maybe Bool
newInstancesProtectedFromScaleIn' = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:vPCZoneIdentifier:CreateAutoScalingGroup' :: Maybe Text
vPCZoneIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:targetGroupARNs:CreateAutoScalingGroup' :: Maybe [Text]
targetGroupARNs = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:maxInstanceLifetime:CreateAutoScalingGroup' :: Maybe Int
maxInstanceLifetime = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultCooldown:CreateAutoScalingGroup' :: Maybe Int
defaultCooldown = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:availabilityZones:CreateAutoScalingGroup' :: Maybe [Text]
availabilityZones = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:desiredCapacity:CreateAutoScalingGroup' :: Maybe Int
desiredCapacity = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:mixedInstancesPolicy:CreateAutoScalingGroup' :: Maybe MixedInstancesPolicy
mixedInstancesPolicy = Maybe MixedInstancesPolicy
forall a. Maybe a
Prelude.Nothing,
        $sel:launchConfigurationName:CreateAutoScalingGroup' :: Maybe Text
launchConfigurationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lifecycleHookSpecificationList:CreateAutoScalingGroup' :: Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList = Maybe [LifecycleHookSpecification]
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckType:CreateAutoScalingGroup' :: Maybe Text
healthCheckType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:launchTemplate:CreateAutoScalingGroup' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
forall a. Maybe a
Prelude.Nothing,
        $sel:capacityRebalance:CreateAutoScalingGroup' :: Maybe Bool
capacityRebalance = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:placementGroup:CreateAutoScalingGroup' :: Maybe Text
placementGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:loadBalancerNames:CreateAutoScalingGroup' :: Maybe [Text]
loadBalancerNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateAutoScalingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:autoScalingGroupName:CreateAutoScalingGroup' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_,
        $sel:minSize:CreateAutoScalingGroup' :: Int
minSize = Int
pMinSize_,
        $sel:maxSize:CreateAutoScalingGroup' :: Int
maxSize = Int
pMaxSize_
      }

-- | 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
-- <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html DescribeInstances>
-- API operation. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html Creating an Auto Scaling group using an EC2 instance>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_instanceId :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_instanceId :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_instanceId = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:instanceId:CreateAutoScalingGroup' :: Maybe Text
instanceId = Maybe Text
a} :: CreateAutoScalingGroup)

-- | Reserved.
createAutoScalingGroup_context :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_context :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_context = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
context :: Maybe Text
$sel:context:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
context} -> Maybe Text
context) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:context:CreateAutoScalingGroup' :: Maybe Text
context = Maybe Text
a} :: CreateAutoScalingGroup)

-- | 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html Controlling which Auto Scaling instances terminate during scale in>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_terminationPolicies :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [Prelude.Text])
createAutoScalingGroup_terminationPolicies :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_terminationPolicies = (CreateAutoScalingGroup -> Maybe [Text])
-> (CreateAutoScalingGroup
    -> Maybe [Text] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [Text]
terminationPolicies :: Maybe [Text]
$sel:terminationPolicies:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
terminationPolicies} -> Maybe [Text]
terminationPolicies) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [Text]
a -> CreateAutoScalingGroup
s {$sel:terminationPolicies:CreateAutoScalingGroup' :: Maybe [Text]
terminationPolicies = Maybe [Text]
a} :: CreateAutoScalingGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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. During this time, any health check failures for the instance
-- are ignored. The default value is @0@. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period Health check grace period>
-- in the /Amazon EC2 Auto Scaling User Guide/.
--
-- Conditional: Required if you are adding an @ELB@ health check.
createAutoScalingGroup_healthCheckGracePeriod :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Int)
createAutoScalingGroup_healthCheckGracePeriod :: (Maybe Int -> f (Maybe Int))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_healthCheckGracePeriod = (CreateAutoScalingGroup -> Maybe Int)
-> (CreateAutoScalingGroup -> Maybe Int -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Int
healthCheckGracePeriod :: Maybe Int
$sel:healthCheckGracePeriod:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
healthCheckGracePeriod} -> Maybe Int
healthCheckGracePeriod) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Int
a -> CreateAutoScalingGroup
s {$sel:healthCheckGracePeriod:CreateAutoScalingGroup' :: Maybe Int
healthCheckGracePeriod = Maybe Int
a} :: CreateAutoScalingGroup)

-- | The Amazon Resource Name (ARN) of the service-linked role that the Auto
-- Scaling group uses to call other Amazon Web Services on your behalf. By
-- default, Amazon EC2 Auto Scaling uses a service-linked role named
-- @AWSServiceRoleForAutoScaling@, which it creates if it does not exist.
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html Service-linked roles>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_serviceLinkedRoleARN :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_serviceLinkedRoleARN :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_serviceLinkedRoleARN = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
serviceLinkedRoleARN :: Maybe Text
$sel:serviceLinkedRoleARN:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
serviceLinkedRoleARN} -> Maybe Text
serviceLinkedRoleARN) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:serviceLinkedRoleARN:CreateAutoScalingGroup' :: Maybe Text
serviceLinkedRoleARN = Maybe Text
a} :: CreateAutoScalingGroup)

-- | 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection Instance scale-in protection>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_newInstancesProtectedFromScaleIn :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Bool)
createAutoScalingGroup_newInstancesProtectedFromScaleIn :: (Maybe Bool -> f (Maybe Bool))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_newInstancesProtectedFromScaleIn = (CreateAutoScalingGroup -> Maybe Bool)
-> (CreateAutoScalingGroup -> Maybe Bool -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Bool
newInstancesProtectedFromScaleIn' :: Maybe Bool
$sel:newInstancesProtectedFromScaleIn':CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Bool
newInstancesProtectedFromScaleIn'} -> Maybe Bool
newInstancesProtectedFromScaleIn') (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Bool
a -> CreateAutoScalingGroup
s {$sel:newInstancesProtectedFromScaleIn':CreateAutoScalingGroup' :: Maybe Bool
newInstancesProtectedFromScaleIn' = Maybe Bool
a} :: CreateAutoScalingGroup)

-- | 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
-- @VPCZoneIdentifier@ with @AvailabilityZones@, the subnets that you
-- specify for this parameter must reside in those Availability Zones.
--
-- Conditional: If your account supports EC2-Classic and VPC, this
-- parameter is required to launch instances into a VPC.
createAutoScalingGroup_vPCZoneIdentifier :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_vPCZoneIdentifier :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_vPCZoneIdentifier = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
vPCZoneIdentifier :: Maybe Text
$sel:vPCZoneIdentifier:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
vPCZoneIdentifier} -> Maybe Text
vPCZoneIdentifier) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:vPCZoneIdentifier:CreateAutoScalingGroup' :: Maybe Text
vPCZoneIdentifier = Maybe Text
a} :: CreateAutoScalingGroup)

-- | The Amazon Resource Names (ARN) of the target groups to associate with
-- the Auto Scaling group. Instances are registered as targets in a target
-- group, and traffic is routed to the target group. For more information,
-- see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html Elastic Load Balancing and Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_targetGroupARNs :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [Prelude.Text])
createAutoScalingGroup_targetGroupARNs :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_targetGroupARNs = (CreateAutoScalingGroup -> Maybe [Text])
-> (CreateAutoScalingGroup
    -> Maybe [Text] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [Text]
targetGroupARNs :: Maybe [Text]
$sel:targetGroupARNs:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
targetGroupARNs} -> Maybe [Text]
targetGroupARNs) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [Text]
a -> CreateAutoScalingGroup
s {$sel:targetGroupARNs:CreateAutoScalingGroup' :: Maybe [Text]
targetGroupARNs = Maybe [Text]
a} :: CreateAutoScalingGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html Replacing Auto Scaling instances based on maximum instance lifetime>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_maxInstanceLifetime :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Int)
createAutoScalingGroup_maxInstanceLifetime :: (Maybe Int -> f (Maybe Int))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_maxInstanceLifetime = (CreateAutoScalingGroup -> Maybe Int)
-> (CreateAutoScalingGroup -> Maybe Int -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Int
maxInstanceLifetime :: Maybe Int
$sel:maxInstanceLifetime:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
maxInstanceLifetime} -> Maybe Int
maxInstanceLifetime) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Int
a -> CreateAutoScalingGroup
s {$sel:maxInstanceLifetime:CreateAutoScalingGroup' :: Maybe Int
maxInstanceLifetime = Maybe Int
a} :: CreateAutoScalingGroup)

-- | The amount of time, in seconds, after a scaling activity completes
-- before another scaling activity can start. The default value is @300@.
-- This setting applies when using simple scaling policies, but not when
-- using other scaling policies or scheduled scaling. For more information,
-- see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html Scaling cooldowns for Amazon EC2 Auto Scaling>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_defaultCooldown :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Int)
createAutoScalingGroup_defaultCooldown :: (Maybe Int -> f (Maybe Int))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_defaultCooldown = (CreateAutoScalingGroup -> Maybe Int)
-> (CreateAutoScalingGroup -> Maybe Int -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Int
defaultCooldown :: Maybe Int
$sel:defaultCooldown:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
defaultCooldown} -> Maybe Int
defaultCooldown) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Int
a -> CreateAutoScalingGroup
s {$sel:defaultCooldown:CreateAutoScalingGroup' :: Maybe Int
defaultCooldown = Maybe Int
a} :: CreateAutoScalingGroup)

-- | A list of Availability Zones where instances in the Auto Scaling group
-- can be created. This parameter is optional if you specify one or more
-- subnets for @VPCZoneIdentifier@.
--
-- Conditional: If your account supports EC2-Classic and VPC, this
-- parameter is required to launch instances into EC2-Classic.
createAutoScalingGroup_availabilityZones :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [Prelude.Text])
createAutoScalingGroup_availabilityZones :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_availabilityZones = (CreateAutoScalingGroup -> Maybe [Text])
-> (CreateAutoScalingGroup
    -> Maybe [Text] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [Text]
availabilityZones :: Maybe [Text]
$sel:availabilityZones:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
availabilityZones} -> Maybe [Text]
availabilityZones) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [Text]
a -> CreateAutoScalingGroup
s {$sel:availabilityZones:CreateAutoScalingGroup' :: Maybe [Text]
availabilityZones = Maybe [Text]
a} :: CreateAutoScalingGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
createAutoScalingGroup_desiredCapacity :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Int)
createAutoScalingGroup_desiredCapacity :: (Maybe Int -> f (Maybe Int))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_desiredCapacity = (CreateAutoScalingGroup -> Maybe Int)
-> (CreateAutoScalingGroup -> Maybe Int -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Int
desiredCapacity :: Maybe Int
$sel:desiredCapacity:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
desiredCapacity} -> Maybe Int
desiredCapacity) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Int
a -> CreateAutoScalingGroup
s {$sel:desiredCapacity:CreateAutoScalingGroup' :: Maybe Int
desiredCapacity = Maybe Int
a} :: CreateAutoScalingGroup)

-- | An embedded object that specifies a mixed instances policy. The required
-- properties must be specified. If optional properties are unspecified,
-- their default values are used.
--
-- The policy includes properties that not only define the distribution of
-- On-Demand Instances and Spot Instances, the maximum price to pay for
-- Spot Instances, and how the Auto Scaling group allocates instance types
-- to fulfill On-Demand and Spot capacities, but also the properties that
-- specify the instance configuration information—the launch template and
-- instance types. The policy can also include a weight for each instance
-- type and different launch templates for individual instance types. For
-- more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html Auto Scaling groups with multiple instance types and purchase options>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_mixedInstancesPolicy :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe MixedInstancesPolicy)
createAutoScalingGroup_mixedInstancesPolicy :: (Maybe MixedInstancesPolicy -> f (Maybe MixedInstancesPolicy))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_mixedInstancesPolicy = (CreateAutoScalingGroup -> Maybe MixedInstancesPolicy)
-> (CreateAutoScalingGroup
    -> Maybe MixedInstancesPolicy -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe MixedInstancesPolicy)
     (Maybe MixedInstancesPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe MixedInstancesPolicy
mixedInstancesPolicy :: Maybe MixedInstancesPolicy
$sel:mixedInstancesPolicy:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe MixedInstancesPolicy
mixedInstancesPolicy} -> Maybe MixedInstancesPolicy
mixedInstancesPolicy) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe MixedInstancesPolicy
a -> CreateAutoScalingGroup
s {$sel:mixedInstancesPolicy:CreateAutoScalingGroup' :: Maybe MixedInstancesPolicy
mixedInstancesPolicy = Maybe MixedInstancesPolicy
a} :: CreateAutoScalingGroup)

-- | The name of the launch configuration to use to launch instances.
--
-- Conditional: You must specify either a launch template (@LaunchTemplate@
-- or @MixedInstancesPolicy@) or a launch configuration
-- (@LaunchConfigurationName@ or @InstanceId@).
createAutoScalingGroup_launchConfigurationName :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_launchConfigurationName :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_launchConfigurationName = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
launchConfigurationName :: Maybe Text
$sel:launchConfigurationName:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
launchConfigurationName} -> Maybe Text
launchConfigurationName) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:launchConfigurationName:CreateAutoScalingGroup' :: Maybe Text
launchConfigurationName = Maybe Text
a} :: CreateAutoScalingGroup)

-- | One or more lifecycle hooks for the group, which specify actions to
-- perform when Amazon EC2 Auto Scaling launches or terminates instances.
createAutoScalingGroup_lifecycleHookSpecificationList :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [LifecycleHookSpecification])
createAutoScalingGroup_lifecycleHookSpecificationList :: (Maybe [LifecycleHookSpecification]
 -> f (Maybe [LifecycleHookSpecification]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_lifecycleHookSpecificationList = (CreateAutoScalingGroup -> Maybe [LifecycleHookSpecification])
-> (CreateAutoScalingGroup
    -> Maybe [LifecycleHookSpecification] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [LifecycleHookSpecification])
     (Maybe [LifecycleHookSpecification])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList :: Maybe [LifecycleHookSpecification]
$sel:lifecycleHookSpecificationList:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList} -> Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [LifecycleHookSpecification]
a -> CreateAutoScalingGroup
s {$sel:lifecycleHookSpecificationList:CreateAutoScalingGroup' :: Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList = Maybe [LifecycleHookSpecification]
a} :: CreateAutoScalingGroup) ((Maybe [LifecycleHookSpecification]
  -> f (Maybe [LifecycleHookSpecification]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [LifecycleHookSpecification]
     -> f (Maybe [LifecycleHookSpecification]))
    -> Maybe [LifecycleHookSpecification]
    -> f (Maybe [LifecycleHookSpecification]))
-> (Maybe [LifecycleHookSpecification]
    -> f (Maybe [LifecycleHookSpecification]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
-> Iso
     (Maybe [LifecycleHookSpecification])
     (Maybe [LifecycleHookSpecification])
     (Maybe [LifecycleHookSpecification])
     (Maybe [LifecycleHookSpecification])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
  [LifecycleHookSpecification]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The service to use for the health checks. The valid values are @EC2@
-- (default) and @ELB@. If you configure an Auto Scaling group to use load
-- balancer (ELB) health checks, it considers the instance unhealthy if it
-- fails either the EC2 status checks or the load balancer health checks.
-- For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html Health checks for Auto Scaling instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_healthCheckType :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_healthCheckType :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_healthCheckType = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
healthCheckType :: Maybe Text
$sel:healthCheckType:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
healthCheckType} -> Maybe Text
healthCheckType) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:healthCheckType:CreateAutoScalingGroup' :: Maybe Text
healthCheckType = Maybe Text
a} :: CreateAutoScalingGroup)

-- | Parameters used to specify the launch template and version to use to
-- launch instances.
--
-- Conditional: You must specify either a launch template (@LaunchTemplate@
-- or @MixedInstancesPolicy@) or a launch configuration
-- (@LaunchConfigurationName@ or @InstanceId@).
--
-- The launch template that is specified must be configured for use with an
-- Auto Scaling group. For more information, see
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html Creating a launch template for an Auto Scaling group>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_launchTemplate :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe LaunchTemplateSpecification)
createAutoScalingGroup_launchTemplate :: (Maybe LaunchTemplateSpecification
 -> f (Maybe LaunchTemplateSpecification))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_launchTemplate = (CreateAutoScalingGroup -> Maybe LaunchTemplateSpecification)
-> (CreateAutoScalingGroup
    -> Maybe LaunchTemplateSpecification -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe LaunchTemplateSpecification)
     (Maybe LaunchTemplateSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe LaunchTemplateSpecification
launchTemplate :: Maybe LaunchTemplateSpecification
$sel:launchTemplate:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe LaunchTemplateSpecification
launchTemplate} -> Maybe LaunchTemplateSpecification
launchTemplate) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe LaunchTemplateSpecification
a -> CreateAutoScalingGroup
s {$sel:launchTemplate:CreateAutoScalingGroup' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
a} :: CreateAutoScalingGroup)

-- | 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html Amazon EC2 Auto Scaling Capacity Rebalancing>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_capacityRebalance :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Bool)
createAutoScalingGroup_capacityRebalance :: (Maybe Bool -> f (Maybe Bool))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_capacityRebalance = (CreateAutoScalingGroup -> Maybe Bool)
-> (CreateAutoScalingGroup -> Maybe Bool -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Bool
capacityRebalance :: Maybe Bool
$sel:capacityRebalance:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Bool
capacityRebalance} -> Maybe Bool
capacityRebalance) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Bool
a -> CreateAutoScalingGroup
s {$sel:capacityRebalance:CreateAutoScalingGroup' :: Maybe Bool
capacityRebalance = Maybe Bool
a} :: CreateAutoScalingGroup)

-- | The name of an existing placement group into which to launch your
-- instances, if any. A placement group is a logical grouping of instances
-- within a single Availability Zone. You cannot specify multiple
-- Availability Zones and a placement group. For more information, see
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html Placement Groups>
-- in the /Amazon EC2 User Guide for Linux Instances/.
createAutoScalingGroup_placementGroup :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe Prelude.Text)
createAutoScalingGroup_placementGroup :: (Maybe Text -> f (Maybe Text))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_placementGroup = (CreateAutoScalingGroup -> Maybe Text)
-> (CreateAutoScalingGroup -> Maybe Text -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe Text
placementGroup :: Maybe Text
$sel:placementGroup:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
placementGroup} -> Maybe Text
placementGroup) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe Text
a -> CreateAutoScalingGroup
s {$sel:placementGroup:CreateAutoScalingGroup' :: Maybe Text
placementGroup = Maybe Text
a} :: CreateAutoScalingGroup)

-- | 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 @TargetGroupARNs@ property instead.
createAutoScalingGroup_loadBalancerNames :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [Prelude.Text])
createAutoScalingGroup_loadBalancerNames :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_loadBalancerNames = (CreateAutoScalingGroup -> Maybe [Text])
-> (CreateAutoScalingGroup
    -> Maybe [Text] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [Text]
loadBalancerNames :: Maybe [Text]
$sel:loadBalancerNames:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
loadBalancerNames} -> Maybe [Text]
loadBalancerNames) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [Text]
a -> CreateAutoScalingGroup
s {$sel:loadBalancerNames:CreateAutoScalingGroup' :: Maybe [Text]
loadBalancerNames = Maybe [Text]
a} :: CreateAutoScalingGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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
-- <https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html Tagging Auto Scaling groups and instances>
-- in the /Amazon EC2 Auto Scaling User Guide/.
createAutoScalingGroup_tags :: Lens.Lens' CreateAutoScalingGroup (Prelude.Maybe [Tag])
createAutoScalingGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_tags = (CreateAutoScalingGroup -> Maybe [Tag])
-> (CreateAutoScalingGroup
    -> Maybe [Tag] -> CreateAutoScalingGroup)
-> Lens
     CreateAutoScalingGroup
     CreateAutoScalingGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Maybe [Tag]
a -> CreateAutoScalingGroup
s {$sel:tags:CreateAutoScalingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateAutoScalingGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateAutoScalingGroup -> f CreateAutoScalingGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAutoScalingGroup
-> f CreateAutoScalingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the Auto Scaling group. This name must be unique per Region
-- per account.
createAutoScalingGroup_autoScalingGroupName :: Lens.Lens' CreateAutoScalingGroup Prelude.Text
createAutoScalingGroup_autoScalingGroupName :: (Text -> f Text)
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_autoScalingGroupName = (CreateAutoScalingGroup -> Text)
-> (CreateAutoScalingGroup -> Text -> CreateAutoScalingGroup)
-> Lens CreateAutoScalingGroup CreateAutoScalingGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Text
autoScalingGroupName :: Text
$sel:autoScalingGroupName:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Text
autoScalingGroupName} -> Text
autoScalingGroupName) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Text
a -> CreateAutoScalingGroup
s {$sel:autoScalingGroupName:CreateAutoScalingGroup' :: Text
autoScalingGroupName = Text
a} :: CreateAutoScalingGroup)

-- | The minimum size of the group.
createAutoScalingGroup_minSize :: Lens.Lens' CreateAutoScalingGroup Prelude.Int
createAutoScalingGroup_minSize :: (Int -> f Int)
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_minSize = (CreateAutoScalingGroup -> Int)
-> (CreateAutoScalingGroup -> Int -> CreateAutoScalingGroup)
-> Lens CreateAutoScalingGroup CreateAutoScalingGroup Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Int
minSize :: Int
$sel:minSize:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Int
minSize} -> Int
minSize) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Int
a -> CreateAutoScalingGroup
s {$sel:minSize:CreateAutoScalingGroup' :: Int
minSize = Int
a} :: CreateAutoScalingGroup)

-- | The maximum size of the group.
--
-- With a mixed instances policy that uses instance weighting, Amazon EC2
-- Auto Scaling may need to go above @MaxSize@ to meet your capacity
-- requirements. In this event, Amazon EC2 Auto Scaling will never go above
-- @MaxSize@ by more than your largest instance weight (weights that define
-- how many units each instance contributes to the desired capacity of the
-- group).
createAutoScalingGroup_maxSize :: Lens.Lens' CreateAutoScalingGroup Prelude.Int
createAutoScalingGroup_maxSize :: (Int -> f Int)
-> CreateAutoScalingGroup -> f CreateAutoScalingGroup
createAutoScalingGroup_maxSize = (CreateAutoScalingGroup -> Int)
-> (CreateAutoScalingGroup -> Int -> CreateAutoScalingGroup)
-> Lens CreateAutoScalingGroup CreateAutoScalingGroup Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoScalingGroup' {Int
maxSize :: Int
$sel:maxSize:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Int
maxSize} -> Int
maxSize) (\s :: CreateAutoScalingGroup
s@CreateAutoScalingGroup' {} Int
a -> CreateAutoScalingGroup
s {$sel:maxSize:CreateAutoScalingGroup' :: Int
maxSize = Int
a} :: CreateAutoScalingGroup)

instance Core.AWSRequest CreateAutoScalingGroup where
  type
    AWSResponse CreateAutoScalingGroup =
      CreateAutoScalingGroupResponse
  request :: CreateAutoScalingGroup -> Request CreateAutoScalingGroup
request = Service -> CreateAutoScalingGroup -> Request CreateAutoScalingGroup
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateAutoScalingGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAutoScalingGroup)))
response =
    AWSResponse CreateAutoScalingGroup
-> Logger
-> Service
-> Proxy CreateAutoScalingGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAutoScalingGroup)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse CreateAutoScalingGroup
CreateAutoScalingGroupResponse
CreateAutoScalingGroupResponse'

instance Prelude.Hashable CreateAutoScalingGroup

instance Prelude.NFData CreateAutoScalingGroup

instance Core.ToHeaders CreateAutoScalingGroup where
  toHeaders :: CreateAutoScalingGroup -> [Header]
toHeaders = [Header] -> CreateAutoScalingGroup -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateAutoScalingGroup where
  toPath :: CreateAutoScalingGroup -> ByteString
toPath = ByteString -> CreateAutoScalingGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateAutoScalingGroup where
  toQuery :: CreateAutoScalingGroup -> QueryString
toQuery CreateAutoScalingGroup' {Int
Maybe Bool
Maybe Int
Maybe [Text]
Maybe [LifecycleHookSpecification]
Maybe [Tag]
Maybe Text
Maybe LaunchTemplateSpecification
Maybe MixedInstancesPolicy
Text
maxSize :: Int
minSize :: Int
autoScalingGroupName :: Text
tags :: Maybe [Tag]
loadBalancerNames :: Maybe [Text]
placementGroup :: Maybe Text
capacityRebalance :: Maybe Bool
launchTemplate :: Maybe LaunchTemplateSpecification
healthCheckType :: Maybe Text
lifecycleHookSpecificationList :: Maybe [LifecycleHookSpecification]
launchConfigurationName :: Maybe Text
mixedInstancesPolicy :: Maybe MixedInstancesPolicy
desiredCapacity :: Maybe Int
availabilityZones :: Maybe [Text]
defaultCooldown :: Maybe Int
maxInstanceLifetime :: Maybe Int
targetGroupARNs :: Maybe [Text]
vPCZoneIdentifier :: Maybe Text
newInstancesProtectedFromScaleIn' :: Maybe Bool
serviceLinkedRoleARN :: Maybe Text
healthCheckGracePeriod :: Maybe Int
terminationPolicies :: Maybe [Text]
context :: Maybe Text
instanceId :: Maybe Text
$sel:maxSize:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Int
$sel:minSize:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Int
$sel:autoScalingGroupName:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Text
$sel:tags:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Tag]
$sel:loadBalancerNames:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
$sel:placementGroup:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:capacityRebalance:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Bool
$sel:launchTemplate:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe LaunchTemplateSpecification
$sel:healthCheckType:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:lifecycleHookSpecificationList:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [LifecycleHookSpecification]
$sel:launchConfigurationName:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:mixedInstancesPolicy:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe MixedInstancesPolicy
$sel:desiredCapacity:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
$sel:availabilityZones:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
$sel:defaultCooldown:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
$sel:maxInstanceLifetime:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
$sel:targetGroupARNs:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
$sel:vPCZoneIdentifier:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:newInstancesProtectedFromScaleIn':CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Bool
$sel:serviceLinkedRoleARN:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:healthCheckGracePeriod:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Int
$sel:terminationPolicies:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe [Text]
$sel:context:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
$sel:instanceId:CreateAutoScalingGroup' :: CreateAutoScalingGroup -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CreateAutoScalingGroup" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
        ByteString
"InstanceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
instanceId,
        ByteString
"Context" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
context,
        ByteString
"TerminationPolicies"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
terminationPolicies
            ),
        ByteString
"HealthCheckGracePeriod"
          ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
healthCheckGracePeriod,
        ByteString
"ServiceLinkedRoleARN" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
serviceLinkedRoleARN,
        ByteString
"NewInstancesProtectedFromScaleIn"
          ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
newInstancesProtectedFromScaleIn',
        ByteString
"VPCZoneIdentifier" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
vPCZoneIdentifier,
        ByteString
"TargetGroupARNs"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
targetGroupARNs
            ),
        ByteString
"MaxInstanceLifetime" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxInstanceLifetime,
        ByteString
"DefaultCooldown" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
defaultCooldown,
        ByteString
"AvailabilityZones"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
availabilityZones
            ),
        ByteString
"DesiredCapacity" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
desiredCapacity,
        ByteString
"MixedInstancesPolicy" ByteString -> Maybe MixedInstancesPolicy -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe MixedInstancesPolicy
mixedInstancesPolicy,
        ByteString
"LaunchConfigurationName"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
launchConfigurationName,
        ByteString
"LifecycleHookSpecificationList"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [LifecycleHookSpecification] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([LifecycleHookSpecification] -> QueryString)
-> Maybe [LifecycleHookSpecification] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LifecycleHookSpecification]
lifecycleHookSpecificationList
            ),
        ByteString
"HealthCheckType" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
healthCheckType,
        ByteString
"LaunchTemplate" ByteString -> Maybe LaunchTemplateSpecification -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe LaunchTemplateSpecification
launchTemplate,
        ByteString
"CapacityRebalance" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
capacityRebalance,
        ByteString
"PlacementGroup" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
placementGroup,
        ByteString
"LoadBalancerNames"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
loadBalancerNames
            ),
        ByteString
"Tags"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            (ByteString -> [Tag] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Tag] -> QueryString) -> Maybe [Tag] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags),
        ByteString
"AutoScalingGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
autoScalingGroupName,
        ByteString
"MinSize" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
minSize,
        ByteString
"MaxSize" ByteString -> Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Int
maxSize
      ]

-- | /See:/ 'newCreateAutoScalingGroupResponse' smart constructor.
data CreateAutoScalingGroupResponse = CreateAutoScalingGroupResponse'
  {
  }
  deriving (CreateAutoScalingGroupResponse
-> CreateAutoScalingGroupResponse -> Bool
(CreateAutoScalingGroupResponse
 -> CreateAutoScalingGroupResponse -> Bool)
-> (CreateAutoScalingGroupResponse
    -> CreateAutoScalingGroupResponse -> Bool)
-> Eq CreateAutoScalingGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAutoScalingGroupResponse
-> CreateAutoScalingGroupResponse -> Bool
$c/= :: CreateAutoScalingGroupResponse
-> CreateAutoScalingGroupResponse -> Bool
== :: CreateAutoScalingGroupResponse
-> CreateAutoScalingGroupResponse -> Bool
$c== :: CreateAutoScalingGroupResponse
-> CreateAutoScalingGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateAutoScalingGroupResponse]
ReadPrec CreateAutoScalingGroupResponse
Int -> ReadS CreateAutoScalingGroupResponse
ReadS [CreateAutoScalingGroupResponse]
(Int -> ReadS CreateAutoScalingGroupResponse)
-> ReadS [CreateAutoScalingGroupResponse]
-> ReadPrec CreateAutoScalingGroupResponse
-> ReadPrec [CreateAutoScalingGroupResponse]
-> Read CreateAutoScalingGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAutoScalingGroupResponse]
$creadListPrec :: ReadPrec [CreateAutoScalingGroupResponse]
readPrec :: ReadPrec CreateAutoScalingGroupResponse
$creadPrec :: ReadPrec CreateAutoScalingGroupResponse
readList :: ReadS [CreateAutoScalingGroupResponse]
$creadList :: ReadS [CreateAutoScalingGroupResponse]
readsPrec :: Int -> ReadS CreateAutoScalingGroupResponse
$creadsPrec :: Int -> ReadS CreateAutoScalingGroupResponse
Prelude.Read, Int -> CreateAutoScalingGroupResponse -> ShowS
[CreateAutoScalingGroupResponse] -> ShowS
CreateAutoScalingGroupResponse -> String
(Int -> CreateAutoScalingGroupResponse -> ShowS)
-> (CreateAutoScalingGroupResponse -> String)
-> ([CreateAutoScalingGroupResponse] -> ShowS)
-> Show CreateAutoScalingGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAutoScalingGroupResponse] -> ShowS
$cshowList :: [CreateAutoScalingGroupResponse] -> ShowS
show :: CreateAutoScalingGroupResponse -> String
$cshow :: CreateAutoScalingGroupResponse -> String
showsPrec :: Int -> CreateAutoScalingGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateAutoScalingGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateAutoScalingGroupResponse
 -> Rep CreateAutoScalingGroupResponse x)
-> (forall x.
    Rep CreateAutoScalingGroupResponse x
    -> CreateAutoScalingGroupResponse)
-> Generic CreateAutoScalingGroupResponse
forall x.
Rep CreateAutoScalingGroupResponse x
-> CreateAutoScalingGroupResponse
forall x.
CreateAutoScalingGroupResponse
-> Rep CreateAutoScalingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAutoScalingGroupResponse x
-> CreateAutoScalingGroupResponse
$cfrom :: forall x.
CreateAutoScalingGroupResponse
-> Rep CreateAutoScalingGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAutoScalingGroupResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newCreateAutoScalingGroupResponse ::
  CreateAutoScalingGroupResponse
newCreateAutoScalingGroupResponse :: CreateAutoScalingGroupResponse
newCreateAutoScalingGroupResponse =
  CreateAutoScalingGroupResponse
CreateAutoScalingGroupResponse'

instance
  Prelude.NFData
    CreateAutoScalingGroupResponse