{-# 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.GlobalAccelerator.CreateEndpointGroup
-- 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)
--
-- Create an endpoint group for the specified listener. An endpoint group
-- is a collection of endpoints in one AWS Region. A resource must be valid
-- and active when you add it as an endpoint.
module Amazonka.GlobalAccelerator.CreateEndpointGroup
  ( -- * Creating a Request
    CreateEndpointGroup (..),
    newCreateEndpointGroup,

    -- * Request Lenses
    createEndpointGroup_thresholdCount,
    createEndpointGroup_healthCheckPath,
    createEndpointGroup_healthCheckIntervalSeconds,
    createEndpointGroup_healthCheckProtocol,
    createEndpointGroup_trafficDialPercentage,
    createEndpointGroup_endpointConfigurations,
    createEndpointGroup_healthCheckPort,
    createEndpointGroup_portOverrides,
    createEndpointGroup_listenerArn,
    createEndpointGroup_endpointGroupRegion,
    createEndpointGroup_idempotencyToken,

    -- * Destructuring the Response
    CreateEndpointGroupResponse (..),
    newCreateEndpointGroupResponse,

    -- * Response Lenses
    createEndpointGroupResponse_endpointGroup,
    createEndpointGroupResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.Types
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:/ 'newCreateEndpointGroup' smart constructor.
data CreateEndpointGroup = CreateEndpointGroup'
  { -- | The number of consecutive health checks required to set the state of a
    -- healthy endpoint to unhealthy, or to set an unhealthy endpoint to
    -- healthy. The default value is 3.
    CreateEndpointGroup -> Maybe Natural
thresholdCount :: Prelude.Maybe Prelude.Natural,
    -- | If the protocol is HTTP\/S, then this specifies the path that is the
    -- destination for health check targets. The default value is slash (\/).
    CreateEndpointGroup -> Maybe Text
healthCheckPath :: Prelude.Maybe Prelude.Text,
    -- | The time—10 seconds or 30 seconds—between each health check for an
    -- endpoint. The default value is 30.
    CreateEndpointGroup -> Maybe Natural
healthCheckIntervalSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The protocol that AWS Global Accelerator uses to check the health of
    -- endpoints that are part of this endpoint group. The default value is
    -- TCP.
    CreateEndpointGroup -> Maybe HealthCheckProtocol
healthCheckProtocol :: Prelude.Maybe HealthCheckProtocol,
    -- | The percentage of traffic to send to an AWS Region. Additional traffic
    -- is distributed to other endpoint groups for this listener.
    --
    -- Use this action to increase (dial up) or decrease (dial down) traffic to
    -- a specific Region. The percentage is applied to the traffic that would
    -- otherwise have been routed to the Region based on optimal routing.
    --
    -- The default value is 100.
    CreateEndpointGroup -> Maybe Double
trafficDialPercentage :: Prelude.Maybe Prelude.Double,
    -- | The list of endpoint objects.
    CreateEndpointGroup -> Maybe [EndpointConfiguration]
endpointConfigurations :: Prelude.Maybe [EndpointConfiguration],
    -- | The port that AWS Global Accelerator uses to check the health of
    -- endpoints that are part of this endpoint group. The default port is the
    -- listener port that this endpoint group is associated with. If listener
    -- port is a list of ports, Global Accelerator uses the first port in the
    -- list.
    CreateEndpointGroup -> Maybe Natural
healthCheckPort :: Prelude.Maybe Prelude.Natural,
    -- | Override specific listener ports used to route traffic to endpoints that
    -- are part of this endpoint group. For example, you can create a port
    -- override in which the listener receives user traffic on ports 80 and
    -- 443, but your accelerator routes that traffic to ports 1080 and 1443,
    -- respectively, on the endpoints.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html Port overrides>
    -- in the /AWS Global Accelerator Developer Guide/.
    CreateEndpointGroup -> Maybe [PortOverride]
portOverrides :: Prelude.Maybe [PortOverride],
    -- | The Amazon Resource Name (ARN) of the listener.
    CreateEndpointGroup -> Text
listenerArn :: Prelude.Text,
    -- | The AWS Region where the endpoint group is located. A listener can have
    -- only one endpoint group in a specific Region.
    CreateEndpointGroup -> Text
endpointGroupRegion :: Prelude.Text,
    -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency—that is, the uniqueness—of the request.
    CreateEndpointGroup -> Text
idempotencyToken :: Prelude.Text
  }
  deriving (CreateEndpointGroup -> CreateEndpointGroup -> Bool
(CreateEndpointGroup -> CreateEndpointGroup -> Bool)
-> (CreateEndpointGroup -> CreateEndpointGroup -> Bool)
-> Eq CreateEndpointGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEndpointGroup -> CreateEndpointGroup -> Bool
$c/= :: CreateEndpointGroup -> CreateEndpointGroup -> Bool
== :: CreateEndpointGroup -> CreateEndpointGroup -> Bool
$c== :: CreateEndpointGroup -> CreateEndpointGroup -> Bool
Prelude.Eq, ReadPrec [CreateEndpointGroup]
ReadPrec CreateEndpointGroup
Int -> ReadS CreateEndpointGroup
ReadS [CreateEndpointGroup]
(Int -> ReadS CreateEndpointGroup)
-> ReadS [CreateEndpointGroup]
-> ReadPrec CreateEndpointGroup
-> ReadPrec [CreateEndpointGroup]
-> Read CreateEndpointGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEndpointGroup]
$creadListPrec :: ReadPrec [CreateEndpointGroup]
readPrec :: ReadPrec CreateEndpointGroup
$creadPrec :: ReadPrec CreateEndpointGroup
readList :: ReadS [CreateEndpointGroup]
$creadList :: ReadS [CreateEndpointGroup]
readsPrec :: Int -> ReadS CreateEndpointGroup
$creadsPrec :: Int -> ReadS CreateEndpointGroup
Prelude.Read, Int -> CreateEndpointGroup -> ShowS
[CreateEndpointGroup] -> ShowS
CreateEndpointGroup -> String
(Int -> CreateEndpointGroup -> ShowS)
-> (CreateEndpointGroup -> String)
-> ([CreateEndpointGroup] -> ShowS)
-> Show CreateEndpointGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEndpointGroup] -> ShowS
$cshowList :: [CreateEndpointGroup] -> ShowS
show :: CreateEndpointGroup -> String
$cshow :: CreateEndpointGroup -> String
showsPrec :: Int -> CreateEndpointGroup -> ShowS
$cshowsPrec :: Int -> CreateEndpointGroup -> ShowS
Prelude.Show, (forall x. CreateEndpointGroup -> Rep CreateEndpointGroup x)
-> (forall x. Rep CreateEndpointGroup x -> CreateEndpointGroup)
-> Generic CreateEndpointGroup
forall x. Rep CreateEndpointGroup x -> CreateEndpointGroup
forall x. CreateEndpointGroup -> Rep CreateEndpointGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEndpointGroup x -> CreateEndpointGroup
$cfrom :: forall x. CreateEndpointGroup -> Rep CreateEndpointGroup x
Prelude.Generic)

