{-# 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.CodeDeploy.CreateDeploymentGroup
-- 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)
--
-- Creates a deployment group to which application revisions are deployed.
module Amazonka.CodeDeploy.CreateDeploymentGroup
  ( -- * Creating a Request
    CreateDeploymentGroup (..),
    newCreateDeploymentGroup,

    -- * Request Lenses
    createDeploymentGroup_ec2TagSet,
    createDeploymentGroup_deploymentConfigName,
    createDeploymentGroup_onPremisesTagSet,
    createDeploymentGroup_ec2TagFilters,
    createDeploymentGroup_ecsServices,
    createDeploymentGroup_blueGreenDeploymentConfiguration,
    createDeploymentGroup_loadBalancerInfo,
    createDeploymentGroup_outdatedInstancesStrategy,
    createDeploymentGroup_onPremisesInstanceTagFilters,
    createDeploymentGroup_alarmConfiguration,
    createDeploymentGroup_triggerConfigurations,
    createDeploymentGroup_autoScalingGroups,
    createDeploymentGroup_deploymentStyle,
    createDeploymentGroup_autoRollbackConfiguration,
    createDeploymentGroup_tags,
    createDeploymentGroup_applicationName,
    createDeploymentGroup_deploymentGroupName,
    createDeploymentGroup_serviceRoleArn,

    -- * Destructuring the Response
    CreateDeploymentGroupResponse (..),
    newCreateDeploymentGroupResponse,

    -- * Response Lenses
    createDeploymentGroupResponse_deploymentGroupId,
    createDeploymentGroupResponse_httpStatus,
  )
where

import Amazonka.CodeDeploy.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

