{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ECS.Types.TaskDefinition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ECS.Types.TaskDefinition where

import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.Attribute
import Amazonka.ECS.Types.Compatibility
import Amazonka.ECS.Types.ContainerDefinition
import Amazonka.ECS.Types.EphemeralStorage
import Amazonka.ECS.Types.InferenceAccelerator
import Amazonka.ECS.Types.IpcMode
import Amazonka.ECS.Types.NetworkMode
import Amazonka.ECS.Types.PidMode
import Amazonka.ECS.Types.ProxyConfiguration
import Amazonka.ECS.Types.TaskDefinitionPlacementConstraint
import Amazonka.ECS.Types.TaskDefinitionStatus
import Amazonka.ECS.Types.Volume
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The details of a task definition which describes the container and
-- volume definitions of an Amazon Elastic Container Service task. You can
-- specify which Docker images to use, the required resources, and other
-- configurations related to launching the task definition through an
-- Amazon ECS service or task.
--
-- /See:/ 'newTaskDefinition' smart constructor.
data TaskDefinition = TaskDefinition'
  { -- | The status of the task definition.
    TaskDefinition -> Maybe TaskDefinitionStatus
status :: Prelude.Maybe TaskDefinitionStatus,
    -- | The Elastic Inference accelerator associated with the task.
    TaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators :: Prelude.Maybe [InferenceAccelerator],
    -- | The Amazon Resource Name (ARN) of the task execution role that grants
    -- the Amazon ECS container agent permission to make Amazon Web Services
    -- API calls on your behalf. The task execution IAM role is required
    -- depending on the requirements of your task. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html Amazon ECS task execution IAM role>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskDefinition -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The task launch types the task definition was validated against. To
    -- determine which task launch types the task definition is validated for,
    -- see the TaskDefinition$compatibilities parameter.
    TaskDefinition -> Maybe [Compatibility]
requiresCompatibilities :: Prelude.Maybe [Compatibility],
    -- | The ephemeral storage settings to use for tasks run with the task
    -- definition.
    TaskDefinition -> Maybe EphemeralStorage
ephemeralStorage :: Prelude.Maybe EphemeralStorage,
    -- | The process namespace to use for the containers in the task. The valid
    -- values are @host@ or @task@. If @host@ is specified, then all containers
    -- within the tasks that specified the @host@ PID mode on the same
    -- container instance share the same process namespace with the host Amazon
    -- EC2 instance. If @task@ is specified, all containers within the
    -- specified task share the same process namespace. If no value is
    -- specified, the default is a private namespace. For more information, see
    -- <https://docs.docker.com/engine/reference/run/#pid-settings---pid PID settings>
    -- in the /Docker run reference/.
    --
    -- If the @host@ PID mode is used, be aware that there is a heightened risk
    -- of undesired process namespace expose. For more information, see
    -- <https://docs.docker.com/engine/security/security/ Docker security>.
    --
    -- This parameter is not supported for Windows containers or tasks run on
    -- Fargate.
    TaskDefinition -> Maybe PidMode
pidMode :: Prelude.Maybe PidMode,
    -- | The name of a family that this task definition is registered to. Up to
    -- 255 letters (uppercase and lowercase), numbers, hyphens, and underscores
    -- are allowed.
    --
    -- A family groups multiple versions of a task definition. Amazon ECS gives
    -- the first task definition that you registered to a family a revision
    -- number of 1. Amazon ECS gives sequential revision numbers to each task
    -- definition that you add.
    TaskDefinition -> Maybe Text
family :: Prelude.Maybe Prelude.Text,
    -- | The IPC resource namespace to use for the containers in the task. The
    -- valid values are @host@, @task@, or @none@. If @host@ is specified, then
    -- all containers within the tasks that specified the @host@ IPC mode on
    -- the same container instance share the same IPC resources with the host
    -- Amazon EC2 instance. If @task@ is specified, all containers within the
    -- specified task share the same IPC resources. If @none@ is specified,
    -- then IPC resources within the containers of a task are private and not
    -- shared with other containers in a task or on the container instance. If
    -- no value is specified, then the IPC resource namespace sharing depends
    -- on the Docker daemon setting on the container instance. For more
    -- information, see
    -- <https://docs.docker.com/engine/reference/run/#ipc-settings---ipc IPC settings>
    -- in the /Docker run reference/.
    --
    -- If the @host@ IPC mode is used, be aware that there is a heightened risk
    -- of undesired IPC namespace expose. For more information, see
    -- <https://docs.docker.com/engine/security/security/ Docker security>.
    --
    -- If you are setting namespaced kernel parameters using @systemControls@
    -- for the containers in the task, the following will apply to your IPC
    -- resource namespace. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html System Controls>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- -   For tasks that use the @host@ IPC mode, IPC namespace related
    --     @systemControls@ are not supported.
    --
    -- -   For tasks that use the @task@ IPC mode, IPC namespace related
    --     @systemControls@ will apply to all containers within a task.
    --
    -- This parameter is not supported for Windows containers or tasks run on
    -- Fargate.
    TaskDefinition -> Maybe IpcMode
ipcMode :: Prelude.Maybe IpcMode,
    -- | A list of container definitions in JSON format that describe the
    -- different containers that make up your task. For more information about
    -- container definition parameters and defaults, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Amazon ECS Task Definitions>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskDefinition -> Maybe [ContainerDefinition]
containerDefinitions :: Prelude.Maybe [ContainerDefinition],
    -- | The amount (in MiB) of memory used by the task.
    --
    -- If your tasks will be run on Amazon EC2 instances, you must specify
    -- either a task-level memory value or a container-level memory value. This
    -- field is optional and any value can be used. If a task-level memory
    -- value is specified then the container-level memory value is optional.
    -- For more information regarding container-level memory and memory
    -- reservation, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html ContainerDefinition>.
    --
    -- If your tasks will be run on Fargate, this field is required and you
    -- must use one of the following values, which determines your range of
    -- valid values for the @cpu@ parameter:
    --
    -- -   512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available @cpu@ values: 256
    --     (.25 vCPU)
    --
    -- -   1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available @cpu@
    --     values: 512 (.5 vCPU)
    --
    -- -   2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB),
    --     7168 (7 GB), 8192 (8 GB) - Available @cpu@ values: 1024 (1 vCPU)
    --
    -- -   Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
    --     Available @cpu@ values: 2048 (2 vCPU)
    --
    -- -   Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
    --     Available @cpu@ values: 4096 (4 vCPU)
    TaskDefinition -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
    -- | The configuration details for the App Mesh proxy.
    --
    -- Your Amazon ECS container instances require at least version 1.26.0 of
    -- the container agent and at least version 1.26.0-1 of the @ecs-init@
    -- package to enable a proxy configuration. If your container instances are
    -- launched from the Amazon ECS-optimized AMI version @20190301@ or later,
    -- then they contain the required versions of the container agent and
    -- @ecs-init@. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration :: Prelude.Maybe ProxyConfiguration,
    -- | The short name or full Amazon Resource Name (ARN) of the Identity and
    -- Access Management role that grants containers in the task permission to
    -- call Amazon Web Services APIs on your behalf. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html Amazon ECS Task Role>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- IAM roles for tasks on Windows require that the @-EnableTaskIAMRole@
    -- option is set when you launch the Amazon ECS-optimized Windows AMI. Your
    -- containers must also run some configuration code in order to take
    -- advantage of the feature. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html Windows IAM roles for tasks>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskDefinition -> Maybe Text
taskRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The Unix timestamp for when the task definition was deregistered.
    TaskDefinition -> Maybe POSIX
deregisteredAt :: Prelude.Maybe Core.POSIX,
    -- | An array of placement constraint objects to use for tasks.
    --
    -- This parameter is not supported for tasks run on Fargate.
    TaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Prelude.Maybe [TaskDefinitionPlacementConstraint],
    -- | The Unix timestamp for when the task definition was registered.
    TaskDefinition -> Maybe POSIX
registeredAt :: Prelude.Maybe Core.POSIX,
    -- | The Docker networking mode to use for the containers in the task. The
    -- valid values are @none@, @bridge@, @awsvpc@, and @host@. If no network
    -- mode is specified, the default is @bridge@.
    --
    -- For Amazon ECS tasks on Fargate, the @awsvpc@ network mode is required.
    -- For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can
    -- be used. For Amazon ECS tasks on Amazon EC2 Windows instances,
    -- @\<default>@ or @awsvpc@ can be used. If the network mode is set to
    -- @none@, you cannot specify port mappings in your container definitions,
    -- and the tasks containers do not have external connectivity. The @host@
    -- and @awsvpc@ network modes offer the highest networking performance for
    -- containers because they use the EC2 network stack instead of the
    -- virtualized network stack provided by the @bridge@ mode.
    --
    -- With the @host@ and @awsvpc@ network modes, exposed container ports are
    -- mapped directly to the corresponding host port (for the @host@ network
    -- mode) or the attached elastic network interface port (for the @awsvpc@
    -- network mode), so you cannot take advantage of dynamic host port
    -- mappings.
    --
    -- When using the @host@ network mode, you should not run containers using
    -- the root user (UID 0). It is considered best practice to use a non-root
    -- user.
    --
    -- If the network mode is @awsvpc@, the task is allocated an elastic
    -- network interface, and you must specify a NetworkConfiguration value
    -- when you create a service or run a task with the task definition. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task Networking>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- If the network mode is @host@, you cannot run multiple instantiations of
    -- the same task on a single container instance when port mappings are
    -- used.
    --
    -- For more information, see
    -- <https://docs.docker.com/engine/reference/run/#network-settings Network settings>
    -- in the /Docker run reference/.
    TaskDefinition -> Maybe NetworkMode
networkMode :: Prelude.Maybe NetworkMode,
    -- | The full Amazon Resource Name (ARN) of the task definition.
    TaskDefinition -> Maybe Text
taskDefinitionArn :: Prelude.Maybe Prelude.Text,
    -- | The task launch types the task definition validated against during task
    -- definition registration. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    TaskDefinition -> Maybe [Compatibility]
compatibilities :: Prelude.Maybe [Compatibility],
    -- | The principal that registered the task definition.
    TaskDefinition -> Maybe Text
registeredBy :: Prelude.Maybe Prelude.Text,
    -- | The revision of the task in a particular family. The revision is a
    -- version number of a task definition in a family. When you register a
    -- task definition for the first time, the revision is @1@. Each time that
    -- you register a new revision of a task definition in the same family, the
    -- revision value always increases by one, even if you have deregistered
    -- previous revisions in this family.
    TaskDefinition -> Maybe Int
revision :: Prelude.Maybe Prelude.Int,
    -- | The list of data volume definitions for the task. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html Using data volumes in tasks>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- The @host@ and @sourcePath@ parameters are not supported for tasks run
    -- on Fargate.
    TaskDefinition -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
    -- | The number of @cpu@ units used by the task. If you are using the EC2
    -- launch type, this field is optional and any value can be used. If you
    -- are using the Fargate launch type, this field is required and you must
    -- use one of the following values, which determines your range of valid
    -- values for the @memory@ parameter:
    --
    -- -   256 (.25 vCPU) - Available @memory@ values: 512 (0.5 GB), 1024 (1
    --     GB), 2048 (2 GB)
    --
    -- -   512 (.5 vCPU) - Available @memory@ values: 1024 (1 GB), 2048 (2 GB),
    --     3072 (3 GB), 4096 (4 GB)
    --
    -- -   1024 (1 vCPU) - Available @memory@ values: 2048 (2 GB), 3072 (3 GB),
    --     4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
    --
    -- -   2048 (2 vCPU) - Available @memory@ values: Between 4096 (4 GB) and
    --     16384 (16 GB) in increments of 1024 (1 GB)
    --
    -- -   4096 (4 vCPU) - Available @memory@ values: Between 8192 (8 GB) and
    --     30720 (30 GB) in increments of 1024 (1 GB)
    TaskDefinition -> Maybe Text
cpu :: Prelude.Maybe Prelude.Text,
    -- | The container instance attributes required by your task. When an Amazon
    -- EC2 instance is registered to your cluster, the Amazon ECS container
    -- agent assigns some standard attributes to the instance. You can apply
    -- custom attributes, specified as key-value pairs using the Amazon ECS
    -- console or the PutAttributes API. These attributes are used when
    -- considering task placement for tasks hosted on Amazon EC2 instances. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes Attributes>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- This parameter is not supported for tasks run on Fargate.
    TaskDefinition -> Maybe [Attribute]
requiresAttributes :: Prelude.Maybe [Attribute]
  }
  deriving (TaskDefinition -> TaskDefinition -> Bool
(TaskDefinition -> TaskDefinition -> Bool)
-> (TaskDefinition -> TaskDefinition -> Bool) -> Eq TaskDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TaskDefinition -> TaskDefinition -> Bool
$c/= :: TaskDefinition -> TaskDefinition -> Bool
== :: TaskDefinition -> TaskDefinition -> Bool
$c== :: TaskDefinition -> TaskDefinition -> Bool
Prelude.Eq, ReadPrec [TaskDefinition]
ReadPrec TaskDefinition
Int -> ReadS TaskDefinition
ReadS [TaskDefinition]
(Int -> ReadS TaskDefinition)
-> ReadS [TaskDefinition]
-> ReadPrec TaskDefinition
-> ReadPrec [TaskDefinition]
-> Read TaskDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TaskDefinition]
$creadListPrec :: ReadPrec [TaskDefinition]
readPrec :: ReadPrec TaskDefinition
$creadPrec :: ReadPrec TaskDefinition
readList :: ReadS [TaskDefinition]
$creadList :: ReadS [TaskDefinition]
readsPrec :: Int -> ReadS TaskDefinition
$creadsPrec :: Int -> ReadS TaskDefinition
Prelude.Read, Int -> TaskDefinition -> ShowS
[TaskDefinition] -> ShowS
TaskDefinition -> String
(Int -> TaskDefinition -> ShowS)
-> (TaskDefinition -> String)
-> ([TaskDefinition] -> ShowS)
-> Show TaskDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TaskDefinition] -> ShowS
$cshowList :: [TaskDefinition] -> ShowS
show :: TaskDefinition -> String
$cshow :: TaskDefinition -> String
showsPrec :: Int -> TaskDefinition -> ShowS
$cshowsPrec :: Int -> TaskDefinition -> ShowS
Prelude.Show, (forall x. TaskDefinition -> Rep TaskDefinition x)
-> (forall x. Rep TaskDefinition x -> TaskDefinition)
-> Generic TaskDefinition
forall x. Rep TaskDefinition x -> TaskDefinition
forall x. TaskDefinition -> Rep TaskDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TaskDefinition x -> TaskDefinition
$cfrom :: forall x. TaskDefinition -> Rep TaskDefinition x
Prelude.Generic)

