{-# 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.EKS.UpdateNodegroupConfig
(
UpdateNodegroupConfig (..),
newUpdateNodegroupConfig,
updateNodegroupConfig_taints,
updateNodegroupConfig_scalingConfig,
updateNodegroupConfig_labels,
updateNodegroupConfig_clientRequestToken,
updateNodegroupConfig_updateConfig,
updateNodegroupConfig_clusterName,
updateNodegroupConfig_nodegroupName,
UpdateNodegroupConfigResponse (..),
newUpdateNodegroupConfigResponse,
updateNodegroupConfigResponse_update,
updateNodegroupConfigResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EKS.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 UpdateNodegroupConfig = UpdateNodegroupConfig'
{
UpdateNodegroupConfig -> Maybe UpdateTaintsPayload
taints :: Prelude.Maybe UpdateTaintsPayload,
UpdateNodegroupConfig -> Maybe NodegroupScalingConfig
scalingConfig :: Prelude.Maybe NodegroupScalingConfig,
UpdateNodegroupConfig -> Maybe UpdateLabelsPayload
labels :: Prelude.Maybe UpdateLabelsPayload,
UpdateNodegroupConfig -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
UpdateNodegroupConfig -> Maybe NodegroupUpdateConfig
updateConfig :: Prelude.Maybe NodegroupUpdateConfig,
UpdateNodegroupConfig -> Text
clusterName :: Prelude.Text,
UpdateNodegroupConfig -> Text
nodegroupName :: Prelude.Text
}
deriving (UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool
(UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool)
-> (UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool)
-> Eq UpdateNodegroupConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool
$c/= :: UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool
== :: UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool
$c== :: UpdateNodegroupConfig -> UpdateNodegroupConfig -> Bool
Prelude.Eq, ReadPrec [UpdateNodegroupConfig]
ReadPrec UpdateNodegroupConfig
Int -> ReadS UpdateNodegroupConfig
ReadS [UpdateNodegroupConfig]
(Int -> ReadS UpdateNodegroupConfig)
-> ReadS [UpdateNodegroupConfig]
-> ReadPrec UpdateNodegroupConfig
-> ReadPrec [UpdateNodegroupConfig]
-> Read UpdateNodegroupConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNodegroupConfig]
$creadListPrec :: ReadPrec [UpdateNodegroupConfig]
readPrec :: ReadPrec UpdateNodegroupConfig
$creadPrec :: ReadPrec UpdateNodegroupConfig
readList :: ReadS [UpdateNodegroupConfig]
$creadList :: ReadS [UpdateNodegroupConfig]
readsPrec :: Int -> ReadS UpdateNodegroupConfig
$creadsPrec :: Int -> ReadS UpdateNodegroupConfig
Prelude.Read, Int -> UpdateNodegroupConfig -> ShowS
[UpdateNodegroupConfig] -> ShowS
UpdateNodegroupConfig -> String
(Int -> UpdateNodegroupConfig -> ShowS)
-> (UpdateNodegroupConfig -> String)
-> ([UpdateNodegroupConfig] -> ShowS)
-> Show UpdateNodegroupConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNodegroupConfig] -> ShowS
$cshowList :: [UpdateNodegroupConfig] -> ShowS
show :: UpdateNodegroupConfig -> String
$cshow :: UpdateNodegroupConfig -> String
showsPrec :: Int -> UpdateNodegroupConfig -> ShowS
$cshowsPrec :: Int -> UpdateNodegroupConfig -> ShowS
Prelude.Show, (forall x. UpdateNodegroupConfig -> Rep UpdateNodegroupConfig x)
-> (forall x. Rep UpdateNodegroupConfig x -> UpdateNodegroupConfig)
-> Generic UpdateNodegroupConfig
forall x. Rep UpdateNodegroupConfig x -> UpdateNodegroupConfig
forall x. UpdateNodegroupConfig -> Rep UpdateNodegroupConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNodegroupConfig x -> UpdateNodegroupConfig
$cfrom :: forall x. UpdateNodegroupConfig -> Rep UpdateNodegroupConfig x
Prelude.Generic)
newUpdateNodegroupConfig ::
Prelude.Text ->
Prelude.Text ->
UpdateNodegroupConfig
newUpdateNodegroupConfig :: Text -> Text -> UpdateNodegroupConfig
newUpdateNodegroupConfig
Text
pClusterName_
Text
pNodegroupName_ =
UpdateNodegroupConfig' :: Maybe UpdateTaintsPayload
-> Maybe NodegroupScalingConfig
-> Maybe UpdateLabelsPayload
-> Maybe Text
-> Maybe NodegroupUpdateConfig
-> Text
-> Text
-> UpdateNodegroupConfig
UpdateNodegroupConfig'
{ $sel:taints:UpdateNodegroupConfig' :: Maybe UpdateTaintsPayload
taints = Maybe UpdateTaintsPayload
forall a. Maybe a
Prelude.Nothing,
$sel:scalingConfig:UpdateNodegroupConfig' :: Maybe NodegroupScalingConfig
scalingConfig = Maybe NodegroupScalingConfig
forall a. Maybe a
Prelude.Nothing,
$sel:labels:UpdateNodegroupConfig' :: Maybe UpdateLabelsPayload
labels = Maybe UpdateLabelsPayload
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:UpdateNodegroupConfig' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updateConfig:UpdateNodegroupConfig' :: Maybe NodegroupUpdateConfig
updateConfig = Maybe NodegroupUpdateConfig
forall a. Maybe a
Prelude.Nothing,
$sel:clusterName:UpdateNodegroupConfig' :: Text
clusterName = Text
pClusterName_,
$sel:nodegroupName:UpdateNodegroupConfig' :: Text
nodegroupName = Text
pNodegroupName_
}
updateNodegroupConfig_taints :: Lens.Lens' UpdateNodegroupConfig (Prelude.Maybe UpdateTaintsPayload)
updateNodegroupConfig_taints :: (Maybe UpdateTaintsPayload -> f (Maybe UpdateTaintsPayload))
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_taints = (UpdateNodegroupConfig -> Maybe UpdateTaintsPayload)
-> (UpdateNodegroupConfig
-> Maybe UpdateTaintsPayload -> UpdateNodegroupConfig)
-> Lens
UpdateNodegroupConfig
UpdateNodegroupConfig
(Maybe UpdateTaintsPayload)
(Maybe UpdateTaintsPayload)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Maybe UpdateTaintsPayload
taints :: Maybe UpdateTaintsPayload
$sel:taints:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateTaintsPayload
taints} -> Maybe UpdateTaintsPayload
taints) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Maybe UpdateTaintsPayload
a -> UpdateNodegroupConfig
s {$sel:taints:UpdateNodegroupConfig' :: Maybe UpdateTaintsPayload
taints = Maybe UpdateTaintsPayload
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_scalingConfig :: Lens.Lens' UpdateNodegroupConfig (Prelude.Maybe NodegroupScalingConfig)
updateNodegroupConfig_scalingConfig :: (Maybe NodegroupScalingConfig -> f (Maybe NodegroupScalingConfig))
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_scalingConfig = (UpdateNodegroupConfig -> Maybe NodegroupScalingConfig)
-> (UpdateNodegroupConfig
-> Maybe NodegroupScalingConfig -> UpdateNodegroupConfig)
-> Lens
UpdateNodegroupConfig
UpdateNodegroupConfig
(Maybe NodegroupScalingConfig)
(Maybe NodegroupScalingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Maybe NodegroupScalingConfig
scalingConfig :: Maybe NodegroupScalingConfig
$sel:scalingConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupScalingConfig
scalingConfig} -> Maybe NodegroupScalingConfig
scalingConfig) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Maybe NodegroupScalingConfig
a -> UpdateNodegroupConfig
s {$sel:scalingConfig:UpdateNodegroupConfig' :: Maybe NodegroupScalingConfig
scalingConfig = Maybe NodegroupScalingConfig
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_labels :: Lens.Lens' UpdateNodegroupConfig (Prelude.Maybe UpdateLabelsPayload)
updateNodegroupConfig_labels :: (Maybe UpdateLabelsPayload -> f (Maybe UpdateLabelsPayload))
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_labels = (UpdateNodegroupConfig -> Maybe UpdateLabelsPayload)
-> (UpdateNodegroupConfig
-> Maybe UpdateLabelsPayload -> UpdateNodegroupConfig)
-> Lens
UpdateNodegroupConfig
UpdateNodegroupConfig
(Maybe UpdateLabelsPayload)
(Maybe UpdateLabelsPayload)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Maybe UpdateLabelsPayload
labels :: Maybe UpdateLabelsPayload
$sel:labels:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateLabelsPayload
labels} -> Maybe UpdateLabelsPayload
labels) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Maybe UpdateLabelsPayload
a -> UpdateNodegroupConfig
s {$sel:labels:UpdateNodegroupConfig' :: Maybe UpdateLabelsPayload
labels = Maybe UpdateLabelsPayload
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_clientRequestToken :: Lens.Lens' UpdateNodegroupConfig (Prelude.Maybe Prelude.Text)
updateNodegroupConfig_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_clientRequestToken = (UpdateNodegroupConfig -> Maybe Text)
-> (UpdateNodegroupConfig -> Maybe Text -> UpdateNodegroupConfig)
-> Lens
UpdateNodegroupConfig
UpdateNodegroupConfig
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Maybe Text
a -> UpdateNodegroupConfig
s {$sel:clientRequestToken:UpdateNodegroupConfig' :: Maybe Text
clientRequestToken = Maybe Text
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_updateConfig :: Lens.Lens' UpdateNodegroupConfig (Prelude.Maybe NodegroupUpdateConfig)
updateNodegroupConfig_updateConfig :: (Maybe NodegroupUpdateConfig -> f (Maybe NodegroupUpdateConfig))
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_updateConfig = (UpdateNodegroupConfig -> Maybe NodegroupUpdateConfig)
-> (UpdateNodegroupConfig
-> Maybe NodegroupUpdateConfig -> UpdateNodegroupConfig)
-> Lens
UpdateNodegroupConfig
UpdateNodegroupConfig
(Maybe NodegroupUpdateConfig)
(Maybe NodegroupUpdateConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Maybe NodegroupUpdateConfig
updateConfig :: Maybe NodegroupUpdateConfig
$sel:updateConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupUpdateConfig
updateConfig} -> Maybe NodegroupUpdateConfig
updateConfig) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Maybe NodegroupUpdateConfig
a -> UpdateNodegroupConfig
s {$sel:updateConfig:UpdateNodegroupConfig' :: Maybe NodegroupUpdateConfig
updateConfig = Maybe NodegroupUpdateConfig
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_clusterName :: Lens.Lens' UpdateNodegroupConfig Prelude.Text
updateNodegroupConfig_clusterName :: (Text -> f Text)
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_clusterName = (UpdateNodegroupConfig -> Text)
-> (UpdateNodegroupConfig -> Text -> UpdateNodegroupConfig)
-> Lens UpdateNodegroupConfig UpdateNodegroupConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Text
clusterName :: Text
$sel:clusterName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
clusterName} -> Text
clusterName) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Text
a -> UpdateNodegroupConfig
s {$sel:clusterName:UpdateNodegroupConfig' :: Text
clusterName = Text
a} :: UpdateNodegroupConfig)
updateNodegroupConfig_nodegroupName :: Lens.Lens' UpdateNodegroupConfig Prelude.Text
updateNodegroupConfig_nodegroupName :: (Text -> f Text)
-> UpdateNodegroupConfig -> f UpdateNodegroupConfig
updateNodegroupConfig_nodegroupName = (UpdateNodegroupConfig -> Text)
-> (UpdateNodegroupConfig -> Text -> UpdateNodegroupConfig)
-> Lens UpdateNodegroupConfig UpdateNodegroupConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfig' {Text
nodegroupName :: Text
$sel:nodegroupName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
nodegroupName} -> Text
nodegroupName) (\s :: UpdateNodegroupConfig
s@UpdateNodegroupConfig' {} Text
a -> UpdateNodegroupConfig
s {$sel:nodegroupName:UpdateNodegroupConfig' :: Text
nodegroupName = Text
a} :: UpdateNodegroupConfig)
instance Core.AWSRequest UpdateNodegroupConfig where
type
AWSResponse UpdateNodegroupConfig =
UpdateNodegroupConfigResponse
request :: UpdateNodegroupConfig -> Request UpdateNodegroupConfig
request = Service -> UpdateNodegroupConfig -> Request UpdateNodegroupConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateNodegroupConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateNodegroupConfig)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateNodegroupConfig))
-> Logger
-> Service
-> Proxy UpdateNodegroupConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateNodegroupConfig)))
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 Update -> Int -> UpdateNodegroupConfigResponse
UpdateNodegroupConfigResponse'
(Maybe Update -> Int -> UpdateNodegroupConfigResponse)
-> Either String (Maybe Update)
-> Either String (Int -> UpdateNodegroupConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Update)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"update")
Either String (Int -> UpdateNodegroupConfigResponse)
-> Either String Int -> Either String UpdateNodegroupConfigResponse
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 UpdateNodegroupConfig
instance Prelude.NFData UpdateNodegroupConfig
instance Core.ToHeaders UpdateNodegroupConfig where
toHeaders :: UpdateNodegroupConfig -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateNodegroupConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 UpdateNodegroupConfig where
toJSON :: UpdateNodegroupConfig -> Value
toJSON UpdateNodegroupConfig' {Maybe Text
Maybe NodegroupScalingConfig
Maybe NodegroupUpdateConfig
Maybe UpdateLabelsPayload
Maybe UpdateTaintsPayload
Text
nodegroupName :: Text
clusterName :: Text
updateConfig :: Maybe NodegroupUpdateConfig
clientRequestToken :: Maybe Text
labels :: Maybe UpdateLabelsPayload
scalingConfig :: Maybe NodegroupScalingConfig
taints :: Maybe UpdateTaintsPayload
$sel:nodegroupName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
$sel:clusterName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
$sel:updateConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupUpdateConfig
$sel:clientRequestToken:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe Text
$sel:labels:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateLabelsPayload
$sel:scalingConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupScalingConfig
$sel:taints:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateTaintsPayload
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"taints" Text -> UpdateTaintsPayload -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateTaintsPayload -> Pair)
-> Maybe UpdateTaintsPayload -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateTaintsPayload
taints,
(Text
"scalingConfig" Text -> NodegroupScalingConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NodegroupScalingConfig -> Pair)
-> Maybe NodegroupScalingConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodegroupScalingConfig
scalingConfig,
(Text
"labels" Text -> UpdateLabelsPayload -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (UpdateLabelsPayload -> Pair)
-> Maybe UpdateLabelsPayload -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe UpdateLabelsPayload
labels,
(Text
"clientRequestToken" 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
clientRequestToken,
(Text
"updateConfig" Text -> NodegroupUpdateConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NodegroupUpdateConfig -> Pair)
-> Maybe NodegroupUpdateConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NodegroupUpdateConfig
updateConfig
]
)
instance Core.ToPath UpdateNodegroupConfig where
toPath :: UpdateNodegroupConfig -> ByteString
toPath UpdateNodegroupConfig' {Maybe Text
Maybe NodegroupScalingConfig
Maybe NodegroupUpdateConfig
Maybe UpdateLabelsPayload
Maybe UpdateTaintsPayload
Text
nodegroupName :: Text
clusterName :: Text
updateConfig :: Maybe NodegroupUpdateConfig
clientRequestToken :: Maybe Text
labels :: Maybe UpdateLabelsPayload
scalingConfig :: Maybe NodegroupScalingConfig
taints :: Maybe UpdateTaintsPayload
$sel:nodegroupName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
$sel:clusterName:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Text
$sel:updateConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupUpdateConfig
$sel:clientRequestToken:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe Text
$sel:labels:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateLabelsPayload
$sel:scalingConfig:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe NodegroupScalingConfig
$sel:taints:UpdateNodegroupConfig' :: UpdateNodegroupConfig -> Maybe UpdateTaintsPayload
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/clusters/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
clusterName,
ByteString
"/node-groups/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
nodegroupName,
ByteString
"/update-config"
]
instance Core.ToQuery UpdateNodegroupConfig where
toQuery :: UpdateNodegroupConfig -> QueryString
toQuery = QueryString -> UpdateNodegroupConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateNodegroupConfigResponse = UpdateNodegroupConfigResponse'
{ UpdateNodegroupConfigResponse -> Maybe Update
update :: Prelude.Maybe Update,
UpdateNodegroupConfigResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool
(UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool)
-> (UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool)
-> Eq UpdateNodegroupConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool
$c/= :: UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool
== :: UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool
$c== :: UpdateNodegroupConfigResponse
-> UpdateNodegroupConfigResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNodegroupConfigResponse]
ReadPrec UpdateNodegroupConfigResponse
Int -> ReadS UpdateNodegroupConfigResponse
ReadS [UpdateNodegroupConfigResponse]
(Int -> ReadS UpdateNodegroupConfigResponse)
-> ReadS [UpdateNodegroupConfigResponse]
-> ReadPrec UpdateNodegroupConfigResponse
-> ReadPrec [UpdateNodegroupConfigResponse]
-> Read UpdateNodegroupConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNodegroupConfigResponse]
$creadListPrec :: ReadPrec [UpdateNodegroupConfigResponse]
readPrec :: ReadPrec UpdateNodegroupConfigResponse
$creadPrec :: ReadPrec UpdateNodegroupConfigResponse
readList :: ReadS [UpdateNodegroupConfigResponse]
$creadList :: ReadS [UpdateNodegroupConfigResponse]
readsPrec :: Int -> ReadS UpdateNodegroupConfigResponse
$creadsPrec :: Int -> ReadS UpdateNodegroupConfigResponse
Prelude.Read, Int -> UpdateNodegroupConfigResponse -> ShowS
[UpdateNodegroupConfigResponse] -> ShowS
UpdateNodegroupConfigResponse -> String
(Int -> UpdateNodegroupConfigResponse -> ShowS)
-> (UpdateNodegroupConfigResponse -> String)
-> ([UpdateNodegroupConfigResponse] -> ShowS)
-> Show UpdateNodegroupConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNodegroupConfigResponse] -> ShowS
$cshowList :: [UpdateNodegroupConfigResponse] -> ShowS
show :: UpdateNodegroupConfigResponse -> String
$cshow :: UpdateNodegroupConfigResponse -> String
showsPrec :: Int -> UpdateNodegroupConfigResponse -> ShowS
$cshowsPrec :: Int -> UpdateNodegroupConfigResponse -> ShowS
Prelude.Show, (forall x.
UpdateNodegroupConfigResponse
-> Rep UpdateNodegroupConfigResponse x)
-> (forall x.
Rep UpdateNodegroupConfigResponse x
-> UpdateNodegroupConfigResponse)
-> Generic UpdateNodegroupConfigResponse
forall x.
Rep UpdateNodegroupConfigResponse x
-> UpdateNodegroupConfigResponse
forall x.
UpdateNodegroupConfigResponse
-> Rep UpdateNodegroupConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNodegroupConfigResponse x
-> UpdateNodegroupConfigResponse
$cfrom :: forall x.
UpdateNodegroupConfigResponse
-> Rep UpdateNodegroupConfigResponse x
Prelude.Generic)
newUpdateNodegroupConfigResponse ::
Prelude.Int ->
UpdateNodegroupConfigResponse
newUpdateNodegroupConfigResponse :: Int -> UpdateNodegroupConfigResponse
newUpdateNodegroupConfigResponse Int
pHttpStatus_ =
UpdateNodegroupConfigResponse' :: Maybe Update -> Int -> UpdateNodegroupConfigResponse
UpdateNodegroupConfigResponse'
{ $sel:update:UpdateNodegroupConfigResponse' :: Maybe Update
update =
Maybe Update
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:UpdateNodegroupConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
}
updateNodegroupConfigResponse_update :: Lens.Lens' UpdateNodegroupConfigResponse (Prelude.Maybe Update)
updateNodegroupConfigResponse_update :: (Maybe Update -> f (Maybe Update))
-> UpdateNodegroupConfigResponse -> f UpdateNodegroupConfigResponse
updateNodegroupConfigResponse_update = (UpdateNodegroupConfigResponse -> Maybe Update)
-> (UpdateNodegroupConfigResponse
-> Maybe Update -> UpdateNodegroupConfigResponse)
-> Lens
UpdateNodegroupConfigResponse
UpdateNodegroupConfigResponse
(Maybe Update)
(Maybe Update)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfigResponse' {Maybe Update
update :: Maybe Update
$sel:update:UpdateNodegroupConfigResponse' :: UpdateNodegroupConfigResponse -> Maybe Update
update} -> Maybe Update
update) (\s :: UpdateNodegroupConfigResponse
s@UpdateNodegroupConfigResponse' {} Maybe Update
a -> UpdateNodegroupConfigResponse
s {$sel:update:UpdateNodegroupConfigResponse' :: Maybe Update
update = Maybe Update
a} :: UpdateNodegroupConfigResponse)
updateNodegroupConfigResponse_httpStatus :: Lens.Lens' UpdateNodegroupConfigResponse Prelude.Int
updateNodegroupConfigResponse_httpStatus :: (Int -> f Int)
-> UpdateNodegroupConfigResponse -> f UpdateNodegroupConfigResponse
updateNodegroupConfigResponse_httpStatus = (UpdateNodegroupConfigResponse -> Int)
-> (UpdateNodegroupConfigResponse
-> Int -> UpdateNodegroupConfigResponse)
-> Lens
UpdateNodegroupConfigResponse UpdateNodegroupConfigResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNodegroupConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNodegroupConfigResponse' :: UpdateNodegroupConfigResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateNodegroupConfigResponse
s@UpdateNodegroupConfigResponse' {} Int
a -> UpdateNodegroupConfigResponse
s {$sel:httpStatus:UpdateNodegroupConfigResponse' :: Int
httpStatus = Int
a} :: UpdateNodegroupConfigResponse)
instance Prelude.NFData UpdateNodegroupConfigResponse