-- | Represents the input of a @CreateDeploymentGroup@ operation.
--
-- /See:/ 'newCreateDeploymentGroup' smart constructor.
data CreateDeploymentGroup = CreateDeploymentGroup'
  { -- | Information about groups of tags applied to EC2 instances. The
    -- deployment group includes only EC2 instances identified by all the tag
    -- groups. Cannot be used in the same call as @ec2TagFilters@.
    CreateDeploymentGroup -> Maybe EC2TagSet
ec2TagSet :: Prelude.Maybe EC2TagSet,
    -- | If specified, the deployment configuration name can be either one of the
    -- predefined configurations provided with AWS CodeDeploy or a custom
    -- deployment configuration that you create by calling the create
    -- deployment configuration operation.
    --
    -- @CodeDeployDefault.OneAtATime@ is the default deployment configuration.
    -- It is used if a configuration isn\'t specified for the deployment or
    -- deployment group.
    --
    -- For more information about the predefined deployment configurations in
    -- AWS CodeDeploy, see
    -- <https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html Working with Deployment Configurations in CodeDeploy>
    -- in the /AWS CodeDeploy User Guide/.
    CreateDeploymentGroup -> Maybe Text
deploymentConfigName :: Prelude.Maybe Prelude.Text,
    -- | Information about groups of tags applied to on-premises instances. The
    -- deployment group includes only on-premises instances identified by all
    -- of the tag groups. Cannot be used in the same call as
    -- @onPremisesInstanceTagFilters@.
    CreateDeploymentGroup -> Maybe OnPremisesTagSet
onPremisesTagSet :: Prelude.Maybe OnPremisesTagSet,
    -- | The Amazon EC2 tags on which to filter. The deployment group includes
    -- EC2 instances with any of the specified tags. Cannot be used in the same
    -- call as ec2TagSet.
    CreateDeploymentGroup -> Maybe [EC2TagFilter]
ec2TagFilters :: Prelude.Maybe [EC2TagFilter],
    -- | The target Amazon ECS services in the deployment group. This applies
    -- only to deployment groups that use the Amazon ECS compute platform. A
    -- target Amazon ECS service is specified as an Amazon ECS cluster and
    -- service name pair using the format @\<clustername>:\<servicename>@.
    CreateDeploymentGroup -> Maybe [ECSService]
ecsServices :: Prelude.Maybe [ECSService],
    -- | Information about blue\/green deployment options for a deployment group.
    CreateDeploymentGroup -> Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration :: Prelude.Maybe BlueGreenDeploymentConfiguration,
    -- | Information about the load balancer used in a deployment.
    CreateDeploymentGroup -> Maybe LoadBalancerInfo
loadBalancerInfo :: Prelude.Maybe LoadBalancerInfo,
    -- | Indicates what happens when new EC2 instances are launched
    -- mid-deployment and do not receive the deployed application revision.
    --
    -- If this option is set to @UPDATE@ or is unspecified, CodeDeploy
    -- initiates one or more \'auto-update outdated instances\' deployments to
    -- apply the deployed application revision to the new EC2 instances.
    --
    -- If this option is set to @IGNORE@, CodeDeploy does not initiate a
    -- deployment to update the new EC2 instances. This may result in instances
    -- having different revisions.
    CreateDeploymentGroup -> Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy :: Prelude.Maybe OutdatedInstancesStrategy,
    -- | The on-premises instance tags on which to filter. The deployment group
    -- includes on-premises instances with any of the specified tags. Cannot be
    -- used in the same call as @OnPremisesTagSet@.
    CreateDeploymentGroup -> Maybe [TagFilter]
onPremisesInstanceTagFilters :: Prelude.Maybe [TagFilter],
    -- | Information to add about Amazon CloudWatch alarms when the deployment
    -- group is created.
    CreateDeploymentGroup -> Maybe AlarmConfiguration
alarmConfiguration :: Prelude.Maybe AlarmConfiguration,
    -- | Information about triggers to create when the deployment group is
    -- created. For examples, see
    -- <https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-sns.html Create a Trigger for an AWS CodeDeploy Event>
    -- in the /AWS CodeDeploy User Guide/.
    CreateDeploymentGroup -> Maybe [TriggerConfig]
triggerConfigurations :: Prelude.Maybe [TriggerConfig],
    -- | A list of associated Amazon EC2 Auto Scaling groups.
    CreateDeploymentGroup -> Maybe [Text]
autoScalingGroups :: Prelude.Maybe [Prelude.Text],
    -- | Information about the type of deployment, in-place or blue\/green, that
    -- you want to run and whether to route deployment traffic behind a load
    -- balancer.
    CreateDeploymentGroup -> Maybe DeploymentStyle
deploymentStyle :: Prelude.Maybe DeploymentStyle,
    -- | Configuration information for an automatic rollback that is added when a
    -- deployment group is created.
    CreateDeploymentGroup -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration :: Prelude.Maybe AutoRollbackConfiguration,
    -- | The metadata that you apply to CodeDeploy deployment groups to help you
    -- organize and categorize them. Each tag consists of a key and an optional
    -- value, both of which you define.
    CreateDeploymentGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of an AWS CodeDeploy application associated with the IAM user
    -- or AWS account.
    CreateDeploymentGroup -> Text
applicationName :: Prelude.Text,
    -- | The name of a new deployment group for the specified application.
    CreateDeploymentGroup -> Text
deploymentGroupName :: Prelude.Text,
    -- | A service role Amazon Resource Name (ARN) that allows AWS CodeDeploy to
    -- act on the user\'s behalf when interacting with AWS services.
    CreateDeploymentGroup -> Text
serviceRoleArn :: Prelude.Text
  }
  deriving (CreateDeploymentGroup -> CreateDeploymentGroup -> Bool
(CreateDeploymentGroup -> CreateDeploymentGroup -> Bool)
-> (CreateDeploymentGroup -> CreateDeploymentGroup -> Bool)
-> Eq CreateDeploymentGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeploymentGroup -> CreateDeploymentGroup -> Bool
$c/= :: CreateDeploymentGroup -> CreateDeploymentGroup -> Bool
== :: CreateDeploymentGroup -> CreateDeploymentGroup -> Bool
$c== :: CreateDeploymentGroup -> CreateDeploymentGroup -> Bool
Prelude.Eq, ReadPrec [CreateDeploymentGroup]
ReadPrec CreateDeploymentGroup
Int -> ReadS CreateDeploymentGroup
ReadS [CreateDeploymentGroup]
(Int -> ReadS CreateDeploymentGroup)
-> ReadS [CreateDeploymentGroup]
-> ReadPrec CreateDeploymentGroup
-> ReadPrec [CreateDeploymentGroup]
-> Read CreateDeploymentGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDeploymentGroup]
$creadListPrec :: ReadPrec [CreateDeploymentGroup]
readPrec :: ReadPrec CreateDeploymentGroup
$creadPrec :: ReadPrec CreateDeploymentGroup
readList :: ReadS [CreateDeploymentGroup]
$creadList :: ReadS [CreateDeploymentGroup]
readsPrec :: Int -> ReadS CreateDeploymentGroup
$creadsPrec :: Int -> ReadS CreateDeploymentGroup
Prelude.Read, Int -> CreateDeploymentGroup -> ShowS
[CreateDeploymentGroup] -> ShowS
CreateDeploymentGroup -> String
(Int -> CreateDeploymentGroup -> ShowS)
-> (CreateDeploymentGroup -> String)
-> ([CreateDeploymentGroup] -> ShowS)
-> Show CreateDeploymentGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeploymentGroup] -> ShowS
$cshowList :: [CreateDeploymentGroup] -> ShowS
show :: CreateDeploymentGroup -> String
$cshow :: CreateDeploymentGroup -> String
showsPrec :: Int -> CreateDeploymentGroup -> ShowS
$cshowsPrec :: Int -> CreateDeploymentGroup -> ShowS
Prelude.Show, (forall x. CreateDeploymentGroup -> Rep CreateDeploymentGroup x)
-> (forall x. Rep CreateDeploymentGroup x -> CreateDeploymentGroup)
-> Generic CreateDeploymentGroup
forall x. Rep CreateDeploymentGroup x -> CreateDeploymentGroup
forall x. CreateDeploymentGroup -> Rep CreateDeploymentGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDeploymentGroup x -> CreateDeploymentGroup
$cfrom :: forall x. CreateDeploymentGroup -> Rep CreateDeploymentGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateDeploymentGroup' 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:
--
-- 'ec2TagSet', 'createDeploymentGroup_ec2TagSet' - Information about groups of tags applied to EC2 instances. The
-- deployment group includes only EC2 instances identified by all the tag
-- groups. Cannot be used in the same call as @ec2TagFilters@.
--
-- 'deploymentConfigName', 'createDeploymentGroup_deploymentConfigName' - If specified, the deployment configuration name can be either one of the
-- predefined configurations provided with AWS CodeDeploy or a custom
-- deployment configuration that you create by calling the create
-- deployment configuration operation.
--
-- @CodeDeployDefault.OneAtATime@ is the default deployment configuration.
-- It is used if a configuration isn\'t specified for the deployment or
-- deployment group.
--
-- For more information about the predefined deployment configurations in
-- AWS CodeDeploy, see
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html Working with Deployment Configurations in CodeDeploy>
-- in the /AWS CodeDeploy User Guide/.
--
-- 'onPremisesTagSet', 'createDeploymentGroup_onPremisesTagSet' - Information about groups of tags applied to on-premises instances. The
-- deployment group includes only on-premises instances identified by all
-- of the tag groups. Cannot be used in the same call as
-- @onPremisesInstanceTagFilters@.
--
-- 'ec2TagFilters', 'createDeploymentGroup_ec2TagFilters' - The Amazon EC2 tags on which to filter. The deployment group includes
-- EC2 instances with any of the specified tags. Cannot be used in the same
-- call as ec2TagSet.
--
-- 'ecsServices', 'createDeploymentGroup_ecsServices' - The target Amazon ECS services in the deployment group. This applies
-- only to deployment groups that use the Amazon ECS compute platform. A
-- target Amazon ECS service is specified as an Amazon ECS cluster and
-- service name pair using the format @\<clustername>:\<servicename>@.
--
-- 'blueGreenDeploymentConfiguration', 'createDeploymentGroup_blueGreenDeploymentConfiguration' - Information about blue\/green deployment options for a deployment group.
--
-- 'loadBalancerInfo', 'createDeploymentGroup_loadBalancerInfo' - Information about the load balancer used in a deployment.
--
-- 'outdatedInstancesStrategy', 'createDeploymentGroup_outdatedInstancesStrategy' - Indicates what happens when new EC2 instances are launched
-- mid-deployment and do not receive the deployed application revision.
--
-- If this option is set to @UPDATE@ or is unspecified, CodeDeploy
-- initiates one or more \'auto-update outdated instances\' deployments to
-- apply the deployed application revision to the new EC2 instances.
--
-- If this option is set to @IGNORE@, CodeDeploy does not initiate a
-- deployment to update the new EC2 instances. This may result in instances
-- having different revisions.
--
-- 'onPremisesInstanceTagFilters', 'createDeploymentGroup_onPremisesInstanceTagFilters' - The on-premises instance tags on which to filter. The deployment group
-- includes on-premises instances with any of the specified tags. Cannot be
-- used in the same call as @OnPremisesTagSet@.
--
-- 'alarmConfiguration', 'createDeploymentGroup_alarmConfiguration' - Information to add about Amazon CloudWatch alarms when the deployment
-- group is created.
--
-- 'triggerConfigurations', 'createDeploymentGroup_triggerConfigurations' - Information about triggers to create when the deployment group is
-- created. For examples, see
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-sns.html Create a Trigger for an AWS CodeDeploy Event>
-- in the /AWS CodeDeploy User Guide/.
--
-- 'autoScalingGroups', 'createDeploymentGroup_autoScalingGroups' - A list of associated Amazon EC2 Auto Scaling groups.
--
-- 'deploymentStyle', 'createDeploymentGroup_deploymentStyle' - Information about the type of deployment, in-place or blue\/green, that
-- you want to run and whether to route deployment traffic behind a load
-- balancer.
--
-- 'autoRollbackConfiguration', 'createDeploymentGroup_autoRollbackConfiguration' - Configuration information for an automatic rollback that is added when a
-- deployment group is created.
--
-- 'tags', 'createDeploymentGroup_tags' - The metadata that you apply to CodeDeploy deployment groups to help you
-- organize and categorize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- 'applicationName', 'createDeploymentGroup_applicationName' - The name of an AWS CodeDeploy application associated with the IAM user
-- or AWS account.
--
-- 'deploymentGroupName', 'createDeploymentGroup_deploymentGroupName' - The name of a new deployment group for the specified application.
--
-- 'serviceRoleArn', 'createDeploymentGroup_serviceRoleArn' - A service role Amazon Resource Name (ARN) that allows AWS CodeDeploy to
-- act on the user\'s behalf when interacting with AWS services.
newCreateDeploymentGroup ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'deploymentGroupName'
  Prelude.Text ->
  -- | 'serviceRoleArn'
  Prelude.Text ->
  CreateDeploymentGroup
