{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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
-- that\'s 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_cpu,
    registerTaskDefinition_ephemeralStorage,
    registerTaskDefinition_executionRoleArn,
    registerTaskDefinition_inferenceAccelerators,
    registerTaskDefinition_ipcMode,
    registerTaskDefinition_memory,
    registerTaskDefinition_networkMode,
    registerTaskDefinition_pidMode,
    registerTaskDefinition_placementConstraints,
    registerTaskDefinition_proxyConfiguration,
    registerTaskDefinition_requiresCompatibilities,
    registerTaskDefinition_runtimePlatform,
    registerTaskDefinition_tags,
    registerTaskDefinition_taskRoleArn,
    registerTaskDefinition_volumes,
    registerTaskDefinition_family,
    registerTaskDefinition_containerDefinitions,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECS.Types
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 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\'re 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 do not specify a value, the parameter is ignored.
    --
    -- If you\'re 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:
    --
    -- The CPU units cannot be less than 1 vCPU when you use Windows containers
    -- on Fargate.
    --
    -- -   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: 4096 (4 GB) and 16384 (16
    --     GB) in increments of 1024 (1 GB)
    --
    -- -   4096 (4 vCPU) - Available @memory@ values: 8192 (8 GB) and 30720 (30
    --     GB) in increments of 1024 (1 GB)
    --
    -- -   8192 (8 vCPU) - Available @memory@ values: 16 GB and 60 GB in 4 GB
    --     increments
    --
    --     This option requires Linux platform @1.4.0@ or later.
    --
    -- -   16384 (16vCPU) - Available @memory@ values: 32GB and 120 GB in 8 GB
    --     increments
    --
    --     This option requires Linux platform @1.4.0@ or later.
    RegisterTaskDefinition -> Maybe Text
cpu :: Prelude.Maybe Prelude.Text,
    -- | 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 the
    -- following platform versions:
    --
    -- -   Linux platform version @1.4.0@ or later.
    RegisterTaskDefinition -> Maybe EphemeralStorage
ephemeralStorage :: Prelude.Maybe EphemeralStorage,
    -- | 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 Elastic Inference accelerators to use for the containers in the
    -- task.
    RegisterTaskDefinition -> Maybe [InferenceAccelerator]
inferenceAccelerators :: Prelude.Maybe [InferenceAccelerator],
    -- | 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. This determines your range of supported
    -- values for the @cpu@ parameter.
    --
    -- The CPU units cannot be less than 1 vCPU when you use Windows containers
    -- on Fargate.
    --
    -- -   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)
    --
    -- -   Between 16 GB and 60 GB in 4 GB increments - Available @cpu@ values:
    --     8192 (8 vCPU)
    --
    --     This option requires Linux platform @1.4.0@ or later.
    --
    -- -   Between 32GB and 120 GB in 8 GB increments - Available @cpu@ values:
    --     16384 (16 vCPU)
    --
    --     This option requires Linux platform @1.4.0@ or later.
    RegisterTaskDefinition -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
    -- | 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,
    -- | 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,
    -- | An array of placement constraint objects to use for the task. You can
    -- specify a maximum of 10 constraints for each task. This limit includes
    -- constraints in the task definition and those specified at runtime.
    RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
placementConstraints :: Prelude.Maybe [TaskDefinitionPlacementConstraint],
    -- | 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 use 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 task launch type that Amazon ECS validates 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 operating system that your tasks definitions run on. A platform
    -- family is specified only for tasks using the Fargate launch type.
    --
    -- When you specify a task definition in a service, this value must match
    -- the @runtimePlatform@ value of the service.
    RegisterTaskDefinition -> Maybe RuntimePlatform
