{-# 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.CreateFargateProfile
(
CreateFargateProfile (..),
newCreateFargateProfile,
createFargateProfile_subnets,
createFargateProfile_clientRequestToken,
createFargateProfile_selectors,
createFargateProfile_tags,
createFargateProfile_fargateProfileName,
createFargateProfile_clusterName,
createFargateProfile_podExecutionRoleArn,
CreateFargateProfileResponse (..),
newCreateFargateProfileResponse,
createFargateProfileResponse_fargateProfile,
createFargateProfileResponse_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 CreateFargateProfile = CreateFargateProfile'
{
CreateFargateProfile -> Maybe [Text]
subnets :: Prelude.Maybe [Prelude.Text],
CreateFargateProfile -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CreateFargateProfile -> Maybe [FargateProfileSelector]
selectors :: Prelude.Maybe [FargateProfileSelector],
CreateFargateProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateFargateProfile -> Text
fargateProfileName :: Prelude.Text,
CreateFargateProfile -> Text
clusterName :: Prelude.Text,
CreateFargateProfile -> Text
podExecutionRoleArn :: Prelude.Text
}
deriving (CreateFargateProfile -> CreateFargateProfile -> Bool
(CreateFargateProfile -> CreateFargateProfile -> Bool)
-> (CreateFargateProfile -> CreateFargateProfile -> Bool)
-> Eq CreateFargateProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFargateProfile -> CreateFargateProfile -> Bool
$c/= :: CreateFargateProfile -> CreateFargateProfile -> Bool
== :: CreateFargateProfile -> CreateFargateProfile -> Bool
$c== :: CreateFargateProfile -> CreateFargateProfile -> Bool
Prelude.Eq, ReadPrec [CreateFargateProfile]
ReadPrec CreateFargateProfile
Int -> ReadS CreateFargateProfile
ReadS [CreateFargateProfile]
(Int -> ReadS CreateFargateProfile)
-> ReadS [CreateFargateProfile]
-> ReadPrec CreateFargateProfile
-> ReadPrec [CreateFargateProfile]
-> Read CreateFargateProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFargateProfile]
$creadListPrec :: ReadPrec [CreateFargateProfile]
readPrec :: ReadPrec CreateFargateProfile
$creadPrec :: ReadPrec CreateFargateProfile
readList :: ReadS [CreateFargateProfile]
$creadList :: ReadS [CreateFargateProfile]
readsPrec :: Int -> ReadS CreateFargateProfile
$creadsPrec :: Int -> ReadS CreateFargateProfile
Prelude.Read, Int -> CreateFargateProfile -> ShowS
[CreateFargateProfile] -> ShowS
CreateFargateProfile -> String
(Int -> CreateFargateProfile -> ShowS)
-> (CreateFargateProfile -> String)
-> ([CreateFargateProfile] -> ShowS)
-> Show CreateFargateProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFargateProfile] -> ShowS
$cshowList :: [CreateFargateProfile] -> ShowS
show :: CreateFargateProfile -> String
$cshow :: CreateFargateProfile -> String
showsPrec :: Int -> CreateFargateProfile -> ShowS
$cshowsPrec :: Int -> CreateFargateProfile -> ShowS
Prelude.Show, (forall x. CreateFargateProfile -> Rep CreateFargateProfile x)
-> (forall x. Rep CreateFargateProfile x -> CreateFargateProfile)
-> Generic CreateFargateProfile
forall x. Rep CreateFargateProfile x -> CreateFargateProfile
forall x. CreateFargateProfile -> Rep CreateFargateProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFargateProfile x -> CreateFargateProfile
$cfrom :: forall x. CreateFargateProfile -> Rep CreateFargateProfile x
Prelude.Generic)
newCreateFargateProfile ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateFargateProfile
newCreateFargateProfile :: Text -> Text -> Text -> CreateFargateProfile
newCreateFargateProfile
Text
pFargateProfileName_
Text
pClusterName_
Text
pPodExecutionRoleArn_ =
CreateFargateProfile' :: Maybe [Text]
-> Maybe Text
-> Maybe [FargateProfileSelector]
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> CreateFargateProfile
CreateFargateProfile'
{ $sel:subnets:CreateFargateProfile' :: Maybe [Text]
subnets = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:CreateFargateProfile' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:selectors:CreateFargateProfile' :: Maybe [FargateProfileSelector]
selectors = Maybe [FargateProfileSelector]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFargateProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:fargateProfileName:CreateFargateProfile' :: Text
fargateProfileName = Text
pFargateProfileName_,
$sel:clusterName:CreateFargateProfile' :: Text
clusterName = Text
pClusterName_,
$sel:podExecutionRoleArn:CreateFargateProfile' :: Text
podExecutionRoleArn = Text
pPodExecutionRoleArn_
}
createFargateProfile_subnets :: Lens.Lens' CreateFargateProfile (Prelude.Maybe [Prelude.Text])
createFargateProfile_subnets :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_subnets = (CreateFargateProfile -> Maybe [Text])
-> (CreateFargateProfile -> Maybe [Text] -> CreateFargateProfile)
-> Lens
CreateFargateProfile
CreateFargateProfile
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Maybe [Text]
subnets :: Maybe [Text]
$sel:subnets:CreateFargateProfile' :: CreateFargateProfile -> Maybe [Text]
subnets} -> Maybe [Text]
subnets) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Maybe [Text]
a -> CreateFargateProfile
s {$sel:subnets:CreateFargateProfile' :: Maybe [Text]
subnets = Maybe [Text]
a} :: CreateFargateProfile) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateFargateProfile -> f CreateFargateProfile)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateFargateProfile
-> f CreateFargateProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFargateProfile_clientRequestToken :: Lens.Lens' CreateFargateProfile (Prelude.Maybe Prelude.Text)
createFargateProfile_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_clientRequestToken = (CreateFargateProfile -> Maybe Text)
-> (CreateFargateProfile -> Maybe Text -> CreateFargateProfile)
-> Lens
CreateFargateProfile CreateFargateProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CreateFargateProfile' :: CreateFargateProfile -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Maybe Text
a -> CreateFargateProfile
s {$sel:clientRequestToken:CreateFargateProfile' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CreateFargateProfile)
createFargateProfile_selectors :: Lens.Lens' CreateFargateProfile (Prelude.Maybe [FargateProfileSelector])
createFargateProfile_selectors :: (Maybe [FargateProfileSelector]
-> f (Maybe [FargateProfileSelector]))
-> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_selectors = (CreateFargateProfile -> Maybe [FargateProfileSelector])
-> (CreateFargateProfile
-> Maybe [FargateProfileSelector] -> CreateFargateProfile)
-> Lens
CreateFargateProfile
CreateFargateProfile
(Maybe [FargateProfileSelector])
(Maybe [FargateProfileSelector])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Maybe [FargateProfileSelector]
selectors :: Maybe [FargateProfileSelector]
$sel:selectors:CreateFargateProfile' :: CreateFargateProfile -> Maybe [FargateProfileSelector]
selectors} -> Maybe [FargateProfileSelector]
selectors) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Maybe [FargateProfileSelector]
a -> CreateFargateProfile
s {$sel:selectors:CreateFargateProfile' :: Maybe [FargateProfileSelector]
selectors = Maybe [FargateProfileSelector]
a} :: CreateFargateProfile) ((Maybe [FargateProfileSelector]
-> f (Maybe [FargateProfileSelector]))
-> CreateFargateProfile -> f CreateFargateProfile)
-> ((Maybe [FargateProfileSelector]
-> f (Maybe [FargateProfileSelector]))
-> Maybe [FargateProfileSelector]
-> f (Maybe [FargateProfileSelector]))
-> (Maybe [FargateProfileSelector]
-> f (Maybe [FargateProfileSelector]))
-> CreateFargateProfile
-> f CreateFargateProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[FargateProfileSelector]
[FargateProfileSelector]
[FargateProfileSelector]
[FargateProfileSelector]
-> Iso
(Maybe [FargateProfileSelector])
(Maybe [FargateProfileSelector])
(Maybe [FargateProfileSelector])
(Maybe [FargateProfileSelector])
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
[FargateProfileSelector]
[FargateProfileSelector]
[FargateProfileSelector]
[FargateProfileSelector]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFargateProfile_tags :: Lens.Lens' CreateFargateProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createFargateProfile_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_tags = (CreateFargateProfile -> Maybe (HashMap Text Text))
-> (CreateFargateProfile
-> Maybe (HashMap Text Text) -> CreateFargateProfile)
-> Lens
CreateFargateProfile
CreateFargateProfile
(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 (\CreateFargateProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateFargateProfile' :: CreateFargateProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Maybe (HashMap Text Text)
a -> CreateFargateProfile
s {$sel:tags:CreateFargateProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateFargateProfile) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFargateProfile -> f CreateFargateProfile)
-> ((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)))
-> CreateFargateProfile
-> f CreateFargateProfile
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
createFargateProfile_fargateProfileName :: Lens.Lens' CreateFargateProfile Prelude.Text
createFargateProfile_fargateProfileName :: (Text -> f Text) -> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_fargateProfileName = (CreateFargateProfile -> Text)
-> (CreateFargateProfile -> Text -> CreateFargateProfile)
-> Lens CreateFargateProfile CreateFargateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Text
fargateProfileName :: Text
$sel:fargateProfileName:CreateFargateProfile' :: CreateFargateProfile -> Text
fargateProfileName} -> Text
fargateProfileName) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Text
a -> CreateFargateProfile
s {$sel:fargateProfileName:CreateFargateProfile' :: Text
fargateProfileName = Text
a} :: CreateFargateProfile)
createFargateProfile_clusterName :: Lens.Lens' CreateFargateProfile Prelude.Text
createFargateProfile_clusterName :: (Text -> f Text) -> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_clusterName = (CreateFargateProfile -> Text)
-> (CreateFargateProfile -> Text -> CreateFargateProfile)
-> Lens CreateFargateProfile CreateFargateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Text
clusterName :: Text
$sel:clusterName:CreateFargateProfile' :: CreateFargateProfile -> Text
clusterName} -> Text
clusterName) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Text
a -> CreateFargateProfile
s {$sel:clusterName:CreateFargateProfile' :: Text
clusterName = Text
a} :: CreateFargateProfile)
createFargateProfile_podExecutionRoleArn :: Lens.Lens' CreateFargateProfile Prelude.Text
createFargateProfile_podExecutionRoleArn :: (Text -> f Text) -> CreateFargateProfile -> f CreateFargateProfile
createFargateProfile_podExecutionRoleArn = (CreateFargateProfile -> Text)
-> (CreateFargateProfile -> Text -> CreateFargateProfile)
-> Lens CreateFargateProfile CreateFargateProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfile' {Text
podExecutionRoleArn :: Text
$sel:podExecutionRoleArn:CreateFargateProfile' :: CreateFargateProfile -> Text
podExecutionRoleArn} -> Text
podExecutionRoleArn) (\s :: CreateFargateProfile
s@CreateFargateProfile' {} Text
a -> CreateFargateProfile
s {$sel:podExecutionRoleArn:CreateFargateProfile' :: Text
podExecutionRoleArn = Text
a} :: CreateFargateProfile)
instance Core.AWSRequest CreateFargateProfile where
type
AWSResponse CreateFargateProfile =
CreateFargateProfileResponse
request :: CreateFargateProfile -> Request CreateFargateProfile
request = Service -> CreateFargateProfile -> Request CreateFargateProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFargateProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFargateProfile)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFargateProfile))
-> Logger
-> Service
-> Proxy CreateFargateProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFargateProfile)))
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 FargateProfile -> Int -> CreateFargateProfileResponse
CreateFargateProfileResponse'
(Maybe FargateProfile -> Int -> CreateFargateProfileResponse)
-> Either String (Maybe FargateProfile)
-> Either String (Int -> CreateFargateProfileResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FargateProfile)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"fargateProfile")
Either String (Int -> CreateFargateProfileResponse)
-> Either String Int -> Either String CreateFargateProfileResponse
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 CreateFargateProfile
instance Prelude.NFData CreateFargateProfile
instance Core.ToHeaders CreateFargateProfile where
toHeaders :: CreateFargateProfile -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFargateProfile -> 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 CreateFargateProfile where
toJSON :: CreateFargateProfile -> Value
toJSON CreateFargateProfile' {Maybe [Text]
Maybe [FargateProfileSelector]
Maybe Text
Maybe (HashMap Text Text)
Text
podExecutionRoleArn :: Text
clusterName :: Text
fargateProfileName :: Text
tags :: Maybe (HashMap Text Text)
selectors :: Maybe [FargateProfileSelector]
clientRequestToken :: Maybe Text
subnets :: Maybe [Text]
$sel:podExecutionRoleArn:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:clusterName:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:fargateProfileName:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:tags:CreateFargateProfile' :: CreateFargateProfile -> Maybe (HashMap Text Text)
$sel:selectors:CreateFargateProfile' :: CreateFargateProfile -> Maybe [FargateProfileSelector]
$sel:clientRequestToken:CreateFargateProfile' :: CreateFargateProfile -> Maybe Text
$sel:subnets:CreateFargateProfile' :: CreateFargateProfile -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"subnets" 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]
subnets,
(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
"selectors" Text -> [FargateProfileSelector] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([FargateProfileSelector] -> Pair)
-> Maybe [FargateProfileSelector] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FargateProfileSelector]
selectors,
(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
"fargateProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fargateProfileName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"podExecutionRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
podExecutionRoleArn)
]
)
instance Core.ToPath CreateFargateProfile where
toPath :: CreateFargateProfile -> ByteString
toPath CreateFargateProfile' {Maybe [Text]
Maybe [FargateProfileSelector]
Maybe Text
Maybe (HashMap Text Text)
Text
podExecutionRoleArn :: Text
clusterName :: Text
fargateProfileName :: Text
tags :: Maybe (HashMap Text Text)
selectors :: Maybe [FargateProfileSelector]
clientRequestToken :: Maybe Text
subnets :: Maybe [Text]
$sel:podExecutionRoleArn:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:clusterName:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:fargateProfileName:CreateFargateProfile' :: CreateFargateProfile -> Text
$sel:tags:CreateFargateProfile' :: CreateFargateProfile -> Maybe (HashMap Text Text)
$sel:selectors:CreateFargateProfile' :: CreateFargateProfile -> Maybe [FargateProfileSelector]
$sel:clientRequestToken:CreateFargateProfile' :: CreateFargateProfile -> Maybe Text
$sel:subnets:CreateFargateProfile' :: CreateFargateProfile -> Maybe [Text]
..} =
[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
"/fargate-profiles"
]
instance Core.ToQuery CreateFargateProfile where
toQuery :: CreateFargateProfile -> QueryString
toQuery = QueryString -> CreateFargateProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFargateProfileResponse = CreateFargateProfileResponse'
{
CreateFargateProfileResponse -> Maybe FargateProfile
fargateProfile :: Prelude.Maybe FargateProfile,
CreateFargateProfileResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool
(CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool)
-> (CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool)
-> Eq CreateFargateProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool
$c/= :: CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool
== :: CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool
$c== :: CreateFargateProfileResponse
-> CreateFargateProfileResponse -> Bool
Prelude.Eq, ReadPrec [CreateFargateProfileResponse]
ReadPrec CreateFargateProfileResponse
Int -> ReadS CreateFargateProfileResponse
ReadS [CreateFargateProfileResponse]
(Int -> ReadS CreateFargateProfileResponse)
-> ReadS [CreateFargateProfileResponse]
-> ReadPrec CreateFargateProfileResponse
-> ReadPrec [CreateFargateProfileResponse]
-> Read CreateFargateProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFargateProfileResponse]
$creadListPrec :: ReadPrec [CreateFargateProfileResponse]
readPrec :: ReadPrec CreateFargateProfileResponse
$creadPrec :: ReadPrec CreateFargateProfileResponse
readList :: ReadS [CreateFargateProfileResponse]
$creadList :: ReadS [CreateFargateProfileResponse]
readsPrec :: Int -> ReadS CreateFargateProfileResponse
$creadsPrec :: Int -> ReadS CreateFargateProfileResponse
Prelude.Read, Int -> CreateFargateProfileResponse -> ShowS
[CreateFargateProfileResponse] -> ShowS
CreateFargateProfileResponse -> String
(Int -> CreateFargateProfileResponse -> ShowS)
-> (CreateFargateProfileResponse -> String)
-> ([CreateFargateProfileResponse] -> ShowS)
-> Show CreateFargateProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFargateProfileResponse] -> ShowS
$cshowList :: [CreateFargateProfileResponse] -> ShowS
show :: CreateFargateProfileResponse -> String
$cshow :: CreateFargateProfileResponse -> String
showsPrec :: Int -> CreateFargateProfileResponse -> ShowS
$cshowsPrec :: Int -> CreateFargateProfileResponse -> ShowS
Prelude.Show, (forall x.
CreateFargateProfileResponse -> Rep CreateFargateProfileResponse x)
-> (forall x.
Rep CreateFargateProfileResponse x -> CreateFargateProfileResponse)
-> Generic CreateFargateProfileResponse
forall x.
Rep CreateFargateProfileResponse x -> CreateFargateProfileResponse
forall x.
CreateFargateProfileResponse -> Rep CreateFargateProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFargateProfileResponse x -> CreateFargateProfileResponse
$cfrom :: forall x.
CreateFargateProfileResponse -> Rep CreateFargateProfileResponse x
Prelude.Generic)
newCreateFargateProfileResponse ::
Prelude.Int ->
CreateFargateProfileResponse
newCreateFargateProfileResponse :: Int -> CreateFargateProfileResponse
newCreateFargateProfileResponse Int
pHttpStatus_ =
CreateFargateProfileResponse' :: Maybe FargateProfile -> Int -> CreateFargateProfileResponse
CreateFargateProfileResponse'
{ $sel:fargateProfile:CreateFargateProfileResponse' :: Maybe FargateProfile
fargateProfile =
Maybe FargateProfile
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFargateProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFargateProfileResponse_fargateProfile :: Lens.Lens' CreateFargateProfileResponse (Prelude.Maybe FargateProfile)
createFargateProfileResponse_fargateProfile :: (Maybe FargateProfile -> f (Maybe FargateProfile))
-> CreateFargateProfileResponse -> f CreateFargateProfileResponse
createFargateProfileResponse_fargateProfile = (CreateFargateProfileResponse -> Maybe FargateProfile)
-> (CreateFargateProfileResponse
-> Maybe FargateProfile -> CreateFargateProfileResponse)
-> Lens
CreateFargateProfileResponse
CreateFargateProfileResponse
(Maybe FargateProfile)
(Maybe FargateProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfileResponse' {Maybe FargateProfile
fargateProfile :: Maybe FargateProfile
$sel:fargateProfile:CreateFargateProfileResponse' :: CreateFargateProfileResponse -> Maybe FargateProfile
fargateProfile} -> Maybe FargateProfile
fargateProfile) (\s :: CreateFargateProfileResponse
s@CreateFargateProfileResponse' {} Maybe FargateProfile
a -> CreateFargateProfileResponse
s {$sel:fargateProfile:CreateFargateProfileResponse' :: Maybe FargateProfile
fargateProfile = Maybe FargateProfile
a} :: CreateFargateProfileResponse)
createFargateProfileResponse_httpStatus :: Lens.Lens' CreateFargateProfileResponse Prelude.Int
createFargateProfileResponse_httpStatus :: (Int -> f Int)
-> CreateFargateProfileResponse -> f CreateFargateProfileResponse
createFargateProfileResponse_httpStatus = (CreateFargateProfileResponse -> Int)
-> (CreateFargateProfileResponse
-> Int -> CreateFargateProfileResponse)
-> Lens
CreateFargateProfileResponse CreateFargateProfileResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFargateProfileResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFargateProfileResponse' :: CreateFargateProfileResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFargateProfileResponse
s@CreateFargateProfileResponse' {} Int
a -> CreateFargateProfileResponse
s {$sel:httpStatus:CreateFargateProfileResponse' :: Int
httpStatus = Int
a} :: CreateFargateProfileResponse)
instance Prelude.NFData CreateFargateProfileResponse