newCreateDeploymentGroup :: Text -> Text -> Text -> CreateDeploymentGroup
newCreateDeploymentGroup
  Text
pApplicationName_
  Text
pDeploymentGroupName_
  Text
pServiceRoleArn_ =
    CreateDeploymentGroup' :: Maybe EC2TagSet
-> Maybe Text
-> Maybe OnPremisesTagSet
-> Maybe [EC2TagFilter]
-> Maybe [ECSService]
-> Maybe BlueGreenDeploymentConfiguration
-> Maybe LoadBalancerInfo
-> Maybe OutdatedInstancesStrategy
-> Maybe [TagFilter]
-> Maybe AlarmConfiguration
-> Maybe [TriggerConfig]
-> Maybe [Text]
-> Maybe DeploymentStyle
-> Maybe AutoRollbackConfiguration
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> CreateDeploymentGroup
CreateDeploymentGroup'
      { $sel:ec2TagSet:CreateDeploymentGroup' :: Maybe EC2TagSet
ec2TagSet = Maybe EC2TagSet
forall a. Maybe a
Prelude.Nothing,
        $sel:deploymentConfigName:CreateDeploymentGroup' :: Maybe Text
deploymentConfigName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:onPremisesTagSet:CreateDeploymentGroup' :: Maybe OnPremisesTagSet
onPremisesTagSet = Maybe OnPremisesTagSet
forall a. Maybe a
Prelude.Nothing,
        $sel:ec2TagFilters:CreateDeploymentGroup' :: Maybe [EC2TagFilter]
ec2TagFilters = Maybe [EC2TagFilter]
forall a. Maybe a
Prelude.Nothing,
        $sel:ecsServices:CreateDeploymentGroup' :: Maybe [ECSService]
ecsServices = Maybe [ECSService]
forall a. Maybe a
Prelude.Nothing,
        $sel:blueGreenDeploymentConfiguration:CreateDeploymentGroup' :: Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration = Maybe BlueGreenDeploymentConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:loadBalancerInfo:CreateDeploymentGroup' :: Maybe LoadBalancerInfo
loadBalancerInfo = Maybe LoadBalancerInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:outdatedInstancesStrategy:CreateDeploymentGroup' :: Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy = Maybe OutdatedInstancesStrategy
forall a. Maybe a
Prelude.Nothing,
        $sel:onPremisesInstanceTagFilters:CreateDeploymentGroup' :: Maybe [TagFilter]
onPremisesInstanceTagFilters = Maybe [TagFilter]
forall a. Maybe a
Prelude.Nothing,
        $sel:alarmConfiguration:CreateDeploymentGroup' :: Maybe AlarmConfiguration
alarmConfiguration = Maybe AlarmConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:triggerConfigurations:CreateDeploymentGroup' :: Maybe [TriggerConfig]
triggerConfigurations = Maybe [TriggerConfig]
forall a. Maybe a
Prelude.Nothing,
        $sel:autoScalingGroups:CreateDeploymentGroup' :: Maybe [Text]
autoScalingGroups = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:deploymentStyle:CreateDeploymentGroup' :: Maybe DeploymentStyle
deploymentStyle = Maybe DeploymentStyle
forall a. Maybe a
Prelude.Nothing,
        $sel:autoRollbackConfiguration:CreateDeploymentGroup' :: Maybe AutoRollbackConfiguration
autoRollbackConfiguration = Maybe AutoRollbackConfiguration
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDeploymentGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationName:CreateDeploymentGroup' :: Text
applicationName = Text
pApplicationName_,
        $sel:deploymentGroupName:CreateDeploymentGroup' :: Text
deploymentGroupName = Text
pDeploymentGroupName_,
        $sel:serviceRoleArn:CreateDeploymentGroup' :: Text
serviceRoleArn = Text
pServiceRoleArn_
      }

-- | Information about groups of tags applied to EC2 instances. The
-- deployment group includes only EC2 instances identified by all the tag
-- groups. Cannot be used in the same call as @ec2TagFilters@.
createDeploymentGroup_ec2TagSet :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe EC2TagSet)
createDeploymentGroup_ec2TagSet :: (Maybe EC2TagSet -> f (Maybe EC2TagSet))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_ec2TagSet = (CreateDeploymentGroup -> Maybe EC2TagSet)
-> (CreateDeploymentGroup
    -> Maybe EC2TagSet -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe EC2TagSet)
     (Maybe EC2TagSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe EC2TagSet
ec2TagSet :: Maybe EC2TagSet
$sel:ec2TagSet:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe EC2TagSet
ec2TagSet} -> Maybe EC2TagSet
ec2TagSet) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe EC2TagSet
a -> CreateDeploymentGroup
s {$sel:ec2TagSet:CreateDeploymentGroup' :: Maybe EC2TagSet
ec2TagSet = Maybe EC2TagSet
a} :: CreateDeploymentGroup)

-- | If specified, the deployment configuration name can be either one of the
-- predefined configurations provided with AWS CodeDeploy or a custom
-- deployment configuration that you create by calling the create
-- deployment configuration operation.
--
-- @CodeDeployDefault.OneAtATime@ is the default deployment configuration.
-- It is used if a configuration isn\'t specified for the deployment or
-- deployment group.
--
-- For more information about the predefined deployment configurations in
-- AWS CodeDeploy, see
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html Working with Deployment Configurations in CodeDeploy>
-- in the /AWS CodeDeploy User Guide/.
createDeploymentGroup_deploymentConfigName :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe Prelude.Text)
createDeploymentGroup_deploymentConfigName :: (Maybe Text -> f (Maybe Text))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_deploymentConfigName = (CreateDeploymentGroup -> Maybe Text)
-> (CreateDeploymentGroup -> Maybe Text -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe Text
deploymentConfigName :: Maybe Text
$sel:deploymentConfigName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe Text
deploymentConfigName} -> Maybe Text
deploymentConfigName) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe Text
a -> CreateDeploymentGroup
s {$sel:deploymentConfigName:CreateDeploymentGroup' :: Maybe Text
deploymentConfigName = Maybe Text
a} :: CreateDeploymentGroup)

-- | Information about groups of tags applied to on-premises instances. The
-- deployment group includes only on-premises instances identified by all
-- of the tag groups. Cannot be used in the same call as
-- @onPremisesInstanceTagFilters@.
createDeploymentGroup_onPremisesTagSet :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe OnPremisesTagSet)
createDeploymentGroup_onPremisesTagSet :: (Maybe OnPremisesTagSet -> f (Maybe OnPremisesTagSet))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_onPremisesTagSet = (CreateDeploymentGroup -> Maybe OnPremisesTagSet)
-> (CreateDeploymentGroup
    -> Maybe OnPremisesTagSet -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe OnPremisesTagSet)
     (Maybe OnPremisesTagSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe OnPremisesTagSet
onPremisesTagSet :: Maybe OnPremisesTagSet
$sel:onPremisesTagSet:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe OnPremisesTagSet
onPremisesTagSet} -> Maybe OnPremisesTagSet
onPremisesTagSet) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe OnPremisesTagSet
a -> CreateDeploymentGroup
s {$sel:onPremisesTagSet:CreateDeploymentGroup' :: Maybe OnPremisesTagSet
onPremisesTagSet = Maybe OnPremisesTagSet
a} :: CreateDeploymentGroup)

-- | The Amazon EC2 tags on which to filter. The deployment group includes
-- EC2 instances with any of the specified tags. Cannot be used in the same
-- call as ec2TagSet.
createDeploymentGroup_ec2TagFilters :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [EC2TagFilter])
createDeploymentGroup_ec2TagFilters :: (Maybe [EC2TagFilter] -> f (Maybe [EC2TagFilter]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_ec2TagFilters = (CreateDeploymentGroup -> Maybe [EC2TagFilter])
-> (CreateDeploymentGroup
    -> Maybe [EC2TagFilter] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [EC2TagFilter])
     (Maybe [EC2TagFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [EC2TagFilter]
ec2TagFilters :: Maybe [EC2TagFilter]
$sel:ec2TagFilters:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [EC2TagFilter]
ec2TagFilters} -> Maybe [EC2TagFilter]
ec2TagFilters) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [EC2TagFilter]
a -> CreateDeploymentGroup
s {$sel:ec2TagFilters:CreateDeploymentGroup' :: Maybe [EC2TagFilter]
ec2TagFilters = Maybe [EC2TagFilter]
a} :: CreateDeploymentGroup) ((Maybe [EC2TagFilter] -> f (Maybe [EC2TagFilter]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [EC2TagFilter] -> f (Maybe [EC2TagFilter]))
    -> Maybe [EC2TagFilter] -> f (Maybe [EC2TagFilter]))
-> (Maybe [EC2TagFilter] -> f (Maybe [EC2TagFilter]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [EC2TagFilter] [EC2TagFilter] [EC2TagFilter] [EC2TagFilter]
-> Iso
     (Maybe [EC2TagFilter])
     (Maybe [EC2TagFilter])
     (Maybe [EC2TagFilter])
     (Maybe [EC2TagFilter])
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 [EC2TagFilter] [EC2TagFilter] [EC2TagFilter] [EC2TagFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The target Amazon ECS services in the deployment group. This applies
-- only to deployment groups that use the Amazon ECS compute platform. A
-- target Amazon ECS service is specified as an Amazon ECS cluster and
-- service name pair using the format @\<clustername>:\<servicename>@.
createDeploymentGroup_ecsServices :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [ECSService])
createDeploymentGroup_ecsServices :: (Maybe [ECSService] -> f (Maybe [ECSService]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_ecsServices = (CreateDeploymentGroup -> Maybe [ECSService])
-> (CreateDeploymentGroup
    -> Maybe [ECSService] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [ECSService])
     (Maybe [ECSService])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [ECSService]
ecsServices :: Maybe [ECSService]
$sel:ecsServices:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [ECSService]
ecsServices} -> Maybe [ECSService]
ecsServices) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [ECSService]
a -> CreateDeploymentGroup
s {$sel:ecsServices:CreateDeploymentGroup' :: Maybe [ECSService]
ecsServices = Maybe [ECSService]
a} :: CreateDeploymentGroup) ((Maybe [ECSService] -> f (Maybe [ECSService]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [ECSService] -> f (Maybe [ECSService]))
    -> Maybe [ECSService] -> f (Maybe [ECSService]))
-> (Maybe [ECSService] -> f (Maybe [ECSService]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ECSService] [ECSService] [ECSService] [ECSService]
-> Iso
     (Maybe [ECSService])
     (Maybe [ECSService])
     (Maybe [ECSService])
     (Maybe [ECSService])
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 [ECSService] [ECSService] [ECSService] [ECSService]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information about blue\/green deployment options for a deployment group.
createDeploymentGroup_blueGreenDeploymentConfiguration :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe BlueGreenDeploymentConfiguration)
createDeploymentGroup_blueGreenDeploymentConfiguration :: (Maybe BlueGreenDeploymentConfiguration
 -> f (Maybe BlueGreenDeploymentConfiguration))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_blueGreenDeploymentConfiguration = (CreateDeploymentGroup -> Maybe BlueGreenDeploymentConfiguration)
-> (CreateDeploymentGroup
    -> Maybe BlueGreenDeploymentConfiguration -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe BlueGreenDeploymentConfiguration)
     (Maybe BlueGreenDeploymentConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration :: Maybe BlueGreenDeploymentConfiguration
$sel:blueGreenDeploymentConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration} -> Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe BlueGreenDeploymentConfiguration
a -> CreateDeploymentGroup
s {$sel:blueGreenDeploymentConfiguration:CreateDeploymentGroup' :: Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration = Maybe BlueGreenDeploymentConfiguration
a} :: CreateDeploymentGroup)

-- | Information about the load balancer used in a deployment.
createDeploymentGroup_loadBalancerInfo :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe LoadBalancerInfo)
createDeploymentGroup_loadBalancerInfo :: (Maybe LoadBalancerInfo -> f (Maybe LoadBalancerInfo))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_loadBalancerInfo = (CreateDeploymentGroup -> Maybe LoadBalancerInfo)
-> (CreateDeploymentGroup
    -> Maybe LoadBalancerInfo -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe LoadBalancerInfo)
     (Maybe LoadBalancerInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe LoadBalancerInfo
loadBalancerInfo :: Maybe LoadBalancerInfo
$sel:loadBalancerInfo:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe LoadBalancerInfo
loadBalancerInfo} -> Maybe LoadBalancerInfo
loadBalancerInfo) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe LoadBalancerInfo
a -> CreateDeploymentGroup
s {$sel:loadBalancerInfo:CreateDeploymentGroup' :: Maybe LoadBalancerInfo
loadBalancerInfo = Maybe LoadBalancerInfo
a} :: CreateDeploymentGroup)