runtimePlatform :: Prelude.Maybe RuntimePlatform,
    -- | 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. You define both of them.
    --
    -- 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],
    -- | 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,
    -- | A list of volume definitions in JSON format that containers in your task
    -- might use.
    RegisterTaskDefinition -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
    -- | You must specify a @family@ for a task definition. You can use it 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
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]
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
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. 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:
--
-- '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\'re 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 do not specify a value, the parameter is ignored.
--
-- If you\'re 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:
--
-- The CPU units cannot be less than 1 vCPU when you use Windows containers
-- on Fargate.
--
-- -   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: 4096 (4 GB) and 16384 (16
--     GB) in increments of 1024 (1 GB)
--
-- -   4096 (4 vCPU) - Available @memory@ values: 8192 (8 GB) and 30720 (30
--     GB) in increments of 1024 (1 GB)
--
-- -   8192 (8 vCPU) - Available @memory@ values: 16 GB and 60 GB in 4 GB
--     increments
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- -   16384 (16vCPU) - Available @memory@ values: 32GB and 120 GB in 8 GB
--     increments
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- '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 the
-- following platform versions:
--
-- -   Linux platform version @1.4.0@ or later.
--
-- '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/.
--
-- 'inferenceAccelerators', 'registerTaskDefinition_inferenceAccelerators' - The Elastic Inference accelerators to use for the containers in the
-- task.
--
-- '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. This determines your range of supported
-- values for the @cpu@ parameter.
--
-- The CPU units cannot be less than 1 vCPU when you use Windows containers
-- on Fargate.
--
-- -   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)
--
-- -   Between 16 GB and 60 GB in 4 GB increments - Available @cpu@ values:
--     8192 (8 vCPU)
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- -   Between 32GB and 120 GB in 8 GB increments - Available @cpu@ values:
--     16384 (16 vCPU)
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- '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/.
--
-- '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.
--
-- 'placementConstraints', 'registerTaskDefinition_placementConstraints' - An array of placement constraint objects to use for the task. You can
-- specify a maximum of 10 constraints for each task. This limit includes
-- constraints in the task definition and those specified at runtime.
--
-- '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 use 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/.
--
-- 'requiresCompatibilities', 'registerTaskDefinition_requiresCompatibilities' - The task launch type that Amazon ECS validates 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.
--
-- 'runtimePlatform', 'registerTaskDefinition_runtimePlatform' - The operating system that your tasks definitions run on. A platform
-- family is specified only for tasks using the Fargate launch type.
--
-- When you specify a task definition in a service, this value must match
-- the @runtimePlatform@ value of the service.
--
-- '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. You define both of them.
--
-- 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.
--
-- '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/.
--
-- 'volumes', 'registerTaskDefinition_volumes' - A list of volume definitions in JSON format that containers in your task
-- might use.
--
-- 'family', 'registerTaskDefinition_family' - You must specify a @family@ for a task definition. You can use it 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'
    { $sel:cpu:RegisterTaskDefinition' :: Maybe Text
cpu = forall a. Maybe a
Prelude.Nothing,
      $sel:ephemeralStorage:RegisterTaskDefinition' :: Maybe EphemeralStorage
ephemeralStorage = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:RegisterTaskDefinition' :: Maybe Text
executionRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:inferenceAccelerators:RegisterTaskDefinition' :: Maybe [InferenceAccelerator]
inferenceAccelerators = forall a. Maybe a
Prelude.Nothing,
      $sel:ipcMode:RegisterTaskDefinition' :: Maybe IpcMode
ipcMode = forall a. Maybe a
Prelude.Nothing,
      $sel:memory:RegisterTaskDefinition' :: Maybe Text
memory = forall a. Maybe a
Prelude.Nothing,
      $sel:networkMode:RegisterTaskDefinition' :: Maybe NetworkMode
networkMode = forall a. Maybe a
Prelude.Nothing,
      $sel:pidMode:RegisterTaskDefinition' :: Maybe PidMode
pidMode = forall a. Maybe a
Prelude.Nothing,
      $sel:placementConstraints:RegisterTaskDefinition' :: Maybe [TaskDefinitionPlacementConstraint]
placementConstraints = forall a. Maybe a
Prelude.Nothing,
      $sel:proxyConfiguration:RegisterTaskDefinition' :: Maybe ProxyConfiguration
proxyConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:requiresCompatibilities:RegisterTaskDefinition' :: Maybe [Compatibility]
requiresCompatibilities = forall a. Maybe a
Prelude.Nothing,
      $sel:runtimePlatform:RegisterTaskDefinition' :: Maybe RuntimePlatform
runtimePlatform = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RegisterTaskDefinition' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:taskRoleArn:RegisterTaskDefinition' :: Maybe Text
taskRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:volumes:RegisterTaskDefinition' :: Maybe [Volume]
volumes = forall a. Maybe a
Prelude.Nothing,
      $sel:family:RegisterTaskDefinition' :: Text
family = Text
pFamily_,
      $sel:containerDefinitions:RegisterTaskDefinition' :: [ContainerDefinition]
containerDefinitions = forall a. Monoid a => a
Prelude.mempty
    }

