{-# 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 #-}
module Amazonka.GlobalAccelerator.UpdateEndpointGroup
(
UpdateEndpointGroup (..),
newUpdateEndpointGroup,
updateEndpointGroup_thresholdCount,
updateEndpointGroup_healthCheckPath,
updateEndpointGroup_healthCheckIntervalSeconds,
updateEndpointGroup_healthCheckProtocol,
updateEndpointGroup_trafficDialPercentage,
updateEndpointGroup_endpointConfigurations,
updateEndpointGroup_healthCheckPort,
updateEndpointGroup_portOverrides,
updateEndpointGroup_endpointGroupArn,
UpdateEndpointGroupResponse (..),
newUpdateEndpointGroupResponse,
updateEndpointGroupResponse_endpointGroup,
updateEndpointGroupResponse_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
data UpdateEndpointGroup = UpdateEndpointGroup'
{
UpdateEndpointGroup -> Maybe Natural
thresholdCount :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe Text
healthCheckPath :: Prelude.Maybe Prelude.Text,
UpdateEndpointGroup -> Maybe Natural
healthCheckIntervalSeconds :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe HealthCheckProtocol
healthCheckProtocol :: Prelude.Maybe HealthCheckProtocol,
UpdateEndpointGroup -> Maybe Double
trafficDialPercentage :: Prelude.Maybe Prelude.Double,
UpdateEndpointGroup -> Maybe [EndpointConfiguration]
endpointConfigurations :: Prelude.Maybe [EndpointConfiguration],
UpdateEndpointGroup -> Maybe Natural
healthCheckPort :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe [PortOverride]
portOverrides :: Prelude.Maybe [PortOverride],
UpdateEndpointGroup -> Text
endpointGroupArn :: Prelude.Text
}
deriving (UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
(UpdateEndpointGroup -> UpdateEndpointGroup -> Bool)
-> (UpdateEndpointGroup -> UpdateEndpointGroup -> Bool)
-> Eq UpdateEndpointGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
$c/= :: UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
== :: UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
$c== :: UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
Prelude.Eq, ReadPrec [UpdateEndpointGroup]
ReadPrec UpdateEndpointGroup
Int -> ReadS UpdateEndpointGroup
ReadS [UpdateEndpointGroup]
(Int -> ReadS UpdateEndpointGroup)
-> ReadS [UpdateEndpointGroup]
-> ReadPrec UpdateEndpointGroup
-> ReadPrec [UpdateEndpointGroup]
-> Read UpdateEndpointGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEndpointGroup]
$creadListPrec :: ReadPrec [UpdateEndpointGroup]
readPrec :: ReadPrec UpdateEndpointGroup
$creadPrec :: ReadPrec UpdateEndpointGroup
readList :: ReadS [UpdateEndpointGroup]
$creadList :: ReadS [UpdateEndpointGroup]
readsPrec :: Int -> ReadS UpdateEndpointGroup
$creadsPrec :: Int -> ReadS UpdateEndpointGroup
Prelude.Read, Int -> UpdateEndpointGroup -> ShowS
[UpdateEndpointGroup] -> ShowS
UpdateEndpointGroup -> String
(Int -> UpdateEndpointGroup -> ShowS)
-> (UpdateEndpointGroup -> String)
-> ([UpdateEndpointGroup] -> ShowS)
-> Show UpdateEndpointGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEndpointGroup] -> ShowS
$cshowList :: [UpdateEndpointGroup] -> ShowS
show :: UpdateEndpointGroup -> String
$cshow :: UpdateEndpointGroup -> String
showsPrec :: Int -> UpdateEndpointGroup -> ShowS
$cshowsPrec :: Int -> UpdateEndpointGroup -> ShowS
Prelude.Show, (forall x. UpdateEndpointGroup -> Rep UpdateEndpointGroup x)
-> (forall x. Rep UpdateEndpointGroup x -> UpdateEndpointGroup)
-> Generic UpdateEndpointGroup
forall x. Rep UpdateEndpointGroup x -> UpdateEndpointGroup
forall x. UpdateEndpointGroup -> Rep UpdateEndpointGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateEndpointGroup x -> UpdateEndpointGroup
$cfrom :: forall x. UpdateEndpointGroup -> Rep UpdateEndpointGroup x
Prelude.Generic)
newUpdateEndpointGroup ::
Prelude.Text ->
UpdateEndpointGroup
newUpdateEndpointGroup :: Text -> UpdateEndpointGroup
newUpdateEndpointGroup Text
pEndpointGroupArn_ =
UpdateEndpointGroup' :: Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Maybe HealthCheckProtocol
-> Maybe Double
-> Maybe [EndpointConfiguration]
-> Maybe Natural
-> Maybe [PortOverride]
-> Text
-> UpdateEndpointGroup
UpdateEndpointGroup'
{ $sel:thresholdCount:UpdateEndpointGroup' :: Maybe Natural
thresholdCount =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckPath:UpdateEndpointGroup' :: Maybe Text
healthCheckPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: Maybe Natural
healthCheckIntervalSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckProtocol:UpdateEndpointGroup' :: Maybe HealthCheckProtocol
healthCheckProtocol = Maybe HealthCheckProtocol
forall a. Maybe a
Prelude.Nothing,
$sel:trafficDialPercentage:UpdateEndpointGroup' :: Maybe Double
trafficDialPercentage = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:endpointConfigurations:UpdateEndpointGroup' :: Maybe [EndpointConfiguration]
endpointConfigurations = Maybe [EndpointConfiguration]
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckPort:UpdateEndpointGroup' :: Maybe Natural
healthCheckPort = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:portOverrides:UpdateEndpointGroup' :: Maybe [PortOverride]
portOverrides = Maybe [PortOverride]
forall a. Maybe a
Prelude.Nothing,
$sel:endpointGroupArn:UpdateEndpointGroup' :: Text
endpointGroupArn = Text
pEndpointGroupArn_
}
updateEndpointGroup_thresholdCount :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_thresholdCount :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_thresholdCount = (UpdateEndpointGroup -> Maybe Natural)
-> (UpdateEndpointGroup -> Maybe Natural -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe Natural
thresholdCount :: Maybe Natural
$sel:thresholdCount:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
thresholdCount} -> Maybe Natural
thresholdCount) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe Natural
a -> UpdateEndpointGroup
s {$sel:thresholdCount:UpdateEndpointGroup' :: Maybe Natural
thresholdCount = Maybe Natural
a} :: UpdateEndpointGroup)
updateEndpointGroup_healthCheckPath :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Text)
updateEndpointGroup_healthCheckPath :: (Maybe Text -> f (Maybe Text))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_healthCheckPath = (UpdateEndpointGroup -> Maybe Text)
-> (UpdateEndpointGroup -> Maybe Text -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup UpdateEndpointGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe Text
healthCheckPath :: Maybe Text
$sel:healthCheckPath:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Text
healthCheckPath} -> Maybe Text
healthCheckPath) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe Text
a -> UpdateEndpointGroup
s {$sel:healthCheckPath:UpdateEndpointGroup' :: Maybe Text
healthCheckPath = Maybe Text
a} :: UpdateEndpointGroup)
updateEndpointGroup_healthCheckIntervalSeconds :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_healthCheckIntervalSeconds :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_healthCheckIntervalSeconds = (UpdateEndpointGroup -> Maybe Natural)
-> (UpdateEndpointGroup -> Maybe Natural -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe Natural
healthCheckIntervalSeconds :: Maybe Natural
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
healthCheckIntervalSeconds} -> Maybe Natural
healthCheckIntervalSeconds) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe Natural
a -> UpdateEndpointGroup
s {$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: Maybe Natural
healthCheckIntervalSeconds = Maybe Natural
a} :: UpdateEndpointGroup)
updateEndpointGroup_healthCheckProtocol :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe HealthCheckProtocol)
updateEndpointGroup_healthCheckProtocol :: (Maybe HealthCheckProtocol -> f (Maybe HealthCheckProtocol))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_healthCheckProtocol = (UpdateEndpointGroup -> Maybe HealthCheckProtocol)
-> (UpdateEndpointGroup
-> Maybe HealthCheckProtocol -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe HealthCheckProtocol)
(Maybe HealthCheckProtocol)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe HealthCheckProtocol
healthCheckProtocol :: Maybe HealthCheckProtocol
$sel:healthCheckProtocol:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe HealthCheckProtocol
healthCheckProtocol} -> Maybe HealthCheckProtocol
healthCheckProtocol) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe HealthCheckProtocol
a -> UpdateEndpointGroup
s {$sel:healthCheckProtocol:UpdateEndpointGroup' :: Maybe HealthCheckProtocol
healthCheckProtocol = Maybe HealthCheckProtocol
a} :: UpdateEndpointGroup)
updateEndpointGroup_trafficDialPercentage :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Double)
updateEndpointGroup_trafficDialPercentage :: (Maybe Double -> f (Maybe Double))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_trafficDialPercentage = (UpdateEndpointGroup -> Maybe Double)
-> (UpdateEndpointGroup -> Maybe Double -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe Double)
(Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe Double
trafficDialPercentage :: Maybe Double
$sel:trafficDialPercentage:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Double
trafficDialPercentage} -> Maybe Double
trafficDialPercentage) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe Double
a -> UpdateEndpointGroup
s {$sel:trafficDialPercentage:UpdateEndpointGroup' :: Maybe Double
trafficDialPercentage = Maybe Double
a} :: UpdateEndpointGroup)
updateEndpointGroup_endpointConfigurations :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe [EndpointConfiguration])
updateEndpointGroup_endpointConfigurations :: (Maybe [EndpointConfiguration]
-> f (Maybe [EndpointConfiguration]))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_endpointConfigurations = (UpdateEndpointGroup -> Maybe [EndpointConfiguration])
-> (UpdateEndpointGroup
-> Maybe [EndpointConfiguration] -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe [EndpointConfiguration])
(Maybe [EndpointConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe [EndpointConfiguration]
endpointConfigurations :: Maybe [EndpointConfiguration]
$sel:endpointConfigurations:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [EndpointConfiguration]
endpointConfigurations} -> Maybe [EndpointConfiguration]
endpointConfigurations) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe [EndpointConfiguration]
a -> UpdateEndpointGroup
s {$sel:endpointConfigurations:UpdateEndpointGroup' :: Maybe [EndpointConfiguration]
endpointConfigurations = Maybe [EndpointConfiguration]
a} :: UpdateEndpointGroup) ((Maybe [EndpointConfiguration]
-> f (Maybe [EndpointConfiguration]))
-> UpdateEndpointGroup -> f UpdateEndpointGroup)
-> ((Maybe [EndpointConfiguration]
-> f (Maybe [EndpointConfiguration]))
-> Maybe [EndpointConfiguration]
-> f (Maybe [EndpointConfiguration]))
-> (Maybe [EndpointConfiguration]
-> f (Maybe [EndpointConfiguration]))
-> UpdateEndpointGroup
-> f UpdateEndpointGroup
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
updateEndpointGroup_healthCheckPort :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_healthCheckPort :: (Maybe Natural -> f (Maybe Natural))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_healthCheckPort = (UpdateEndpointGroup -> Maybe Natural)
-> (UpdateEndpointGroup -> Maybe Natural -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe Natural
healthCheckPort :: Maybe Natural
$sel:healthCheckPort:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
healthCheckPort} -> Maybe Natural
healthCheckPort) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe Natural
a -> UpdateEndpointGroup
s {$sel:healthCheckPort:UpdateEndpointGroup' :: Maybe Natural
healthCheckPort = Maybe Natural
a} :: UpdateEndpointGroup)
updateEndpointGroup_portOverrides :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe [PortOverride])
updateEndpointGroup_portOverrides :: (Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_portOverrides = (UpdateEndpointGroup -> Maybe [PortOverride])
-> (UpdateEndpointGroup
-> Maybe [PortOverride] -> UpdateEndpointGroup)
-> Lens
UpdateEndpointGroup
UpdateEndpointGroup
(Maybe [PortOverride])
(Maybe [PortOverride])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Maybe [PortOverride]
portOverrides :: Maybe [PortOverride]
$sel:portOverrides:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [PortOverride]
portOverrides} -> Maybe [PortOverride]
portOverrides) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Maybe [PortOverride]
a -> UpdateEndpointGroup
s {$sel:portOverrides:UpdateEndpointGroup' :: Maybe [PortOverride]
portOverrides = Maybe [PortOverride]
a} :: UpdateEndpointGroup) ((Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> UpdateEndpointGroup -> f UpdateEndpointGroup)
-> ((Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> (Maybe [PortOverride] -> f (Maybe [PortOverride]))
-> UpdateEndpointGroup
-> f UpdateEndpointGroup
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
updateEndpointGroup_endpointGroupArn :: Lens.Lens' UpdateEndpointGroup Prelude.Text
updateEndpointGroup_endpointGroupArn :: (Text -> f Text) -> UpdateEndpointGroup -> f UpdateEndpointGroup
updateEndpointGroup_endpointGroupArn = (UpdateEndpointGroup -> Text)
-> (UpdateEndpointGroup -> Text -> UpdateEndpointGroup)
-> Lens UpdateEndpointGroup UpdateEndpointGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroup' {Text
endpointGroupArn :: Text
$sel:endpointGroupArn:UpdateEndpointGroup' :: UpdateEndpointGroup -> Text
endpointGroupArn} -> Text
endpointGroupArn) (\s :: UpdateEndpointGroup
s@UpdateEndpointGroup' {} Text
a -> UpdateEndpointGroup
s {$sel:endpointGroupArn:UpdateEndpointGroup' :: Text
endpointGroupArn = Text
a} :: UpdateEndpointGroup)
instance Core.AWSRequest UpdateEndpointGroup where
type
AWSResponse UpdateEndpointGroup =
UpdateEndpointGroupResponse
request :: UpdateEndpointGroup -> Request UpdateEndpointGroup
request = Service -> UpdateEndpointGroup -> Request UpdateEndpointGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateEndpointGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEndpointGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateEndpointGroup))
-> Logger
-> Service
-> Proxy UpdateEndpointGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEndpointGroup)))
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 -> UpdateEndpointGroupResponse
UpdateEndpointGroupResponse'
(Maybe EndpointGroup -> Int -> UpdateEndpointGroupResponse)
-> Either String (Maybe EndpointGroup)
-> Either String (Int -> UpdateEndpointGroupResponse)
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 -> UpdateEndpointGroupResponse)
-> Either String Int -> Either String UpdateEndpointGroupResponse
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 UpdateEndpointGroup
instance Prelude.NFData UpdateEndpointGroup
instance Core.ToHeaders UpdateEndpointGroup where
toHeaders :: UpdateEndpointGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateEndpointGroup -> 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.UpdateEndpointGroup" ::
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 UpdateEndpointGroup where
toJSON :: UpdateEndpointGroup -> Value
toJSON UpdateEndpointGroup' {Maybe Double
Maybe Natural
Maybe [EndpointConfiguration]
Maybe [PortOverride]
Maybe Text
Maybe HealthCheckProtocol
Text
endpointGroupArn :: 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:endpointGroupArn:UpdateEndpointGroup' :: UpdateEndpointGroup -> Text
$sel:portOverrides:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [PortOverride]
$sel:healthCheckPort:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:endpointConfigurations:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [EndpointConfiguration]
$sel:trafficDialPercentage:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Double
$sel:healthCheckProtocol:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe HealthCheckProtocol
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:healthCheckPath:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Text
$sel:thresholdCount:UpdateEndpointGroup' :: UpdateEndpointGroup -> 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
"EndpointGroupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointGroupArn)
]
)
instance Core.ToPath UpdateEndpointGroup where
toPath :: UpdateEndpointGroup -> ByteString
toPath = ByteString -> UpdateEndpointGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateEndpointGroup where
toQuery :: UpdateEndpointGroup -> QueryString
toQuery = QueryString -> UpdateEndpointGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateEndpointGroupResponse = UpdateEndpointGroupResponse'
{
UpdateEndpointGroupResponse -> Maybe EndpointGroup
endpointGroup :: Prelude.Maybe EndpointGroup,
UpdateEndpointGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateEndpointGroupResponse -> UpdateEndpointGroupResponse -> Bool
(UpdateEndpointGroupResponse
-> UpdateEndpointGroupResponse -> Bool)
-> (UpdateEndpointGroupResponse
-> UpdateEndpointGroupResponse -> Bool)
-> Eq UpdateEndpointGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEndpointGroupResponse -> UpdateEndpointGroupResponse -> Bool
$c/= :: UpdateEndpointGroupResponse -> UpdateEndpointGroupResponse -> Bool
== :: UpdateEndpointGroupResponse -> UpdateEndpointGroupResponse -> Bool
$c== :: UpdateEndpointGroupResponse -> UpdateEndpointGroupResponse -> Bool
Prelude.Eq, ReadPrec [UpdateEndpointGroupResponse]
ReadPrec UpdateEndpointGroupResponse
Int -> ReadS UpdateEndpointGroupResponse
ReadS [UpdateEndpointGroupResponse]
(Int -> ReadS UpdateEndpointGroupResponse)
-> ReadS [UpdateEndpointGroupResponse]
-> ReadPrec UpdateEndpointGroupResponse
-> ReadPrec [UpdateEndpointGroupResponse]
-> Read UpdateEndpointGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEndpointGroupResponse]
$creadListPrec :: ReadPrec [UpdateEndpointGroupResponse]
readPrec :: ReadPrec UpdateEndpointGroupResponse
$creadPrec :: ReadPrec UpdateEndpointGroupResponse
readList :: ReadS [UpdateEndpointGroupResponse]
$creadList :: ReadS [UpdateEndpointGroupResponse]
readsPrec :: Int -> ReadS UpdateEndpointGroupResponse
$creadsPrec :: Int -> ReadS UpdateEndpointGroupResponse
Prelude.Read, Int -> UpdateEndpointGroupResponse -> ShowS
[UpdateEndpointGroupResponse] -> ShowS
UpdateEndpointGroupResponse -> String
(Int -> UpdateEndpointGroupResponse -> ShowS)
-> (UpdateEndpointGroupResponse -> String)
-> ([UpdateEndpointGroupResponse] -> ShowS)
-> Show UpdateEndpointGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEndpointGroupResponse] -> ShowS
$cshowList :: [UpdateEndpointGroupResponse] -> ShowS
show :: UpdateEndpointGroupResponse -> String
$cshow :: UpdateEndpointGroupResponse -> String
showsPrec :: Int -> UpdateEndpointGroupResponse -> ShowS
$cshowsPrec :: Int -> UpdateEndpointGroupResponse -> ShowS
Prelude.Show, (forall x.
UpdateEndpointGroupResponse -> Rep UpdateEndpointGroupResponse x)
-> (forall x.
Rep UpdateEndpointGroupResponse x -> UpdateEndpointGroupResponse)
-> Generic UpdateEndpointGroupResponse
forall x.
Rep UpdateEndpointGroupResponse x -> UpdateEndpointGroupResponse
forall x.
UpdateEndpointGroupResponse -> Rep UpdateEndpointGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEndpointGroupResponse x -> UpdateEndpointGroupResponse
$cfrom :: forall x.
UpdateEndpointGroupResponse -> Rep UpdateEndpointGroupResponse x
Prelude.Generic)
newUpdateEndpointGroupResponse ::
Prelude.Int ->
UpdateEndpointGroupResponse
newUpdateEndpointGroupResponse :: Int -> UpdateEndpointGroupResponse
newUpdateEndpointGroupResponse Int
pHttpStatus_ =
UpdateEndpointGroupResponse' :: Maybe EndpointGroup -> Int -> UpdateEndpointGroupResponse
UpdateEndpointGroupResponse'
{ $sel:endpointGroup:UpdateEndpointGroupResponse' :: Maybe EndpointGroup
endpointGroup =
Maybe EndpointGroup
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateEndpointGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateEndpointGroupResponse_endpointGroup :: Lens.Lens' UpdateEndpointGroupResponse (Prelude.Maybe EndpointGroup)
updateEndpointGroupResponse_endpointGroup :: (Maybe EndpointGroup -> f (Maybe EndpointGroup))
-> UpdateEndpointGroupResponse -> f UpdateEndpointGroupResponse
updateEndpointGroupResponse_endpointGroup = (UpdateEndpointGroupResponse -> Maybe EndpointGroup)
-> (UpdateEndpointGroupResponse
-> Maybe EndpointGroup -> UpdateEndpointGroupResponse)
-> Lens
UpdateEndpointGroupResponse
UpdateEndpointGroupResponse
(Maybe EndpointGroup)
(Maybe EndpointGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroupResponse' {Maybe EndpointGroup
endpointGroup :: Maybe EndpointGroup
$sel:endpointGroup:UpdateEndpointGroupResponse' :: UpdateEndpointGroupResponse -> Maybe EndpointGroup
endpointGroup} -> Maybe EndpointGroup
endpointGroup) (\s :: UpdateEndpointGroupResponse
s@UpdateEndpointGroupResponse' {} Maybe EndpointGroup
a -> UpdateEndpointGroupResponse
s {$sel:endpointGroup:UpdateEndpointGroupResponse' :: Maybe EndpointGroup
endpointGroup = Maybe EndpointGroup
a} :: UpdateEndpointGroupResponse)
updateEndpointGroupResponse_httpStatus :: Lens.Lens' UpdateEndpointGroupResponse Prelude.Int
updateEndpointGroupResponse_httpStatus :: (Int -> f Int)
-> UpdateEndpointGroupResponse -> f UpdateEndpointGroupResponse
updateEndpointGroupResponse_httpStatus = (UpdateEndpointGroupResponse -> Int)
-> (UpdateEndpointGroupResponse
-> Int -> UpdateEndpointGroupResponse)
-> Lens
UpdateEndpointGroupResponse UpdateEndpointGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateEndpointGroupResponse' :: UpdateEndpointGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateEndpointGroupResponse
s@UpdateEndpointGroupResponse' {} Int
a -> UpdateEndpointGroupResponse
s {$sel:httpStatus:UpdateEndpointGroupResponse' :: Int
httpStatus = Int
a} :: UpdateEndpointGroupResponse)
instance Prelude.NFData UpdateEndpointGroupResponse