-- | Indicates what happens when new EC2 instances are launched
-- mid-deployment and do not receive the deployed application revision.
--
-- If this option is set to @UPDATE@ or is unspecified, CodeDeploy
-- initiates one or more \'auto-update outdated instances\' deployments to
-- apply the deployed application revision to the new EC2 instances.
--
-- If this option is set to @IGNORE@, CodeDeploy does not initiate a
-- deployment to update the new EC2 instances. This may result in instances
-- having different revisions.
createDeploymentGroup_outdatedInstancesStrategy :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe OutdatedInstancesStrategy)
createDeploymentGroup_outdatedInstancesStrategy :: (Maybe OutdatedInstancesStrategy
 -> f (Maybe OutdatedInstancesStrategy))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_outdatedInstancesStrategy = (CreateDeploymentGroup -> Maybe OutdatedInstancesStrategy)
-> (CreateDeploymentGroup
    -> Maybe OutdatedInstancesStrategy -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe OutdatedInstancesStrategy)
     (Maybe OutdatedInstancesStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy :: Maybe OutdatedInstancesStrategy
$sel:outdatedInstancesStrategy:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy} -> Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe OutdatedInstancesStrategy
a -> CreateDeploymentGroup
s {$sel:outdatedInstancesStrategy:CreateDeploymentGroup' :: Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy = Maybe OutdatedInstancesStrategy
a} :: CreateDeploymentGroup)

-- | The on-premises instance tags on which to filter. The deployment group
-- includes on-premises instances with any of the specified tags. Cannot be
-- used in the same call as @OnPremisesTagSet@.
createDeploymentGroup_onPremisesInstanceTagFilters :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [TagFilter])
createDeploymentGroup_onPremisesInstanceTagFilters :: (Maybe [TagFilter] -> f (Maybe [TagFilter]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_onPremisesInstanceTagFilters = (CreateDeploymentGroup -> Maybe [TagFilter])
-> (CreateDeploymentGroup
    -> Maybe [TagFilter] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [TagFilter])
     (Maybe [TagFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [TagFilter]
onPremisesInstanceTagFilters :: Maybe [TagFilter]
$sel:onPremisesInstanceTagFilters:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [TagFilter]
onPremisesInstanceTagFilters} -> Maybe [TagFilter]
onPremisesInstanceTagFilters) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [TagFilter]
a -> CreateDeploymentGroup
s {$sel:onPremisesInstanceTagFilters:CreateDeploymentGroup' :: Maybe [TagFilter]
onPremisesInstanceTagFilters = Maybe [TagFilter]
a} :: CreateDeploymentGroup) ((Maybe [TagFilter] -> f (Maybe [TagFilter]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [TagFilter] -> f (Maybe [TagFilter]))
    -> Maybe [TagFilter] -> f (Maybe [TagFilter]))
-> (Maybe [TagFilter] -> f (Maybe [TagFilter]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TagFilter] [TagFilter] [TagFilter] [TagFilter]
-> Iso
     (Maybe [TagFilter])
     (Maybe [TagFilter])
     (Maybe [TagFilter])
     (Maybe [TagFilter])
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 [TagFilter] [TagFilter] [TagFilter] [TagFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Information to add about Amazon CloudWatch alarms when the deployment
-- group is created.
createDeploymentGroup_alarmConfiguration :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe AlarmConfiguration)
createDeploymentGroup_alarmConfiguration :: (Maybe AlarmConfiguration -> f (Maybe AlarmConfiguration))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_alarmConfiguration = (CreateDeploymentGroup -> Maybe AlarmConfiguration)
-> (CreateDeploymentGroup
    -> Maybe AlarmConfiguration -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe AlarmConfiguration)
     (Maybe AlarmConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe AlarmConfiguration
alarmConfiguration :: Maybe AlarmConfiguration
$sel:alarmConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe AlarmConfiguration
alarmConfiguration} -> Maybe AlarmConfiguration
alarmConfiguration) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe AlarmConfiguration
a -> CreateDeploymentGroup
s {$sel:alarmConfiguration:CreateDeploymentGroup' :: Maybe AlarmConfiguration
alarmConfiguration = Maybe AlarmConfiguration
a} :: CreateDeploymentGroup)

-- | Information about triggers to create when the deployment group is
-- created. For examples, see
-- <https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-notify-sns.html Create a Trigger for an AWS CodeDeploy Event>
-- in the /AWS CodeDeploy User Guide/.
createDeploymentGroup_triggerConfigurations :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [TriggerConfig])
createDeploymentGroup_triggerConfigurations :: (Maybe [TriggerConfig] -> f (Maybe [TriggerConfig]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_triggerConfigurations = (CreateDeploymentGroup -> Maybe [TriggerConfig])
-> (CreateDeploymentGroup
    -> Maybe [TriggerConfig] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [TriggerConfig])
     (Maybe [TriggerConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [TriggerConfig]
triggerConfigurations :: Maybe [TriggerConfig]
$sel:triggerConfigurations:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [TriggerConfig]
triggerConfigurations} -> Maybe [TriggerConfig]
triggerConfigurations) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [TriggerConfig]
a -> CreateDeploymentGroup
s {$sel:triggerConfigurations:CreateDeploymentGroup' :: Maybe [TriggerConfig]
triggerConfigurations = Maybe [TriggerConfig]
a} :: CreateDeploymentGroup) ((Maybe [TriggerConfig] -> f (Maybe [TriggerConfig]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [TriggerConfig] -> f (Maybe [TriggerConfig]))
    -> Maybe [TriggerConfig] -> f (Maybe [TriggerConfig]))
-> (Maybe [TriggerConfig] -> f (Maybe [TriggerConfig]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TriggerConfig] [TriggerConfig] [TriggerConfig] [TriggerConfig]
-> Iso
     (Maybe [TriggerConfig])
     (Maybe [TriggerConfig])
     (Maybe [TriggerConfig])
     (Maybe [TriggerConfig])
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
  [TriggerConfig] [TriggerConfig] [TriggerConfig] [TriggerConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of associated Amazon EC2 Auto Scaling groups.
createDeploymentGroup_autoScalingGroups :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [Prelude.Text])
createDeploymentGroup_autoScalingGroups :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_autoScalingGroups = (CreateDeploymentGroup -> Maybe [Text])
-> (CreateDeploymentGroup -> Maybe [Text] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [Text]
autoScalingGroups :: Maybe [Text]
$sel:autoScalingGroups:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [Text]
autoScalingGroups} -> Maybe [Text]
autoScalingGroups) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [Text]
a -> CreateDeploymentGroup
s {$sel:autoScalingGroups:CreateDeploymentGroup' :: Maybe [Text]
autoScalingGroups = Maybe [Text]
a} :: CreateDeploymentGroup) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
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

-- | Information about the type of deployment, in-place or blue\/green, that
-- you want to run and whether to route deployment traffic behind a load
-- balancer.
createDeploymentGroup_deploymentStyle :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe DeploymentStyle)
createDeploymentGroup_deploymentStyle :: (Maybe DeploymentStyle -> f (Maybe DeploymentStyle))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_deploymentStyle = (CreateDeploymentGroup -> Maybe DeploymentStyle)
-> (CreateDeploymentGroup
    -> Maybe DeploymentStyle -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe DeploymentStyle)
     (Maybe DeploymentStyle)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe DeploymentStyle