-- |
-- Create a value of 'CreateEndpointGroup' 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:
--
-- 'thresholdCount', 'createEndpointGroup_thresholdCount' - The number of consecutive health checks required to set the state of a
-- healthy endpoint to unhealthy, or to set an unhealthy endpoint to
-- healthy. The default value is 3.
--
-- 'healthCheckPath', 'createEndpointGroup_healthCheckPath' - If the protocol is HTTP\/S, then this specifies the path that is the
-- destination for health check targets. The default value is slash (\/).
--
-- 'healthCheckIntervalSeconds', 'createEndpointGroup_healthCheckIntervalSeconds' - The time—10 seconds or 30 seconds—between each health check for an
-- endpoint. The default value is 30.
--
-- 'healthCheckProtocol', 'createEndpointGroup_healthCheckProtocol' - The protocol that AWS Global Accelerator uses to check the health of
-- endpoints that are part of this endpoint group. The default value is
-- TCP.
--
-- 'trafficDialPercentage', 'createEndpointGroup_trafficDialPercentage' - The percentage of traffic to send to an AWS Region. Additional traffic
-- is distributed to other endpoint groups for this listener.
--
-- Use this action to increase (dial up) or decrease (dial down) traffic to
-- a specific Region. The percentage is applied to the traffic that would
-- otherwise have been routed to the Region based on optimal routing.
--
-- The default value is 100.
--
-- 'endpointConfigurations', 'createEndpointGroup_endpointConfigurations' - The list of endpoint objects.
--
-- 'healthCheckPort', 'createEndpointGroup_healthCheckPort' - The port that AWS Global Accelerator uses to check the health of
-- endpoints that are part of this endpoint group. The default port is the
-- listener port that this endpoint group is associated with. If listener
-- port is a list of ports, Global Accelerator uses the first port in the
-- list.
--
-- 'portOverrides', 'createEndpointGroup_portOverrides' - Override specific listener ports used to route traffic to endpoints that
-- are part of this endpoint group. For example, you can create a port
-- override in which the listener receives user traffic on ports 80 and
-- 443, but your accelerator routes that traffic to ports 1080 and 1443,
-- respectively, on the endpoints.
--
-- For more information, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html Port overrides>
-- in the /AWS Global Accelerator Developer Guide/.
--
-- 'listenerArn', 'createEndpointGroup_listenerArn' - The Amazon Resource Name (ARN) of the listener.
--
-- 'endpointGroupRegion', 'createEndpointGroup_endpointGroupRegion' - The AWS Region where the endpoint group is located. A listener can have
-- only one endpoint group in a specific Region.
--
-- 'idempotencyToken', 'createEndpointGroup_idempotencyToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency—that is, the uniqueness—of the request.
newCreateEndpointGroup ::
  -- | 'listenerArn'
  Prelude.Text ->
  -- | 'endpointGroupRegion'
  Prelude.Text ->
  -- | 'idempotencyToken'
  Prelude.Text ->
  CreateEndpointGroup