-- |
-- Create a value of 'TaskDefinition' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'taskDefinition_status' - The status of the task definition.
--
-- 'inferenceAccelerators', 'taskDefinition_inferenceAccelerators' - The Elastic Inference accelerator associated with the task.
--
-- 'executionRoleArn', 'taskDefinition_executionRoleArn' - The Amazon Resource Name (ARN) of the task execution role that grants
-- the Amazon ECS container agent permission to make Amazon Web Services
-- API calls on your behalf. The task execution IAM role is required
-- depending on the requirements of your task. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html Amazon ECS task execution IAM role>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'requiresCompatibilities', 'taskDefinition_requiresCompatibilities' - The task launch types the task definition was validated against. To
-- determine which task launch types the task definition is validated for,
-- see the TaskDefinition$compatibilities parameter.
--
-- 'ephemeralStorage', 'taskDefinition_ephemeralStorage' - The ephemeral storage settings to use for tasks run with the task
-- definition.
--
-- 'pidMode', 'taskDefinition_pidMode' - The process namespace to use for the containers in the task. The valid
-- values are @host@ or @task@. If @host@ is specified, then all containers
-- within the tasks that specified the @host@ PID mode on the same
-- container instance share the same process namespace with the host Amazon
-- EC2 instance. If @task@ is specified, all containers within the
-- specified task share the same process namespace. If no value is
-- specified, the default is a private namespace. For more information, see
-- <https://docs.docker.com/engine/reference/run/#pid-settings---pid PID settings>
-- in the /Docker run reference/.
--
-- If the @host@ PID mode is used, be aware that there is a heightened risk
-- of undesired process namespace expose. For more information, see
-- <https://docs.docker.com/engine/security/security/ Docker security>.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
--
-- 'family', 'taskDefinition_family' - The name of a family that this task definition is registered to. Up to
-- 255 letters (uppercase and lowercase), numbers, hyphens, and underscores
-- are allowed.
--
-- A family groups multiple versions of a task definition. Amazon ECS gives
-- the first task definition that you registered to a family a revision
-- number of 1. Amazon ECS gives sequential revision numbers to each task
-- definition that you add.
--
-- 'ipcMode', 'taskDefinition_ipcMode' - The IPC resource namespace to use for the containers in the task. The
-- valid values are @host@, @task@, or @none@. If @host@ is specified, then
-- all containers within the tasks that specified the @host@ IPC mode on
-- the same container instance share the same IPC resources with the host
-- Amazon EC2 instance. If @task@ is specified, all containers within the
-- specified task share the same IPC resources. If @none@ is specified,
-- then IPC resources within the containers of a task are private and not
-- shared with other containers in a task or on the container instance. If
-- no value is specified, then the IPC resource namespace sharing depends
-- on the Docker daemon setting on the container instance. For more
-- information, see
-- <https://docs.docker.com/engine/reference/run/#ipc-settings---ipc IPC settings>
-- in the /Docker run reference/.
--
-- If the @host@ IPC mode is used, be aware that there is a heightened risk
-- of undesired IPC namespace expose. For more information, see
-- <https://docs.docker.com/engine/security/security/ Docker security>.
--
-- If you are setting namespaced kernel parameters using @systemControls@
-- for the containers in the task, the following will apply to your IPC
-- resource namespace. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html System Controls>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- -   For tasks that use the @host@ IPC mode, IPC namespace related
--     @systemControls@ are not supported.
--
-- -   For tasks that use the @task@ IPC mode, IPC namespace related
--     @systemControls@ will apply to all containers within a task.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
--
-- 'containerDefinitions', 'taskDefinition_containerDefinitions' - A list of container definitions in JSON format that describe the
-- different containers that make up your task. For more information about
-- container definition parameters and defaults, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Amazon ECS Task Definitions>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'memory', 'taskDefinition_memory' - The amount (in MiB) of memory used by the task.
--
-- If your tasks will be run on Amazon EC2 instances, you must specify
-- either a task-level memory value or a container-level memory value. This
-- field is optional and any value can be used. If a task-level memory
-- value is specified then the container-level memory value is optional.
-- For more information regarding container-level memory and memory
-- reservation, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html ContainerDefinition>.
--
-- If your tasks will be run on Fargate, this field is required and you
-- must use one of the following values, which determines your range of
-- valid values for the @cpu@ parameter:
--
-- -   512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available @cpu@ values: 256
--     (.25 vCPU)
--
-- -   1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available @cpu@
--     values: 512 (.5 vCPU)
--
-- -   2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB),
--     7168 (7 GB), 8192 (8 GB) - Available @cpu@ values: 1024 (1 vCPU)
--
-- -   Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
--     Available @cpu@ values: 2048 (2 vCPU)
--
-- -   Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
--     Available @cpu@ values: 4096 (4 vCPU)
--
-- 'proxyConfiguration', 'taskDefinition_proxyConfiguration' - The configuration details for the App Mesh proxy.
--
-- Your Amazon ECS container instances require at least version 1.26.0 of
-- the container agent and at least version 1.26.0-1 of the @ecs-init@
-- package to enable a proxy configuration. If your container instances are
-- launched from the Amazon ECS-optimized AMI version @20190301@ or later,
-- then they contain the required versions of the container agent and
-- @ecs-init@. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'taskRoleArn', 'taskDefinition_taskRoleArn' - The short name or full Amazon Resource Name (ARN) of the Identity and
-- Access Management role that grants containers in the task permission to
-- call Amazon Web Services APIs on your behalf. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html Amazon ECS Task Role>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- IAM roles for tasks on Windows require that the @-EnableTaskIAMRole@
-- option is set when you launch the Amazon ECS-optimized Windows AMI. Your
-- containers must also run some configuration code in order to take
-- advantage of the feature. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html Windows IAM roles for tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'deregisteredAt', 'taskDefinition_deregisteredAt' - The Unix timestamp for when the task definition was deregistered.
--
-- 'placementConstraints', 'taskDefinition_placementConstraints' - An array of placement constraint objects to use for tasks.
--
-- This parameter is not supported for tasks run on Fargate.
--
-- 'registeredAt', 'taskDefinition_registeredAt' - The Unix timestamp for when the task definition was registered.
--
-- 'networkMode', 'taskDefinition_networkMode' - The Docker networking mode to use for the containers in the task. The
-- valid values are @none@, @bridge@, @awsvpc@, and @host@. If no network
-- mode is specified, the default is @bridge@.
--
-- For Amazon ECS tasks on Fargate, the @awsvpc@ network mode is required.
-- For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can
-- be used. For Amazon ECS tasks on Amazon EC2 Windows instances,
-- @\<default>@ or @awsvpc@ can be used. If the network mode is set to
-- @none@, you cannot specify port mappings in your container definitions,
-- and the tasks containers do not have external connectivity. The @host@
-- and @awsvpc@ network modes offer the highest networking performance for
-- containers because they use the EC2 network stack instead of the
-- virtualized network stack provided by the @bridge@ mode.
--
-- With the @host@ and @awsvpc@ network modes, exposed container ports are
-- mapped directly to the corresponding host port (for the @host@ network
-- mode) or the attached elastic network interface port (for the @awsvpc@
-- network mode), so you cannot take advantage of dynamic host port
-- mappings.
--
-- When using the @host@ network mode, you should not run containers using
-- the root user (UID 0). It is considered best practice to use a non-root
-- user.
--
-- If the network mode is @awsvpc@, the task is allocated an elastic
-- network interface, and you must specify a NetworkConfiguration value
-- when you create a service or run a task with the task definition. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task Networking>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- If the network mode is @host@, you cannot run multiple instantiations of
-- the same task on a single container instance when port mappings are
-- used.
--
-- For more information, see
-- <https://docs.docker.com/engine/reference/run/#network-settings Network settings>
-- in the /Docker run reference/.
--
-- 'taskDefinitionArn', 'taskDefinition_taskDefinitionArn' - The full Amazon Resource Name (ARN) of the task definition.
--
-- 'compatibilities', 'taskDefinition_compatibilities' - The task launch types the task definition validated against during task
-- definition registration. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'registeredBy', 'taskDefinition_registeredBy' - The principal that registered the task definition.
--
-- 'revision', 'taskDefinition_revision' - The revision of the task in a particular family. The revision is a
-- version number of a task definition in a family. When you register a
-- task definition for the first time, the revision is @1@. Each time that
-- you register a new revision of a task definition in the same family, the
-- revision value always increases by one, even if you have deregistered
-- previous revisions in this family.
--
-- 'volumes', 'taskDefinition_volumes' - The list of data volume definitions for the task. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html Using data volumes in tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- The @host@ and @sourcePath@ parameters are not supported for tasks run
-- on Fargate.
--
-- 'cpu', 'taskDefinition_cpu' - The number of @cpu@ units used by the task. If you are using the EC2
-- launch type, this field is optional and any value can be used. If you
-- are using the Fargate launch type, this field is required and you must
-- use one of the following values, which determines your range of valid
-- values for the @memory@ parameter:
--
-- -   256 (.25 vCPU) - Available @memory@ values: 512 (0.5 GB), 1024 (1
--     GB), 2048 (2 GB)
--
-- -   512 (.5 vCPU) - Available @memory@ values: 1024 (1 GB), 2048 (2 GB),
--     3072 (3 GB), 4096 (4 GB)
--
-- -   1024 (1 vCPU) - Available @memory@ values: 2048 (2 GB), 3072 (3 GB),
--     4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
--
-- -   2048 (2 vCPU) - Available @memory@ values: Between 4096 (4 GB) and
--     16384 (16 GB) in increments of 1024 (1 GB)
--
-- -   4096 (4 vCPU) - Available @memory@ values: Between 8192 (8 GB) and
--     30720 (30 GB) in increments of 1024 (1 GB)
--
-- 'requiresAttributes', 'taskDefinition_requiresAttributes' - The container instance attributes required by your task. When an Amazon
-- EC2 instance is registered to your cluster, the Amazon ECS container
-- agent assigns some standard attributes to the instance. You can apply
-- custom attributes, specified as key-value pairs using the Amazon ECS
-- console or the PutAttributes API. These attributes are used when
-- considering task placement for tasks hosted on Amazon EC2 instances. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes Attributes>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- This parameter is not supported for tasks run on Fargate.
newTaskDefinition ::
  TaskDefinition
newTaskDefinition :: TaskDefinition
newTaskDefinition =
  TaskDefinition' :: Maybe TaskDefinitionStatus
-> Maybe [InferenceAccelerator]
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe EphemeralStorage
-> Maybe PidMode
-> Maybe Text
-> Maybe IpcMode
-> Maybe [ContainerDefinition]
-> Maybe Text
-> Maybe ProxyConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe [TaskDefinitionPlacementConstraint]
-> Maybe POSIX
-> Maybe NetworkMode
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe Text
-> Maybe Int
-> Maybe [Volume]
-> Maybe Text
-> Maybe [Attribute]
-> TaskDefinition
TaskDefinition'
    { $sel:status:TaskDefinition' :: Maybe TaskDefinitionStatus
status = Maybe TaskDefinitionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:inferenceAccelerators:TaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators = Maybe [InferenceAccelerator]
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:TaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requiresCompatibilities:TaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
forall a. Maybe a
Prelude.Nothing,
      $sel:ephemeralStorage:TaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
forall a. Maybe a
Prelude.Nothing,
      $sel:pidMode:TaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
forall a. Maybe a
Prelude.Nothing,
      $sel:family:TaskDefinition' :: Maybe Text
family = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ipcMode:TaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
forall a. Maybe a
Prelude.Nothing,
      $sel:containerDefinitions:TaskDefinition' :: Maybe [ContainerDefinition]
containerDefinitions = Maybe [ContainerDefinition]
forall a. Maybe a
Prelude.Nothing,
      $sel:memory:TaskDefinition' :: Maybe Text
memory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proxyConfiguration:TaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:taskRoleArn:TaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deregisteredAt:TaskDefinition' :: Maybe POSIX
deregisteredAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:placementConstraints:TaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
forall a. Maybe a
Prelude.Nothing,
      $sel:registeredAt:TaskDefinition' :: Maybe POSIX
registeredAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:networkMode:TaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
forall a. Maybe a
Prelude.Nothing,
      $sel:taskDefinitionArn:TaskDefinition' :: Maybe Text
taskDefinitionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:compatibilities:TaskDefinition' :: Maybe [Compatibility]
compatibilities = Maybe [Compatibility]
forall a. Maybe a
Prelude.Nothing,
      $sel:registeredBy:TaskDefinition' :: Maybe Text
registeredBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:revision:TaskDefinition' :: Maybe Int
revision = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:volumes:TaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:TaskDefinition' :: Maybe Text
cpu = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requiresAttributes:TaskDefinition' :: Maybe [Attribute]
requiresAttributes = Maybe [Attribute]
forall a. Maybe a
Prelude.Nothing
    }

-- | The status of the task definition.
taskDefinition_status :: Lens.Lens' TaskDefinition (Prelude.Maybe TaskDefinitionStatus)
taskDefinition_status :: (Maybe TaskDefinitionStatus -> f (Maybe TaskDefinitionStatus))
-> TaskDefinition -> f TaskDefinition
taskDefinition_status = (TaskDefinition -> Maybe TaskDefinitionStatus)
-> (TaskDefinition -> Maybe TaskDefinitionStatus -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe TaskDefinitionStatus)
     (Maybe TaskDefinitionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe TaskDefinitionStatus
status :: Maybe TaskDefinitionStatus
$sel:status:TaskDefinition' :: TaskDefinition -> Maybe TaskDefinitionStatus
status} -> Maybe TaskDefinitionStatus
status) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe TaskDefinitionStatus
a -> TaskDefinition
s {$sel:status:TaskDefinition' :: Maybe TaskDefinitionStatus
status = Maybe TaskDefinitionStatus
a} :: TaskDefinition)

-- | The Elastic Inference accelerator associated with the task.
taskDefinition_inferenceAccelerators :: Lens.Lens' TaskDefinition (Prelude.Maybe [InferenceAccelerator])
taskDefinition_inferenceAccelerators :: (Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_inferenceAccelerators = (TaskDefinition -> Maybe [InferenceAccelerator])
-> (TaskDefinition
    -> Maybe [InferenceAccelerator] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [InferenceAccelerator])
     (Maybe [InferenceAccelerator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [InferenceAccelerator]
inferenceAccelerators :: Maybe [InferenceAccelerator]
$sel:inferenceAccelerators:TaskDefinition' :: TaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators} -> Maybe [InferenceAccelerator]
inferenceAccelerators) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [InferenceAccelerator]
a -> TaskDefinition
s {$sel:inferenceAccelerators:TaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators = Maybe [InferenceAccelerator]
a} :: TaskDefinition) ((Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [InferenceAccelerator]
     -> f (Maybe [InferenceAccelerator]))
    -> Maybe [InferenceAccelerator]
    -> f (Maybe [InferenceAccelerator]))
-> (Maybe [InferenceAccelerator]
    -> f (Maybe [InferenceAccelerator]))
-> TaskDefinition
-> f TaskDefinition
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

-- | The Amazon Resource Name (ARN) of the task execution role that grants
-- the Amazon ECS container agent permission to make Amazon Web Services
-- API calls on your behalf. The task execution IAM role is required
-- depending on the requirements of your task. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html Amazon ECS task execution IAM role>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskDefinition_executionRoleArn :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_executionRoleArn :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_executionRoleArn = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:TaskDefinition' :: TaskDefinition -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:executionRoleArn:TaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
a} :: TaskDefinition)

-- | The task launch types the task definition was validated against. To
-- determine which task launch types the task definition is validated for,
-- see the TaskDefinition$compatibilities parameter.
taskDefinition_requiresCompatibilities :: Lens.Lens' TaskDefinition (Prelude.Maybe [Compatibility])
taskDefinition_requiresCompatibilities :: (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_requiresCompatibilities = (TaskDefinition -> Maybe [Compatibility])
-> (TaskDefinition -> Maybe [Compatibility] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [Compatibility])
     (Maybe [Compatibility])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [Compatibility]
requiresCompatibilities :: Maybe [Compatibility]
$sel:requiresCompatibilities:TaskDefinition' :: TaskDefinition -> Maybe [Compatibility]
requiresCompatibilities} -> Maybe [Compatibility]
requiresCompatibilities) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [Compatibility]
a -> TaskDefinition
s {$sel:requiresCompatibilities:TaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
a} :: TaskDefinition) ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
    -> Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> TaskDefinition
-> f TaskDefinition
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

-- | The ephemeral storage settings to use for tasks run with the task
-- definition.
taskDefinition_ephemeralStorage :: Lens.Lens' TaskDefinition (Prelude.Maybe EphemeralStorage)
taskDefinition_ephemeralStorage :: (Maybe EphemeralStorage -> f (Maybe EphemeralStorage))
-> TaskDefinition -> f TaskDefinition
taskDefinition_ephemeralStorage = (TaskDefinition -> Maybe EphemeralStorage)
-> (TaskDefinition -> Maybe EphemeralStorage -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe EphemeralStorage)
     (Maybe EphemeralStorage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe EphemeralStorage
ephemeralStorage :: Maybe EphemeralStorage
$sel:ephemeralStorage:TaskDefinition' :: TaskDefinition -> Maybe EphemeralStorage
ephemeralStorage} -> Maybe EphemeralStorage
ephemeralStorage) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe EphemeralStorage
a -> TaskDefinition
s {$sel:ephemeralStorage:TaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
a} :: TaskDefinition)

-- | The process namespace to use for the containers in the task. The valid
-- values are @host@ or @task@. If @host@ is specified, then all containers
-- within the tasks that specified the @host@ PID mode on the same
-- container instance share the same process namespace with the host Amazon
-- EC2 instance. If @task@ is specified, all containers within the
-- specified task share the same process namespace. If no value is
-- specified, the default is a private namespace. For more information, see
-- <https://docs.docker.com/engine/reference/run/#pid-settings---pid PID settings>
-- in the /Docker run reference/.
--
-- If the @host@ PID mode is used, be aware that there is a heightened risk
-- of undesired process namespace expose. For more information, see
-- <https://docs.docker.com/engine/security/security/ Docker security>.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
taskDefinition_pidMode :: Lens.Lens' TaskDefinition (Prelude.Maybe PidMode)
taskDefinition_pidMode :: (Maybe PidMode -> f (Maybe PidMode))
-> TaskDefinition -> f TaskDefinition
taskDefinition_pidMode = (TaskDefinition -> Maybe PidMode)
-> (TaskDefinition -> Maybe PidMode -> TaskDefinition)
-> Lens
     TaskDefinition TaskDefinition (Maybe PidMode) (Maybe PidMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe PidMode
pidMode :: Maybe PidMode
$sel:pidMode:TaskDefinition' :: TaskDefinition -> Maybe PidMode
pidMode} -> Maybe PidMode
pidMode) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe PidMode
a -> TaskDefinition
s {$sel:pidMode:TaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
a} :: TaskDefinition)

-- | The name of a family that this task definition is registered to. Up to
-- 255 letters (uppercase and lowercase), numbers, hyphens, and underscores
-- are allowed.
--
-- A family groups multiple versions of a task definition. Amazon ECS gives
-- the first task definition that you registered to a family a revision
-- number of 1. Amazon ECS gives sequential revision numbers to each task
-- definition that you add.
taskDefinition_family :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_family :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_family = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
family :: Maybe Text
$sel:family:TaskDefinition' :: TaskDefinition -> Maybe Text
family} -> Maybe Text
family) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:family:TaskDefinition' :: Maybe Text
family = Maybe Text
a} :: TaskDefinition)

-- | The IPC resource namespace to use for the containers in the task. The
-- valid values are @host@, @task@, or @none@. If @host@ is specified, then
-- all containers within the tasks that specified the @host@ IPC mode on
-- the same container instance share the same IPC resources with the host
-- Amazon EC2 instance. If @task@ is specified, all containers within the
-- specified task share the same IPC resources. If @none@ is specified,
-- then IPC resources within the containers of a task are private and not
-- shared with other containers in a task or on the container instance. If
-- no value is specified, then the IPC resource namespace sharing depends
-- on the Docker daemon setting on the container instance. For more
-- information, see
-- <https://docs.docker.com/engine/reference/run/#ipc-settings---ipc IPC settings>
-- in the /Docker run reference/.
--
-- If the @host@ IPC mode is used, be aware that there is a heightened risk
-- of undesired IPC namespace expose. For more information, see
-- <https://docs.docker.com/engine/security/security/ Docker security>.
--
-- If you are setting namespaced kernel parameters using @systemControls@
-- for the containers in the task, the following will apply to your IPC
-- resource namespace. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html System Controls>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- -   For tasks that use the @host@ IPC mode, IPC namespace related
--     @systemControls@ are not supported.
--
-- -   For tasks that use the @task@ IPC mode, IPC namespace related
--     @systemControls@ will apply to all containers within a task.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
taskDefinition_ipcMode :: Lens.Lens' TaskDefinition (Prelude.Maybe IpcMode)
taskDefinition_ipcMode :: (Maybe IpcMode -> f (Maybe IpcMode))
-> TaskDefinition -> f TaskDefinition
taskDefinition_ipcMode = (TaskDefinition -> Maybe IpcMode)
-> (TaskDefinition -> Maybe IpcMode -> TaskDefinition)
-> Lens
     TaskDefinition TaskDefinition (Maybe IpcMode) (Maybe IpcMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe IpcMode
ipcMode :: Maybe IpcMode
$sel:ipcMode:TaskDefinition' :: TaskDefinition -> Maybe IpcMode
ipcMode} -> Maybe IpcMode
ipcMode) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe IpcMode
a -> TaskDefinition
s {$sel:ipcMode:TaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
a} :: TaskDefinition)

-- | A list of container definitions in JSON format that describe the
-- different containers that make up your task. For more information about
-- container definition parameters and defaults, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html Amazon ECS Task Definitions>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskDefinition_containerDefinitions :: Lens.Lens' TaskDefinition (Prelude.Maybe [ContainerDefinition])
taskDefinition_containerDefinitions :: (Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_containerDefinitions = (TaskDefinition -> Maybe [ContainerDefinition])
-> (TaskDefinition
    -> Maybe [ContainerDefinition] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [ContainerDefinition]
containerDefinitions :: Maybe [ContainerDefinition]
$sel:containerDefinitions:TaskDefinition' :: TaskDefinition -> Maybe [ContainerDefinition]
containerDefinitions} -> Maybe [ContainerDefinition]
containerDefinitions) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [ContainerDefinition]
a -> TaskDefinition
s {$sel:containerDefinitions:TaskDefinition' :: Maybe [ContainerDefinition]
containerDefinitions = Maybe [ContainerDefinition]
a} :: TaskDefinition) ((Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [ContainerDefinition]
     -> f (Maybe [ContainerDefinition]))
    -> Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> (Maybe [ContainerDefinition] -> f (Maybe [ContainerDefinition]))
-> TaskDefinition
-> f TaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
-> Iso
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
     (Maybe [ContainerDefinition])
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
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
  [ContainerDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The amount (in MiB) of memory used by the task.
--
-- If your tasks will be run on Amazon EC2 instances, you must specify
-- either a task-level memory value or a container-level memory value. This
-- field is optional and any value can be used. If a task-level memory
-- value is specified then the container-level memory value is optional.
-- For more information regarding container-level memory and memory
-- reservation, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html ContainerDefinition>.
--
-- If your tasks will be run on Fargate, this field is required and you
-- must use one of the following values, which determines your range of
-- valid values for the @cpu@ parameter:
--
-- -   512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available @cpu@ values: 256
--     (.25 vCPU)
--
-- -   1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available @cpu@
--     values: 512 (.5 vCPU)
--
-- -   2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB),
--     7168 (7 GB), 8192 (8 GB) - Available @cpu@ values: 1024 (1 vCPU)
--
-- -   Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
--     Available @cpu@ values: 2048 (2 vCPU)
--
-- -   Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
--     Available @cpu@ values: 4096 (4 vCPU)
taskDefinition_memory :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_memory :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_memory = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
memory :: Maybe Text
$sel:memory:TaskDefinition' :: TaskDefinition -> Maybe Text
memory} -> Maybe Text
memory) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:memory:TaskDefinition' :: Maybe Text
memory = Maybe Text
a} :: TaskDefinition)

-- | The configuration details for the App Mesh proxy.
--
-- Your Amazon ECS container instances require at least version 1.26.0 of
-- the container agent and at least version 1.26.0-1 of the @ecs-init@
-- package to enable a proxy configuration. If your container instances are
-- launched from the Amazon ECS-optimized AMI version @20190301@ or later,
-- then they contain the required versions of the container agent and
-- @ecs-init@. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskDefinition_proxyConfiguration :: Lens.Lens' TaskDefinition (Prelude.Maybe ProxyConfiguration)
taskDefinition_proxyConfiguration :: (Maybe ProxyConfiguration -> f (Maybe ProxyConfiguration))
-> TaskDefinition -> f TaskDefinition
taskDefinition_proxyConfiguration = (TaskDefinition -> Maybe ProxyConfiguration)
-> (TaskDefinition -> Maybe ProxyConfiguration -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe ProxyConfiguration)
     (Maybe ProxyConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe ProxyConfiguration
proxyConfiguration :: Maybe ProxyConfiguration
$sel:proxyConfiguration:TaskDefinition' :: TaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration} -> Maybe ProxyConfiguration
proxyConfiguration) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe ProxyConfiguration
a -> TaskDefinition
s {$sel:proxyConfiguration:TaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
a} :: TaskDefinition)

-- | The short name or full Amazon Resource Name (ARN) of the Identity and
-- Access Management role that grants containers in the task permission to
-- call Amazon Web Services APIs on your behalf. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html Amazon ECS Task Role>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- IAM roles for tasks on Windows require that the @-EnableTaskIAMRole@
-- option is set when you launch the Amazon ECS-optimized Windows AMI. Your
-- containers must also run some configuration code in order to take
-- advantage of the feature. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html Windows IAM roles for tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskDefinition_taskRoleArn :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_taskRoleArn :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_taskRoleArn = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
taskRoleArn :: Maybe Text
$sel:taskRoleArn:TaskDefinition' :: TaskDefinition -> Maybe Text
taskRoleArn} -> Maybe Text
taskRoleArn) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:taskRoleArn:TaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
a} :: TaskDefinition)

-- | The Unix timestamp for when the task definition was deregistered.
taskDefinition_deregisteredAt :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.UTCTime)
taskDefinition_deregisteredAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskDefinition -> f TaskDefinition
taskDefinition_deregisteredAt = (TaskDefinition -> Maybe POSIX)
-> (TaskDefinition -> Maybe POSIX -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe POSIX
deregisteredAt :: Maybe POSIX
$sel:deregisteredAt:TaskDefinition' :: TaskDefinition -> Maybe POSIX
deregisteredAt} -> Maybe POSIX
deregisteredAt) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe POSIX
a -> TaskDefinition
s {$sel:deregisteredAt:TaskDefinition' :: Maybe POSIX
deregisteredAt = Maybe POSIX
a} :: TaskDefinition) ((Maybe POSIX -> f (Maybe POSIX))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskDefinition
-> f TaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | An array of placement constraint objects to use for tasks.
--
-- This parameter is not supported for tasks run on Fargate.
taskDefinition_placementConstraints :: Lens.Lens' TaskDefinition (Prelude.Maybe [TaskDefinitionPlacementConstraint])
taskDefinition_placementConstraints :: (Maybe [TaskDefinitionPlacementConstraint]
 -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_placementConstraints = (TaskDefinition -> Maybe [TaskDefinitionPlacementConstraint])
-> (TaskDefinition
    -> Maybe [TaskDefinitionPlacementConstraint] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [TaskDefinitionPlacementConstraint])
     (Maybe [TaskDefinitionPlacementConstraint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
$sel:placementConstraints:TaskDefinition' :: TaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints} -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [TaskDefinitionPlacementConstraint]
a -> TaskDefinition
s {$sel:placementConstraints:TaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
a} :: TaskDefinition) ((Maybe [TaskDefinitionPlacementConstraint]
  -> f (Maybe [TaskDefinitionPlacementConstraint]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [TaskDefinitionPlacementConstraint]
     -> f (Maybe [TaskDefinitionPlacementConstraint]))
    -> Maybe [TaskDefinitionPlacementConstraint]
    -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> (Maybe [TaskDefinitionPlacementConstraint]
    -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> TaskDefinition
-> f TaskDefinition
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

-- | The Unix timestamp for when the task definition was registered.
taskDefinition_registeredAt :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.UTCTime)
taskDefinition_registeredAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskDefinition -> f TaskDefinition
taskDefinition_registeredAt = (TaskDefinition -> Maybe POSIX)
-> (TaskDefinition -> Maybe POSIX -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe POSIX
registeredAt :: Maybe POSIX
$sel:registeredAt:TaskDefinition' :: TaskDefinition -> Maybe POSIX
registeredAt} -> Maybe POSIX
registeredAt) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe POSIX
a -> TaskDefinition
s {$sel:registeredAt:TaskDefinition' :: Maybe POSIX
registeredAt = Maybe POSIX
a} :: TaskDefinition) ((Maybe POSIX -> f (Maybe POSIX))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> TaskDefinition
-> f TaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Docker networking mode to use for the containers in the task. The
-- valid values are @none@, @bridge@, @awsvpc@, and @host@. If no network
-- mode is specified, the default is @bridge@.
--
-- For Amazon ECS tasks on Fargate, the @awsvpc@ network mode is required.
-- For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can
-- be used. For Amazon ECS tasks on Amazon EC2 Windows instances,
-- @\<default>@ or @awsvpc@ can be used. If the network mode is set to
-- @none@, you cannot specify port mappings in your container definitions,
-- and the tasks containers do not have external connectivity. The @host@
-- and @awsvpc@ network modes offer the highest networking performance for
-- containers because they use the EC2 network stack instead of the
-- virtualized network stack provided by the @bridge@ mode.
--
-- With the @host@ and @awsvpc@ network modes, exposed container ports are
-- mapped directly to the corresponding host port (for the @host@ network
-- mode) or the attached elastic network interface port (for the @awsvpc@
-- network mode), so you cannot take advantage of dynamic host port
-- mappings.
--
-- When using the @host@ network mode, you should not run containers using
-- the root user (UID 0). It is considered best practice to use a non-root
-- user.
--
-- If the network mode is @awsvpc@, the task is allocated an elastic
-- network interface, and you must specify a NetworkConfiguration value
-- when you create a service or run a task with the task definition. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task Networking>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- If the network mode is @host@, you cannot run multiple instantiations of
-- the same task on a single container instance when port mappings are
-- used.
--
-- For more information, see
-- <https://docs.docker.com/engine/reference/run/#network-settings Network settings>
-- in the /Docker run reference/.
taskDefinition_networkMode :: Lens.Lens' TaskDefinition (Prelude.Maybe NetworkMode)
taskDefinition_networkMode :: (Maybe NetworkMode -> f (Maybe NetworkMode))
-> TaskDefinition -> f TaskDefinition
taskDefinition_networkMode = (TaskDefinition -> Maybe NetworkMode)
-> (TaskDefinition -> Maybe NetworkMode -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe NetworkMode)
     (Maybe NetworkMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe NetworkMode
networkMode :: Maybe NetworkMode
$sel:networkMode:TaskDefinition' :: TaskDefinition -> Maybe NetworkMode
networkMode} -> Maybe NetworkMode
networkMode) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe NetworkMode
a -> TaskDefinition
s {$sel:networkMode:TaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
a} :: TaskDefinition)

-- | The full Amazon Resource Name (ARN) of the task definition.
taskDefinition_taskDefinitionArn :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_taskDefinitionArn :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_taskDefinitionArn = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
taskDefinitionArn :: Maybe Text
$sel:taskDefinitionArn:TaskDefinition' :: TaskDefinition -> Maybe Text
taskDefinitionArn} -> Maybe Text
taskDefinitionArn) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:taskDefinitionArn:TaskDefinition' :: Maybe Text
taskDefinitionArn = Maybe Text
a} :: TaskDefinition)

-- | The task launch types the task definition validated against during task
-- definition registration. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
taskDefinition_compatibilities :: Lens.Lens' TaskDefinition (Prelude.Maybe [Compatibility])
taskDefinition_compatibilities :: (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_compatibilities = (TaskDefinition -> Maybe [Compatibility])
-> (TaskDefinition -> Maybe [Compatibility] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [Compatibility])
     (Maybe [Compatibility])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [Compatibility]
compatibilities :: Maybe [Compatibility]
$sel:compatibilities:TaskDefinition' :: TaskDefinition -> Maybe [Compatibility]
compatibilities} -> Maybe [Compatibility]
compatibilities) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [Compatibility]
a -> TaskDefinition
s {$sel:compatibilities:TaskDefinition' :: Maybe [Compatibility]
compatibilities = Maybe [Compatibility]
a} :: TaskDefinition) ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
    -> Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> TaskDefinition
-> f TaskDefinition
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

-- | The principal that registered the task definition.
taskDefinition_registeredBy :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_registeredBy :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_registeredBy = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
registeredBy :: Maybe Text
$sel:registeredBy:TaskDefinition' :: TaskDefinition -> Maybe Text
registeredBy} -> Maybe Text
registeredBy) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:registeredBy:TaskDefinition' :: Maybe Text
registeredBy = Maybe Text
a} :: TaskDefinition)

-- | The revision of the task in a particular family. The revision is a
-- version number of a task definition in a family. When you register a
-- task definition for the first time, the revision is @1@. Each time that
-- you register a new revision of a task definition in the same family, the
-- revision value always increases by one, even if you have deregistered
-- previous revisions in this family.
taskDefinition_revision :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Int)
taskDefinition_revision :: (Maybe Int -> f (Maybe Int)) -> TaskDefinition -> f TaskDefinition
taskDefinition_revision = (TaskDefinition -> Maybe Int)
-> (TaskDefinition -> Maybe Int -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Int
revision :: Maybe Int
$sel:revision:TaskDefinition' :: TaskDefinition -> Maybe Int
revision} -> Maybe Int
revision) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Int
a -> TaskDefinition
s {$sel:revision:TaskDefinition' :: Maybe Int
revision = Maybe Int
a} :: TaskDefinition)

-- | The list of data volume definitions for the task. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html Using data volumes in tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- The @host@ and @sourcePath@ parameters are not supported for tasks run
-- on Fargate.
taskDefinition_volumes :: Lens.Lens' TaskDefinition (Prelude.Maybe [Volume])
taskDefinition_volumes :: (Maybe [Volume] -> f (Maybe [Volume]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_volumes = (TaskDefinition -> Maybe [Volume])
-> (TaskDefinition -> Maybe [Volume] -> TaskDefinition)
-> Lens
     TaskDefinition TaskDefinition (Maybe [Volume]) (Maybe [Volume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [Volume]
volumes :: Maybe [Volume]
$sel:volumes:TaskDefinition' :: TaskDefinition -> Maybe [Volume]
volumes} -> Maybe [Volume]
volumes) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [Volume]
a -> TaskDefinition
s {$sel:volumes:TaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
a} :: TaskDefinition) ((Maybe [Volume] -> f (Maybe [Volume]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [Volume] -> f (Maybe [Volume]))
    -> Maybe [Volume] -> f (Maybe [Volume]))
-> (Maybe [Volume] -> f (Maybe [Volume]))
-> TaskDefinition
-> f TaskDefinition
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

-- | The number of @cpu@ units used by the task. If you are using the EC2
-- launch type, this field is optional and any value can be used. If you
-- are using the Fargate launch type, this field is required and you must
-- use one of the following values, which determines your range of valid
-- values for the @memory@ parameter:
--
-- -   256 (.25 vCPU) - Available @memory@ values: 512 (0.5 GB), 1024 (1
--     GB), 2048 (2 GB)
--
-- -   512 (.5 vCPU) - Available @memory@ values: 1024 (1 GB), 2048 (2 GB),
--     3072 (3 GB), 4096 (4 GB)
--
-- -   1024 (1 vCPU) - Available @memory@ values: 2048 (2 GB), 3072 (3 GB),
--     4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
--
-- -   2048 (2 vCPU) - Available @memory@ values: Between 4096 (4 GB) and
--     16384 (16 GB) in increments of 1024 (1 GB)
--
-- -   4096 (4 vCPU) - Available @memory@ values: Between 8192 (8 GB) and
--     30720 (30 GB) in increments of 1024 (1 GB)
taskDefinition_cpu :: Lens.Lens' TaskDefinition (Prelude.Maybe Prelude.Text)
taskDefinition_cpu :: (Maybe Text -> f (Maybe Text))
-> TaskDefinition -> f TaskDefinition
taskDefinition_cpu = (TaskDefinition -> Maybe Text)
-> (TaskDefinition -> Maybe Text -> TaskDefinition)
-> Lens TaskDefinition TaskDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe Text
cpu :: Maybe Text
$sel:cpu:TaskDefinition' :: TaskDefinition -> Maybe Text
cpu} -> Maybe Text
cpu) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe Text
a -> TaskDefinition
s {$sel:cpu:TaskDefinition' :: Maybe Text
cpu = Maybe Text
a} :: TaskDefinition)

-- | The container instance attributes required by your task. When an Amazon
-- EC2 instance is registered to your cluster, the Amazon ECS container
-- agent assigns some standard attributes to the instance. You can apply
-- custom attributes, specified as key-value pairs using the Amazon ECS
-- console or the PutAttributes API. These attributes are used when
-- considering task placement for tasks hosted on Amazon EC2 instances. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes Attributes>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- This parameter is not supported for tasks run on Fargate.
taskDefinition_requiresAttributes :: Lens.Lens' TaskDefinition (Prelude.Maybe [Attribute])
taskDefinition_requiresAttributes :: (Maybe [Attribute] -> f (Maybe [Attribute]))
-> TaskDefinition -> f TaskDefinition
taskDefinition_requiresAttributes = (TaskDefinition -> Maybe [Attribute])
-> (TaskDefinition -> Maybe [Attribute] -> TaskDefinition)
-> Lens
     TaskDefinition
     TaskDefinition
     (Maybe [Attribute])
     (Maybe [Attribute])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TaskDefinition' {Maybe [Attribute]
requiresAttributes :: Maybe [Attribute]
$sel:requiresAttributes:TaskDefinition' :: TaskDefinition -> Maybe [Attribute]
requiresAttributes} -> Maybe [Attribute]
requiresAttributes) (\s :: TaskDefinition
s@TaskDefinition' {} Maybe [Attribute]
a -> TaskDefinition
s {$sel:requiresAttributes:TaskDefinition' :: Maybe [Attribute]
requiresAttributes = Maybe [Attribute]
a} :: TaskDefinition) ((Maybe [Attribute] -> f (Maybe [Attribute]))
 -> TaskDefinition -> f TaskDefinition)
-> ((Maybe [Attribute] -> f (Maybe [Attribute]))
    -> Maybe [Attribute] -> f (Maybe [Attribute]))
-> (Maybe [Attribute] -> f (Maybe [Attribute]))
-> TaskDefinition
-> f TaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Attribute] [Attribute] [Attribute] [Attribute]
-> Iso
     (Maybe [Attribute])
     (Maybe [Attribute])
     (Maybe [Attribute])
     (Maybe [Attribute])
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 [Attribute] [Attribute] [Attribute] [Attribute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON TaskDefinition where
  parseJSON :: Value -> Parser TaskDefinition
parseJSON =
    String
-> (Object -> Parser TaskDefinition)
-> Value
-> Parser TaskDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"TaskDefinition"
      ( \Object
x ->
          Maybe TaskDefinitionStatus
-> Maybe [InferenceAccelerator]
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe EphemeralStorage
-> Maybe PidMode
-> Maybe Text
-> Maybe IpcMode
-> Maybe [ContainerDefinition]
-> Maybe Text
-> Maybe ProxyConfiguration
-> Maybe Text
-> Maybe POSIX
-> Maybe [TaskDefinitionPlacementConstraint]
-> Maybe POSIX
-> Maybe NetworkMode
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe Text
-> Maybe Int
-> Maybe [Volume]
-> Maybe Text
-> Maybe [Attribute]
-> TaskDefinition
TaskDefinition'
            (Maybe TaskDefinitionStatus
 -> Maybe [InferenceAccelerator]
 -> Maybe Text
 -> Maybe [Compatibility]
 -> Maybe EphemeralStorage
 -> Maybe PidMode
 -> Maybe Text
 -> Maybe IpcMode
 -> Maybe [ContainerDefinition]
 -> Maybe Text
 -> Maybe ProxyConfiguration
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [TaskDefinitionPlacementConstraint]
 -> Maybe POSIX
 -> Maybe NetworkMode
 -> Maybe Text
 -> Maybe [Compatibility]
 -> Maybe Text
 -> Maybe Int
 -> Maybe [Volume]
 -> Maybe Text
 -> Maybe [Attribute]
 -> TaskDefinition)
-> Parser (Maybe TaskDefinitionStatus)
-> Parser
     (Maybe [InferenceAccelerator]
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe EphemeralStorage
      -> Maybe PidMode
      -> Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TaskDefinitionStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
            Parser
  (Maybe [InferenceAccelerator]
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe EphemeralStorage
   -> Maybe PidMode
   -> Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe [InferenceAccelerator])
-> Parser
     (Maybe Text
      -> Maybe [Compatibility]
      -> Maybe EphemeralStorage
      -> Maybe PidMode
      -> Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [InferenceAccelerator]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"inferenceAccelerators"
                            Parser (Maybe (Maybe [InferenceAccelerator]))
-> Maybe [InferenceAccelerator]
-> Parser (Maybe [InferenceAccelerator])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [InferenceAccelerator]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe [Compatibility]
   -> Maybe EphemeralStorage
   -> Maybe PidMode
   -> Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Compatibility]
      -> Maybe EphemeralStorage
      -> Maybe PidMode
      -> Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionRoleArn")
            Parser
  (Maybe [Compatibility]
   -> Maybe EphemeralStorage
   -> Maybe PidMode
   -> Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe [Compatibility])
-> Parser
     (Maybe EphemeralStorage
      -> Maybe PidMode
      -> Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Compatibility]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requiresCompatibilities"
                            Parser (Maybe (Maybe [Compatibility]))
-> Maybe [Compatibility] -> Parser (Maybe [Compatibility])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Compatibility]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe EphemeralStorage
   -> Maybe PidMode
   -> Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe EphemeralStorage)
-> Parser
     (Maybe PidMode
      -> Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe EphemeralStorage)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ephemeralStorage")
            Parser
  (Maybe PidMode
   -> Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe PidMode)
-> Parser
     (Maybe Text
      -> Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PidMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pidMode")
            Parser
  (Maybe Text
   -> Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe IpcMode
      -> Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"family")
            Parser
  (Maybe IpcMode
   -> Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe IpcMode)
-> Parser
     (Maybe [ContainerDefinition]
      -> Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IpcMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ipcMode")
            Parser
  (Maybe [ContainerDefinition]
   -> Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe [ContainerDefinition])
-> Parser
     (Maybe Text
      -> Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ContainerDefinition]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containerDefinitions"
                            Parser (Maybe (Maybe [ContainerDefinition]))
-> Maybe [ContainerDefinition]
-> Parser (Maybe [ContainerDefinition])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ContainerDefinition]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProxyConfiguration
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"memory")
            Parser
  (Maybe ProxyConfiguration
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe ProxyConfiguration)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProxyConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"proxyConfiguration")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskRoleArn")
            Parser
  (Maybe POSIX
   -> Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [TaskDefinitionPlacementConstraint]
      -> Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"deregisteredAt")
            Parser
  (Maybe [TaskDefinitionPlacementConstraint]
   -> Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe [TaskDefinitionPlacementConstraint])
-> Parser
     (Maybe POSIX
      -> Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [TaskDefinitionPlacementConstraint]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"placementConstraints"
                            Parser (Maybe (Maybe [TaskDefinitionPlacementConstraint]))
-> Maybe [TaskDefinitionPlacementConstraint]
-> Parser (Maybe [TaskDefinitionPlacementConstraint])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TaskDefinitionPlacementConstraint]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe POSIX
   -> Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe NetworkMode
      -> Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"registeredAt")
            Parser
  (Maybe NetworkMode
   -> Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe NetworkMode)
-> Parser
     (Maybe Text
      -> Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"networkMode")
            Parser
  (Maybe Text
   -> Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Compatibility]
      -> Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"taskDefinitionArn")
            Parser
  (Maybe [Compatibility]
   -> Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe [Compatibility])
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Compatibility]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"compatibilities"
                            Parser (Maybe (Maybe [Compatibility]))
-> Maybe [Compatibility] -> Parser (Maybe [Compatibility])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Compatibility]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe [Volume]
      -> Maybe Text
      -> Maybe [Attribute]
      -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"registeredBy")
            Parser
  (Maybe Int
   -> Maybe [Volume]
   -> Maybe Text
   -> Maybe [Attribute]
   -> TaskDefinition)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Volume]
      -> Maybe Text -> Maybe [Attribute] -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revision")
            Parser
  (Maybe [Volume]
   -> Maybe Text -> Maybe [Attribute] -> TaskDefinition)
-> Parser (Maybe [Volume])
-> Parser (Maybe Text -> Maybe [Attribute] -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Volume]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumes" Parser (Maybe (Maybe [Volume]))
-> Maybe [Volume] -> Parser (Maybe [Volume])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Volume]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> Maybe [Attribute] -> TaskDefinition)
-> Parser (Maybe Text)
-> Parser (Maybe [Attribute] -> TaskDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cpu")
            Parser (Maybe [Attribute] -> TaskDefinition)
-> Parser (Maybe [Attribute]) -> Parser TaskDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Attribute]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requiresAttributes"
                            Parser (Maybe (Maybe [Attribute]))
-> Maybe [Attribute] -> Parser (Maybe [Attribute])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Attribute]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable TaskDefinition

instance Prelude.NFData TaskDefinition