deploymentStyle :: Maybe DeploymentStyle
$sel:deploymentStyle:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe DeploymentStyle
deploymentStyle} -> Maybe DeploymentStyle
deploymentStyle) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe DeploymentStyle
a -> CreateDeploymentGroup
s {$sel:deploymentStyle:CreateDeploymentGroup' :: Maybe DeploymentStyle
deploymentStyle = Maybe DeploymentStyle
a} :: CreateDeploymentGroup)

-- | Configuration information for an automatic rollback that is added when a
-- deployment group is created.
createDeploymentGroup_autoRollbackConfiguration :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe AutoRollbackConfiguration)
createDeploymentGroup_autoRollbackConfiguration :: (Maybe AutoRollbackConfiguration
 -> f (Maybe AutoRollbackConfiguration))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_autoRollbackConfiguration = (CreateDeploymentGroup -> Maybe AutoRollbackConfiguration)
-> (CreateDeploymentGroup
    -> Maybe AutoRollbackConfiguration -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe AutoRollbackConfiguration)
     (Maybe AutoRollbackConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe AutoRollbackConfiguration
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
$sel:autoRollbackConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration} -> Maybe AutoRollbackConfiguration
autoRollbackConfiguration) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe AutoRollbackConfiguration
a -> CreateDeploymentGroup
s {$sel:autoRollbackConfiguration:CreateDeploymentGroup' :: Maybe AutoRollbackConfiguration
autoRollbackConfiguration = Maybe AutoRollbackConfiguration
a} :: CreateDeploymentGroup)

-- | The metadata that you apply to CodeDeploy deployment groups to help you
-- organize and categorize them. Each tag consists of a key and an optional
-- value, both of which you define.
createDeploymentGroup_tags :: Lens.Lens' CreateDeploymentGroup (Prelude.Maybe [Tag])
createDeploymentGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_tags = (CreateDeploymentGroup -> Maybe [Tag])
-> (CreateDeploymentGroup -> Maybe [Tag] -> CreateDeploymentGroup)
-> Lens
     CreateDeploymentGroup
     CreateDeploymentGroup
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Maybe [Tag]
a -> CreateDeploymentGroup
s {$sel:tags:CreateDeploymentGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDeploymentGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateDeploymentGroup -> f CreateDeploymentGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateDeploymentGroup
-> f CreateDeploymentGroup
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 an AWS CodeDeploy application associated with the IAM user
-- or AWS account.
createDeploymentGroup_applicationName :: Lens.Lens' CreateDeploymentGroup Prelude.Text
createDeploymentGroup_applicationName :: (Text -> f Text)
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_applicationName = (CreateDeploymentGroup -> Text)
-> (CreateDeploymentGroup -> Text -> CreateDeploymentGroup)
-> Lens CreateDeploymentGroup CreateDeploymentGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Text
applicationName :: Text
$sel:applicationName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
applicationName} -> Text
applicationName) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Text
a -> CreateDeploymentGroup
s {$sel:applicationName:CreateDeploymentGroup' :: Text
applicationName = Text
a} :: CreateDeploymentGroup)

-- | The name of a new deployment group for the specified application.
createDeploymentGroup_deploymentGroupName :: Lens.Lens' CreateDeploymentGroup Prelude.Text
createDeploymentGroup_deploymentGroupName :: (Text -> f Text)
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_deploymentGroupName = (CreateDeploymentGroup -> Text)
-> (CreateDeploymentGroup -> Text -> CreateDeploymentGroup)
-> Lens CreateDeploymentGroup CreateDeploymentGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Text
deploymentGroupName :: Text
$sel:deploymentGroupName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
deploymentGroupName} -> Text
deploymentGroupName) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Text
a -> CreateDeploymentGroup
s {$sel:deploymentGroupName:CreateDeploymentGroup' :: Text
deploymentGroupName = Text
a} :: CreateDeploymentGroup)

-- | A service role Amazon Resource Name (ARN) that allows AWS CodeDeploy to
-- act on the user\'s behalf when interacting with AWS services.
createDeploymentGroup_serviceRoleArn :: Lens.Lens' CreateDeploymentGroup Prelude.Text
createDeploymentGroup_serviceRoleArn :: (Text -> f Text)
-> CreateDeploymentGroup -> f CreateDeploymentGroup
createDeploymentGroup_serviceRoleArn = (CreateDeploymentGroup -> Text)
-> (CreateDeploymentGroup -> Text -> CreateDeploymentGroup)
-> Lens CreateDeploymentGroup CreateDeploymentGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroup' {Text
serviceRoleArn :: Text
$sel:serviceRoleArn:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
serviceRoleArn} -> Text
serviceRoleArn) (\s :: CreateDeploymentGroup
s@CreateDeploymentGroup' {} Text
a -> CreateDeploymentGroup
s {$sel:serviceRoleArn:CreateDeploymentGroup' :: Text
serviceRoleArn = Text
a} :: CreateDeploymentGroup)

instance Core.AWSRequest CreateDeploymentGroup where
  type
    AWSResponse CreateDeploymentGroup =
      CreateDeploymentGroupResponse
  request :: CreateDeploymentGroup -> Request CreateDeploymentGroup
request = Service -> CreateDeploymentGroup -> Request CreateDeploymentGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateDeploymentGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDeploymentGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateDeploymentGroup))
-> Logger
-> Service
-> Proxy CreateDeploymentGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDeploymentGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateDeploymentGroupResponse
CreateDeploymentGroupResponse'
            (Maybe Text -> Int -> CreateDeploymentGroupResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateDeploymentGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentGroupId")
            Either String (Int -> CreateDeploymentGroupResponse)
-> Either String Int -> Either String CreateDeploymentGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateDeploymentGroup

instance Prelude.NFData CreateDeploymentGroup

instance Core.ToHeaders CreateDeploymentGroup where
  toHeaders :: CreateDeploymentGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateDeploymentGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeDeploy_20141006.CreateDeploymentGroup" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateDeploymentGroup where
  toJSON :: CreateDeploymentGroup -> Value
toJSON CreateDeploymentGroup' {Maybe [Text]
Maybe [EC2TagFilter]
Maybe [ECSService]
Maybe [Tag]
Maybe [TagFilter]
Maybe [TriggerConfig]
Maybe Text
Maybe AlarmConfiguration
Maybe AutoRollbackConfiguration
Maybe DeploymentStyle
Maybe EC2TagSet
Maybe BlueGreenDeploymentConfiguration
Maybe OutdatedInstancesStrategy
Maybe OnPremisesTagSet
Maybe LoadBalancerInfo
Text
serviceRoleArn :: Text
deploymentGroupName :: Text
applicationName :: Text
tags :: Maybe [Tag]
autoRollbackConfiguration :: Maybe AutoRollbackConfiguration
deploymentStyle :: Maybe DeploymentStyle
autoScalingGroups :: Maybe [Text]
triggerConfigurations :: Maybe [TriggerConfig]
alarmConfiguration :: Maybe AlarmConfiguration
onPremisesInstanceTagFilters :: Maybe [TagFilter]
outdatedInstancesStrategy :: Maybe OutdatedInstancesStrategy
loadBalancerInfo :: Maybe LoadBalancerInfo
blueGreenDeploymentConfiguration :: Maybe BlueGreenDeploymentConfiguration
ecsServices :: Maybe [ECSService]
ec2TagFilters :: Maybe [EC2TagFilter]
onPremisesTagSet :: Maybe OnPremisesTagSet
deploymentConfigName :: Maybe Text
ec2TagSet :: Maybe EC2TagSet
$sel:serviceRoleArn:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
$sel:deploymentGroupName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
$sel:applicationName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Text
$sel:tags:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [Tag]
$sel:autoRollbackConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe AutoRollbackConfiguration
$sel:deploymentStyle:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe DeploymentStyle
$sel:autoScalingGroups:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [Text]
$sel:triggerConfigurations:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [TriggerConfig]
$sel:alarmConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe AlarmConfiguration
$sel:onPremisesInstanceTagFilters:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [TagFilter]
$sel:outdatedInstancesStrategy:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe OutdatedInstancesStrategy
$sel:loadBalancerInfo:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe LoadBalancerInfo
$sel:blueGreenDeploymentConfiguration:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe BlueGreenDeploymentConfiguration
$sel:ecsServices:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [ECSService]
$sel:ec2TagFilters:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe [EC2TagFilter]
$sel:onPremisesTagSet:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe OnPremisesTagSet
$sel:deploymentConfigName:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe Text
$sel:ec2TagSet:CreateDeploymentGroup' :: CreateDeploymentGroup -> Maybe EC2TagSet
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ec2TagSet" Text -> EC2TagSet -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EC2TagSet -> Pair) -> Maybe EC2TagSet -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EC2TagSet
ec2TagSet,
            (Text
"deploymentConfigName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deploymentConfigName,
            (Text
"onPremisesTagSet" Text -> OnPremisesTagSet -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OnPremisesTagSet -> Pair) -> Maybe OnPremisesTagSet -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnPremisesTagSet
onPremisesTagSet,
            (Text
"ec2TagFilters" Text -> [EC2TagFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([EC2TagFilter] -> Pair) -> Maybe [EC2TagFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EC2TagFilter]
ec2TagFilters,
            (Text
"ecsServices" Text -> [ECSService] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ECSService] -> Pair) -> Maybe [ECSService] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ECSService]
ecsServices,
            (Text
"blueGreenDeploymentConfiguration" Text -> BlueGreenDeploymentConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BlueGreenDeploymentConfiguration -> Pair)
-> Maybe BlueGreenDeploymentConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BlueGreenDeploymentConfiguration
blueGreenDeploymentConfiguration,
            (Text
"loadBalancerInfo" Text -> LoadBalancerInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LoadBalancerInfo -> Pair) -> Maybe LoadBalancerInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoadBalancerInfo
loadBalancerInfo,
            (Text
"outdatedInstancesStrategy" Text -> OutdatedInstancesStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (OutdatedInstancesStrategy -> Pair)
-> Maybe OutdatedInstancesStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OutdatedInstancesStrategy
outdatedInstancesStrategy,
            (Text
"onPremisesInstanceTagFilters" Text -> [TagFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([TagFilter] -> Pair) -> Maybe [TagFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagFilter]
onPremisesInstanceTagFilters,
            (Text
"alarmConfiguration" Text -> AlarmConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AlarmConfiguration -> Pair)
-> Maybe AlarmConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AlarmConfiguration
alarmConfiguration,
            (Text
"triggerConfigurations" Text -> [TriggerConfig] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([TriggerConfig] -> Pair) -> Maybe [TriggerConfig] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TriggerConfig]
triggerConfigurations,
            (Text
"autoScalingGroups" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
autoScalingGroups,
            (Text
"deploymentStyle" Text -> DeploymentStyle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DeploymentStyle -> Pair) -> Maybe DeploymentStyle -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DeploymentStyle
deploymentStyle,
            (Text
"autoRollbackConfiguration" Text -> AutoRollbackConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AutoRollbackConfiguration -> Pair)
-> Maybe AutoRollbackConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoRollbackConfiguration
autoRollbackConfiguration,
            (Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"applicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"deploymentGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deploymentGroupName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"serviceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceRoleArn)
          ]
      )

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

instance Core.ToQuery CreateDeploymentGroup where
  toQuery :: CreateDeploymentGroup -> QueryString
toQuery = QueryString -> CreateDeploymentGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Represents the output of a @CreateDeploymentGroup@ operation.
--
-- /See:/ 'newCreateDeploymentGroupResponse' smart constructor.
data CreateDeploymentGroupResponse = CreateDeploymentGroupResponse'
  { -- | A unique deployment group ID.
    CreateDeploymentGroupResponse -> Maybe Text
deploymentGroupId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateDeploymentGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDeploymentGroupResponse
-> CreateDeploymentGroupResponse -> Bool
(CreateDeploymentGroupResponse
 -> CreateDeploymentGroupResponse -> Bool)
-> (CreateDeploymentGroupResponse
    -> CreateDeploymentGroupResponse -> Bool)
-> Eq CreateDeploymentGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDeploymentGroupResponse
-> CreateDeploymentGroupResponse -> Bool
$c/= :: CreateDeploymentGroupResponse
-> CreateDeploymentGroupResponse -> Bool
== :: CreateDeploymentGroupResponse
-> CreateDeploymentGroupResponse -> Bool
$c== :: CreateDeploymentGroupResponse
-> CreateDeploymentGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateDeploymentGroupResponse]
ReadPrec CreateDeploymentGroupResponse
Int -> ReadS CreateDeploymentGroupResponse
ReadS [CreateDeploymentGroupResponse]
(Int -> ReadS CreateDeploymentGroupResponse)
-> ReadS [CreateDeploymentGroupResponse]
-> ReadPrec CreateDeploymentGroupResponse
-> ReadPrec [CreateDeploymentGroupResponse]
-> Read CreateDeploymentGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDeploymentGroupResponse]
$creadListPrec :: ReadPrec [CreateDeploymentGroupResponse]
readPrec :: ReadPrec CreateDeploymentGroupResponse
$creadPrec :: ReadPrec CreateDeploymentGroupResponse
readList :: ReadS [CreateDeploymentGroupResponse]
$creadList :: ReadS [CreateDeploymentGroupResponse]
readsPrec :: Int -> ReadS CreateDeploymentGroupResponse
$creadsPrec :: Int -> ReadS CreateDeploymentGroupResponse
Prelude.Read, Int -> CreateDeploymentGroupResponse -> ShowS
[CreateDeploymentGroupResponse] -> ShowS
CreateDeploymentGroupResponse -> String
(Int -> CreateDeploymentGroupResponse -> ShowS)
-> (CreateDeploymentGroupResponse -> String)
-> ([CreateDeploymentGroupResponse] -> ShowS)
-> Show CreateDeploymentGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDeploymentGroupResponse] -> ShowS
$cshowList :: [CreateDeploymentGroupResponse] -> ShowS
show :: CreateDeploymentGroupResponse -> String
$cshow :: CreateDeploymentGroupResponse -> String
showsPrec :: Int -> CreateDeploymentGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateDeploymentGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateDeploymentGroupResponse
 -> Rep CreateDeploymentGroupResponse x)
-> (forall x.
    Rep CreateDeploymentGroupResponse x
    -> CreateDeploymentGroupResponse)
-> Generic CreateDeploymentGroupResponse
forall x.
Rep CreateDeploymentGroupResponse x
-> CreateDeploymentGroupResponse
forall x.
CreateDeploymentGroupResponse
-> Rep CreateDeploymentGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDeploymentGroupResponse x
-> CreateDeploymentGroupResponse
$cfrom :: forall x.
CreateDeploymentGroupResponse
-> Rep CreateDeploymentGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDeploymentGroupResponse' 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:
--
-- 'deploymentGroupId', 'createDeploymentGroupResponse_deploymentGroupId' - A unique deployment group ID.
--
-- 'httpStatus', 'createDeploymentGroupResponse_httpStatus' - The response's http status code.
newCreateDeploymentGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDeploymentGroupResponse
newCreateDeploymentGroupResponse :: Int -> CreateDeploymentGroupResponse
newCreateDeploymentGroupResponse Int
pHttpStatus_ =
  CreateDeploymentGroupResponse' :: Maybe Text -> Int -> CreateDeploymentGroupResponse
CreateDeploymentGroupResponse'
    { $sel:deploymentGroupId:CreateDeploymentGroupResponse' :: Maybe Text
deploymentGroupId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDeploymentGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique deployment group ID.
createDeploymentGroupResponse_deploymentGroupId :: Lens.Lens' CreateDeploymentGroupResponse (Prelude.Maybe Prelude.Text)
createDeploymentGroupResponse_deploymentGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateDeploymentGroupResponse -> f CreateDeploymentGroupResponse
createDeploymentGroupResponse_deploymentGroupId = (CreateDeploymentGroupResponse -> Maybe Text)
-> (CreateDeploymentGroupResponse
    -> Maybe Text -> CreateDeploymentGroupResponse)
-> Lens
     CreateDeploymentGroupResponse
     CreateDeploymentGroupResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroupResponse' {Maybe Text
deploymentGroupId :: Maybe Text
$sel:deploymentGroupId:CreateDeploymentGroupResponse' :: CreateDeploymentGroupResponse -> Maybe Text
deploymentGroupId} -> Maybe Text
deploymentGroupId) (\s :: CreateDeploymentGroupResponse
s@CreateDeploymentGroupResponse' {} Maybe Text
a -> CreateDeploymentGroupResponse
s {$sel:deploymentGroupId:CreateDeploymentGroupResponse' :: Maybe Text
deploymentGroupId = Maybe Text
a} :: CreateDeploymentGroupResponse)

-- | The response's http status code.
createDeploymentGroupResponse_httpStatus :: Lens.Lens' CreateDeploymentGroupResponse Prelude.Int
createDeploymentGroupResponse_httpStatus :: (Int -> f Int)
-> CreateDeploymentGroupResponse -> f CreateDeploymentGroupResponse
createDeploymentGroupResponse_httpStatus = (CreateDeploymentGroupResponse -> Int)
-> (CreateDeploymentGroupResponse
    -> Int -> CreateDeploymentGroupResponse)
-> Lens
     CreateDeploymentGroupResponse CreateDeploymentGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDeploymentGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDeploymentGroupResponse' :: CreateDeploymentGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateDeploymentGroupResponse
s@CreateDeploymentGroupResponse' {} Int
a -> CreateDeploymentGroupResponse
s {$sel:httpStatus:CreateDeploymentGroupResponse' :: Int
httpStatus = Int
a} :: CreateDeploymentGroupResponse)

instance Prelude.NFData CreateDeploymentGroupResponse