newCreateEndpointGroup :: Text -> Text -> Text -> CreateEndpointGroup
newCreateEndpointGroup
  Text
pListenerArn_
  Text
pEndpointGroupRegion_
  Text
pIdempotencyToken_ =
    CreateEndpointGroup' :: Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe HealthCheckProtocol
-> Maybe Double
-> Maybe [EndpointConfiguration]
-> Maybe Natural
-> Maybe [PortOverride]
-> Text
-> Text
-> Text
-> CreateEndpointGroup
CreateEndpointGroup'
      { $sel:thresholdCount:CreateEndpointGroup' :: Maybe Natural
thresholdCount =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckPath:CreateEndpointGroup' :: Maybe Text
healthCheckPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckIntervalSeconds:CreateEndpointGroup' :: Maybe Natural
healthCheckIntervalSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckProtocol:CreateEndpointGroup' :: Maybe HealthCheckProtocol
healthCheckProtocol = Maybe HealthCheckProtocol
forall a. Maybe a
Prelude.Nothing,
        $sel:trafficDialPercentage:CreateEndpointGroup' :: Maybe Double
trafficDialPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
        $sel:endpointConfigurations:CreateEndpointGroup' :: Maybe [EndpointConfiguration]
endpointConfigurations = Maybe [EndpointConfiguration]
forall a. Maybe a
Prelude.Nothing,
        $sel:healthCheckPort:CreateEndpointGroup' :: Maybe Natural
healthCheckPort = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:portOverrides:CreateEndpointGroup' :: Maybe [PortOverride]
portOverrides = Maybe [PortOverride]
forall a. Maybe a
Prelude.Nothing,
        $sel:listenerArn:CreateEndpointGroup' :: Text
listenerArn = Text
pListenerArn_,
        $sel:endpointGroupRegion:CreateEndpointGroup' :: Text
endpointGroupRegion = Text
pEndpointGroupRegion_,
        $sel:idempotencyToken:CreateEndpointGroup' :: Text
idempotencyToken = Text
pIdempotencyToken_
      }

-- | The number of consecutive health checks required to set the state of a
-- healthy endpoint to unhealthy, or to set an unhealthy endpoint to
-- healthy. The default value is 3.
createEndpointGroup_thresholdCount :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe Prelude.Natural)
createEndpointGroup_thresholdCount :: (Maybe Natural -> f (Maybe Natural))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_thresholdCount = (CreateEndpointGroup -> Maybe Natural)
-> (CreateEndpointGroup -> Maybe Natural -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe Natural
thresholdCount :: Maybe Natural
$sel:thresholdCount:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
thresholdCount} -> Maybe Natural
thresholdCount) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe Natural
a -> CreateEndpointGroup
s {$sel:thresholdCount:CreateEndpointGroup' :: Maybe Natural
thresholdCount = Maybe Natural
a} :: CreateEndpointGroup)

