{-# 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.RegisterTaskDefinition
(
RegisterTaskDefinition (..),
newRegisterTaskDefinition,
registerTaskDefinition_inferenceAccelerators,
registerTaskDefinition_executionRoleArn,
registerTaskDefinition_requiresCompatibilities,
registerTaskDefinition_ephemeralStorage,
registerTaskDefinition_pidMode,
registerTaskDefinition_ipcMode,
registerTaskDefinition_memory,
registerTaskDefinition_proxyConfiguration,
registerTaskDefinition_taskRoleArn,
registerTaskDefinition_placementConstraints,
registerTaskDefinition_networkMode,
registerTaskDefinition_volumes,
registerTaskDefinition_cpu,
registerTaskDefinition_tags,
registerTaskDefinition_family,
registerTaskDefinition_containerDefinitions,
RegisterTaskDefinitionResponse (..),
newRegisterTaskDefinitionResponse,
registerTaskDefinitionResponse_taskDefinition,
registerTaskDefinitionResponse_tags,
registerTaskDefinitionResponse_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 RegisterTaskDefinition = RegisterTaskDefinition'
{
RegisterTaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators :: Prelude.Maybe [InferenceAccelerator],
RegisterTaskDefinition -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
RegisterTaskDefinition -> Maybe [Compatibility]
requiresCompatibilities :: Prelude.Maybe [Compatibility],
RegisterTaskDefinition -> Maybe EphemeralStorage
ephemeralStorage :: Prelude.Maybe EphemeralStorage,
RegisterTaskDefinition -> Maybe PidMode
pidMode :: Prelude.Maybe PidMode,
RegisterTaskDefinition -> Maybe IpcMode
ipcMode :: Prelude.Maybe IpcMode,
RegisterTaskDefinition -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
RegisterTaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration :: Prelude.Maybe ProxyConfiguration,
RegisterTaskDefinition -> Maybe Text
taskRoleArn :: Prelude.Maybe Prelude.Text,
RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Prelude.Maybe [TaskDefinitionPlacementConstraint],
RegisterTaskDefinition -> Maybe NetworkMode
networkMode :: Prelude.Maybe NetworkMode,
RegisterTaskDefinition -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
RegisterTaskDefinition -> Maybe Text
cpu :: Prelude.Maybe Prelude.Text,
RegisterTaskDefinition -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
RegisterTaskDefinition -> Text
family :: Prelude.Text,
RegisterTaskDefinition -> [ContainerDefinition]
containerDefinitions :: [ContainerDefinition]
}
deriving (RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
(RegisterTaskDefinition -> RegisterTaskDefinition -> Bool)
-> (RegisterTaskDefinition -> RegisterTaskDefinition -> Bool)
-> Eq RegisterTaskDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
$c/= :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
== :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
$c== :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
Prelude.Eq, ReadPrec [RegisterTaskDefinition]
ReadPrec RegisterTaskDefinition
Int -> ReadS RegisterTaskDefinition
ReadS [RegisterTaskDefinition]
(Int -> ReadS RegisterTaskDefinition)
-> ReadS [RegisterTaskDefinition]
-> ReadPrec RegisterTaskDefinition
-> ReadPrec [RegisterTaskDefinition]
-> Read RegisterTaskDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTaskDefinition]
$creadListPrec :: ReadPrec [RegisterTaskDefinition]
readPrec :: ReadPrec RegisterTaskDefinition
$creadPrec :: ReadPrec RegisterTaskDefinition
readList :: ReadS [RegisterTaskDefinition]
$creadList :: ReadS [RegisterTaskDefinition]
readsPrec :: Int -> ReadS RegisterTaskDefinition
$creadsPrec :: Int -> ReadS RegisterTaskDefinition
Prelude.Read, Int -> RegisterTaskDefinition -> ShowS
[RegisterTaskDefinition] -> ShowS
RegisterTaskDefinition -> String
(Int -> RegisterTaskDefinition -> ShowS)
-> (RegisterTaskDefinition -> String)
-> ([RegisterTaskDefinition] -> ShowS)
-> Show RegisterTaskDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTaskDefinition] -> ShowS
$cshowList :: [RegisterTaskDefinition] -> ShowS
show :: RegisterTaskDefinition -> String
$cshow :: RegisterTaskDefinition -> String
showsPrec :: Int -> RegisterTaskDefinition -> ShowS
$cshowsPrec :: Int -> RegisterTaskDefinition -> ShowS
Prelude.Show, (forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x)
-> (forall x.
Rep RegisterTaskDefinition x -> RegisterTaskDefinition)
-> Generic RegisterTaskDefinition
forall x. Rep RegisterTaskDefinition x -> RegisterTaskDefinition
forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterTaskDefinition x -> RegisterTaskDefinition
$cfrom :: forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x
Prelude.Generic)
newRegisterTaskDefinition ::
Prelude.Text ->
RegisterTaskDefinition
newRegisterTaskDefinition :: Text -> RegisterTaskDefinition
newRegisterTaskDefinition Text
pFamily_ =
RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe EphemeralStorage
-> Maybe PidMode
-> Maybe IpcMode
-> Maybe Text
-> Maybe ProxyConfiguration
-> Maybe Text
-> Maybe [TaskDefinitionPlacementConstraint]
-> Maybe NetworkMode
-> Maybe [Volume]
-> Maybe Text
-> Maybe [Tag]
-> Text
-> [ContainerDefinition]
-> RegisterTaskDefinition
RegisterTaskDefinition'
{ $sel:inferenceAccelerators:RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators =
Maybe [InferenceAccelerator]
forall a. Maybe a
Prelude.Nothing,
$sel:executionRoleArn:RegisterTaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requiresCompatibilities:RegisterTaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
forall a. Maybe a
Prelude.Nothing,
$sel:ephemeralStorage:RegisterTaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
forall a. Maybe a
Prelude.Nothing,
$sel:pidMode:RegisterTaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
forall a. Maybe a
Prelude.Nothing,
$sel:ipcMode:RegisterTaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
forall a. Maybe a
Prelude.Nothing,
$sel:memory:RegisterTaskDefinition' :: Maybe Text
memory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:proxyConfiguration:RegisterTaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:taskRoleArn:RegisterTaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:placementConstraints:RegisterTaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
forall a. Maybe a
Prelude.Nothing,
$sel:networkMode:RegisterTaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
forall a. Maybe a
Prelude.Nothing,
$sel:volumes:RegisterTaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
forall a. Maybe a
Prelude.Nothing,
$sel:cpu:RegisterTaskDefinition' :: Maybe Text
cpu = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:RegisterTaskDefinition' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:family:RegisterTaskDefinition' :: Text
family = Text
pFamily_,
$sel:containerDefinitions:RegisterTaskDefinition' :: [ContainerDefinition]
containerDefinitions = [ContainerDefinition]
forall a. Monoid a => a
Prelude.mempty
}
registerTaskDefinition_inferenceAccelerators :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [InferenceAccelerator])
registerTaskDefinition_inferenceAccelerators :: (Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_inferenceAccelerators = (RegisterTaskDefinition -> Maybe [InferenceAccelerator])
-> (RegisterTaskDefinition
-> Maybe [InferenceAccelerator] -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe [InferenceAccelerator])
(Maybe [InferenceAccelerator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [InferenceAccelerator]
inferenceAccelerators :: Maybe [InferenceAccelerator]
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators} -> Maybe [InferenceAccelerator]
inferenceAccelerators) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [InferenceAccelerator]
a -> RegisterTaskDefinition
s {$sel:inferenceAccelerators:RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators = Maybe [InferenceAccelerator]
a} :: RegisterTaskDefinition) ((Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [InferenceAccelerator]
-> f (Maybe [InferenceAccelerator]))
-> Maybe [InferenceAccelerator]
-> f (Maybe [InferenceAccelerator]))
-> (Maybe [InferenceAccelerator]
-> f (Maybe [InferenceAccelerator]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[InferenceAccelerator]
[InferenceAccelerator]
[InferenceAccelerator]
[InferenceAccelerator]
-> Iso
(Maybe [InferenceAccelerator])
(Maybe [InferenceAccelerator])
(Maybe [InferenceAccelerator])
(Maybe [InferenceAccelerator])
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
[InferenceAccelerator]
[InferenceAccelerator]
[InferenceAccelerator]
[InferenceAccelerator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
registerTaskDefinition_executionRoleArn :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_executionRoleArn :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_executionRoleArn = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:executionRoleArn:RegisterTaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
a} :: RegisterTaskDefinition)
registerTaskDefinition_requiresCompatibilities :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Compatibility])
registerTaskDefinition_requiresCompatibilities :: (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_requiresCompatibilities = (RegisterTaskDefinition -> Maybe [Compatibility])
-> (RegisterTaskDefinition
-> Maybe [Compatibility] -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe [Compatibility])
(Maybe [Compatibility])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Compatibility]
requiresCompatibilities :: Maybe [Compatibility]
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
requiresCompatibilities} -> Maybe [Compatibility]
requiresCompatibilities) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Compatibility]
a -> RegisterTaskDefinition
s {$sel:requiresCompatibilities:RegisterTaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
a} :: RegisterTaskDefinition) ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[Compatibility] [Compatibility] [Compatibility] [Compatibility]
-> Iso
(Maybe [Compatibility])
(Maybe [Compatibility])
(Maybe [Compatibility])
(Maybe [Compatibility])
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
[Compatibility] [Compatibility] [Compatibility] [Compatibility]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
registerTaskDefinition_ephemeralStorage :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe EphemeralStorage)
registerTaskDefinition_ephemeralStorage :: (Maybe EphemeralStorage -> f (Maybe EphemeralStorage))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_ephemeralStorage = (RegisterTaskDefinition -> Maybe EphemeralStorage)
-> (RegisterTaskDefinition
-> Maybe EphemeralStorage -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe EphemeralStorage)
(Maybe EphemeralStorage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe EphemeralStorage
ephemeralStorage :: Maybe EphemeralStorage
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
ephemeralStorage} -> Maybe EphemeralStorage
ephemeralStorage) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe EphemeralStorage
a -> RegisterTaskDefinition
s {$sel:ephemeralStorage:RegisterTaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
a} :: RegisterTaskDefinition)
registerTaskDefinition_pidMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe PidMode)
registerTaskDefinition_pidMode :: (Maybe PidMode -> f (Maybe PidMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_pidMode = (RegisterTaskDefinition -> Maybe PidMode)
-> (RegisterTaskDefinition
-> Maybe PidMode -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe PidMode)
(Maybe PidMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe PidMode
pidMode :: Maybe PidMode
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
pidMode} -> Maybe PidMode
pidMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe PidMode
a -> RegisterTaskDefinition
s {$sel:pidMode:RegisterTaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
a} :: RegisterTaskDefinition)
registerTaskDefinition_ipcMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe IpcMode)
registerTaskDefinition_ipcMode :: (Maybe IpcMode -> f (Maybe IpcMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_ipcMode = (RegisterTaskDefinition -> Maybe IpcMode)
-> (RegisterTaskDefinition
-> Maybe IpcMode -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe IpcMode)
(Maybe IpcMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe IpcMode
ipcMode :: Maybe IpcMode
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
ipcMode} -> Maybe IpcMode
ipcMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe IpcMode
a -> RegisterTaskDefinition
s {$sel:ipcMode:RegisterTaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
a} :: RegisterTaskDefinition)
registerTaskDefinition_memory :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_memory :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_memory = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
memory :: Maybe Text
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
memory} -> Maybe Text
memory) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:memory:RegisterTaskDefinition' :: Maybe Text
memory = Maybe Text
a} :: RegisterTaskDefinition)
registerTaskDefinition_proxyConfiguration :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe ProxyConfiguration)
registerTaskDefinition_proxyConfiguration :: (Maybe ProxyConfiguration -> f (Maybe ProxyConfiguration))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_proxyConfiguration = (RegisterTaskDefinition -> Maybe ProxyConfiguration)
-> (RegisterTaskDefinition
-> Maybe ProxyConfiguration -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe ProxyConfiguration)
(Maybe ProxyConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe ProxyConfiguration
proxyConfiguration :: Maybe ProxyConfiguration
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration} -> Maybe ProxyConfiguration
proxyConfiguration) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe ProxyConfiguration
a -> RegisterTaskDefinition
s {$sel:proxyConfiguration:RegisterTaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
a} :: RegisterTaskDefinition)
registerTaskDefinition_taskRoleArn :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_taskRoleArn :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_taskRoleArn = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
taskRoleArn :: Maybe Text
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
taskRoleArn} -> Maybe Text
taskRoleArn) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:taskRoleArn:RegisterTaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
a} :: RegisterTaskDefinition)
registerTaskDefinition_placementConstraints :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [TaskDefinitionPlacementConstraint])
registerTaskDefinition_placementConstraints :: (Maybe [TaskDefinitionPlacementConstraint]
-> f (Maybe [TaskDefinitionPlacementConstraint]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_placementConstraints = (RegisterTaskDefinition
-> Maybe [TaskDefinitionPlacementConstraint])
-> (RegisterTaskDefinition
-> Maybe [TaskDefinitionPlacementConstraint]
-> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe [TaskDefinitionPlacementConstraint])
(Maybe [TaskDefinitionPlacementConstraint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints} -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [TaskDefinitionPlacementConstraint]
a -> RegisterTaskDefinition
s {$sel:placementConstraints:RegisterTaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
a} :: RegisterTaskDefinition) ((Maybe [TaskDefinitionPlacementConstraint]
-> f (Maybe [TaskDefinitionPlacementConstraint]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [TaskDefinitionPlacementConstraint]
-> f (Maybe [TaskDefinitionPlacementConstraint]))
-> Maybe [TaskDefinitionPlacementConstraint]
-> f (Maybe [TaskDefinitionPlacementConstraint]))
-> (Maybe [TaskDefinitionPlacementConstraint]
-> f (Maybe [TaskDefinitionPlacementConstraint]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
-> Iso
(Maybe [TaskDefinitionPlacementConstraint])
(Maybe [TaskDefinitionPlacementConstraint])
(Maybe [TaskDefinitionPlacementConstraint])
(Maybe [TaskDefinitionPlacementConstraint])
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
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
[TaskDefinitionPlacementConstraint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
registerTaskDefinition_networkMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe NetworkMode)
registerTaskDefinition_networkMode :: (Maybe NetworkMode -> f (Maybe NetworkMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_networkMode = (RegisterTaskDefinition -> Maybe NetworkMode)
-> (RegisterTaskDefinition
-> Maybe NetworkMode -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe NetworkMode)
(Maybe NetworkMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe NetworkMode
networkMode :: Maybe NetworkMode
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
networkMode} -> Maybe NetworkMode
networkMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe NetworkMode
a -> RegisterTaskDefinition
s {$sel:networkMode:RegisterTaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
a} :: RegisterTaskDefinition)
registerTaskDefinition_volumes :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Volume])
registerTaskDefinition_volumes :: (Maybe [Volume] -> f (Maybe [Volume]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_volumes = (RegisterTaskDefinition -> Maybe [Volume])
-> (RegisterTaskDefinition
-> Maybe [Volume] -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe [Volume])
(Maybe [Volume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Volume]
volumes :: Maybe [Volume]
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
volumes} -> Maybe [Volume]
volumes) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Volume]
a -> RegisterTaskDefinition
s {$sel:volumes:RegisterTaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
a} :: RegisterTaskDefinition) ((Maybe [Volume] -> f (Maybe [Volume]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Volume] -> f (Maybe [Volume]))
-> Maybe [Volume] -> f (Maybe [Volume]))
-> (Maybe [Volume] -> f (Maybe [Volume]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Volume] [Volume] [Volume] [Volume]
-> Iso
(Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume])
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 [Volume] [Volume] [Volume] [Volume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
registerTaskDefinition_cpu :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_cpu :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_cpu = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
cpu :: Maybe Text
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
cpu} -> Maybe Text
cpu) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:cpu:RegisterTaskDefinition' :: Maybe Text
cpu = Maybe Text
a} :: RegisterTaskDefinition)
registerTaskDefinition_tags :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Tag])
registerTaskDefinition_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_tags = (RegisterTaskDefinition -> Maybe [Tag])
-> (RegisterTaskDefinition
-> Maybe [Tag] -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Tag]
a -> RegisterTaskDefinition
s {$sel:tags:RegisterTaskDefinition' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RegisterTaskDefinition) ((Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
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
registerTaskDefinition_family :: Lens.Lens' RegisterTaskDefinition Prelude.Text
registerTaskDefinition_family :: (Text -> f Text)
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_family = (RegisterTaskDefinition -> Text)
-> (RegisterTaskDefinition -> Text -> RegisterTaskDefinition)
-> Lens RegisterTaskDefinition RegisterTaskDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Text
family :: Text
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
family} -> Text
family) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Text
a -> RegisterTaskDefinition
s {$sel:family:RegisterTaskDefinition' :: Text
family = Text
a} :: RegisterTaskDefinition)
registerTaskDefinition_containerDefinitions :: Lens.Lens' RegisterTaskDefinition [ContainerDefinition]
registerTaskDefinition_containerDefinitions :: ([ContainerDefinition] -> f [ContainerDefinition])
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_containerDefinitions = (RegisterTaskDefinition -> [ContainerDefinition])
-> (RegisterTaskDefinition
-> [ContainerDefinition] -> RegisterTaskDefinition)
-> Lens
RegisterTaskDefinition
RegisterTaskDefinition
[ContainerDefinition]
[ContainerDefinition]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {[ContainerDefinition]
containerDefinitions :: [ContainerDefinition]
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
containerDefinitions} -> [ContainerDefinition]
containerDefinitions) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} [ContainerDefinition]
a -> RegisterTaskDefinition
s {$sel:containerDefinitions:RegisterTaskDefinition' :: [ContainerDefinition]
containerDefinitions = [ContainerDefinition]
a} :: RegisterTaskDefinition) (([ContainerDefinition] -> f [ContainerDefinition])
-> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> (([ContainerDefinition] -> f [ContainerDefinition])
-> [ContainerDefinition] -> f [ContainerDefinition])
-> ([ContainerDefinition] -> f [ContainerDefinition])
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ContainerDefinition] -> f [ContainerDefinition])
-> [ContainerDefinition] -> f [ContainerDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest RegisterTaskDefinition where
type
AWSResponse RegisterTaskDefinition =
RegisterTaskDefinitionResponse
request :: RegisterTaskDefinition -> Request RegisterTaskDefinition
request = Service -> RegisterTaskDefinition -> Request RegisterTaskDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RegisterTaskDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RegisterTaskDefinition)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse RegisterTaskDefinition))
-> Logger
-> Service
-> Proxy RegisterTaskDefinition
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RegisterTaskDefinition)))
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 TaskDefinition
-> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse'
(Maybe TaskDefinition
-> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
-> Either String (Maybe TaskDefinition)
-> Either
String (Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TaskDefinition)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"taskDefinition")
Either
String (Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> RegisterTaskDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> RegisterTaskDefinitionResponse)
-> Either String Int
-> Either String RegisterTaskDefinitionResponse
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 RegisterTaskDefinition
instance Prelude.NFData RegisterTaskDefinition
instance Core.ToHeaders RegisterTaskDefinition where
toHeaders :: RegisterTaskDefinition -> ResponseHeaders
toHeaders =
ResponseHeaders -> RegisterTaskDefinition -> 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.RegisterTaskDefinition" ::
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 RegisterTaskDefinition where
toJSON :: RegisterTaskDefinition -> Value
toJSON RegisterTaskDefinition' {[ContainerDefinition]
Maybe [Compatibility]
Maybe [InferenceAccelerator]
Maybe [Tag]
Maybe [TaskDefinitionPlacementConstraint]
Maybe [Volume]
Maybe Text
Maybe EphemeralStorage
Maybe IpcMode
Maybe NetworkMode
Maybe PidMode
Maybe ProxyConfiguration
Text
containerDefinitions :: [ContainerDefinition]
family :: Text
tags :: Maybe [Tag]
cpu :: Maybe Text
volumes :: Maybe [Volume]
networkMode :: Maybe NetworkMode
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
taskRoleArn :: Maybe Text
proxyConfiguration :: Maybe ProxyConfiguration
memory :: Maybe Text
ipcMode :: Maybe IpcMode
pidMode :: Maybe PidMode
ephemeralStorage :: Maybe EphemeralStorage
requiresCompatibilities :: Maybe [Compatibility]
executionRoleArn :: Maybe Text
inferenceAccelerators :: Maybe [InferenceAccelerator]
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"inferenceAccelerators" Text -> [InferenceAccelerator] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([InferenceAccelerator] -> Pair)
-> Maybe [InferenceAccelerator] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InferenceAccelerator]
inferenceAccelerators,
(Text
"executionRoleArn" 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
executionRoleArn,
(Text
"requiresCompatibilities" Text -> [Compatibility] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Compatibility] -> Pair) -> Maybe [Compatibility] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Compatibility]
requiresCompatibilities,
(Text
"ephemeralStorage" Text -> EphemeralStorage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EphemeralStorage -> Pair) -> Maybe EphemeralStorage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EphemeralStorage
ephemeralStorage,
(Text
"pidMode" Text -> PidMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PidMode -> Pair) -> Maybe PidMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PidMode
pidMode,
(Text
"ipcMode" Text -> IpcMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IpcMode -> Pair) -> Maybe IpcMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpcMode
ipcMode,
(Text
"memory" 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
memory,
(Text
"proxyConfiguration" Text -> ProxyConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ProxyConfiguration -> Pair)
-> Maybe ProxyConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProxyConfiguration
proxyConfiguration,
(Text
"taskRoleArn" 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
taskRoleArn,
(Text
"placementConstraints" Text -> [TaskDefinitionPlacementConstraint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([TaskDefinitionPlacementConstraint] -> Pair)
-> Maybe [TaskDefinitionPlacementConstraint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints,
(Text
"networkMode" Text -> NetworkMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NetworkMode -> Pair) -> Maybe NetworkMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkMode
networkMode,
(Text
"volumes" Text -> [Volume] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Volume] -> Pair) -> Maybe [Volume] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Volume]
volumes,
(Text
"cpu" 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
cpu,
(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
"family" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
family),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"containerDefinitions"
Text -> [ContainerDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [ContainerDefinition]
containerDefinitions
)
]
)
instance Core.ToPath RegisterTaskDefinition where
toPath :: RegisterTaskDefinition -> ByteString
toPath = ByteString -> RegisterTaskDefinition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RegisterTaskDefinition where
toQuery :: RegisterTaskDefinition -> QueryString
toQuery = QueryString -> RegisterTaskDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RegisterTaskDefinitionResponse = RegisterTaskDefinitionResponse'
{
RegisterTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition :: Prelude.Maybe TaskDefinition,
RegisterTaskDefinitionResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
RegisterTaskDefinitionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
(RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool)
-> (RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool)
-> Eq RegisterTaskDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
$c/= :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
== :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
$c== :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [RegisterTaskDefinitionResponse]
ReadPrec RegisterTaskDefinitionResponse
Int -> ReadS RegisterTaskDefinitionResponse
ReadS [RegisterTaskDefinitionResponse]
(Int -> ReadS RegisterTaskDefinitionResponse)
-> ReadS [RegisterTaskDefinitionResponse]
-> ReadPrec RegisterTaskDefinitionResponse
-> ReadPrec [RegisterTaskDefinitionResponse]
-> Read RegisterTaskDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTaskDefinitionResponse]
$creadListPrec :: ReadPrec [RegisterTaskDefinitionResponse]
readPrec :: ReadPrec RegisterTaskDefinitionResponse
$creadPrec :: ReadPrec RegisterTaskDefinitionResponse
readList :: ReadS [RegisterTaskDefinitionResponse]
$creadList :: ReadS [RegisterTaskDefinitionResponse]
readsPrec :: Int -> ReadS RegisterTaskDefinitionResponse
$creadsPrec :: Int -> ReadS RegisterTaskDefinitionResponse
Prelude.Read, Int -> RegisterTaskDefinitionResponse -> ShowS
[RegisterTaskDefinitionResponse] -> ShowS
RegisterTaskDefinitionResponse -> String
(Int -> RegisterTaskDefinitionResponse -> ShowS)
-> (RegisterTaskDefinitionResponse -> String)
-> ([RegisterTaskDefinitionResponse] -> ShowS)
-> Show RegisterTaskDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTaskDefinitionResponse] -> ShowS
$cshowList :: [RegisterTaskDefinitionResponse] -> ShowS
show :: RegisterTaskDefinitionResponse -> String
$cshow :: RegisterTaskDefinitionResponse -> String
showsPrec :: Int -> RegisterTaskDefinitionResponse -> ShowS
$cshowsPrec :: Int -> RegisterTaskDefinitionResponse -> ShowS
Prelude.Show, (forall x.
RegisterTaskDefinitionResponse
-> Rep RegisterTaskDefinitionResponse x)
-> (forall x.
Rep RegisterTaskDefinitionResponse x
-> RegisterTaskDefinitionResponse)
-> Generic RegisterTaskDefinitionResponse
forall x.
Rep RegisterTaskDefinitionResponse x
-> RegisterTaskDefinitionResponse
forall x.
RegisterTaskDefinitionResponse
-> Rep RegisterTaskDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterTaskDefinitionResponse x
-> RegisterTaskDefinitionResponse
$cfrom :: forall x.
RegisterTaskDefinitionResponse
-> Rep RegisterTaskDefinitionResponse x
Prelude.Generic)
newRegisterTaskDefinitionResponse ::
Prelude.Int ->
RegisterTaskDefinitionResponse
newRegisterTaskDefinitionResponse :: Int -> RegisterTaskDefinitionResponse
newRegisterTaskDefinitionResponse Int
pHttpStatus_ =
RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
-> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse'
{ $sel:taskDefinition:RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition =
Maybe TaskDefinition
forall a. Maybe a
Prelude.Nothing,
$sel:tags:RegisterTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RegisterTaskDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
registerTaskDefinitionResponse_taskDefinition :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe TaskDefinition)
registerTaskDefinitionResponse_taskDefinition :: (Maybe TaskDefinition -> f (Maybe TaskDefinition))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_taskDefinition = (RegisterTaskDefinitionResponse -> Maybe TaskDefinition)
-> (RegisterTaskDefinitionResponse
-> Maybe TaskDefinition -> RegisterTaskDefinitionResponse)
-> Lens
RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse
(Maybe TaskDefinition)
(Maybe TaskDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Maybe TaskDefinition
taskDefinition :: Maybe TaskDefinition
$sel:taskDefinition:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition} -> Maybe TaskDefinition
taskDefinition) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Maybe TaskDefinition
a -> RegisterTaskDefinitionResponse
s {$sel:taskDefinition:RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition = Maybe TaskDefinition
a} :: RegisterTaskDefinitionResponse)
registerTaskDefinitionResponse_tags :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe [Tag])
registerTaskDefinitionResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_tags = (RegisterTaskDefinitionResponse -> Maybe [Tag])
-> (RegisterTaskDefinitionResponse
-> Maybe [Tag] -> RegisterTaskDefinitionResponse)
-> Lens
RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Maybe [Tag]
a -> RegisterTaskDefinitionResponse
s {$sel:tags:RegisterTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RegisterTaskDefinitionResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
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
registerTaskDefinitionResponse_httpStatus :: Lens.Lens' RegisterTaskDefinitionResponse Prelude.Int
registerTaskDefinitionResponse_httpStatus :: (Int -> f Int)
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_httpStatus = (RegisterTaskDefinitionResponse -> Int)
-> (RegisterTaskDefinitionResponse
-> Int -> RegisterTaskDefinitionResponse)
-> Lens
RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Int
a -> RegisterTaskDefinitionResponse
s {$sel:httpStatus:RegisterTaskDefinitionResponse' :: Int
httpStatus = Int
a} :: RegisterTaskDefinitionResponse)
instance
Prelude.NFData
RegisterTaskDefinitionResponse