{-# 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.CreateCluster
(
CreateCluster (..),
newCreateCluster,
createCluster_kubernetesNetworkConfig,
createCluster_version,
createCluster_encryptionConfig,
createCluster_clientRequestToken,
createCluster_logging,
createCluster_tags,
createCluster_name,
createCluster_roleArn,
createCluster_resourcesVpcConfig,
CreateClusterResponse (..),
newCreateClusterResponse,
createClusterResponse_cluster,
createClusterResponse_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 CreateCluster = CreateCluster'
{
CreateCluster -> Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig :: Prelude.Maybe KubernetesNetworkConfigRequest,
CreateCluster -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
CreateCluster -> Maybe [EncryptionConfig]
encryptionConfig :: Prelude.Maybe [EncryptionConfig],
CreateCluster -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateCluster -> Maybe Logging
logging :: Prelude.Maybe Logging,
CreateCluster -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateCluster -> Text
name :: Prelude.Text,
CreateCluster -> Text
roleArn :: Prelude.Text,
CreateCluster -> VpcConfigRequest
resourcesVpcConfig :: VpcConfigRequest
}
deriving (CreateCluster -> CreateCluster -> Bool
(CreateCluster -> CreateCluster -> Bool)
-> (CreateCluster -> CreateCluster -> Bool) -> Eq CreateCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCluster -> CreateCluster -> Bool
$c/= :: CreateCluster -> CreateCluster -> Bool
== :: CreateCluster -> CreateCluster -> Bool
$c== :: CreateCluster -> CreateCluster -> Bool
Prelude.Eq, ReadPrec [CreateCluster]
ReadPrec CreateCluster
Int -> ReadS CreateCluster
ReadS [CreateCluster]
(Int -> ReadS CreateCluster)
-> ReadS [CreateCluster]
-> ReadPrec CreateCluster
-> ReadPrec [CreateCluster]
-> Read CreateCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCluster]
$creadListPrec :: ReadPrec [CreateCluster]
readPrec :: ReadPrec CreateCluster
$creadPrec :: ReadPrec CreateCluster
readList :: ReadS [CreateCluster]
$creadList :: ReadS [CreateCluster]
readsPrec :: Int -> ReadS CreateCluster
$creadsPrec :: Int -> ReadS CreateCluster
Prelude.Read, Int -> CreateCluster -> ShowS
[CreateCluster] -> ShowS
CreateCluster -> String
(Int -> CreateCluster -> ShowS)
-> (CreateCluster -> String)
-> ([CreateCluster] -> ShowS)
-> Show CreateCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCluster] -> ShowS
$cshowList :: [CreateCluster] -> ShowS
show :: CreateCluster -> String
$cshow :: CreateCluster -> String
showsPrec :: Int -> CreateCluster -> ShowS
$cshowsPrec :: Int -> CreateCluster -> ShowS
Prelude.Show, (forall x. CreateCluster -> Rep CreateCluster x)
-> (forall x. Rep CreateCluster x -> CreateCluster)
-> Generic CreateCluster
forall x. Rep CreateCluster x -> CreateCluster
forall x. CreateCluster -> Rep CreateCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateCluster x -> CreateCluster
$cfrom :: forall x. CreateCluster -> Rep CreateCluster x
Prelude.Generic)
newCreateCluster ::
Prelude.Text ->
Prelude.Text ->
VpcConfigRequest ->
CreateCluster
newCreateCluster :: Text -> Text -> VpcConfigRequest -> CreateCluster
newCreateCluster
Text
pName_
Text
pRoleArn_
VpcConfigRequest
pResourcesVpcConfig_ =
CreateCluster' :: Maybe KubernetesNetworkConfigRequest
-> Maybe Text
-> Maybe [EncryptionConfig]
-> Maybe Text
-> Maybe Logging
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> VpcConfigRequest
-> CreateCluster
CreateCluster'
{ $sel:kubernetesNetworkConfig:CreateCluster' :: Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig =
Maybe KubernetesNetworkConfigRequest
forall a. Maybe a
Prelude.Nothing,
$sel:version:CreateCluster' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfig:CreateCluster' :: Maybe [EncryptionConfig]
encryptionConfig = Maybe [EncryptionConfig]
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateCluster' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logging:CreateCluster' :: Maybe Logging
logging = Maybe Logging
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateCluster' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateCluster' :: Text
name = Text
pName_,
$sel:roleArn:CreateCluster' :: Text
roleArn = Text
pRoleArn_,
$sel:resourcesVpcConfig:CreateCluster' :: VpcConfigRequest
resourcesVpcConfig = VpcConfigRequest
pResourcesVpcConfig_
}
createCluster_kubernetesNetworkConfig :: Lens.Lens' CreateCluster (Prelude.Maybe KubernetesNetworkConfigRequest)
createCluster_kubernetesNetworkConfig :: (Maybe KubernetesNetworkConfigRequest
-> f (Maybe KubernetesNetworkConfigRequest))
-> CreateCluster -> f CreateCluster
createCluster_kubernetesNetworkConfig = (CreateCluster -> Maybe KubernetesNetworkConfigRequest)
-> (CreateCluster
-> Maybe KubernetesNetworkConfigRequest -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe KubernetesNetworkConfigRequest)
(Maybe KubernetesNetworkConfigRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig :: Maybe KubernetesNetworkConfigRequest
$sel:kubernetesNetworkConfig:CreateCluster' :: CreateCluster -> Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig} -> Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig) (\s :: CreateCluster
s@CreateCluster' {} Maybe KubernetesNetworkConfigRequest
a -> CreateCluster
s {$sel:kubernetesNetworkConfig:CreateCluster' :: Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig = Maybe KubernetesNetworkConfigRequest
a} :: CreateCluster)
createCluster_version :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_version :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_version = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
version :: Maybe Text
$sel:version:CreateCluster' :: CreateCluster -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:version:CreateCluster' :: Maybe Text
version = Maybe Text
a} :: CreateCluster)
createCluster_encryptionConfig :: Lens.Lens' CreateCluster (Prelude.Maybe [EncryptionConfig])
createCluster_encryptionConfig :: (Maybe [EncryptionConfig] -> f (Maybe [EncryptionConfig]))
-> CreateCluster -> f CreateCluster
createCluster_encryptionConfig = (CreateCluster -> Maybe [EncryptionConfig])
-> (CreateCluster -> Maybe [EncryptionConfig] -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe [EncryptionConfig])
(Maybe [EncryptionConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe [EncryptionConfig]
encryptionConfig :: Maybe [EncryptionConfig]
$sel:encryptionConfig:CreateCluster' :: CreateCluster -> Maybe [EncryptionConfig]
encryptionConfig} -> Maybe [EncryptionConfig]
encryptionConfig) (\s :: CreateCluster
s@CreateCluster' {} Maybe [EncryptionConfig]
a -> CreateCluster
s {$sel:encryptionConfig:CreateCluster' :: Maybe [EncryptionConfig]
encryptionConfig = Maybe [EncryptionConfig]
a} :: CreateCluster) ((Maybe [EncryptionConfig] -> f (Maybe [EncryptionConfig]))
-> CreateCluster -> f CreateCluster)
-> ((Maybe [EncryptionConfig] -> f (Maybe [EncryptionConfig]))
-> Maybe [EncryptionConfig] -> f (Maybe [EncryptionConfig]))
-> (Maybe [EncryptionConfig] -> f (Maybe [EncryptionConfig]))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[EncryptionConfig]
[EncryptionConfig]
[EncryptionConfig]
[EncryptionConfig]
-> Iso
(Maybe [EncryptionConfig])
(Maybe [EncryptionConfig])
(Maybe [EncryptionConfig])
(Maybe [EncryptionConfig])
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
[EncryptionConfig]
[EncryptionConfig]
[EncryptionConfig]
[EncryptionConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createCluster_clientRequestToken :: Lens.Lens' CreateCluster (Prelude.Maybe Prelude.Text)
createCluster_clientRequestToken :: (Maybe Text -> f (Maybe Text)) -> CreateCluster -> f CreateCluster
createCluster_clientRequestToken = (CreateCluster -> Maybe Text)
-> (CreateCluster -> Maybe Text -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateCluster' :: CreateCluster -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateCluster
s@CreateCluster' {} Maybe Text
a -> CreateCluster
s {$sel:clientRequestToken:CreateCluster' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateCluster)
createCluster_logging :: Lens.Lens' CreateCluster (Prelude.Maybe Logging)
createCluster_logging :: (Maybe Logging -> f (Maybe Logging))
-> CreateCluster -> f CreateCluster
createCluster_logging = (CreateCluster -> Maybe Logging)
-> (CreateCluster -> Maybe Logging -> CreateCluster)
-> Lens CreateCluster CreateCluster (Maybe Logging) (Maybe Logging)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe Logging
logging :: Maybe Logging
$sel:logging:CreateCluster' :: CreateCluster -> Maybe Logging
logging} -> Maybe Logging
logging) (\s :: CreateCluster
s@CreateCluster' {} Maybe Logging
a -> CreateCluster
s {$sel:logging:CreateCluster' :: Maybe Logging
logging = Maybe Logging
a} :: CreateCluster)
createCluster_tags :: Lens.Lens' CreateCluster (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createCluster_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCluster -> f CreateCluster
createCluster_tags = (CreateCluster -> Maybe (HashMap Text Text))
-> (CreateCluster -> Maybe (HashMap Text Text) -> CreateCluster)
-> Lens
CreateCluster
CreateCluster
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateCluster' :: CreateCluster -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateCluster
s@CreateCluster' {} Maybe (HashMap Text Text)
a -> CreateCluster
s {$sel:tags:CreateCluster' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateCluster) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCluster -> f CreateCluster)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateCluster
-> f CreateCluster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createCluster_name :: Lens.Lens' CreateCluster Prelude.Text
createCluster_name :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_name = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
name :: Text
$sel:name:CreateCluster' :: CreateCluster -> Text
name} -> Text
name) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:name:CreateCluster' :: Text
name = Text
a} :: CreateCluster)
createCluster_roleArn :: Lens.Lens' CreateCluster Prelude.Text
createCluster_roleArn :: (Text -> f Text) -> CreateCluster -> f CreateCluster
createCluster_roleArn = (CreateCluster -> Text)
-> (CreateCluster -> Text -> CreateCluster)
-> Lens CreateCluster CreateCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {Text
roleArn :: Text
$sel:roleArn:CreateCluster' :: CreateCluster -> Text
roleArn} -> Text
roleArn) (\s :: CreateCluster
s@CreateCluster' {} Text
a -> CreateCluster
s {$sel:roleArn:CreateCluster' :: Text
roleArn = Text
a} :: CreateCluster)
createCluster_resourcesVpcConfig :: Lens.Lens' CreateCluster VpcConfigRequest
createCluster_resourcesVpcConfig :: (VpcConfigRequest -> f VpcConfigRequest)
-> CreateCluster -> f CreateCluster
createCluster_resourcesVpcConfig = (CreateCluster -> VpcConfigRequest)
-> (CreateCluster -> VpcConfigRequest -> CreateCluster)
-> Lens
CreateCluster CreateCluster VpcConfigRequest VpcConfigRequest
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCluster' {VpcConfigRequest
resourcesVpcConfig :: VpcConfigRequest
$sel:resourcesVpcConfig:CreateCluster' :: CreateCluster -> VpcConfigRequest
resourcesVpcConfig} -> VpcConfigRequest
resourcesVpcConfig) (\s :: CreateCluster
s@CreateCluster' {} VpcConfigRequest
a -> CreateCluster
s {$sel:resourcesVpcConfig:CreateCluster' :: VpcConfigRequest
resourcesVpcConfig = VpcConfigRequest
a} :: CreateCluster)
instance Core.AWSRequest CreateCluster where
type
AWSResponse CreateCluster =
CreateClusterResponse
request :: CreateCluster -> Request CreateCluster
request = Service -> CreateCluster -> Request CreateCluster
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateCluster))
-> Logger
-> Service
-> Proxy CreateCluster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateCluster)))
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 Cluster -> Int -> CreateClusterResponse
CreateClusterResponse'
(Maybe Cluster -> Int -> CreateClusterResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> CreateClusterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Cluster)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"cluster")
Either String (Int -> CreateClusterResponse)
-> Either String Int -> Either String CreateClusterResponse
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 CreateCluster
instance Prelude.NFData CreateCluster
instance Core.ToHeaders CreateCluster where
toHeaders :: CreateCluster -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateCluster -> 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 CreateCluster where
toJSON :: CreateCluster -> Value
toJSON CreateCluster' {Maybe [EncryptionConfig]
Maybe Text
Maybe (HashMap Text Text)
Maybe KubernetesNetworkConfigRequest
Maybe Logging
Text
VpcConfigRequest
resourcesVpcConfig :: VpcConfigRequest
roleArn :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
logging :: Maybe Logging
clientRequestToken :: Maybe Text
encryptionConfig :: Maybe [EncryptionConfig]
version :: Maybe Text
kubernetesNetworkConfig :: Maybe KubernetesNetworkConfigRequest
$sel:resourcesVpcConfig:CreateCluster' :: CreateCluster -> VpcConfigRequest
$sel:roleArn:CreateCluster' :: CreateCluster -> Text
$sel:name:CreateCluster' :: CreateCluster -> Text
$sel:tags:CreateCluster' :: CreateCluster -> Maybe (HashMap Text Text)
$sel:logging:CreateCluster' :: CreateCluster -> Maybe Logging
$sel:clientRequestToken:CreateCluster' :: CreateCluster -> Maybe Text
$sel:encryptionConfig:CreateCluster' :: CreateCluster -> Maybe [EncryptionConfig]
$sel:version:CreateCluster' :: CreateCluster -> Maybe Text
$sel:kubernetesNetworkConfig:CreateCluster' :: CreateCluster -> Maybe KubernetesNetworkConfigRequest
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"kubernetesNetworkConfig" Text -> KubernetesNetworkConfigRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(KubernetesNetworkConfigRequest -> Pair)
-> Maybe KubernetesNetworkConfigRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe KubernetesNetworkConfigRequest
kubernetesNetworkConfig,
(Text
"version" 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
version,
(Text
"encryptionConfig" Text -> [EncryptionConfig] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([EncryptionConfig] -> Pair)
-> Maybe [EncryptionConfig] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EncryptionConfig]
encryptionConfig,
(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
"logging" Text -> Logging -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Logging -> Pair) -> Maybe Logging -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Logging
logging,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"resourcesVpcConfig" Text -> VpcConfigRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VpcConfigRequest
resourcesVpcConfig)
]
)
instance Core.ToPath CreateCluster where
toPath :: CreateCluster -> ByteString
toPath = ByteString -> CreateCluster -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/clusters"
instance Core.ToQuery CreateCluster where
toQuery :: CreateCluster -> QueryString
toQuery = QueryString -> CreateCluster -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateClusterResponse = CreateClusterResponse'
{
CreateClusterResponse -> Maybe Cluster
cluster :: Prelude.Maybe Cluster,
CreateClusterResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateClusterResponse -> CreateClusterResponse -> Bool
(CreateClusterResponse -> CreateClusterResponse -> Bool)
-> (CreateClusterResponse -> CreateClusterResponse -> Bool)
-> Eq CreateClusterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateClusterResponse -> CreateClusterResponse -> Bool
$c/= :: CreateClusterResponse -> CreateClusterResponse -> Bool
== :: CreateClusterResponse -> CreateClusterResponse -> Bool
$c== :: CreateClusterResponse -> CreateClusterResponse -> Bool
Prelude.Eq, ReadPrec [CreateClusterResponse]
ReadPrec CreateClusterResponse
Int -> ReadS CreateClusterResponse
ReadS [CreateClusterResponse]
(Int -> ReadS CreateClusterResponse)
-> ReadS [CreateClusterResponse]
-> ReadPrec CreateClusterResponse
-> ReadPrec [CreateClusterResponse]
-> Read CreateClusterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateClusterResponse]
$creadListPrec :: ReadPrec [CreateClusterResponse]
readPrec :: ReadPrec CreateClusterResponse
$creadPrec :: ReadPrec CreateClusterResponse
readList :: ReadS [CreateClusterResponse]
$creadList :: ReadS [CreateClusterResponse]
readsPrec :: Int -> ReadS CreateClusterResponse
$creadsPrec :: Int -> ReadS CreateClusterResponse
Prelude.Read, Int -> CreateClusterResponse -> ShowS
[CreateClusterResponse] -> ShowS
CreateClusterResponse -> String
(Int -> CreateClusterResponse -> ShowS)
-> (CreateClusterResponse -> String)
-> ([CreateClusterResponse] -> ShowS)
-> Show CreateClusterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateClusterResponse] -> ShowS
$cshowList :: [CreateClusterResponse] -> ShowS
show :: CreateClusterResponse -> String
$cshow :: CreateClusterResponse -> String
showsPrec :: Int -> CreateClusterResponse -> ShowS
$cshowsPrec :: Int -> CreateClusterResponse -> ShowS
Prelude.Show, (forall x. CreateClusterResponse -> Rep CreateClusterResponse x)
-> (forall x. Rep CreateClusterResponse x -> CreateClusterResponse)
-> Generic CreateClusterResponse
forall x. Rep CreateClusterResponse x -> CreateClusterResponse
forall x. CreateClusterResponse -> Rep CreateClusterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateClusterResponse x -> CreateClusterResponse
$cfrom :: forall x. CreateClusterResponse -> Rep CreateClusterResponse x
Prelude.Generic)
newCreateClusterResponse ::
Prelude.Int ->
CreateClusterResponse
newCreateClusterResponse :: Int -> CreateClusterResponse
newCreateClusterResponse Int
pHttpStatus_ =
CreateClusterResponse' :: Maybe Cluster -> Int -> CreateClusterResponse
CreateClusterResponse'
{ $sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateClusterResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createClusterResponse_cluster :: Lens.Lens' CreateClusterResponse (Prelude.Maybe Cluster)
createClusterResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> CreateClusterResponse -> f CreateClusterResponse
createClusterResponse_cluster = (CreateClusterResponse -> Maybe Cluster)
-> (CreateClusterResponse
-> Maybe Cluster -> CreateClusterResponse)
-> Lens
CreateClusterResponse
CreateClusterResponse
(Maybe Cluster)
(Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:CreateClusterResponse' :: CreateClusterResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: CreateClusterResponse
s@CreateClusterResponse' {} Maybe Cluster
a -> CreateClusterResponse
s {$sel:cluster:CreateClusterResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: CreateClusterResponse)
createClusterResponse_httpStatus :: Lens.Lens' CreateClusterResponse Prelude.Int
createClusterResponse_httpStatus :: (Int -> f Int) -> CreateClusterResponse -> f CreateClusterResponse
createClusterResponse_httpStatus = (CreateClusterResponse -> Int)
-> (CreateClusterResponse -> Int -> CreateClusterResponse)
-> Lens CreateClusterResponse CreateClusterResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateClusterResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateClusterResponse' :: CreateClusterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateClusterResponse
s@CreateClusterResponse' {} Int
a -> CreateClusterResponse
s {$sel:httpStatus:CreateClusterResponse' :: Int
httpStatus = Int
a} :: CreateClusterResponse)
instance Prelude.NFData CreateClusterResponse