-- | If the protocol is HTTP\/S, then this specifies the path that is the
-- destination for health check targets. The default value is slash (\/).
createEndpointGroup_healthCheckPath :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe Prelude.Text)
createEndpointGroup_healthCheckPath :: (Maybe Text -> f (Maybe Text))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_healthCheckPath = (CreateEndpointGroup -> Maybe Text)
-> (CreateEndpointGroup -> Maybe Text -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup CreateEndpointGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe Text
healthCheckPath :: Maybe Text
$sel:healthCheckPath:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Text
healthCheckPath} -> Maybe Text
healthCheckPath) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe Text
a -> CreateEndpointGroup
s {$sel:healthCheckPath:CreateEndpointGroup' :: Maybe Text
healthCheckPath = Maybe Text
a} :: CreateEndpointGroup)

-- | The time—10 seconds or 30 seconds—between each health check for an
-- endpoint. The default value is 30.
createEndpointGroup_healthCheckIntervalSeconds :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe Prelude.Natural)
createEndpointGroup_healthCheckIntervalSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_healthCheckIntervalSeconds = (CreateEndpointGroup -> Maybe Natural)
-> (CreateEndpointGroup -> Maybe Natural -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe Natural
healthCheckIntervalSeconds :: Maybe Natural
$sel:healthCheckIntervalSeconds:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
healthCheckIntervalSeconds} -> Maybe Natural
healthCheckIntervalSeconds) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe Natural
a -> CreateEndpointGroup
s {$sel:healthCheckIntervalSeconds:CreateEndpointGroup' :: Maybe Natural
healthCheckIntervalSeconds = Maybe Natural
a} :: CreateEndpointGroup)

-- | The protocol that AWS Global Accelerator uses to check the health of
-- endpoints that are part of this endpoint group. The default value is
-- TCP.
createEndpointGroup_healthCheckProtocol :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe HealthCheckProtocol)
createEndpointGroup_healthCheckProtocol :: (Maybe HealthCheckProtocol -> f (Maybe HealthCheckProtocol))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_healthCheckProtocol = (CreateEndpointGroup -> Maybe HealthCheckProtocol)
-> (CreateEndpointGroup
    -> Maybe HealthCheckProtocol -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe HealthCheckProtocol)
     (Maybe HealthCheckProtocol)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe HealthCheckProtocol
healthCheckProtocol :: Maybe HealthCheckProtocol
$sel:healthCheckProtocol:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe HealthCheckProtocol
healthCheckProtocol} -> Maybe HealthCheckProtocol
healthCheckProtocol) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe HealthCheckProtocol
a -> CreateEndpointGroup
s {$sel:healthCheckProtocol:CreateEndpointGroup' :: Maybe HealthCheckProtocol
healthCheckProtocol = Maybe HealthCheckProtocol
a} :: CreateEndpointGroup)

-- | The percentage of traffic to send to an AWS Region. Additional traffic
-- is distributed to other endpoint groups for this listener.
--
-- Use this action to increase (dial up) or decrease (dial down) traffic to
-- a specific Region. The percentage is applied to the traffic that would
-- otherwise have been routed to the Region based on optimal routing.
--
-- The default value is 100.
createEndpointGroup_trafficDialPercentage :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe Prelude.Double)
createEndpointGroup_trafficDialPercentage :: (Maybe Double -> f (Maybe Double))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_trafficDialPercentage = (CreateEndpointGroup -> Maybe Double)
-> (CreateEndpointGroup -> Maybe Double -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe Double)
     (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe Double
trafficDialPercentage :: Maybe Double
$sel:trafficDialPercentage:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Double
trafficDialPercentage} -> Maybe Double
trafficDialPercentage) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe Double
a -> CreateEndpointGroup
s {$sel:trafficDialPercentage:CreateEndpointGroup' :: Maybe Double
trafficDialPercentage = Maybe Double
a} :: CreateEndpointGroup)