-- | 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\'re 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 do not specify a value, the parameter is ignored.
--
-- If you\'re 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:
--
-- The CPU units cannot be less than 1 vCPU when you use Windows containers
-- on Fargate.
--
-- -   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: 4096 (4 GB) and 16384 (16
--     GB) in increments of 1024 (1 GB)
--
-- -   4096 (4 vCPU) - Available @memory@ values: 8192 (8 GB) and 30720 (30
--     GB) in increments of 1024 (1 GB)
--
-- -   8192 (8 vCPU) - Available @memory@ values: 16 GB and 60 GB in 4 GB
--     increments
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- -   16384 (16vCPU) - Available @memory@ values: 32GB and 120 GB in 8 GB
--     increments
--
--     This option requires Linux platform @1.4.0@ or later.
registerTaskDefinition_cpu :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_cpu :: Lens' RegisterTaskDefinition (Maybe Text)
registerTaskDefinition_cpu = 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 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 the
-- following platform versions:
--
-- -   Linux platform version @1.4.0@ or later.
registerTaskDefinition_ephemeralStorage :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe EphemeralStorage)
registerTaskDefinition_ephemeralStorage :: Lens' RegisterTaskDefinition (Maybe EphemeralStorage)
registerTaskDefinition_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 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 :: Lens' RegisterTaskDefinition (Maybe Text)
registerTaskDefinition_executionRoleArn = 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 Elastic Inference accelerators to use for the containers in the
-- task.
registerTaskDefinition_inferenceAccelerators :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [InferenceAccelerator])
registerTaskDefinition_inferenceAccelerators :: Lens' RegisterTaskDefinition (Maybe [InferenceAccelerator])
registerTaskDefinition_inferenceAccelerators = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' RegisterTaskDefinition (Maybe IpcMode)
registerTaskDefinition_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. This determines your range of supported
-- values for the @cpu@ parameter.
--
-- The CPU units cannot be less than 1 vCPU when you use Windows containers
-- on Fargate.
--
-- -   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)
--
-- -   Between 16 GB and 60 GB in 4 GB increments - Available @cpu@ values:
--     8192 (8 vCPU)
--
--     This option requires Linux platform @1.4.0@ or later.
--
-- -   Between 32GB and 120 GB in 8 GB increments - Available @cpu@ values:
--     16384 (16 vCPU)
--
--     This option requires Linux platform @1.4.0@ or later.
registerTaskDefinition_memory :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe Prelude.Text)
registerTaskDefinition_memory :: Lens' RegisterTaskDefinition (Maybe Text)
registerTaskDefinition_memory = 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 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 :: Lens' RegisterTaskDefinition (Maybe NetworkMode)
registerTaskDefinition_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)

-- | 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 :: Lens' RegisterTaskDefinition (Maybe PidMode)
registerTaskDefinition_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)

-- | An array of placement constraint objects to use for the task. You can
-- specify a maximum of 10 constraints for each task. This limit includes
-- constraints in the task definition and those specified at runtime.
registerTaskDefinition_placementConstraints :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [TaskDefinitionPlacementConstraint])
registerTaskDefinition_placementConstraints :: Lens'
  RegisterTaskDefinition (Maybe [TaskDefinitionPlacementConstraint])
registerTaskDefinition_placementConstraints = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 use 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 :: Lens' RegisterTaskDefinition (Maybe ProxyConfiguration)
registerTaskDefinition_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 task launch type that Amazon ECS validates 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 :: Lens' RegisterTaskDefinition (Maybe [Compatibility])
registerTaskDefinition_requiresCompatibilities = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The operating system that your tasks definitions run on. A platform
-- family is specified only for tasks using the Fargate launch type.
--
-- When you specify a task definition in a service, this value must match
-- the @runtimePlatform@ value of the service.
registerTaskDefinition_runtimePlatform :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe RuntimePlatform)
registerTaskDefinition_runtimePlatform :: Lens' RegisterTaskDefinition (Maybe RuntimePlatform)
registerTaskDefinition_runtimePlatform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RegisterTaskDefinition' {Maybe RuntimePlatform
runtimePlatform :: Maybe RuntimePlatform
$sel:runtimePlatform:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe RuntimePlatform
runtimePlatform} -> Maybe RuntimePlatform
runtimePlatform) (\s :: RegisterTaskDefinition
s@RegisterTaskDefinition' {} Maybe RuntimePlatform
a -> RegisterTaskDefinition
s {$sel:runtimePlatform:RegisterTaskDefinition' :: Maybe RuntimePlatform
runtimePlatform = Maybe RuntimePlatform
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. You define both of them.
--
-- 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 :: Lens' RegisterTaskDefinition (Maybe [Tag])
registerTaskDefinition_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' RegisterTaskDefinition (Maybe Text)
registerTaskDefinition_taskRoleArn = 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)

-- | A list of volume definitions in JSON format that containers in your task
-- might use.
registerTaskDefinition_volumes :: Lens.Lens' RegisterTaskDefinition (Prelude.Maybe [Volume])
registerTaskDefinition_volumes :: Lens' RegisterTaskDefinition (Maybe [Volume])
registerTaskDefinition_volumes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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. You can use it 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 :: Lens' RegisterTaskDefinition Text
registerTaskDefinition_family = 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 :: Lens' RegisterTaskDefinition [ContainerDefinition]
registerTaskDefinition_containerDefinitions = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 :: (Service -> Service)
-> RegisterTaskDefinition -> Request RegisterTaskDefinition
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RegisterTaskDefinition
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse RegisterTaskDefinition)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Tag]
-> Maybe TaskDefinition -> Int -> RegisterTaskDefinitionResponse
RegisterTaskDefinitionResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"taskDefinition")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RegisterTaskDefinition where
  hashWithSalt :: Int -> RegisterTaskDefinition -> Int
hashWithSalt Int
_salt RegisterTaskDefinition' {[ContainerDefinition]
Maybe [Compatibility]
Maybe [InferenceAccelerator]
Maybe [Tag]
Maybe [TaskDefinitionPlacementConstraint]
Maybe [Volume]
Maybe Text
Maybe EphemeralStorage
Maybe IpcMode
Maybe NetworkMode
Maybe PidMode
Maybe ProxyConfiguration
Maybe RuntimePlatform
Text
containerDefinitions :: [ContainerDefinition]
family :: Text
volumes :: Maybe [Volume]
taskRoleArn :: Maybe Text
tags :: Maybe [Tag]
runtimePlatform :: Maybe RuntimePlatform
requiresCompatibilities :: Maybe [Compatibility]
proxyConfiguration :: Maybe ProxyConfiguration
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
pidMode :: Maybe PidMode
networkMode :: Maybe NetworkMode
memory :: Maybe Text
ipcMode :: Maybe IpcMode
inferenceAccelerators :: Maybe [InferenceAccelerator]
executionRoleArn :: Maybe Text
ephemeralStorage :: Maybe EphemeralStorage
cpu :: Maybe Text
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
$sel:runtimePlatform:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe RuntimePlatform
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cpu
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EphemeralStorage
ephemeralStorage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InferenceAccelerator]
inferenceAccelerators
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IpcMode
ipcMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
memory
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkMode
networkMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PidMode
pidMode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TaskDefinitionPlacementConstraint]
placementConstraints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProxyConfiguration
proxyConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Compatibility]
requiresCompatibilities
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RuntimePlatform
runtimePlatform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
taskRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Volume]
volumes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
family
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ContainerDefinition]
containerDefinitions

instance Prelude.NFData RegisterTaskDefinition where
  rnf :: RegisterTaskDefinition -> ()
rnf RegisterTaskDefinition' {[ContainerDefinition]
Maybe [Compatibility]
Maybe [InferenceAccelerator]
Maybe [Tag]
Maybe [TaskDefinitionPlacementConstraint]
Maybe [Volume]
Maybe Text
Maybe EphemeralStorage
Maybe IpcMode
Maybe NetworkMode
Maybe PidMode
Maybe ProxyConfiguration
Maybe RuntimePlatform
Text
containerDefinitions :: [ContainerDefinition]
family :: Text
volumes :: Maybe [Volume]
taskRoleArn :: Maybe Text
tags :: Maybe [Tag]
runtimePlatform :: Maybe RuntimePlatform
requiresCompatibilities :: Maybe [Compatibility]
proxyConfiguration :: Maybe ProxyConfiguration
placementConstraints :: Maybe [TaskDefinitionPlacementConstraint]
pidMode :: Maybe PidMode
networkMode :: Maybe NetworkMode
memory :: Maybe Text
ipcMode :: Maybe IpcMode
inferenceAccelerators :: Maybe [InferenceAccelerator]
executionRoleArn :: Maybe Text
ephemeralStorage :: Maybe EphemeralStorage
cpu :: Maybe Text
$sel:containerDefinitions:RegisterTaskDefinition' :: RegisterTaskDefinition -> [ContainerDefinition]
$sel:family:RegisterTaskDefinition' :: RegisterTaskDefinition -> Text
$sel:volumes:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Volume]
$sel:taskRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:tags:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Tag]
$sel:runtimePlatform:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe RuntimePlatform
$sel:requiresCompatibilities:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [Compatibility]
$sel:proxyConfiguration:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe ProxyConfiguration
$sel:placementConstraints:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [TaskDefinitionPlacementConstraint]
$sel:pidMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe PidMode
$sel:networkMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe NetworkMode
$sel:memory:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ipcMode:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe IpcMode
$sel:inferenceAccelerators:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe [InferenceAccelerator]
$sel:executionRoleArn:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
$sel:ephemeralStorage:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe EphemeralStorage
$sel:cpu:RegisterTaskDefinition' :: RegisterTaskDefinition -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cpu
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EphemeralStorage
ephemeralStorage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [InferenceAccelerator]
inferenceAccelerators
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IpcMode
ipcMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
memory
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkMode
networkMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PidMode
pidMode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TaskDefinitionPlacementConstraint]
placementConstraints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProxyConfiguration
proxyConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Compatibility]
requiresCompatibilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RuntimePlatform
runtimePlatform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Volume]
volumes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
family
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ContainerDefinition]
containerDefinitions

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

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

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

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

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

-- | The list of tags associated with the task definition.
registerTaskDefinitionResponse_tags :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe [Tag])
registerTaskDefinitionResponse_tags :: Lens' RegisterTaskDefinitionResponse (Maybe [Tag])
registerTaskDefinitionResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The full description of the registered task definition.
registerTaskDefinitionResponse_taskDefinition :: Lens.Lens' RegisterTaskDefinitionResponse (Prelude.Maybe TaskDefinition)
registerTaskDefinitionResponse_taskDefinition :: Lens' RegisterTaskDefinitionResponse (Maybe TaskDefinition)
registerTaskDefinitionResponse_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 response's http status code.
registerTaskDefinitionResponse_httpStatus :: Lens.Lens' RegisterTaskDefinitionResponse Prelude.Int
registerTaskDefinitionResponse_httpStatus :: Lens' RegisterTaskDefinitionResponse Int
registerTaskDefinitionResponse_httpStatus = 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
  where
  rnf :: RegisterTaskDefinitionResponse -> ()
rnf RegisterTaskDefinitionResponse' {Int
Maybe [Tag]
Maybe TaskDefinition
httpStatus :: Int
taskDefinition :: Maybe TaskDefinition
tags :: Maybe [Tag]
$sel:httpStatus:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Int
$sel:taskDefinition:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe TaskDefinition
$sel:tags:RegisterTaskDefinitionResponse' :: RegisterTaskDefinitionResponse -> Maybe [Tag]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TaskDefinition
taskDefinition
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus