{-# 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.ECS.CreateTaskSet
(
CreateTaskSet (..),
newCreateTaskSet,
createTaskSet_clientToken,
createTaskSet_platformVersion,
createTaskSet_scale,
createTaskSet_loadBalancers,
createTaskSet_launchType,
createTaskSet_externalId,
createTaskSet_networkConfiguration,
createTaskSet_serviceRegistries,
createTaskSet_capacityProviderStrategy,
createTaskSet_tags,
createTaskSet_service,
createTaskSet_cluster,
createTaskSet_taskDefinition,
CreateTaskSetResponse (..),
newCreateTaskSetResponse,
createTaskSetResponse_taskSet,
createTaskSetResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.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 CreateTaskSet = CreateTaskSet'
{
CreateTaskSet -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateTaskSet -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
CreateTaskSet -> Maybe Scale
scale :: Prelude.Maybe Scale,
CreateTaskSet -> Maybe [LoadBalancer]
loadBalancers :: Prelude.Maybe [LoadBalancer],
CreateTaskSet -> Maybe LaunchType
launchType :: Prelude.Maybe LaunchType,
CreateTaskSet -> Maybe Text
externalId :: Prelude.Maybe Prelude.Text,
CreateTaskSet -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
CreateTaskSet -> Maybe [ServiceRegistry]
serviceRegistries :: Prelude.Maybe [ServiceRegistry],
CreateTaskSet -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
CreateTaskSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateTaskSet -> Text
service :: Prelude.Text,
CreateTaskSet -> Text
cluster :: Prelude.Text,
CreateTaskSet -> Text
taskDefinition :: Prelude.Text
}
deriving (CreateTaskSet -> CreateTaskSet -> Bool
(CreateTaskSet -> CreateTaskSet -> Bool)
-> (CreateTaskSet -> CreateTaskSet -> Bool) -> Eq CreateTaskSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTaskSet -> CreateTaskSet -> Bool
$c/= :: CreateTaskSet -> CreateTaskSet -> Bool
== :: CreateTaskSet -> CreateTaskSet -> Bool
$c== :: CreateTaskSet -> CreateTaskSet -> Bool
Prelude.Eq, ReadPrec [CreateTaskSet]
ReadPrec CreateTaskSet
Int -> ReadS CreateTaskSet
ReadS [CreateTaskSet]
(Int -> ReadS CreateTaskSet)
-> ReadS [CreateTaskSet]
-> ReadPrec CreateTaskSet
-> ReadPrec [CreateTaskSet]
-> Read CreateTaskSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTaskSet]
$creadListPrec :: ReadPrec [CreateTaskSet]
readPrec :: ReadPrec CreateTaskSet
$creadPrec :: ReadPrec CreateTaskSet
readList :: ReadS [CreateTaskSet]
$creadList :: ReadS [CreateTaskSet]
readsPrec :: Int -> ReadS CreateTaskSet
$creadsPrec :: Int -> ReadS CreateTaskSet
Prelude.Read, Int -> CreateTaskSet -> ShowS
[CreateTaskSet] -> ShowS
CreateTaskSet -> String
(Int -> CreateTaskSet -> ShowS)
-> (CreateTaskSet -> String)
-> ([CreateTaskSet] -> ShowS)
-> Show CreateTaskSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTaskSet] -> ShowS
$cshowList :: [CreateTaskSet] -> ShowS
show :: CreateTaskSet -> String
$cshow :: CreateTaskSet -> String
showsPrec :: Int -> CreateTaskSet -> ShowS
$cshowsPrec :: Int -> CreateTaskSet -> ShowS
Prelude.Show, (forall x. CreateTaskSet -> Rep CreateTaskSet x)
-> (forall x. Rep CreateTaskSet x -> CreateTaskSet)
-> Generic CreateTaskSet
forall x. Rep CreateTaskSet x -> CreateTaskSet
forall x. CreateTaskSet -> Rep CreateTaskSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTaskSet x -> CreateTaskSet
$cfrom :: forall x. CreateTaskSet -> Rep CreateTaskSet x
Prelude.Generic)
newCreateTaskSet ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateTaskSet
newCreateTaskSet :: Text -> Text -> Text -> CreateTaskSet
newCreateTaskSet Text
pService_ Text
pCluster_ Text
pTaskDefinition_ =
CreateTaskSet' :: Maybe Text
-> Maybe Text
-> Maybe Scale
-> Maybe [LoadBalancer]
-> Maybe LaunchType
-> Maybe Text
-> Maybe NetworkConfiguration
-> Maybe [ServiceRegistry]
-> Maybe [CapacityProviderStrategyItem]
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> CreateTaskSet
CreateTaskSet'
{ $sel:clientToken:CreateTaskSet' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:platformVersion:CreateTaskSet' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:scale:CreateTaskSet' :: Maybe Scale
scale = Maybe Scale
forall a. Maybe a
Prelude.Nothing,
$sel:loadBalancers:CreateTaskSet' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
forall a. Maybe a
Prelude.Nothing,
$sel:launchType:CreateTaskSet' :: Maybe LaunchType
launchType = Maybe LaunchType
forall a. Maybe a
Prelude.Nothing,
$sel:externalId:CreateTaskSet' :: Maybe Text
externalId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkConfiguration:CreateTaskSet' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:serviceRegistries:CreateTaskSet' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
forall a. Maybe a
Prelude.Nothing,
$sel:capacityProviderStrategy:CreateTaskSet' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTaskSet' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:service:CreateTaskSet' :: Text
service = Text
pService_,
$sel:cluster:CreateTaskSet' :: Text
cluster = Text
pCluster_,
$sel:taskDefinition:CreateTaskSet' :: Text
taskDefinition = Text
pTaskDefinition_
}
createTaskSet_clientToken :: Lens.Lens' CreateTaskSet (Prelude.Maybe Prelude.Text)
createTaskSet_clientToken :: (Maybe Text -> f (Maybe Text)) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_clientToken = (CreateTaskSet -> Maybe Text)
-> (CreateTaskSet -> Maybe Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateTaskSet' :: CreateTaskSet -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe Text
a -> CreateTaskSet
s {$sel:clientToken:CreateTaskSet' :: Maybe Text
clientToken = Maybe Text
a} :: CreateTaskSet)
createTaskSet_platformVersion :: Lens.Lens' CreateTaskSet (Prelude.Maybe Prelude.Text)
createTaskSet_platformVersion :: (Maybe Text -> f (Maybe Text)) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_platformVersion = (CreateTaskSet -> Maybe Text)
-> (CreateTaskSet -> Maybe Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:CreateTaskSet' :: CreateTaskSet -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe Text
a -> CreateTaskSet
s {$sel:platformVersion:CreateTaskSet' :: Maybe Text
platformVersion = Maybe Text
a} :: CreateTaskSet)
createTaskSet_scale :: Lens.Lens' CreateTaskSet (Prelude.Maybe Scale)
createTaskSet_scale :: (Maybe Scale -> f (Maybe Scale))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_scale = (CreateTaskSet -> Maybe Scale)
-> (CreateTaskSet -> Maybe Scale -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet (Maybe Scale) (Maybe Scale)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe Scale
scale :: Maybe Scale
$sel:scale:CreateTaskSet' :: CreateTaskSet -> Maybe Scale
scale} -> Maybe Scale
scale) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe Scale
a -> CreateTaskSet
s {$sel:scale:CreateTaskSet' :: Maybe Scale
scale = Maybe Scale
a} :: CreateTaskSet)
createTaskSet_loadBalancers :: Lens.Lens' CreateTaskSet (Prelude.Maybe [LoadBalancer])
createTaskSet_loadBalancers :: (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_loadBalancers = (CreateTaskSet -> Maybe [LoadBalancer])
-> (CreateTaskSet -> Maybe [LoadBalancer] -> CreateTaskSet)
-> Lens
CreateTaskSet
CreateTaskSet
(Maybe [LoadBalancer])
(Maybe [LoadBalancer])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe [LoadBalancer]
loadBalancers :: Maybe [LoadBalancer]
$sel:loadBalancers:CreateTaskSet' :: CreateTaskSet -> Maybe [LoadBalancer]
loadBalancers} -> Maybe [LoadBalancer]
loadBalancers) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe [LoadBalancer]
a -> CreateTaskSet
s {$sel:loadBalancers:CreateTaskSet' :: Maybe [LoadBalancer]
loadBalancers = Maybe [LoadBalancer]
a} :: CreateTaskSet) ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> CreateTaskSet -> f CreateTaskSet)
-> ((Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> (Maybe [LoadBalancer] -> f (Maybe [LoadBalancer]))
-> CreateTaskSet
-> f CreateTaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
-> Iso
(Maybe [LoadBalancer])
(Maybe [LoadBalancer])
(Maybe [LoadBalancer])
(Maybe [LoadBalancer])
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 [LoadBalancer] [LoadBalancer] [LoadBalancer] [LoadBalancer]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTaskSet_launchType :: Lens.Lens' CreateTaskSet (Prelude.Maybe LaunchType)
createTaskSet_launchType :: (Maybe LaunchType -> f (Maybe LaunchType))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_launchType = (CreateTaskSet -> Maybe LaunchType)
-> (CreateTaskSet -> Maybe LaunchType -> CreateTaskSet)
-> Lens
CreateTaskSet CreateTaskSet (Maybe LaunchType) (Maybe LaunchType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe LaunchType
launchType :: Maybe LaunchType
$sel:launchType:CreateTaskSet' :: CreateTaskSet -> Maybe LaunchType
launchType} -> Maybe LaunchType
launchType) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe LaunchType
a -> CreateTaskSet
s {$sel:launchType:CreateTaskSet' :: Maybe LaunchType
launchType = Maybe LaunchType
a} :: CreateTaskSet)
createTaskSet_externalId :: Lens.Lens' CreateTaskSet (Prelude.Maybe Prelude.Text)
createTaskSet_externalId :: (Maybe Text -> f (Maybe Text)) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_externalId = (CreateTaskSet -> Maybe Text)
-> (CreateTaskSet -> Maybe Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe Text
externalId :: Maybe Text
$sel:externalId:CreateTaskSet' :: CreateTaskSet -> Maybe Text
externalId} -> Maybe Text
externalId) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe Text
a -> CreateTaskSet
s {$sel:externalId:CreateTaskSet' :: Maybe Text
externalId = Maybe Text
a} :: CreateTaskSet)
createTaskSet_networkConfiguration :: Lens.Lens' CreateTaskSet (Prelude.Maybe NetworkConfiguration)
createTaskSet_networkConfiguration :: (Maybe NetworkConfiguration -> f (Maybe NetworkConfiguration))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_networkConfiguration = (CreateTaskSet -> Maybe NetworkConfiguration)
-> (CreateTaskSet -> Maybe NetworkConfiguration -> CreateTaskSet)
-> Lens
CreateTaskSet
CreateTaskSet
(Maybe NetworkConfiguration)
(Maybe NetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:CreateTaskSet' :: CreateTaskSet -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe NetworkConfiguration
a -> CreateTaskSet
s {$sel:networkConfiguration:CreateTaskSet' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: CreateTaskSet)
createTaskSet_serviceRegistries :: Lens.Lens' CreateTaskSet (Prelude.Maybe [ServiceRegistry])
createTaskSet_serviceRegistries :: (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_serviceRegistries = (CreateTaskSet -> Maybe [ServiceRegistry])
-> (CreateTaskSet -> Maybe [ServiceRegistry] -> CreateTaskSet)
-> Lens
CreateTaskSet
CreateTaskSet
(Maybe [ServiceRegistry])
(Maybe [ServiceRegistry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe [ServiceRegistry]
serviceRegistries :: Maybe [ServiceRegistry]
$sel:serviceRegistries:CreateTaskSet' :: CreateTaskSet -> Maybe [ServiceRegistry]
serviceRegistries} -> Maybe [ServiceRegistry]
serviceRegistries) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe [ServiceRegistry]
a -> CreateTaskSet
s {$sel:serviceRegistries:CreateTaskSet' :: Maybe [ServiceRegistry]
serviceRegistries = Maybe [ServiceRegistry]
a} :: CreateTaskSet) ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> CreateTaskSet -> f CreateTaskSet)
-> ((Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> (Maybe [ServiceRegistry] -> f (Maybe [ServiceRegistry]))
-> CreateTaskSet
-> f CreateTaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ServiceRegistry]
[ServiceRegistry]
[ServiceRegistry]
[ServiceRegistry]
-> Iso
(Maybe [ServiceRegistry])
(Maybe [ServiceRegistry])
(Maybe [ServiceRegistry])
(Maybe [ServiceRegistry])
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
[ServiceRegistry]
[ServiceRegistry]
[ServiceRegistry]
[ServiceRegistry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTaskSet_capacityProviderStrategy :: Lens.Lens' CreateTaskSet (Prelude.Maybe [CapacityProviderStrategyItem])
createTaskSet_capacityProviderStrategy :: (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_capacityProviderStrategy = (CreateTaskSet -> Maybe [CapacityProviderStrategyItem])
-> (CreateTaskSet
-> Maybe [CapacityProviderStrategyItem] -> CreateTaskSet)
-> Lens
CreateTaskSet
CreateTaskSet
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:capacityProviderStrategy:CreateTaskSet' :: CreateTaskSet -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe [CapacityProviderStrategyItem]
a -> CreateTaskSet
s {$sel:capacityProviderStrategy:CreateTaskSet' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: CreateTaskSet) ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateTaskSet -> f CreateTaskSet)
-> ((Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> (Maybe [CapacityProviderStrategyItem]
-> f (Maybe [CapacityProviderStrategyItem]))
-> CreateTaskSet
-> f CreateTaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
-> Iso
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
(Maybe [CapacityProviderStrategyItem])
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
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
[CapacityProviderStrategyItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTaskSet_tags :: Lens.Lens' CreateTaskSet (Prelude.Maybe [Tag])
createTaskSet_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTaskSet -> f CreateTaskSet
createTaskSet_tags = (CreateTaskSet -> Maybe [Tag])
-> (CreateTaskSet -> Maybe [Tag] -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateTaskSet' :: CreateTaskSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateTaskSet
s@CreateTaskSet' {} Maybe [Tag]
a -> CreateTaskSet
s {$sel:tags:CreateTaskSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateTaskSet) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTaskSet -> f CreateTaskSet)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTaskSet
-> f CreateTaskSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTaskSet_service :: Lens.Lens' CreateTaskSet Prelude.Text
createTaskSet_service :: (Text -> f Text) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_service = (CreateTaskSet -> Text)
-> (CreateTaskSet -> Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Text
service :: Text
$sel:service:CreateTaskSet' :: CreateTaskSet -> Text
service} -> Text
service) (\s :: CreateTaskSet
s@CreateTaskSet' {} Text
a -> CreateTaskSet
s {$sel:service:CreateTaskSet' :: Text
service = Text
a} :: CreateTaskSet)
createTaskSet_cluster :: Lens.Lens' CreateTaskSet Prelude.Text
createTaskSet_cluster :: (Text -> f Text) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_cluster = (CreateTaskSet -> Text)
-> (CreateTaskSet -> Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Text
cluster :: Text
$sel:cluster:CreateTaskSet' :: CreateTaskSet -> Text
cluster} -> Text
cluster) (\s :: CreateTaskSet
s@CreateTaskSet' {} Text
a -> CreateTaskSet
s {$sel:cluster:CreateTaskSet' :: Text
cluster = Text
a} :: CreateTaskSet)
createTaskSet_taskDefinition :: Lens.Lens' CreateTaskSet Prelude.Text
createTaskSet_taskDefinition :: (Text -> f Text) -> CreateTaskSet -> f CreateTaskSet
createTaskSet_taskDefinition = (CreateTaskSet -> Text)
-> (CreateTaskSet -> Text -> CreateTaskSet)
-> Lens CreateTaskSet CreateTaskSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSet' {Text
taskDefinition :: Text
$sel:taskDefinition:CreateTaskSet' :: CreateTaskSet -> Text
taskDefinition} -> Text
taskDefinition) (\s :: CreateTaskSet
s@CreateTaskSet' {} Text
a -> CreateTaskSet
s {$sel:taskDefinition:CreateTaskSet' :: Text
taskDefinition = Text
a} :: CreateTaskSet)
instance Core.AWSRequest CreateTaskSet where
type
AWSResponse CreateTaskSet =
CreateTaskSetResponse
request :: CreateTaskSet -> Request CreateTaskSet
request = Service -> CreateTaskSet -> Request CreateTaskSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTaskSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTaskSet)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTaskSet))
-> Logger
-> Service
-> Proxy CreateTaskSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTaskSet)))
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 TaskSet -> Int -> CreateTaskSetResponse
CreateTaskSetResponse'
(Maybe TaskSet -> Int -> CreateTaskSetResponse)
-> Either String (Maybe TaskSet)
-> Either String (Int -> CreateTaskSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TaskSet)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"taskSet")
Either String (Int -> CreateTaskSetResponse)
-> Either String Int -> Either String CreateTaskSetResponse
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 CreateTaskSet
instance Prelude.NFData CreateTaskSet
instance Core.ToHeaders CreateTaskSet where
toHeaders :: CreateTaskSet -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTaskSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerServiceV20141113.CreateTaskSet" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateTaskSet where
toJSON :: CreateTaskSet -> Value
toJSON CreateTaskSet' {Maybe [CapacityProviderStrategyItem]
Maybe [LoadBalancer]
Maybe [ServiceRegistry]
Maybe [Tag]
Maybe Text
Maybe LaunchType
Maybe NetworkConfiguration
Maybe Scale
Text
taskDefinition :: Text
cluster :: Text
service :: Text
tags :: Maybe [Tag]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
serviceRegistries :: Maybe [ServiceRegistry]
networkConfiguration :: Maybe NetworkConfiguration
externalId :: Maybe Text
launchType :: Maybe LaunchType
loadBalancers :: Maybe [LoadBalancer]
scale :: Maybe Scale
platformVersion :: Maybe Text
clientToken :: Maybe Text
$sel:taskDefinition:CreateTaskSet' :: CreateTaskSet -> Text
$sel:cluster:CreateTaskSet' :: CreateTaskSet -> Text
$sel:service:CreateTaskSet' :: CreateTaskSet -> Text
$sel:tags:CreateTaskSet' :: CreateTaskSet -> Maybe [Tag]
$sel:capacityProviderStrategy:CreateTaskSet' :: CreateTaskSet -> Maybe [CapacityProviderStrategyItem]
$sel:serviceRegistries:CreateTaskSet' :: CreateTaskSet -> Maybe [ServiceRegistry]
$sel:networkConfiguration:CreateTaskSet' :: CreateTaskSet -> Maybe NetworkConfiguration
$sel:externalId:CreateTaskSet' :: CreateTaskSet -> Maybe Text
$sel:launchType:CreateTaskSet' :: CreateTaskSet -> Maybe LaunchType
$sel:loadBalancers:CreateTaskSet' :: CreateTaskSet -> Maybe [LoadBalancer]
$sel:scale:CreateTaskSet' :: CreateTaskSet -> Maybe Scale
$sel:platformVersion:CreateTaskSet' :: CreateTaskSet -> Maybe Text
$sel:clientToken:CreateTaskSet' :: CreateTaskSet -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"clientToken" 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
clientToken,
(Text
"platformVersion" 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
platformVersion,
(Text
"scale" Text -> Scale -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Scale -> Pair) -> Maybe Scale -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Scale
scale,
(Text
"loadBalancers" Text -> [LoadBalancer] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([LoadBalancer] -> Pair) -> Maybe [LoadBalancer] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [LoadBalancer]
loadBalancers,
(Text
"launchType" Text -> LaunchType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LaunchType -> Pair) -> Maybe LaunchType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchType
launchType,
(Text
"externalId" 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
externalId,
(Text
"networkConfiguration" Text -> NetworkConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NetworkConfiguration -> Pair)
-> Maybe NetworkConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkConfiguration
networkConfiguration,
(Text
"serviceRegistries" Text -> [ServiceRegistry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ServiceRegistry] -> Pair)
-> Maybe [ServiceRegistry] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ServiceRegistry]
serviceRegistries,
(Text
"capacityProviderStrategy" Text -> [CapacityProviderStrategyItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([CapacityProviderStrategyItem] -> Pair)
-> Maybe [CapacityProviderStrategyItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"service" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
service),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"cluster" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
cluster),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"taskDefinition" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
taskDefinition)
]
)
instance Core.ToPath CreateTaskSet where
toPath :: CreateTaskSet -> ByteString
toPath = ByteString -> CreateTaskSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateTaskSet where
toQuery :: CreateTaskSet -> QueryString
toQuery = QueryString -> CreateTaskSet -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTaskSetResponse = CreateTaskSetResponse'
{
CreateTaskSetResponse -> Maybe TaskSet
taskSet :: Prelude.Maybe TaskSet,
CreateTaskSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTaskSetResponse -> CreateTaskSetResponse -> Bool
(CreateTaskSetResponse -> CreateTaskSetResponse -> Bool)
-> (CreateTaskSetResponse -> CreateTaskSetResponse -> Bool)
-> Eq CreateTaskSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTaskSetResponse -> CreateTaskSetResponse -> Bool
$c/= :: CreateTaskSetResponse -> CreateTaskSetResponse -> Bool
== :: CreateTaskSetResponse -> CreateTaskSetResponse -> Bool
$c== :: CreateTaskSetResponse -> CreateTaskSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateTaskSetResponse]
ReadPrec CreateTaskSetResponse
Int -> ReadS CreateTaskSetResponse
ReadS [CreateTaskSetResponse]
(Int -> ReadS CreateTaskSetResponse)
-> ReadS [CreateTaskSetResponse]
-> ReadPrec CreateTaskSetResponse
-> ReadPrec [CreateTaskSetResponse]
-> Read CreateTaskSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTaskSetResponse]
$creadListPrec :: ReadPrec [CreateTaskSetResponse]
readPrec :: ReadPrec CreateTaskSetResponse
$creadPrec :: ReadPrec CreateTaskSetResponse
readList :: ReadS [CreateTaskSetResponse]
$creadList :: ReadS [CreateTaskSetResponse]
readsPrec :: Int -> ReadS CreateTaskSetResponse
$creadsPrec :: Int -> ReadS CreateTaskSetResponse
Prelude.Read, Int -> CreateTaskSetResponse -> ShowS
[CreateTaskSetResponse] -> ShowS
CreateTaskSetResponse -> String
(Int -> CreateTaskSetResponse -> ShowS)
-> (CreateTaskSetResponse -> String)
-> ([CreateTaskSetResponse] -> ShowS)
-> Show CreateTaskSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTaskSetResponse] -> ShowS
$cshowList :: [CreateTaskSetResponse] -> ShowS
show :: CreateTaskSetResponse -> String
$cshow :: CreateTaskSetResponse -> String
showsPrec :: Int -> CreateTaskSetResponse -> ShowS
$cshowsPrec :: Int -> CreateTaskSetResponse -> ShowS
Prelude.Show, (forall x. CreateTaskSetResponse -> Rep CreateTaskSetResponse x)
-> (forall x. Rep CreateTaskSetResponse x -> CreateTaskSetResponse)
-> Generic CreateTaskSetResponse
forall x. Rep CreateTaskSetResponse x -> CreateTaskSetResponse
forall x. CreateTaskSetResponse -> Rep CreateTaskSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTaskSetResponse x -> CreateTaskSetResponse
$cfrom :: forall x. CreateTaskSetResponse -> Rep CreateTaskSetResponse x
Prelude.Generic)
newCreateTaskSetResponse ::
Prelude.Int ->
CreateTaskSetResponse
newCreateTaskSetResponse :: Int -> CreateTaskSetResponse
newCreateTaskSetResponse Int
pHttpStatus_ =
CreateTaskSetResponse' :: Maybe TaskSet -> Int -> CreateTaskSetResponse
CreateTaskSetResponse'
{ $sel:taskSet:CreateTaskSetResponse' :: Maybe TaskSet
taskSet = Maybe TaskSet
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTaskSetResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTaskSetResponse_taskSet :: Lens.Lens' CreateTaskSetResponse (Prelude.Maybe TaskSet)
createTaskSetResponse_taskSet :: (Maybe TaskSet -> f (Maybe TaskSet))
-> CreateTaskSetResponse -> f CreateTaskSetResponse
createTaskSetResponse_taskSet = (CreateTaskSetResponse -> Maybe TaskSet)
-> (CreateTaskSetResponse
-> Maybe TaskSet -> CreateTaskSetResponse)
-> Lens
CreateTaskSetResponse
CreateTaskSetResponse
(Maybe TaskSet)
(Maybe TaskSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSetResponse' {Maybe TaskSet
taskSet :: Maybe TaskSet
$sel:taskSet:CreateTaskSetResponse' :: CreateTaskSetResponse -> Maybe TaskSet
taskSet} -> Maybe TaskSet
taskSet) (\s :: CreateTaskSetResponse
s@CreateTaskSetResponse' {} Maybe TaskSet
a -> CreateTaskSetResponse
s {$sel:taskSet:CreateTaskSetResponse' :: Maybe TaskSet
taskSet = Maybe TaskSet
a} :: CreateTaskSetResponse)
createTaskSetResponse_httpStatus :: Lens.Lens' CreateTaskSetResponse Prelude.Int
createTaskSetResponse_httpStatus :: (Int -> f Int) -> CreateTaskSetResponse -> f CreateTaskSetResponse
createTaskSetResponse_httpStatus = (CreateTaskSetResponse -> Int)
-> (CreateTaskSetResponse -> Int -> CreateTaskSetResponse)
-> Lens CreateTaskSetResponse CreateTaskSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTaskSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTaskSetResponse' :: CreateTaskSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTaskSetResponse
s@CreateTaskSetResponse' {} Int
a -> CreateTaskSetResponse
s {$sel:httpStatus:CreateTaskSetResponse' :: Int
httpStatus = Int
a} :: CreateTaskSetResponse)
instance Prelude.NFData CreateTaskSetResponse