-- | The list of endpoint objects.
createEndpointGroup_endpointConfigurations :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe [EndpointConfiguration])
createEndpointGroup_endpointConfigurations :: (Maybe [EndpointConfiguration]
 -> f (Maybe [EndpointConfiguration]))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_endpointConfigurations = (CreateEndpointGroup -> Maybe [EndpointConfiguration])
-> (CreateEndpointGroup
    -> Maybe [EndpointConfiguration] -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe [EndpointConfiguration])
     (Maybe [EndpointConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe [EndpointConfiguration]
endpointConfigurations :: Maybe [EndpointConfiguration]
$sel:endpointConfigurations:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe [EndpointConfiguration]
endpointConfigurations} -> Maybe [EndpointConfiguration]
endpointConfigurations) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe [EndpointConfiguration]
a -> CreateEndpointGroup
s {$sel:endpointConfigurations:CreateEndpointGroup' :: Maybe [EndpointConfiguration]
endpointConfigurations = Maybe [EndpointConfiguration]
a} :: CreateEndpointGroup) ((Maybe [EndpointConfiguration]
  -> f (Maybe [EndpointConfiguration]))
 -> CreateEndpointGroup -> f CreateEndpointGroup)
-> ((Maybe [EndpointConfiguration]
     -> f (Maybe [EndpointConfiguration]))
    -> Maybe [EndpointConfiguration]
    -> f (Maybe [EndpointConfiguration]))
-> (Maybe [EndpointConfiguration]
    -> f (Maybe [EndpointConfiguration]))
-> CreateEndpointGroup
-> f CreateEndpointGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EndpointConfiguration]
  [EndpointConfiguration]
  [EndpointConfiguration]
  [EndpointConfiguration]
-> Iso
     (Maybe [EndpointConfiguration])
     (Maybe [EndpointConfiguration])
     (Maybe [EndpointConfiguration])
     (Maybe [EndpointConfiguration])
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
  [EndpointConfiguration]
  [EndpointConfiguration]
  [EndpointConfiguration]
  [EndpointConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The port that AWS Global Accelerator uses to check the health of
-- endpoints that are part of this endpoint group. The default port is the
-- listener port that this endpoint group is associated with. If listener
-- port is a list of ports, Global Accelerator uses the first port in the
-- list.
createEndpointGroup_healthCheckPort :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe Prelude.Natural)
createEndpointGroup_healthCheckPort :: (Maybe Natural -> f (Maybe Natural))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_healthCheckPort = (CreateEndpointGroup -> Maybe Natural)
-> (CreateEndpointGroup -> Maybe Natural -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe Natural
healthCheckPort :: Maybe Natural
$sel:healthCheckPort:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
healthCheckPort} -> Maybe Natural
healthCheckPort) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe Natural
a -> CreateEndpointGroup
s {$sel:healthCheckPort:CreateEndpointGroup' :: Maybe Natural
healthCheckPort = Maybe Natural
a} :: CreateEndpointGroup)

-- | Override specific listener ports used to route traffic to endpoints that
-- are part of this endpoint group. For example, you can create a port
-- override in which the listener receives user traffic on ports 80 and
-- 443, but your accelerator routes that traffic to ports 1080 and 1443,
-- respectively, on the endpoints.
--
-- For more information, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html Port overrides>
-- in the /AWS Global Accelerator Developer Guide/.
createEndpointGroup_portOverrides :: Lens.Lens' CreateEndpointGroup (Prelude.Maybe [PortOverride])
createEndpointGroup_portOverrides :: (Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_portOverrides = (CreateEndpointGroup -> Maybe [PortOverride])
-> (CreateEndpointGroup
    -> Maybe [PortOverride] -> CreateEndpointGroup)
-> Lens
     CreateEndpointGroup
     CreateEndpointGroup
     (Maybe [PortOverride])
     (Maybe [PortOverride])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Maybe [PortOverride]
portOverrides :: Maybe [PortOverride]
$sel:portOverrides:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe [PortOverride]
portOverrides} -> Maybe [PortOverride]
portOverrides) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Maybe [PortOverride]
a -> CreateEndpointGroup
s {$sel:portOverrides:CreateEndpointGroup' :: Maybe [PortOverride]
portOverrides = Maybe [PortOverride]
a} :: CreateEndpointGroup) ((Maybe [PortOverride] -> f (Maybe [PortOverride]))
 -> CreateEndpointGroup -> f CreateEndpointGroup)
-> ((Maybe [PortOverride] -> f (Maybe [PortOverride]))
    -> Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> (Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> CreateEndpointGroup
-> f CreateEndpointGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PortOverride] [PortOverride] [PortOverride] [PortOverride]
-> Iso
     (Maybe [PortOverride])
     (Maybe [PortOverride])
     (Maybe [PortOverride])
     (Maybe [PortOverride])
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 [PortOverride] [PortOverride] [PortOverride] [PortOverride]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the listener.
createEndpointGroup_listenerArn :: Lens.Lens' CreateEndpointGroup Prelude.Text
createEndpointGroup_listenerArn :: (Text -> f Text) -> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_listenerArn = (CreateEndpointGroup -> Text)
-> (CreateEndpointGroup -> Text -> CreateEndpointGroup)
-> Lens CreateEndpointGroup CreateEndpointGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Text
listenerArn :: Text
$sel:listenerArn:CreateEndpointGroup' :: CreateEndpointGroup -> Text
listenerArn} -> Text
listenerArn) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Text
a -> CreateEndpointGroup
s {$sel:listenerArn:CreateEndpointGroup' :: Text
listenerArn = Text
a} :: CreateEndpointGroup)

-- | The AWS Region where the endpoint group is located. A listener can have
-- only one endpoint group in a specific Region.
createEndpointGroup_endpointGroupRegion :: Lens.Lens' CreateEndpointGroup Prelude.Text
createEndpointGroup_endpointGroupRegion :: (Text -> f Text) -> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_endpointGroupRegion = (CreateEndpointGroup -> Text)
-> (CreateEndpointGroup -> Text -> CreateEndpointGroup)
-> Lens CreateEndpointGroup CreateEndpointGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Text
endpointGroupRegion :: Text
$sel:endpointGroupRegion:CreateEndpointGroup' :: CreateEndpointGroup -> Text
endpointGroupRegion} -> Text
endpointGroupRegion) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Text
a -> CreateEndpointGroup
s {$sel:endpointGroupRegion:CreateEndpointGroup' :: Text
endpointGroupRegion = Text
a} :: CreateEndpointGroup)

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency—that is, the uniqueness—of the request.
createEndpointGroup_idempotencyToken :: Lens.Lens' CreateEndpointGroup Prelude.Text
createEndpointGroup_idempotencyToken :: (Text -> f Text) -> CreateEndpointGroup -> f CreateEndpointGroup
createEndpointGroup_idempotencyToken = (CreateEndpointGroup -> Text)
-> (CreateEndpointGroup -> Text -> CreateEndpointGroup)
-> Lens CreateEndpointGroup CreateEndpointGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroup' {Text
idempotencyToken :: Text
$sel:idempotencyToken:CreateEndpointGroup' :: CreateEndpointGroup -> Text
idempotencyToken} -> Text
idempotencyToken) (\s :: CreateEndpointGroup
s@CreateEndpointGroup' {} Text
a -> CreateEndpointGroup
s {$sel:idempotencyToken:CreateEndpointGroup' :: Text
idempotencyToken = Text
a} :: CreateEndpointGroup)

instance Core.AWSRequest CreateEndpointGroup where
  type
    AWSResponse CreateEndpointGroup =
      CreateEndpointGroupResponse
  request :: CreateEndpointGroup -> Request CreateEndpointGroup
request = Service -> CreateEndpointGroup -> Request CreateEndpointGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateEndpointGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEndpointGroup)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateEndpointGroup))
-> Logger
-> Service
-> Proxy CreateEndpointGroup
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateEndpointGroup)))
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 EndpointGroup -> Int -> CreateEndpointGroupResponse
CreateEndpointGroupResponse'
            (Maybe EndpointGroup -> Int -> CreateEndpointGroupResponse)
-> Either String (Maybe EndpointGroup)
-> Either String (Int -> CreateEndpointGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe EndpointGroup)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EndpointGroup")
            Either String (Int -> CreateEndpointGroupResponse)
-> Either String Int -> Either String CreateEndpointGroupResponse
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 CreateEndpointGroup

instance Prelude.NFData CreateEndpointGroup

instance Core.ToHeaders CreateEndpointGroup where
  toHeaders :: CreateEndpointGroup -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateEndpointGroup -> 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
"GlobalAccelerator_V20180706.CreateEndpointGroup" ::
                          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 CreateEndpointGroup where
  toJSON :: CreateEndpointGroup -> Value
toJSON CreateEndpointGroup' {Maybe Double
Maybe Natural
Maybe [EndpointConfiguration]
Maybe [PortOverride]
Maybe Text
Maybe HealthCheckProtocol
Text
idempotencyToken :: Text
endpointGroupRegion :: Text
listenerArn :: Text
portOverrides :: Maybe [PortOverride]
healthCheckPort :: Maybe Natural
endpointConfigurations :: Maybe [EndpointConfiguration]
trafficDialPercentage :: Maybe Double
healthCheckProtocol :: Maybe HealthCheckProtocol
healthCheckIntervalSeconds :: Maybe Natural
healthCheckPath :: Maybe Text
thresholdCount :: Maybe Natural
$sel:idempotencyToken:CreateEndpointGroup' :: CreateEndpointGroup -> Text
$sel:endpointGroupRegion:CreateEndpointGroup' :: CreateEndpointGroup -> Text
$sel:listenerArn:CreateEndpointGroup' :: CreateEndpointGroup -> Text
$sel:portOverrides:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe [PortOverride]
$sel:healthCheckPort:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
$sel:endpointConfigurations:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe [EndpointConfiguration]
$sel:trafficDialPercentage:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Double
$sel:healthCheckProtocol:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe HealthCheckProtocol
$sel:healthCheckIntervalSeconds:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
$sel:healthCheckPath:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Text
$sel:thresholdCount:CreateEndpointGroup' :: CreateEndpointGroup -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ThresholdCount" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
thresholdCount,
            (Text
"HealthCheckPath" 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
healthCheckPath,
            (Text
"HealthCheckIntervalSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
healthCheckIntervalSeconds,
            (Text
"HealthCheckProtocol" Text -> HealthCheckProtocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HealthCheckProtocol -> Pair)
-> Maybe HealthCheckProtocol -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckProtocol
healthCheckProtocol,
            (Text
"TrafficDialPercentage" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
trafficDialPercentage,
            (Text
"EndpointConfigurations" Text -> [EndpointConfiguration] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([EndpointConfiguration] -> Pair)
-> Maybe [EndpointConfiguration] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EndpointConfiguration]
endpointConfigurations,
            (Text
"HealthCheckPort" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
healthCheckPort,
            (Text
"PortOverrides" Text -> [PortOverride] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PortOverride] -> Pair) -> Maybe [PortOverride] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PortOverride]
portOverrides,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ListenerArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
listenerArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"EndpointGroupRegion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointGroupRegion),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"IdempotencyToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
idempotencyToken)
          ]
      )

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

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

-- | /See:/ 'newCreateEndpointGroupResponse' smart constructor.
data CreateEndpointGroupResponse = CreateEndpointGroupResponse'
  { -- | The information about the endpoint group that was created.
    CreateEndpointGroupResponse -> Maybe EndpointGroup
endpointGroup :: Prelude.Maybe EndpointGroup,
    -- | The response's http status code.
    CreateEndpointGroupResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateEndpointGroupResponse -> CreateEndpointGroupResponse -> Bool
(CreateEndpointGroupResponse
 -> CreateEndpointGroupResponse -> Bool)
-> (CreateEndpointGroupResponse
    -> CreateEndpointGroupResponse -> Bool)
-> Eq CreateEndpointGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEndpointGroupResponse -> CreateEndpointGroupResponse -> Bool
$c/= :: CreateEndpointGroupResponse -> CreateEndpointGroupResponse -> Bool
== :: CreateEndpointGroupResponse -> CreateEndpointGroupResponse -> Bool
$c== :: CreateEndpointGroupResponse -> CreateEndpointGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateEndpointGroupResponse]
ReadPrec CreateEndpointGroupResponse
Int -> ReadS CreateEndpointGroupResponse
ReadS [CreateEndpointGroupResponse]
(Int -> ReadS CreateEndpointGroupResponse)
-> ReadS [CreateEndpointGroupResponse]
-> ReadPrec CreateEndpointGroupResponse
-> ReadPrec [CreateEndpointGroupResponse]
-> Read CreateEndpointGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEndpointGroupResponse]
$creadListPrec :: ReadPrec [CreateEndpointGroupResponse]
readPrec :: ReadPrec CreateEndpointGroupResponse
$creadPrec :: ReadPrec CreateEndpointGroupResponse
readList :: ReadS [CreateEndpointGroupResponse]
$creadList :: ReadS [CreateEndpointGroupResponse]
readsPrec :: Int -> ReadS CreateEndpointGroupResponse
$creadsPrec :: Int -> ReadS CreateEndpointGroupResponse
Prelude.Read, Int -> CreateEndpointGroupResponse -> ShowS
[CreateEndpointGroupResponse] -> ShowS
CreateEndpointGroupResponse -> String
(Int -> CreateEndpointGroupResponse -> ShowS)
-> (CreateEndpointGroupResponse -> String)
-> ([CreateEndpointGroupResponse] -> ShowS)
-> Show CreateEndpointGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEndpointGroupResponse] -> ShowS
$cshowList :: [CreateEndpointGroupResponse] -> ShowS
show :: CreateEndpointGroupResponse -> String
$cshow :: CreateEndpointGroupResponse -> String
showsPrec :: Int -> CreateEndpointGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateEndpointGroupResponse -> ShowS
Prelude.Show, (forall x.
 CreateEndpointGroupResponse -> Rep CreateEndpointGroupResponse x)
-> (forall x.
    Rep CreateEndpointGroupResponse x -> CreateEndpointGroupResponse)
-> Generic CreateEndpointGroupResponse
forall x.
Rep CreateEndpointGroupResponse x -> CreateEndpointGroupResponse
forall x.
CreateEndpointGroupResponse -> Rep CreateEndpointGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEndpointGroupResponse x -> CreateEndpointGroupResponse
$cfrom :: forall x.
CreateEndpointGroupResponse -> Rep CreateEndpointGroupResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEndpointGroupResponse' 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:
--
-- 'endpointGroup', 'createEndpointGroupResponse_endpointGroup' - The information about the endpoint group that was created.
--
-- 'httpStatus', 'createEndpointGroupResponse_httpStatus' - The response's http status code.
newCreateEndpointGroupResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEndpointGroupResponse
newCreateEndpointGroupResponse :: Int -> CreateEndpointGroupResponse
newCreateEndpointGroupResponse Int
pHttpStatus_ =
  CreateEndpointGroupResponse' :: Maybe EndpointGroup -> Int -> CreateEndpointGroupResponse
CreateEndpointGroupResponse'
    { $sel:endpointGroup:CreateEndpointGroupResponse' :: Maybe EndpointGroup
endpointGroup =
        Maybe EndpointGroup
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEndpointGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The information about the endpoint group that was created.
createEndpointGroupResponse_endpointGroup :: Lens.Lens' CreateEndpointGroupResponse (Prelude.Maybe EndpointGroup)
createEndpointGroupResponse_endpointGroup :: (Maybe EndpointGroup -> f (Maybe EndpointGroup))
-> CreateEndpointGroupResponse -> f CreateEndpointGroupResponse
createEndpointGroupResponse_endpointGroup = (CreateEndpointGroupResponse -> Maybe EndpointGroup)
-> (CreateEndpointGroupResponse
    -> Maybe EndpointGroup -> CreateEndpointGroupResponse)
-> Lens
     CreateEndpointGroupResponse
     CreateEndpointGroupResponse
     (Maybe EndpointGroup)
     (Maybe EndpointGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEndpointGroupResponse' {Maybe EndpointGroup
endpointGroup :: Maybe EndpointGroup
$sel:endpointGroup:CreateEndpointGroupResponse' :: CreateEndpointGroupResponse -> Maybe EndpointGroup
endpointGroup} -> Maybe EndpointGroup
endpointGroup) (\s :: CreateEndpointGroupResponse
s@CreateEndpointGroupResponse' {} Maybe EndpointGroup
a -> CreateEndpointGroupResponse
s {$sel:endpointGroup:CreateEndpointGroupResponse' :: Maybe EndpointGroup
endpointGroup = Maybe EndpointGroup
a} :: CreateEndpointGroupResponse)

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

instance Prelude.NFData CreateEndpointGroupResponse