{-# 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_endpointConfigurations,
updateEndpointGroup_healthCheckIntervalSeconds,
updateEndpointGroup_healthCheckPath,
updateEndpointGroup_healthCheckPort,
updateEndpointGroup_healthCheckProtocol,
updateEndpointGroup_portOverrides,
updateEndpointGroup_thresholdCount,
updateEndpointGroup_trafficDialPercentage,
updateEndpointGroup_endpointGroupArn,
UpdateEndpointGroupResponse (..),
newUpdateEndpointGroupResponse,
updateEndpointGroupResponse_endpointGroup,
updateEndpointGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GlobalAccelerator.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateEndpointGroup = UpdateEndpointGroup'
{
UpdateEndpointGroup -> Maybe [EndpointConfiguration]
endpointConfigurations :: Prelude.Maybe [EndpointConfiguration],
UpdateEndpointGroup -> Maybe Natural
healthCheckIntervalSeconds :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe Text
healthCheckPath :: Prelude.Maybe Prelude.Text,
UpdateEndpointGroup -> Maybe Natural
healthCheckPort :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe HealthCheckProtocol
healthCheckProtocol :: Prelude.Maybe HealthCheckProtocol,
UpdateEndpointGroup -> Maybe [PortOverride]
portOverrides :: Prelude.Maybe [PortOverride],
UpdateEndpointGroup -> Maybe Natural
thresholdCount :: Prelude.Maybe Prelude.Natural,
UpdateEndpointGroup -> Maybe Double
trafficDialPercentage :: Prelude.Maybe Prelude.Double,
UpdateEndpointGroup -> Text
endpointGroupArn :: Prelude.Text
}
deriving (UpdateEndpointGroup -> UpdateEndpointGroup -> Bool
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]
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
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. 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'
{ $sel:endpointConfigurations:UpdateEndpointGroup' :: Maybe [EndpointConfiguration]
endpointConfigurations =
forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: Maybe Natural
healthCheckIntervalSeconds = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckPath:UpdateEndpointGroup' :: Maybe Text
healthCheckPath = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckPort:UpdateEndpointGroup' :: Maybe Natural
healthCheckPort = forall a. Maybe a
Prelude.Nothing,
$sel:healthCheckProtocol:UpdateEndpointGroup' :: Maybe HealthCheckProtocol
healthCheckProtocol = forall a. Maybe a
Prelude.Nothing,
$sel:portOverrides:UpdateEndpointGroup' :: Maybe [PortOverride]
portOverrides = forall a. Maybe a
Prelude.Nothing,
$sel:thresholdCount:UpdateEndpointGroup' :: Maybe Natural
thresholdCount = forall a. Maybe a
Prelude.Nothing,
$sel:trafficDialPercentage:UpdateEndpointGroup' :: Maybe Double
trafficDialPercentage = forall a. Maybe a
Prelude.Nothing,
$sel:endpointGroupArn:UpdateEndpointGroup' :: Text
endpointGroupArn = Text
pEndpointGroupArn_
}
updateEndpointGroup_endpointConfigurations :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe [EndpointConfiguration])
updateEndpointGroup_endpointConfigurations :: Lens' UpdateEndpointGroup (Maybe [EndpointConfiguration])
updateEndpointGroup_endpointConfigurations = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateEndpointGroup_healthCheckIntervalSeconds :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_healthCheckIntervalSeconds :: Lens' UpdateEndpointGroup (Maybe Natural)
updateEndpointGroup_healthCheckIntervalSeconds = 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_healthCheckPath :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Text)
updateEndpointGroup_healthCheckPath :: Lens' UpdateEndpointGroup (Maybe Text)
updateEndpointGroup_healthCheckPath = 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_healthCheckPort :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_healthCheckPort :: Lens' UpdateEndpointGroup (Maybe Natural)
updateEndpointGroup_healthCheckPort = 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_healthCheckProtocol :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe HealthCheckProtocol)
updateEndpointGroup_healthCheckProtocol :: Lens' UpdateEndpointGroup (Maybe HealthCheckProtocol)
updateEndpointGroup_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_portOverrides :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe [PortOverride])
updateEndpointGroup_portOverrides :: Lens' UpdateEndpointGroup (Maybe [PortOverride])
updateEndpointGroup_portOverrides = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateEndpointGroup_thresholdCount :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Natural)
updateEndpointGroup_thresholdCount :: Lens' UpdateEndpointGroup (Maybe Natural)
updateEndpointGroup_thresholdCount = 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_trafficDialPercentage :: Lens.Lens' UpdateEndpointGroup (Prelude.Maybe Prelude.Double)
updateEndpointGroup_trafficDialPercentage :: Lens' UpdateEndpointGroup (Maybe Double)
updateEndpointGroup_trafficDialPercentage = 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_endpointGroupArn :: Lens.Lens' UpdateEndpointGroup Prelude.Text
updateEndpointGroup_endpointGroupArn :: Lens' UpdateEndpointGroup Text
updateEndpointGroup_endpointGroupArn = 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 :: (Service -> Service)
-> UpdateEndpointGroup -> Request UpdateEndpointGroup
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateEndpointGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateEndpointGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe EndpointGroup -> Int -> UpdateEndpointGroupResponse
UpdateEndpointGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"EndpointGroup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateEndpointGroup where
hashWithSalt :: Int -> UpdateEndpointGroup -> Int
hashWithSalt Int
_salt UpdateEndpointGroup' {Maybe Double
Maybe Natural
Maybe [EndpointConfiguration]
Maybe [PortOverride]
Maybe Text
Maybe HealthCheckProtocol
Text
endpointGroupArn :: Text
trafficDialPercentage :: Maybe Double
thresholdCount :: Maybe Natural
portOverrides :: Maybe [PortOverride]
healthCheckProtocol :: Maybe HealthCheckProtocol
healthCheckPort :: Maybe Natural
healthCheckPath :: Maybe Text
healthCheckIntervalSeconds :: Maybe Natural
endpointConfigurations :: Maybe [EndpointConfiguration]
$sel:endpointGroupArn:UpdateEndpointGroup' :: UpdateEndpointGroup -> Text
$sel:trafficDialPercentage:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Double
$sel:thresholdCount:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:portOverrides:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [PortOverride]
$sel:healthCheckProtocol:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe HealthCheckProtocol
$sel:healthCheckPort:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:healthCheckPath:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Text
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:endpointConfigurations:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [EndpointConfiguration]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [EndpointConfiguration]
endpointConfigurations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
healthCheckIntervalSeconds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
healthCheckPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
healthCheckPort
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HealthCheckProtocol
healthCheckProtocol
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PortOverride]
portOverrides
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
thresholdCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
trafficDialPercentage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointGroupArn
instance Prelude.NFData UpdateEndpointGroup where
rnf :: UpdateEndpointGroup -> ()
rnf UpdateEndpointGroup' {Maybe Double
Maybe Natural
Maybe [EndpointConfiguration]
Maybe [PortOverride]
Maybe Text
Maybe HealthCheckProtocol
Text
endpointGroupArn :: Text
trafficDialPercentage :: Maybe Double
thresholdCount :: Maybe Natural
portOverrides :: Maybe [PortOverride]
healthCheckProtocol :: Maybe HealthCheckProtocol
healthCheckPort :: Maybe Natural
healthCheckPath :: Maybe Text
healthCheckIntervalSeconds :: Maybe Natural
endpointConfigurations :: Maybe [EndpointConfiguration]
$sel:endpointGroupArn:UpdateEndpointGroup' :: UpdateEndpointGroup -> Text
$sel:trafficDialPercentage:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Double
$sel:thresholdCount:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:portOverrides:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [PortOverride]
$sel:healthCheckProtocol:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe HealthCheckProtocol
$sel:healthCheckPort:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:healthCheckPath:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Text
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:endpointConfigurations:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [EndpointConfiguration]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [EndpointConfiguration]
endpointConfigurations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
healthCheckIntervalSeconds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
healthCheckPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
healthCheckPort
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HealthCheckProtocol
healthCheckProtocol
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PortOverride]
portOverrides
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
thresholdCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
trafficDialPercentage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
endpointGroupArn
instance Data.ToHeaders UpdateEndpointGroup where
toHeaders :: UpdateEndpointGroup -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"GlobalAccelerator_V20180706.UpdateEndpointGroup" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateEndpointGroup where
toJSON :: UpdateEndpointGroup -> Value
toJSON UpdateEndpointGroup' {Maybe Double
Maybe Natural
Maybe [EndpointConfiguration]
Maybe [PortOverride]
Maybe Text
Maybe HealthCheckProtocol
Text
endpointGroupArn :: Text
trafficDialPercentage :: Maybe Double
thresholdCount :: Maybe Natural
portOverrides :: Maybe [PortOverride]
healthCheckProtocol :: Maybe HealthCheckProtocol
healthCheckPort :: Maybe Natural
healthCheckPath :: Maybe Text
healthCheckIntervalSeconds :: Maybe Natural
endpointConfigurations :: Maybe [EndpointConfiguration]
$sel:endpointGroupArn:UpdateEndpointGroup' :: UpdateEndpointGroup -> Text
$sel:trafficDialPercentage:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Double
$sel:thresholdCount:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:portOverrides:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [PortOverride]
$sel:healthCheckProtocol:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe HealthCheckProtocol
$sel:healthCheckPort:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:healthCheckPath:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Text
$sel:healthCheckIntervalSeconds:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe Natural
$sel:endpointConfigurations:UpdateEndpointGroup' :: UpdateEndpointGroup -> Maybe [EndpointConfiguration]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"EndpointConfigurations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EndpointConfiguration]
endpointConfigurations,
(Key
"HealthCheckIntervalSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
healthCheckIntervalSeconds,
(Key
"HealthCheckPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
healthCheckPath,
(Key
"HealthCheckPort" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
healthCheckPort,
(Key
"HealthCheckProtocol" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckProtocol
healthCheckProtocol,
(Key
"PortOverrides" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PortOverride]
portOverrides,
(Key
"ThresholdCount" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
thresholdCount,
(Key
"TrafficDialPercentage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
trafficDialPercentage,
forall a. a -> Maybe a
Prelude.Just
(Key
"EndpointGroupArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
endpointGroupArn)
]
)
instance Data.ToPath UpdateEndpointGroup where
toPath :: UpdateEndpointGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateEndpointGroup where
toQuery :: UpdateEndpointGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const 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
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]
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
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.
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'
{ $sel:endpointGroup:UpdateEndpointGroupResponse' :: Maybe EndpointGroup
endpointGroup =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateEndpointGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateEndpointGroupResponse_endpointGroup :: Lens.Lens' UpdateEndpointGroupResponse (Prelude.Maybe EndpointGroup)
updateEndpointGroupResponse_endpointGroup :: Lens' UpdateEndpointGroupResponse (Maybe EndpointGroup)
updateEndpointGroupResponse_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 :: Lens' UpdateEndpointGroupResponse Int
updateEndpointGroupResponse_httpStatus = 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 where
rnf :: UpdateEndpointGroupResponse -> ()
rnf UpdateEndpointGroupResponse' {Int
Maybe EndpointGroup
httpStatus :: Int
endpointGroup :: Maybe EndpointGroup
$sel:httpStatus:UpdateEndpointGroupResponse' :: UpdateEndpointGroupResponse -> Int
$sel:endpointGroup:UpdateEndpointGroupResponse' :: UpdateEndpointGroupResponse -> Maybe EndpointGroup
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointGroup
endpointGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus