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

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

-- |
-- Module      : Amazonka.ECS.RegisterTaskDefinition
-- 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)
--
-- Registers a new task definition from the supplied @family@ and
-- @containerDefinitions@. Optionally, you can add data volumes to your
-- containers with the @volumes@ parameter. For more information about task
-- 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/.
--
-- You can specify an IAM role for your task with the @taskRoleArn@
-- parameter. When you specify an IAM role for a task, its containers can
-- then use the latest versions of the CLI or SDKs to make API requests to
-- the Amazon Web Services services that are specified in the IAM policy
-- associated with the role. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- You can specify a Docker networking mode for the containers in your task
-- definition with the @networkMode@ parameter. The available network modes
-- correspond to those described in
-- <https://docs.docker.com/engine/reference/run/#/network-settings Network settings>
-- in the Docker run reference. If you specify the @awsvpc@ network mode,
-- the task is allocated an elastic network interface, and you must specify
-- a NetworkConfiguration 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/.
module Amazonka.ECS.RegisterTaskDefinition
  ( -- * Creating a Request
    RegisterTaskDefinition (..),
    newRegisterTaskDefinition,

    -- * Request Lenses
    registerTaskDefinition_inferenceAccelerators,
    registerTaskDefinition_executionRoleArn,
    registerTaskDefinition_requiresCompatibilities,
    registerTaskDefinition_ephemeralStorage,
    registerTaskDefinition_pidMode,
    registerTaskDefinition_ipcMode,
    registerTaskDefinition_memory,
    registerTaskDefinition_proxyConfiguration,
    registerTaskDefinition_taskRoleArn,
    registerTaskDefinition_placementConstraints,
    registerTaskDefinition_networkMode,
    registerTaskDefinition_volumes,
    registerTaskDefinition_cpu,
    registerTaskDefinition_tags,
    registerTaskDefinition_family,
    registerTaskDefinition_containerDefinitions,

    -- * Destructuring the Response
    RegisterTaskDefinitionResponse (..),
    newRegisterTaskDefinitionResponse,

    -- * Response Lenses
    registerTaskDefinitionResponse_taskDefinition,
    registerTaskDefinitionResponse_tags,
    registerTaskDefinitionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.ECS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newRegisterTaskDefinition' smart constructor.
data RegisterTaskDefinition = RegisterTaskDefinition'
  { -- | The Elastic Inference accelerators to use for the containers in the
    -- task.
    RegisterTaskDefinition -> 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/.
    RegisterTaskDefinition -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The task launch type that Amazon ECS should validate the task definition
    -- against. A client exception is returned if the task definition doesn\'t
    -- validate against the compatibilities specified. If no value is
    -- specified, the parameter is omitted from the response.
    RegisterTaskDefinition -> Maybe [Compatibility]
requiresCompatibilities :: Prelude.Maybe [Compatibility],
    -- | The amount of ephemeral storage to allocate for the task. This parameter
    -- is used to expand the total amount of ephemeral storage available,
    -- beyond the default amount, for tasks hosted on Fargate. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_data_volumes.html Fargate task storage>
    -- in the /Amazon ECS User Guide for Fargate/.
    --
    -- This parameter is only supported for tasks hosted on Fargate using
    -- platform version @1.4.0@ or later.
    RegisterTaskDefinition -> 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.
    RegisterTaskDefinition -> Maybe PidMode
pidMode :: Prelude.Maybe PidMode,
    -- | 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.
    RegisterTaskDefinition -> Maybe IpcMode
ipcMode :: Prelude.Maybe IpcMode,
    -- | The amount of memory (in MiB) used by the task. It can be expressed as
    -- an integer using MiB, for example @1024@, or as a string using GB, for
    -- example @1GB@ or @1 GB@, in a task definition. String values are
    -- converted to an integer indicating the MiB when the task definition is
    -- registered.
    --
    -- Task-level CPU and memory parameters are ignored for Windows containers.
    -- We recommend specifying container-level resources for Windows
    -- containers.
    --
    -- If using the EC2 launch type, this field is optional.
    --
    -- If using the Fargate launch type, this field is required and you must
    -- use one of the following values, which determines your range of
    -- supported 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)
    RegisterTaskDefinition -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
    -- | The configuration details for the App Mesh proxy.
    --
    -- For tasks hosted on Amazon EC2 instances, the 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-ami-versions.html Amazon ECS-optimized AMI versions>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    RegisterTaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration :: Prelude.Maybe ProxyConfiguration,
    -- | The short name or full Amazon Resource Name (ARN) of the IAM role that
    -- containers in this task can assume. All containers in this task are
    -- granted the permissions that are specified in this role. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    RegisterTaskDefinition -> Maybe Text
taskRoleArn :: Prelude.Maybe Prelude.Text,
    -- | An array of placement constraint objects to use for the task. You can
    -- specify a maximum of 10 constraints per task (this limit includes
    -- constraints in the task definition and those specified at runtime).
    RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Prelude.Maybe [TaskDefinitionPlacementConstraint],
    -- | 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/.
    RegisterTaskDefinition -> Maybe NetworkMode
networkMode :: Prelude.Maybe NetworkMode,
    -- | A list of volume definitions in JSON format that containers in your task
    -- may use.
    RegisterTaskDefinition -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
    -- | The number of CPU units used by the task. It can be expressed as an
    -- integer using CPU units, for example @1024@, or as a string using vCPUs,
    -- for example @1 vCPU@ or @1 vcpu@, in a task definition. String values
    -- are converted to an integer indicating the CPU units when the task
    -- definition is registered.
    --
    -- Task-level CPU and memory parameters are ignored for Windows containers.
    -- We recommend specifying container-level resources for Windows
    -- containers.
    --
    -- If you are using the EC2 launch type, this field is optional. Supported
    -- values are between @128@ CPU units (@0.125@ vCPUs) and @10240@ CPU units
    -- (@10@ vCPUs).
    --
    -- 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
    -- supported 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)
    RegisterTaskDefinition -> Maybe Text
cpu :: Prelude.Maybe Prelude.Text,
    -- | The metadata that you apply to the task definition to help you
    -- categorize and organize them. Each tag consists of a key and an optional
    -- value, both of which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case-sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for either keys or values as it is reserved for
    --     Amazon Web Services use. You cannot edit or delete tag keys or
    --     values with this prefix. Tags with this prefix do not count against
    --     your tags per resource limit.
    RegisterTaskDefinition -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | You must specify a @family@ for a task definition, which allows you to
    -- track multiple versions of the same task definition. The @family@ is
    -- used as a name for your task definition. Up to 255 letters (uppercase
    -- and lowercase), numbers, underscores, and hyphens are allowed.
    RegisterTaskDefinition -> Text
family :: Prelude.Text,
    -- | A list of container definitions in JSON format that describe the
    -- different containers that make up your task.
    RegisterTaskDefinition -> [ContainerDefinition]
containerDefinitions :: [ContainerDefinition]
  }
  deriving (RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
(RegisterTaskDefinition -> RegisterTaskDefinition -> Bool)
-> (RegisterTaskDefinition -> RegisterTaskDefinition -> Bool)
-> Eq RegisterTaskDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
$c/= :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
== :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
$c== :: RegisterTaskDefinition -> RegisterTaskDefinition -> Bool
Prelude.Eq, ReadPrec [RegisterTaskDefinition]
ReadPrec RegisterTaskDefinition
Int -> ReadS RegisterTaskDefinition
ReadS [RegisterTaskDefinition]
(Int -> ReadS RegisterTaskDefinition)
-> ReadS [RegisterTaskDefinition]
-> ReadPrec RegisterTaskDefinition
-> ReadPrec [RegisterTaskDefinition]
-> Read RegisterTaskDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTaskDefinition]
$creadListPrec :: ReadPrec [RegisterTaskDefinition]
readPrec :: ReadPrec RegisterTaskDefinition
$creadPrec :: ReadPrec RegisterTaskDefinition
readList :: ReadS [RegisterTaskDefinition]
$creadList :: ReadS [RegisterTaskDefinition]
readsPrec :: Int -> ReadS RegisterTaskDefinition
$creadsPrec :: Int -> ReadS RegisterTaskDefinition
Prelude.Read, Int -> RegisterTaskDefinition -> ShowS
[RegisterTaskDefinition] -> ShowS
RegisterTaskDefinition -> String
(Int -> RegisterTaskDefinition -> ShowS)
-> (RegisterTaskDefinition -> String)
-> ([RegisterTaskDefinition] -> ShowS)
-> Show RegisterTaskDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTaskDefinition] -> ShowS
$cshowList :: [RegisterTaskDefinition] -> ShowS
show :: RegisterTaskDefinition -> String
$cshow :: RegisterTaskDefinition -> String
showsPrec :: Int -> RegisterTaskDefinition -> ShowS
$cshowsPrec :: Int -> RegisterTaskDefinition -> ShowS
Prelude.Show, (forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x)
-> (forall x.
    Rep RegisterTaskDefinition x -> RegisterTaskDefinition)
-> Generic RegisterTaskDefinition
forall x. Rep RegisterTaskDefinition x -> RegisterTaskDefinition
forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RegisterTaskDefinition x -> RegisterTaskDefinition
$cfrom :: forall x. RegisterTaskDefinition -> Rep RegisterTaskDefinition x
Prelude.Generic)

-- |
-- Create a value of 'RegisterTaskDefinition' 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:
--
-- 'inferenceAccelerators', 'registerTaskDefinition_inferenceAccelerators' - The Elastic Inference accelerators to use for the containers in the
-- task.
--
-- 'executionRoleArn', 'registerTaskDefinition_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', 'registerTaskDefinition_requiresCompatibilities' - The task launch type that Amazon ECS should validate the task definition
-- against. A client exception is returned if the task definition doesn\'t
-- validate against the compatibilities specified. If no value is
-- specified, the parameter is omitted from the response.
--
-- 'ephemeralStorage', 'registerTaskDefinition_ephemeralStorage' - The amount of ephemeral storage to allocate for the task. This parameter
-- is used to expand the total amount of ephemeral storage available,
-- beyond the default amount, for tasks hosted on Fargate. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_data_volumes.html Fargate task storage>
-- in the /Amazon ECS User Guide for Fargate/.
--
-- This parameter is only supported for tasks hosted on Fargate using
-- platform version @1.4.0@ or later.
--
-- 'pidMode', 'registerTaskDefinition_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.
--
-- 'ipcMode', 'registerTaskDefinition_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.
--
-- 'memory', 'registerTaskDefinition_memory' - The amount of memory (in MiB) used by the task. It can be expressed as
-- an integer using MiB, for example @1024@, or as a string using GB, for
-- example @1GB@ or @1 GB@, in a task definition. String values are
-- converted to an integer indicating the MiB when the task definition is
-- registered.
--
-- Task-level CPU and memory parameters are ignored for Windows containers.
-- We recommend specifying container-level resources for Windows
-- containers.
--
-- If using the EC2 launch type, this field is optional.
--
-- If using the Fargate launch type, this field is required and you must
-- use one of the following values, which determines your range of
-- supported 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', 'registerTaskDefinition_proxyConfiguration' - The configuration details for the App Mesh proxy.
--
-- For tasks hosted on Amazon EC2 instances, the 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-ami-versions.html Amazon ECS-optimized AMI versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'taskRoleArn', 'registerTaskDefinition_taskRoleArn' - The short name or full Amazon Resource Name (ARN) of the IAM role that
-- containers in this task can assume. All containers in this task are
-- granted the permissions that are specified in this role. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'placementConstraints', 'registerTaskDefinition_placementConstraints' - An array of placement constraint objects to use for the task. You can
-- specify a maximum of 10 constraints per task (this limit includes
-- constraints in the task definition and those specified at runtime).
--
-- 'networkMode', 'registerTaskDefinition_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/.
--
-- 'volumes', 'registerTaskDefinition_volumes' - A list of volume definitions in JSON format that containers in your task
-- may use.
--
-- 'cpu', 'registerTaskDefinition_cpu' - The number of CPU units used by the task. It can be expressed as an
-- integer using CPU units, for example @1024@, or as a string using vCPUs,
-- for example @1 vCPU@ or @1 vcpu@, in a task definition. String values
-- are converted to an integer indicating the CPU units when the task
-- definition is registered.
--
-- Task-level CPU and memory parameters are ignored for Windows containers.
-- We recommend specifying container-level resources for Windows
-- containers.
--
-- If you are using the EC2 launch type, this field is optional. Supported
-- values are between @128@ CPU units (@0.125@ vCPUs) and @10240@ CPU units
-- (@10@ vCPUs).
--
-- 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
-- supported 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)
--
-- 'tags', 'registerTaskDefinition_tags' - The metadata that you apply to the task definition to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
--
-- 'family', 'registerTaskDefinition_family' - You must specify a @family@ for a task definition, which allows you to
-- track multiple versions of the same task definition. The @family@ is
-- used as a name for your task definition. Up to 255 letters (uppercase
-- and lowercase), numbers, underscores, and hyphens are allowed.
--
-- 'containerDefinitions', 'registerTaskDefinition_containerDefinitions' - A list of container definitions in JSON format that describe the
-- different containers that make up your task.
newRegisterTaskDefinition ::
  -- | 'family'
  Prelude.Text ->
  RegisterTaskDefinition
newRegisterTaskDefinition :: Text -> RegisterTaskDefinition
newRegisterTaskDefinition Text
pFamily_ =
  RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
-> Maybe Text
-> Maybe [Compatibility]
-> Maybe EphemeralStorage
-> Maybe PidMode
-> Maybe IpcMode
-> Maybe Text
-> Maybe ProxyConfiguration
-> Maybe Text
-> Maybe [TaskDefinitionPlacementConstraint]
-> Maybe NetworkMode
-> Maybe [Volume]
-> Maybe Text
-> Maybe [Tag]
-> Text
-> [ContainerDefinition]
-> RegisterTaskDefinition
RegisterTaskDefinition'
    { $sel:inferenceAccelerators:RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators =
        Maybe [InferenceAccelerator]
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:RegisterTaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requiresCompatibilities:RegisterTaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
forall a. Maybe a
Prelude.Nothing,
      $sel:ephemeralStorage:RegisterTaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
forall a. Maybe a
Prelude.Nothing,
      $sel:pidMode:RegisterTaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
forall a. Maybe a
Prelude.Nothing,
      $sel:ipcMode:RegisterTaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
forall a. Maybe a
Prelude.Nothing,
      $sel:memory:RegisterTaskDefinition' :: Maybe Text
memory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:proxyConfiguration:RegisterTaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:taskRoleArn:RegisterTaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:placementConstraints:RegisterTaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
forall a. Maybe a
Prelude.Nothing,
      $sel:networkMode:RegisterTaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
forall a. Maybe a
Prelude.Nothing,
      $sel:volumes:RegisterTaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:RegisterTaskDefinition' :: Maybe Text
cpu = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RegisterTaskDefinition' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:family:RegisterTaskDefinition' :: Text
family = Text
pFamily_,
      $sel:containerDefinitions:RegisterTaskDefinition' :: [ContainerDefinition]
containerDefinitions = [ContainerDefinition]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The Elastic Inference accelerators to use for the containers in the
-- task.
registerTaskDefinition_inferenceAccelerators :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [InferenceAccelerator])
registerTaskDefinition_inferenceAccelerators :: (Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_inferenceAccelerators = (RegisterTaskDefinition -> Maybe [InferenceAccelerator])
-> (RegisterTaskDefinition
    -> Maybe [InferenceAccelerator] -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe [InferenceAccelerator])
     (Maybe [InferenceAccelerator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [InferenceAccelerator]
inferenceAccelerators :: Maybe [InferenceAccelerator]
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators} -> Maybe [InferenceAccelerator]
inferenceAccelerators) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [InferenceAccelerator]
a -> RegisterTaskDefinition
s {$sel:inferenceAccelerators:RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators = Maybe [InferenceAccelerator]
a} :: RegisterTaskDefinition) ((Maybe [InferenceAccelerator] -> f (Maybe [InferenceAccelerator]))
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [InferenceAccelerator]
     -> f (Maybe [InferenceAccelerator]))
    -> Maybe [InferenceAccelerator]
    -> f (Maybe [InferenceAccelerator]))
-> (Maybe [InferenceAccelerator]
    -> f (Maybe [InferenceAccelerator]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [InferenceAccelerator]
  [InferenceAccelerator]
  [InferenceAccelerator]
  [InferenceAccelerator]
-> Iso
     (Maybe [InferenceAccelerator])
     (Maybe [InferenceAccelerator])
     (Maybe [InferenceAccelerator])
     (Maybe [InferenceAccelerator])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [InferenceAccelerator]
  [InferenceAccelerator]
  [InferenceAccelerator]
  [InferenceAccelerator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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/.
registerTaskDefinition_executionRoleArn :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_executionRoleArn :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_executionRoleArn = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:executionRoleArn:RegisterTaskDefinition' :: Maybe Text
executionRoleArn = Maybe Text
a} :: RegisterTaskDefinition)

-- | The task launch type that Amazon ECS should validate the task definition
-- against. A client exception is returned if the task definition doesn\'t
-- validate against the compatibilities specified. If no value is
-- specified, the parameter is omitted from the response.
registerTaskDefinition_requiresCompatibilities :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Compatibility])
registerTaskDefinition_requiresCompatibilities :: (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_requiresCompatibilities = (RegisterTaskDefinition -> Maybe [Compatibility])
-> (RegisterTaskDefinition
    -> Maybe [Compatibility] -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe [Compatibility])
     (Maybe [Compatibility])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Compatibility]
requiresCompatibilities :: Maybe [Compatibility]
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
requiresCompatibilities} -> Maybe [Compatibility]
requiresCompatibilities) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Compatibility]
a -> RegisterTaskDefinition
s {$sel:requiresCompatibilities:RegisterTaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = Maybe [Compatibility]
a} :: RegisterTaskDefinition) ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Compatibility] -> f (Maybe [Compatibility]))
    -> Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> (Maybe [Compatibility] -> f (Maybe [Compatibility]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [Compatibility] [Compatibility] [Compatibility] [Compatibility]
-> Iso
     (Maybe [Compatibility])
     (Maybe [Compatibility])
     (Maybe [Compatibility])
     (Maybe [Compatibility])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [Compatibility] [Compatibility] [Compatibility] [Compatibility]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The amount of ephemeral storage to allocate for the task. This parameter
-- is used to expand the total amount of ephemeral storage available,
-- beyond the default amount, for tasks hosted on Fargate. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/using_data_volumes.html Fargate task storage>
-- in the /Amazon ECS User Guide for Fargate/.
--
-- This parameter is only supported for tasks hosted on Fargate using
-- platform version @1.4.0@ or later.
registerTaskDefinition_ephemeralStorage :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe EphemeralStorage)
registerTaskDefinition_ephemeralStorage :: (Maybe EphemeralStorage -> f (Maybe EphemeralStorage))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_ephemeralStorage = (RegisterTaskDefinition -> Maybe EphemeralStorage)
-> (RegisterTaskDefinition
    -> Maybe EphemeralStorage -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe EphemeralStorage)
     (Maybe EphemeralStorage)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe EphemeralStorage
ephemeralStorage :: Maybe EphemeralStorage
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
ephemeralStorage} -> Maybe EphemeralStorage
ephemeralStorage) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe EphemeralStorage
a -> RegisterTaskDefinition
s {$sel:ephemeralStorage:RegisterTaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = Maybe EphemeralStorage
a} :: RegisterTaskDefinition)

-- | 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.
registerTaskDefinition_pidMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe PidMode)
registerTaskDefinition_pidMode :: (Maybe PidMode -> f (Maybe PidMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_pidMode = (RegisterTaskDefinition -> Maybe PidMode)
-> (RegisterTaskDefinition
    -> Maybe PidMode -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe PidMode)
     (Maybe PidMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe PidMode
pidMode :: Maybe PidMode
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
pidMode} -> Maybe PidMode
pidMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe PidMode
a -> RegisterTaskDefinition
s {$sel:pidMode:RegisterTaskDefinition' :: Maybe PidMode
pidMode = Maybe PidMode
a} :: RegisterTaskDefinition)

-- | 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.
registerTaskDefinition_ipcMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe IpcMode)
registerTaskDefinition_ipcMode :: (Maybe IpcMode -> f (Maybe IpcMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_ipcMode = (RegisterTaskDefinition -> Maybe IpcMode)
-> (RegisterTaskDefinition
    -> Maybe IpcMode -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe IpcMode)
     (Maybe IpcMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe IpcMode
ipcMode :: Maybe IpcMode
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
ipcMode} -> Maybe IpcMode
ipcMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe IpcMode
a -> RegisterTaskDefinition
s {$sel:ipcMode:RegisterTaskDefinition' :: Maybe IpcMode
ipcMode = Maybe IpcMode
a} :: RegisterTaskDefinition)

-- | The amount of memory (in MiB) used by the task. It can be expressed as
-- an integer using MiB, for example @1024@, or as a string using GB, for
-- example @1GB@ or @1 GB@, in a task definition. String values are
-- converted to an integer indicating the MiB when the task definition is
-- registered.
--
-- Task-level CPU and memory parameters are ignored for Windows containers.
-- We recommend specifying container-level resources for Windows
-- containers.
--
-- If using the EC2 launch type, this field is optional.
--
-- If using the Fargate launch type, this field is required and you must
-- use one of the following values, which determines your range of
-- supported 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)
registerTaskDefinition_memory :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_memory :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_memory = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
memory :: Maybe Text
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
memory} -> Maybe Text
memory) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:memory:RegisterTaskDefinition' :: Maybe Text
memory = Maybe Text
a} :: RegisterTaskDefinition)

-- | The configuration details for the App Mesh proxy.
--
-- For tasks hosted on Amazon EC2 instances, the 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-ami-versions.html Amazon ECS-optimized AMI versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
registerTaskDefinition_proxyConfiguration :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe ProxyConfiguration)
registerTaskDefinition_proxyConfiguration :: (Maybe ProxyConfiguration -> f (Maybe ProxyConfiguration))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_proxyConfiguration = (RegisterTaskDefinition -> Maybe ProxyConfiguration)
-> (RegisterTaskDefinition
    -> Maybe ProxyConfiguration -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe ProxyConfiguration)
     (Maybe ProxyConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe ProxyConfiguration
proxyConfiguration :: Maybe ProxyConfiguration
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
proxyConfiguration} -> Maybe ProxyConfiguration
proxyConfiguration) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe ProxyConfiguration
a -> RegisterTaskDefinition
s {$sel:proxyConfiguration:RegisterTaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = Maybe ProxyConfiguration
a} :: RegisterTaskDefinition)

-- | The short name or full Amazon Resource Name (ARN) of the IAM role that
-- containers in this task can assume. All containers in this task are
-- granted the permissions that are specified in this role. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
registerTaskDefinition_taskRoleArn :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_taskRoleArn :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_taskRoleArn = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
taskRoleArn :: Maybe Text
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
taskRoleArn} -> Maybe Text
taskRoleArn) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:taskRoleArn:RegisterTaskDefinition' :: Maybe Text
taskRoleArn = Maybe Text
a} :: RegisterTaskDefinition)

-- | An array of placement constraint objects to use for the task. You can
-- specify a maximum of 10 constraints per task (this limit includes
-- constraints in the task definition and those specified at runtime).
registerTaskDefinition_placementConstraints :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [TaskDefinitionPlacementConstraint])
registerTaskDefinition_placementConstraints :: (Maybe [TaskDefinitionPlacementConstraint]
 -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_placementConstraints = (RegisterTaskDefinition
 -> Maybe [TaskDefinitionPlacementConstraint])
-> (RegisterTaskDefinition
    -> Maybe [TaskDefinitionPlacementConstraint]
    -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe [TaskDefinitionPlacementConstraint])
     (Maybe [TaskDefinitionPlacementConstraint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints} -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [TaskDefinitionPlacementConstraint]
a -> RegisterTaskDefinition
s {$sel:placementConstraints:RegisterTaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = Maybe [TaskDefinitionPlacementConstraint]
a} :: RegisterTaskDefinition) ((Maybe [TaskDefinitionPlacementConstraint]
  -> f (Maybe [TaskDefinitionPlacementConstraint]))
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [TaskDefinitionPlacementConstraint]
     -> f (Maybe [TaskDefinitionPlacementConstraint]))
    -> Maybe [TaskDefinitionPlacementConstraint]
    -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> (Maybe [TaskDefinitionPlacementConstraint]
    -> f (Maybe [TaskDefinitionPlacementConstraint]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
-> Iso
     (Maybe [TaskDefinitionPlacementConstraint])
     (Maybe [TaskDefinitionPlacementConstraint])
     (Maybe [TaskDefinitionPlacementConstraint])
     (Maybe [TaskDefinitionPlacementConstraint])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
  [TaskDefinitionPlacementConstraint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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/.
registerTaskDefinition_networkMode :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe NetworkMode)
registerTaskDefinition_networkMode :: (Maybe NetworkMode -> f (Maybe NetworkMode))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_networkMode = (RegisterTaskDefinition -> Maybe NetworkMode)
-> (RegisterTaskDefinition
    -> Maybe NetworkMode -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe NetworkMode)
     (Maybe NetworkMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe NetworkMode
networkMode :: Maybe NetworkMode
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
networkMode} -> Maybe NetworkMode
networkMode) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe NetworkMode
a -> RegisterTaskDefinition
s {$sel:networkMode:RegisterTaskDefinition' :: Maybe NetworkMode
networkMode = Maybe NetworkMode
a} :: RegisterTaskDefinition)

-- | A list of volume definitions in JSON format that containers in your task
-- may use.
registerTaskDefinition_volumes :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Volume])
registerTaskDefinition_volumes :: (Maybe [Volume] -> f (Maybe [Volume]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_volumes = (RegisterTaskDefinition -> Maybe [Volume])
-> (RegisterTaskDefinition
    -> Maybe [Volume] -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe [Volume])
     (Maybe [Volume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Volume]
volumes :: Maybe [Volume]
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
volumes} -> Maybe [Volume]
volumes) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Volume]
a -> RegisterTaskDefinition
s {$sel:volumes:RegisterTaskDefinition' :: Maybe [Volume]
volumes = Maybe [Volume]
a} :: RegisterTaskDefinition) ((Maybe [Volume] -> f (Maybe [Volume]))
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Volume] -> f (Maybe [Volume]))
    -> Maybe [Volume] -> f (Maybe [Volume]))
-> (Maybe [Volume] -> f (Maybe [Volume]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Volume] [Volume] [Volume] [Volume]
-> Iso
     (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Volume] [Volume] [Volume] [Volume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of CPU units used by the task. It can be expressed as an
-- integer using CPU units, for example @1024@, or as a string using vCPUs,
-- for example @1 vCPU@ or @1 vcpu@, in a task definition. String values
-- are converted to an integer indicating the CPU units when the task
-- definition is registered.
--
-- Task-level CPU and memory parameters are ignored for Windows containers.
-- We recommend specifying container-level resources for Windows
-- containers.
--
-- If you are using the EC2 launch type, this field is optional. Supported
-- values are between @128@ CPU units (@0.125@ vCPUs) and @10240@ CPU units
-- (@10@ vCPUs).
--
-- 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
-- supported 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)
registerTaskDefinition_cpu :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_cpu :: (Maybe Text -> f (Maybe Text))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_cpu = (RegisterTaskDefinition -> Maybe Text)
-> (RegisterTaskDefinition -> Maybe Text -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe Text
cpu :: Maybe Text
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
cpu} -> Maybe Text
cpu) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe Text
a -> RegisterTaskDefinition
s {$sel:cpu:RegisterTaskDefinition' :: Maybe Text
cpu = Maybe Text
a} :: RegisterTaskDefinition)

-- | The metadata that you apply to the task definition to help you
-- categorize and organize them. Each tag consists of a key and an optional
-- value, both of which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
registerTaskDefinition_tags :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Tag])
registerTaskDefinition_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_tags = (RegisterTaskDefinition -> Maybe [Tag])
-> (RegisterTaskDefinition
    -> Maybe [Tag] -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe [Tag]
a -> RegisterTaskDefinition
s {$sel:tags:RegisterTaskDefinition' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RegisterTaskDefinition) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | You must specify a @family@ for a task definition, which allows you to
-- track multiple versions of the same task definition. The @family@ is
-- used as a name for your task definition. Up to 255 letters (uppercase
-- and lowercase), numbers, underscores, and hyphens are allowed.
registerTaskDefinition_family :: Lens.Lens' RegisterTaskDefinition Prelude.Text
registerTaskDefinition_family :: (Text -> f Text)
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_family = (RegisterTaskDefinition -> Text)
-> (RegisterTaskDefinition -> Text -> RegisterTaskDefinition)
-> Lens RegisterTaskDefinition RegisterTaskDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Text
family :: Text
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
family} -> Text
family) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Text
a -> RegisterTaskDefinition
s {$sel:family:RegisterTaskDefinition' :: Text
family = Text
a} :: RegisterTaskDefinition)

-- | A list of container definitions in JSON format that describe the
-- different containers that make up your task.
registerTaskDefinition_containerDefinitions :: Lens.Lens' RegisterTaskDefinition [ContainerDefinition]
registerTaskDefinition_containerDefinitions :: ([ContainerDefinition] -> f [ContainerDefinition])
-> RegisterTaskDefinition -> f RegisterTaskDefinition
registerTaskDefinition_containerDefinitions = (RegisterTaskDefinition -> [ContainerDefinition])
-> (RegisterTaskDefinition
    -> [ContainerDefinition] -> RegisterTaskDefinition)
-> Lens
     RegisterTaskDefinition
     RegisterTaskDefinition
     [ContainerDefinition]
     [ContainerDefinition]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {[ContainerDefinition]
containerDefinitions :: [ContainerDefinition]
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
containerDefinitions} -> [ContainerDefinition]
containerDefinitions) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} [ContainerDefinition]
a -> RegisterTaskDefinition
s {$sel:containerDefinitions:RegisterTaskDefinition' :: [ContainerDefinition]
containerDefinitions = [ContainerDefinition]
a} :: RegisterTaskDefinition) (([ContainerDefinition] -> f [ContainerDefinition])
 -> RegisterTaskDefinition -> f RegisterTaskDefinition)
-> (([ContainerDefinition] -> f [ContainerDefinition])
    -> [ContainerDefinition] -> f [ContainerDefinition])
-> ([ContainerDefinition] -> f [ContainerDefinition])
-> RegisterTaskDefinition
-> f RegisterTaskDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ContainerDefinition] -> f [ContainerDefinition])
-> [ContainerDefinition] -> f [ContainerDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest RegisterTaskDefinition where
  type
    AWSResponse RegisterTaskDefinition =
      RegisterTaskDefinitionResponse
  request :: RegisterTaskDefinition -> Request RegisterTaskDefinition
request = Service -> RegisterTaskDefinition -> Request RegisterTaskDefinition
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy RegisterTaskDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RegisterTaskDefinition)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse RegisterTaskDefinition))
-> Logger
-> Service
-> Proxy RegisterTaskDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RegisterTaskDefinition)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe TaskDefinition
-> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse'
            (Maybe TaskDefinition
 -> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
-> Either String (Maybe TaskDefinition)
-> Either
     String (Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TaskDefinition)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"taskDefinition")
            Either
  String (Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> RegisterTaskDefinitionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> RegisterTaskDefinitionResponse)
-> Either String Int
-> Either String RegisterTaskDefinitionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RegisterTaskDefinition

instance Prelude.NFData RegisterTaskDefinition

instance Core.ToHeaders RegisterTaskDefinition where
  toHeaders :: RegisterTaskDefinition -> ResponseHeaders
toHeaders =
    ResponseHeaders -> RegisterTaskDefinition -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerServiceV20141113.RegisterTaskDefinition" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON RegisterTaskDefinition where
  toJSON :: RegisterTaskDefinition -> Value
toJSON RegisterTaskDefinition' {[ContainerDefinition]
Maybe [Compatibility]
Maybe [InferenceAccelerator]
Maybe [Tag]
Maybe [TaskDefinitionPlacementConstraint]
Maybe [Volume]
Maybe Text
Maybe EphemeralStorage
Maybe IpcMode
Maybe NetworkMode
Maybe PidMode
Maybe ProxyConfiguration
Text
containerDefinitions :: [ContainerDefinition]
family :: Text
tags :: Maybe [Tag]
cpu :: Maybe Text
volumes :: Maybe [Volume]
networkMode :: Maybe NetworkMode
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
taskRoleArn :: Maybe Text
proxyConfiguration :: Maybe ProxyConfiguration
memory :: Maybe Text
ipcMode :: Maybe IpcMode
pidMode :: Maybe PidMode
ephemeralStorage :: Maybe EphemeralStorage
requiresCompatibilities :: Maybe [Compatibility]
executionRoleArn :: Maybe Text
inferenceAccelerators :: Maybe [InferenceAccelerator]
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"inferenceAccelerators" Text -> [InferenceAccelerator] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([InferenceAccelerator] -> Pair)
-> Maybe [InferenceAccelerator] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InferenceAccelerator]
inferenceAccelerators,
            (Text
"executionRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
executionRoleArn,
            (Text
"requiresCompatibilities" Text -> [Compatibility] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([Compatibility] -> Pair) -> Maybe [Compatibility] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Compatibility]
requiresCompatibilities,
            (Text
"ephemeralStorage" Text -> EphemeralStorage -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (EphemeralStorage -> Pair) -> Maybe EphemeralStorage -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EphemeralStorage
ephemeralStorage,
            (Text
"pidMode" Text -> PidMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PidMode -> Pair) -> Maybe PidMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PidMode
pidMode,
            (Text
"ipcMode" Text -> IpcMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (IpcMode -> Pair) -> Maybe IpcMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IpcMode
ipcMode,
            (Text
"memory" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
memory,
            (Text
"proxyConfiguration" Text -> ProxyConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProxyConfiguration -> Pair)
-> Maybe ProxyConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProxyConfiguration
proxyConfiguration,
            (Text
"taskRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
taskRoleArn,
            (Text
"placementConstraints" Text -> [TaskDefinitionPlacementConstraint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([TaskDefinitionPlacementConstraint] -> Pair)
-> Maybe [TaskDefinitionPlacementConstraint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints,
            (Text
"networkMode" Text -> NetworkMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NetworkMode -> Pair) -> Maybe NetworkMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkMode
networkMode,
            (Text
"volumes" Text -> [Volume] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Volume] -> Pair) -> Maybe [Volume] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Volume]
volumes,
            (Text
"cpu" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cpu,
            (Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"family" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
family),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"containerDefinitions"
                  Text -> [ContainerDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [ContainerDefinition]
containerDefinitions
              )
          ]
      )

instance Core.ToPath RegisterTaskDefinition where
  toPath :: RegisterTaskDefinition -> ByteString
toPath = ByteString -> RegisterTaskDefinition -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery RegisterTaskDefinition where
  toQuery :: RegisterTaskDefinition -> QueryString
toQuery = QueryString -> RegisterTaskDefinition -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newRegisterTaskDefinitionResponse' smart constructor.
data RegisterTaskDefinitionResponse = RegisterTaskDefinitionResponse'
  { -- | The full description of the registered task definition.
    RegisterTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition :: Prelude.Maybe TaskDefinition,
    -- | The list of tags associated with the task definition.
    RegisterTaskDefinitionResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    RegisterTaskDefinitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
(RegisterTaskDefinitionResponse
 -> RegisterTaskDefinitionResponse -> Bool)
-> (RegisterTaskDefinitionResponse
    -> RegisterTaskDefinitionResponse -> Bool)
-> Eq RegisterTaskDefinitionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
$c/= :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
== :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
$c== :: RegisterTaskDefinitionResponse
-> RegisterTaskDefinitionResponse -> Bool
Prelude.Eq, ReadPrec [RegisterTaskDefinitionResponse]
ReadPrec RegisterTaskDefinitionResponse
Int -> ReadS RegisterTaskDefinitionResponse
ReadS [RegisterTaskDefinitionResponse]
(Int -> ReadS RegisterTaskDefinitionResponse)
-> ReadS [RegisterTaskDefinitionResponse]
-> ReadPrec RegisterTaskDefinitionResponse
-> ReadPrec [RegisterTaskDefinitionResponse]
-> Read RegisterTaskDefinitionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RegisterTaskDefinitionResponse]
$creadListPrec :: ReadPrec [RegisterTaskDefinitionResponse]
readPrec :: ReadPrec RegisterTaskDefinitionResponse
$creadPrec :: ReadPrec RegisterTaskDefinitionResponse
readList :: ReadS [RegisterTaskDefinitionResponse]
$creadList :: ReadS [RegisterTaskDefinitionResponse]
readsPrec :: Int -> ReadS RegisterTaskDefinitionResponse
$creadsPrec :: Int -> ReadS RegisterTaskDefinitionResponse
Prelude.Read, Int -> RegisterTaskDefinitionResponse -> ShowS
[RegisterTaskDefinitionResponse] -> ShowS
RegisterTaskDefinitionResponse -> String
(Int -> RegisterTaskDefinitionResponse -> ShowS)
-> (RegisterTaskDefinitionResponse -> String)
-> ([RegisterTaskDefinitionResponse] -> ShowS)
-> Show RegisterTaskDefinitionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RegisterTaskDefinitionResponse] -> ShowS
$cshowList :: [RegisterTaskDefinitionResponse] -> ShowS
show :: RegisterTaskDefinitionResponse -> String
$cshow :: RegisterTaskDefinitionResponse -> String
showsPrec :: Int -> RegisterTaskDefinitionResponse -> ShowS
$cshowsPrec :: Int -> RegisterTaskDefinitionResponse -> ShowS
Prelude.Show, (forall x.
 RegisterTaskDefinitionResponse
 -> Rep RegisterTaskDefinitionResponse x)
-> (forall x.
    Rep RegisterTaskDefinitionResponse x
    -> RegisterTaskDefinitionResponse)
-> Generic RegisterTaskDefinitionResponse
forall x.
Rep RegisterTaskDefinitionResponse x
-> RegisterTaskDefinitionResponse
forall x.
RegisterTaskDefinitionResponse
-> Rep RegisterTaskDefinitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RegisterTaskDefinitionResponse x
-> RegisterTaskDefinitionResponse
$cfrom :: forall x.
RegisterTaskDefinitionResponse
-> Rep RegisterTaskDefinitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'RegisterTaskDefinitionResponse' 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:
--
-- 'taskDefinition', 'registerTaskDefinitionResponse_taskDefinition' - The full description of the registered task definition.
--
-- 'tags', 'registerTaskDefinitionResponse_tags' - The list of tags associated with the task definition.
--
-- 'httpStatus', 'registerTaskDefinitionResponse_httpStatus' - The response's http status code.
newRegisterTaskDefinitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RegisterTaskDefinitionResponse
newRegisterTaskDefinitionResponse :: Int -> RegisterTaskDefinitionResponse
newRegisterTaskDefinitionResponse Int
pHttpStatus_ =
  RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
-> Maybe [Tag] -> Int -> RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse'
    { $sel:taskDefinition:RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition =
        Maybe TaskDefinition
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RegisterTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RegisterTaskDefinitionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The full description of the registered task definition.
registerTaskDefinitionResponse_taskDefinition :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe TaskDefinition)
registerTaskDefinitionResponse_taskDefinition :: (Maybe TaskDefinition -> f (Maybe TaskDefinition))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_taskDefinition = (RegisterTaskDefinitionResponse -> Maybe TaskDefinition)
-> (RegisterTaskDefinitionResponse
    -> Maybe TaskDefinition -> RegisterTaskDefinitionResponse)
-> Lens
     RegisterTaskDefinitionResponse
     RegisterTaskDefinitionResponse
     (Maybe TaskDefinition)
     (Maybe TaskDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Maybe TaskDefinition
taskDefinition :: Maybe TaskDefinition
$sel:taskDefinition:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe TaskDefinition
taskDefinition} -> Maybe TaskDefinition
taskDefinition) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Maybe TaskDefinition
a -> RegisterTaskDefinitionResponse
s {$sel:taskDefinition:RegisterTaskDefinitionResponse' :: Maybe TaskDefinition
taskDefinition = Maybe TaskDefinition
a} :: RegisterTaskDefinitionResponse)

-- | The list of tags associated with the task definition.
registerTaskDefinitionResponse_tags :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe [Tag])
registerTaskDefinitionResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_tags = (RegisterTaskDefinitionResponse -> Maybe [Tag])
-> (RegisterTaskDefinitionResponse
    -> Maybe [Tag] -> RegisterTaskDefinitionResponse)
-> Lens
     RegisterTaskDefinitionResponse
     RegisterTaskDefinitionResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Maybe [Tag]
a -> RegisterTaskDefinitionResponse
s {$sel:tags:RegisterTaskDefinitionResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RegisterTaskDefinitionResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> RegisterTaskDefinitionResponse
 -> f RegisterTaskDefinitionResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
registerTaskDefinitionResponse_httpStatus :: Lens.Lens' RegisterTaskDefinitionResponse Prelude.Int
registerTaskDefinitionResponse_httpStatus :: (Int -> f Int)
-> RegisterTaskDefinitionResponse
-> f RegisterTaskDefinitionResponse
registerTaskDefinitionResponse_httpStatus = (RegisterTaskDefinitionResponse -> Int)
-> (RegisterTaskDefinitionResponse
    -> Int -> RegisterTaskDefinitionResponse)
-> Lens
     RegisterTaskDefinitionResponse
     RegisterTaskDefinitionResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RegisterTaskDefinitionResponse
s@RegisterTaskDefinitionResponse' {} Int
a -> RegisterTaskDefinitionResponse
s {$sel:httpStatus:RegisterTaskDefinitionResponse' :: Int
httpStatus = Int
a} :: RegisterTaskDefinitionResponse)

instance
  Prelude.NFData
    RegisterTaskDefinitionResponse