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

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

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

import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.ContainerDependency
import Amazonka.ECS.Types.EnvironmentFile
import Amazonka.ECS.Types.FirelensConfiguration
import Amazonka.ECS.Types.HealthCheck
import Amazonka.ECS.Types.HostEntry
import Amazonka.ECS.Types.KeyValuePair
import Amazonka.ECS.Types.LinuxParameters
import Amazonka.ECS.Types.LogConfiguration
import Amazonka.ECS.Types.MountPoint
import Amazonka.ECS.Types.PortMapping
import Amazonka.ECS.Types.RepositoryCredentials
import Amazonka.ECS.Types.ResourceRequirement
import Amazonka.ECS.Types.Secret
import Amazonka.ECS.Types.SystemControl
import Amazonka.ECS.Types.Ulimit
import Amazonka.ECS.Types.VolumeFrom
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Container definitions are used in task definitions to describe the
-- different containers that are launched as part of a task.
--
-- /See:/ 'newContainerDefinition' smart constructor.
data ContainerDefinition = ContainerDefinition'
  { -- | The image used to start a container. This string is passed directly to
    -- the Docker daemon. Images in the Docker Hub registry are available by
    -- default. Other repositories are specified with either
    -- @ repository-url\/image:tag @ or @ repository-url\/image\@digest @. Up
    -- to 255 letters (uppercase and lowercase), numbers, hyphens, underscores,
    -- colons, periods, forward slashes, and number signs are allowed. This
    -- parameter maps to @Image@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @IMAGE@ parameter of
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- -   When a new task starts, the Amazon ECS container agent pulls the
    --     latest version of the specified image and tag for the container to
    --     use. However, subsequent updates to a repository image are not
    --     propagated to already running tasks.
    --
    -- -   Images in Amazon ECR repositories can be specified by either using
    --     the full @registry\/repository:tag@ or
    --     @registry\/repository\@digest@. For example,
    --     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>:latest@
    --     or
    --     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>\@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE@.
    --
    -- -   Images in official repositories on Docker Hub use a single name (for
    --     example, @ubuntu@ or @mongo@).
    --
    -- -   Images in other repositories on Docker Hub are qualified with an
    --     organization name (for example, @amazon\/amazon-ecs-agent@).
    --
    -- -   Images in other online repositories are qualified further by a
    --     domain name (for example, @quay.io\/assemblyline\/ubuntu@).
    ContainerDefinition -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The command that is passed to the container. This parameter maps to
    -- @Cmd@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @COMMAND@ parameter to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- For more information, see
    -- <https://docs.docker.com/engine/reference/builder/#cmd>. If there are
    -- multiple arguments, each argument should be a separated string in the
    -- array.
    ContainerDefinition -> Maybe [Text]
command :: Prelude.Maybe [Prelude.Text],
    -- | The hostname to use for your container. This parameter maps to
    -- @Hostname@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--hostname@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- The @hostname@ parameter is not supported if you are using the @awsvpc@
    -- network mode.
    ContainerDefinition -> Maybe Text
hostname :: Prelude.Maybe Prelude.Text,
    -- | The private repository authentication credentials to use.
    ContainerDefinition -> Maybe RepositoryCredentials
repositoryCredentials :: Prelude.Maybe RepositoryCredentials,
    -- | A list of strings to provide custom labels for SELinux and AppArmor
    -- multi-level security systems. This field is not valid for containers in
    -- tasks using the Fargate launch type.
    --
    -- With Windows containers, this parameter can be used to reference a
    -- credential spec file when configuring a container for Active Directory
    -- authentication. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html Using gMSAs for Windows Containers>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- This parameter maps to @SecurityOpt@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--security-opt@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- The Amazon ECS container agent running on a container instance must
    -- register with the @ECS_SELINUX_CAPABLE=true@ or
    -- @ECS_APPARMOR_CAPABLE=true@ environment variables before containers
    -- placed on that instance can use these security options. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- For more information about valid values, see
    -- <https://docs.docker.com/engine/reference/run/#security-configuration Docker Run Security Configuration>.
    --
    -- Valid values: \"no-new-privileges\" | \"apparmor:PROFILE\" |
    -- \"label:value\" | \"credentialspec:CredentialSpecFilePath\"
    ContainerDefinition -> Maybe [Text]
dockerSecurityOptions :: Prelude.Maybe [Prelude.Text],
    -- | The container health check command and associated configuration
    -- parameters for the container. This parameter maps to @HealthCheck@ in
    -- the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @HEALTHCHECK@ parameter of
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe HealthCheck
healthCheck :: Prelude.Maybe HealthCheck,
    -- | When this parameter is true, networking is disabled within the
    -- container. This parameter maps to @NetworkDisabled@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API>.
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe Bool
disableNetworking :: Prelude.Maybe Prelude.Bool,
    -- | The secrets to pass to the container. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html Specifying Sensitive Data>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe [Secret]
secrets :: Prelude.Maybe [Secret],
    -- | Data volumes to mount from another container. This parameter maps to
    -- @VolumesFrom@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--volumes-from@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe [VolumeFrom]
volumesFrom :: Prelude.Maybe [VolumeFrom],
    -- | The environment variables to pass to a container. This parameter maps to
    -- @Env@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--env@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- We do not recommend using plaintext environment variables for sensitive
    -- information, such as credential data.
    ContainerDefinition -> Maybe [KeyValuePair]
environment :: Prelude.Maybe [KeyValuePair],
    -- | A list of files containing the environment variables to pass to a
    -- container. This parameter maps to the @--env-file@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- You can specify up to ten environment files. The file must have a @.env@
    -- file extension. Each line in an environment file should contain an
    -- environment variable in @VARIABLE=VALUE@ format. Lines beginning with
    -- @#@ are treated as comments and are ignored. For more information on the
    -- environment variable file syntax, see
    -- <https://docs.docker.com/compose/env-file/ Declare default environment variables in file>.
    --
    -- If there are environment variables specified using the @environment@
    -- parameter in a container definition, they take precedence over the
    -- variables contained within an environment file. If multiple environment
    -- files are specified that contain the same variable, they are processed
    -- from the top down. It is recommended to use unique variable names. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html Specifying Environment Variables>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe [EnvironmentFile]
environmentFiles :: Prelude.Maybe [EnvironmentFile],
    -- | Early versions of the Amazon ECS container agent do not properly handle
    -- @entryPoint@ parameters. If you have problems using @entryPoint@, update
    -- your container agent or enter your commands and arguments as @command@
    -- array items instead.
    --
    -- The entry point that is passed to the container. This parameter maps to
    -- @Entrypoint@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--entrypoint@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- For more information, see
    -- <https://docs.docker.com/engine/reference/builder/#entrypoint>.
    ContainerDefinition -> Maybe [Text]
entryPoint :: Prelude.Maybe [Prelude.Text],
    -- | The working directory in which to run commands inside the container.
    -- This parameter maps to @WorkingDir@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--workdir@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe Text
workingDirectory :: Prelude.Maybe Prelude.Text,
    -- | A list of @ulimits@ to set in the container. If a ulimit value is
    -- specified in a task definition, it will override the default values set
    -- by Docker. This parameter maps to @Ulimits@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--ulimit@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- Valid naming values are displayed in the Ulimit data type.
    --
    -- Amazon ECS tasks hosted on Fargate use the default resource limit values
    -- set by the operating system with the exception of the @nofile@ resource
    -- limit parameter which Fargate overrides. The @nofile@ resource limit
    -- sets a restriction on the number of open files that a container can use.
    -- The default @nofile@ soft limit is @1024@ and hard limit is @4096@.
    --
    -- This parameter requires version 1.18 of the Docker Remote API or greater
    -- on your container instance. To check the Docker Remote API version on
    -- your container instance, log in to your container instance and run the
    -- following command:
    -- @sudo docker version --format \'{{.Server.APIVersion}}\'@
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe [Ulimit]
ulimits :: Prelude.Maybe [Ulimit],
    -- | Time duration (in seconds) to wait before the container is forcefully
    -- killed if it doesn\'t exit normally on its own.
    --
    -- For tasks using the Fargate launch type, the task or service requires
    -- platform version 1.3.0 or later. The max stop timeout value is 120
    -- seconds and if the parameter is not specified, the default value of 30
    -- seconds is used.
    --
    -- For tasks using the EC2 launch type, if the @stopTimeout@ parameter is
    -- not specified, the value set for the Amazon ECS container agent
    -- configuration variable @ECS_CONTAINER_STOP_TIMEOUT@ is used by default.
    -- If neither the @stopTimeout@ parameter or the
    -- @ECS_CONTAINER_STOP_TIMEOUT@ agent configuration variable are set, then
    -- the default values of 30 seconds for Linux containers and 30 seconds on
    -- Windows containers are used. Your container instances require at least
    -- version 1.26.0 of the container agent to enable a container stop timeout
    -- value. However, we recommend using the latest container agent version.
    -- For information about checking your agent version and updating to the
    -- latest version, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
    -- in the /Amazon Elastic Container Service Developer Guide/. If you are
    -- using an Amazon ECS-optimized Linux AMI, your instance needs at least
    -- version 1.26.0-1 of the @ecs-init@ package. If your container instances
    -- are launched from version @20190301@ or later, then they contain the
    -- required versions of the container agent and @ecs-init@. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe Int
stopTimeout :: Prelude.Maybe Prelude.Int,
    -- | When this parameter is true, the container is given elevated privileges
    -- on the host container instance (similar to the @root@ user). This
    -- parameter maps to @Privileged@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--privileged@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers or tasks run on
    -- Fargate.
    ContainerDefinition -> Maybe Bool
privileged :: Prelude.Maybe Prelude.Bool,
    -- | The list of port mappings for the container. Port mappings allow
    -- containers to access ports on the host container instance to send or
    -- receive traffic.
    --
    -- For task definitions that use the @awsvpc@ network mode, you should only
    -- specify the @containerPort@. The @hostPort@ can be left blank or it must
    -- be the same value as the @containerPort@.
    --
    -- Port mappings on Windows use the @NetNAT@ gateway address rather than
    -- @localhost@. There is no loopback for port mappings on Windows, so you
    -- cannot access a container\'s mapped port from the host itself.
    --
    -- This parameter maps to @PortBindings@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--publish@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- If the network mode of a task definition is set to @none@, then you
    -- can\'t specify port mappings. If the network mode of a task definition
    -- is set to @host@, then host ports must either be undefined or they must
    -- match the container port in the port mapping.
    --
    -- After a task reaches the @RUNNING@ status, manual and automatic host and
    -- container port assignments are visible in the __Network Bindings__
    -- section of a container description for a selected task in the Amazon ECS
    -- console. The assignments are also visible in the @networkBindings@
    -- section DescribeTasks responses.
    ContainerDefinition -> Maybe [PortMapping]
portMappings :: Prelude.Maybe [PortMapping],
    -- | The type and amount of a resource to assign to a container. The only
    -- supported resource is a GPU.
    ContainerDefinition -> Maybe [ResourceRequirement]
resourceRequirements :: Prelude.Maybe [ResourceRequirement],
    -- | A key\/value map of labels to add to the container. This parameter maps
    -- to @Labels@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--label@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- This parameter requires version 1.18 of the Docker Remote API or greater
    -- on your container instance. To check the Docker Remote API version on
    -- your container instance, log in to your container instance and run the
    -- following command:
    -- @sudo docker version --format \'{{.Server.APIVersion}}\'@
    ContainerDefinition -> Maybe (HashMap Text Text)
dockerLabels :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of hostnames and IP address mappings to append to the
    -- @\/etc\/hosts@ file on the container. This parameter maps to
    -- @ExtraHosts@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--add-host@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers or tasks that use
    -- the @awsvpc@ network mode.
    ContainerDefinition -> Maybe [HostEntry]
extraHosts :: Prelude.Maybe [HostEntry],
    -- | The amount (in MiB) of memory to present to the container. If your
    -- container attempts to exceed the memory specified here, the container is
    -- killed. The total amount of memory reserved for all containers within a
    -- task must be lower than the task @memory@ value, if one is specified.
    -- This parameter maps to @Memory@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--memory@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- If using the Fargate launch type, this parameter is optional.
    --
    -- If using the EC2 launch type, you must specify either a task-level
    -- memory value or a container-level memory value. If you specify both a
    -- container-level @memory@ and @memoryReservation@ value, @memory@ must be
    -- greater than @memoryReservation@. If you specify @memoryReservation@,
    -- then that value is subtracted from the available memory resources for
    -- the container instance on which the container is placed. Otherwise, the
    -- value of @memory@ is used.
    --
    -- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
    -- so you should not specify fewer than 4 MiB of memory for your
    -- containers.
    ContainerDefinition -> Maybe Int
memory :: Prelude.Maybe Prelude.Int,
    -- | A list of namespaced kernel parameters to set in the container. This
    -- parameter maps to @Sysctls@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--sysctl@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- It is not recommended that you specify network-related @systemControls@
    -- parameters for multiple containers in a single task that also uses
    -- either the @awsvpc@ or @host@ network modes. For tasks that use the
    -- @awsvpc@ network mode, the container that is started last determines
    -- which @systemControls@ parameters take effect. For tasks that use the
    -- @host@ network mode, it changes the container instance\'s namespaced
    -- kernel parameters as well as the containers.
    ContainerDefinition -> Maybe [SystemControl]
systemControls :: Prelude.Maybe [SystemControl],
    -- | The user to use inside the container. This parameter maps to @User@ in
    -- the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--user@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- When running tasks 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.
    --
    -- You can specify the @user@ using the following formats. If specifying a
    -- UID or GID, you must specify it as a positive integer.
    --
    -- -   @user@
    --
    -- -   @user:group@
    --
    -- -   @uid@
    --
    -- -   @uid:gid@
    --
    -- -   @user:gid@
    --
    -- -   @uid:group@
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe Text
user :: Prelude.Maybe Prelude.Text,
    -- | The FireLens configuration for the container. This is used to specify
    -- and configure a log router for container logs. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html Custom Log Routing>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe FirelensConfiguration
firelensConfiguration :: Prelude.Maybe FirelensConfiguration,
    -- | A list of DNS search domains that are presented to the container. This
    -- parameter maps to @DnsSearch@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--dns-search@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe [Text]
dnsSearchDomains :: Prelude.Maybe [Prelude.Text],
    -- | The log configuration specification for the container.
    --
    -- This parameter maps to @LogConfig@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--log-driver@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    -- By default, containers use the same logging driver that the Docker
    -- daemon uses. However the container may use a different logging driver
    -- than the Docker daemon by specifying a log driver with this parameter in
    -- the container definition. To use a different logging driver for a
    -- container, the log system must be configured properly on the container
    -- instance (or on a different log server for remote logging options). For
    -- more information on the options for different supported log drivers, see
    -- <https://docs.docker.com/engine/admin/logging/overview/ Configure logging drivers>
    -- in the Docker documentation.
    --
    -- Amazon ECS currently supports a subset of the logging drivers available
    -- to the Docker daemon (shown in the LogConfiguration data type).
    -- Additional log drivers may be available in future releases of the Amazon
    -- ECS container agent.
    --
    -- This parameter requires version 1.18 of the Docker Remote API or greater
    -- on your container instance. To check the Docker Remote API version on
    -- your container instance, log in to your container instance and run the
    -- following command:
    -- @sudo docker version --format \'{{.Server.APIVersion}}\'@
    --
    -- The Amazon ECS container agent running on a container instance must
    -- register the logging drivers available on that instance with the
    -- @ECS_AVAILABLE_LOGGING_DRIVERS@ environment variable before containers
    -- placed on that instance can use these log configuration options. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe LogConfiguration
logConfiguration :: Prelude.Maybe LogConfiguration,
    -- | Linux-specific modifications that are applied to the container, such as
    -- Linux kernel capabilities. For more information see KernelCapabilities.
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe LinuxParameters
linuxParameters :: Prelude.Maybe LinuxParameters,
    -- | When this parameter is @true@, a TTY is allocated. This parameter maps
    -- to @Tty@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--tty@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe Bool
pseudoTerminal :: Prelude.Maybe Prelude.Bool,
    -- | The dependencies defined for container startup and shutdown. A container
    -- can contain multiple dependencies. When a dependency is defined for
    -- container startup, for container shutdown it is reversed.
    --
    -- For tasks using the EC2 launch type, the container instances require at
    -- least version 1.26.0 of the container agent to enable container
    -- dependencies. However, we recommend using the latest container agent
    -- version. For information about checking your agent version and updating
    -- to the latest version, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
    -- in the /Amazon Elastic Container Service Developer Guide/. If you are
    -- using an Amazon ECS-optimized Linux AMI, your instance needs at least
    -- version 1.26.0-1 of the @ecs-init@ package. If your container instances
    -- are launched from version @20190301@ or later, then they contain the
    -- required versions of the container agent and @ecs-init@. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- For tasks using the Fargate launch type, the task or service requires
    -- platform version @1.3.0@ or later.
    ContainerDefinition -> Maybe [ContainerDependency]
dependsOn :: Prelude.Maybe [ContainerDependency],
    -- | The name of a container. If you are linking multiple containers together
    -- in a task definition, the @name@ of one container can be entered in the
    -- @links@ of another container to connect the containers. Up to 255
    -- letters (uppercase and lowercase), numbers, underscores, and hyphens are
    -- allowed. This parameter maps to @name@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--name@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A list of DNS servers that are presented to the container. This
    -- parameter maps to @Dns@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--dns@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe [Text]
dnsServers :: Prelude.Maybe [Prelude.Text],
    -- | The mount points for data volumes in your container.
    --
    -- This parameter maps to @Volumes@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--volume@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- Windows containers can mount whole directories on the same drive as
    -- @$env:ProgramData@. Windows containers cannot mount directories on a
    -- different drive, and mount point cannot be across drives.
    ContainerDefinition -> Maybe [MountPoint]
mountPoints :: Prelude.Maybe [MountPoint],
    -- | When this parameter is @true@, this allows you to deploy containerized
    -- applications that require @stdin@ or a @tty@ to be allocated. This
    -- parameter maps to @OpenStdin@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--interactive@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    ContainerDefinition -> Maybe Bool
interactive :: Prelude.Maybe Prelude.Bool,
    -- | Time duration (in seconds) to wait before giving up on resolving
    -- dependencies for a container. For example, you specify two containers in
    -- a task definition with containerA having a dependency on containerB
    -- reaching a @COMPLETE@, @SUCCESS@, or @HEALTHY@ status. If a
    -- @startTimeout@ value is specified for containerB and it does not reach
    -- the desired status within that time then containerA will give up and not
    -- start. This results in the task transitioning to a @STOPPED@ state.
    --
    -- When the @ECS_CONTAINER_START_TIMEOUT@ container agent configuration
    -- variable is used, it is enforced indendently from this start timeout
    -- value.
    --
    -- For tasks using the Fargate launch type, this parameter requires that
    -- the task or service uses platform version 1.3.0 or later.
    --
    -- For tasks using the EC2 launch type, your container instances require at
    -- least version @1.26.0@ of the container agent to enable a container
    -- start timeout value. However, we recommend using the latest container
    -- agent version. For information about checking your agent version and
    -- updating to the latest version, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
    -- in the /Amazon Elastic Container Service Developer Guide/. If you are
    -- using an Amazon ECS-optimized Linux AMI, your instance needs at least
    -- version @1.26.0-1@ of the @ecs-init@ package. If your container
    -- instances are launched from version @20190301@ or later, then they
    -- contain the required versions of the container agent and @ecs-init@. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe Int
startTimeout :: Prelude.Maybe Prelude.Int,
    -- | The @links@ parameter allows containers to communicate with each other
    -- without the need for port mappings. This parameter is only supported if
    -- the network mode of a task definition is @bridge@. The
    -- @name:internalName@ construct is analogous to @name:alias@ in Docker
    -- links. Up to 255 letters (uppercase and lowercase), numbers,
    -- underscores, and hyphens are allowed. For more information about linking
    -- Docker containers, go to
    -- <https://docs.docker.com/network/links/ Legacy container links> in the
    -- Docker documentation. This parameter maps to @Links@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--link@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers.
    --
    -- Containers that are collocated on a single container instance may be
    -- able to communicate with each other without requiring links or host port
    -- mappings. Network isolation is achieved on the container instance using
    -- security groups and VPC settings.
    ContainerDefinition -> Maybe [Text]
links :: Prelude.Maybe [Prelude.Text],
    -- | When this parameter is true, the container is given read-only access to
    -- its root file system. This parameter maps to @ReadonlyRootfs@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--read-only@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This parameter is not supported for Windows containers.
    ContainerDefinition -> Maybe Bool
readonlyRootFilesystem :: Prelude.Maybe Prelude.Bool,
    -- | If the @essential@ parameter of a container is marked as @true@, and
    -- that container fails or stops for any reason, all other containers that
    -- are part of the task are stopped. If the @essential@ parameter of a
    -- container is marked as @false@, then its failure does not affect the
    -- rest of the containers in a task. If this parameter is omitted, a
    -- container is assumed to be essential.
    --
    -- All tasks must have at least one essential container. If you have an
    -- application that is composed of multiple containers, you should group
    -- containers that are used for a common purpose into components, and
    -- separate the different components into multiple task definitions. For
    -- more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html Application Architecture>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerDefinition -> Maybe Bool
essential :: Prelude.Maybe Prelude.Bool,
    -- | The number of @cpu@ units reserved for the container. This parameter
    -- maps to @CpuShares@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--cpu-shares@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- This field is optional for tasks using the Fargate launch type, and the
    -- only requirement is that the total amount of CPU reserved for all
    -- containers within a task be lower than the task-level @cpu@ value.
    --
    -- You can determine the number of CPU units that are available per EC2
    -- instance type by multiplying the vCPUs listed for that instance type on
    -- the <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instances>
    -- detail page by 1,024.
    --
    -- Linux containers share unallocated CPU units with other containers on
    -- the container instance with the same ratio as their allocated amount.
    -- For example, if you run a single-container task on a single-core
    -- instance type with 512 CPU units specified for that container, and that
    -- is the only task running on the container instance, that container could
    -- use the full 1,024 CPU unit share at any given time. However, if you
    -- launched another copy of the same task on that container instance, each
    -- task would be guaranteed a minimum of 512 CPU units when needed, and
    -- each container could float to higher CPU usage if the other container
    -- was not using it, but if both tasks were 100% active all of the time,
    -- they would be limited to 512 CPU units.
    --
    -- On Linux container instances, the Docker daemon on the container
    -- instance uses the CPU value to calculate the relative CPU share ratios
    -- for running containers. For more information, see
    -- <https://docs.docker.com/engine/reference/run/#cpu-share-constraint CPU share constraint>
    -- in the Docker documentation. The minimum valid CPU share value that the
    -- Linux kernel allows is 2. However, the CPU parameter is not required,
    -- and you can use CPU values below 2 in your container definitions. For
    -- CPU values below 2 (including null), the behavior varies based on your
    -- Amazon ECS container agent version:
    --
    -- -   __Agent versions less than or equal to 1.1.0:__ Null and zero CPU
    --     values are passed to Docker as 0, which Docker then converts to
    --     1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which
    --     the Linux kernel converts to two CPU shares.
    --
    -- -   __Agent versions greater than or equal to 1.2.0:__ Null, zero, and
    --     CPU values of 1 are passed to Docker as 2.
    --
    -- On Windows container instances, the CPU limit is enforced as an absolute
    -- limit, or a quota. Windows containers only have access to the specified
    -- amount of CPU that is described in the task definition. A null or zero
    -- CPU value is passed to Docker as @0@, which Windows interprets as 1% of
    -- one CPU.
    ContainerDefinition -> Maybe Int
cpu :: Prelude.Maybe Prelude.Int,
    -- | The soft limit (in MiB) of memory to reserve for the container. When
    -- system memory is under heavy contention, Docker attempts to keep the
    -- container memory to this soft limit. However, your container can consume
    -- more memory when it needs to, up to either the hard limit specified with
    -- the @memory@ parameter (if applicable), or all of the available memory
    -- on the container instance, whichever comes first. This parameter maps to
    -- @MemoryReservation@ in the
    -- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
    -- @--memory-reservation@ option to
    -- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
    --
    -- If a task-level memory value is not specified, you must specify a
    -- non-zero integer for one or both of @memory@ or @memoryReservation@ in a
    -- container definition. If you specify both, @memory@ must be greater than
    -- @memoryReservation@. If you specify @memoryReservation@, then that value
    -- is subtracted from the available memory resources for the container
    -- instance on which the container is placed. Otherwise, the value of
    -- @memory@ is used.
    --
    -- For example, if your container normally uses 128 MiB of memory, but
    -- occasionally bursts to 256 MiB of memory for short periods of time, you
    -- can set a @memoryReservation@ of 128 MiB, and a @memory@ hard limit of
    -- 300 MiB. This configuration would allow the container to only reserve
    -- 128 MiB of memory from the remaining resources on the container
    -- instance, but also allow the container to consume more memory resources
    -- when needed.
    --
    -- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
    -- so you should not specify fewer than 4 MiB of memory for your
    -- containers.
    ContainerDefinition -> Maybe Int
memoryReservation :: Prelude.Maybe Prelude.Int
  }
  deriving (ContainerDefinition -> ContainerDefinition -> Bool
(ContainerDefinition -> ContainerDefinition -> Bool)
-> (ContainerDefinition -> ContainerDefinition -> Bool)
-> Eq ContainerDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerDefinition -> ContainerDefinition -> Bool
$c/= :: ContainerDefinition -> ContainerDefinition -> Bool
== :: ContainerDefinition -> ContainerDefinition -> Bool
$c== :: ContainerDefinition -> ContainerDefinition -> Bool
Prelude.Eq, ReadPrec [ContainerDefinition]
ReadPrec ContainerDefinition
Int -> ReadS ContainerDefinition
ReadS [ContainerDefinition]
(Int -> ReadS ContainerDefinition)
-> ReadS [ContainerDefinition]
-> ReadPrec ContainerDefinition
-> ReadPrec [ContainerDefinition]
-> Read ContainerDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerDefinition]
$creadListPrec :: ReadPrec [ContainerDefinition]
readPrec :: ReadPrec ContainerDefinition
$creadPrec :: ReadPrec ContainerDefinition
readList :: ReadS [ContainerDefinition]
$creadList :: ReadS [ContainerDefinition]
readsPrec :: Int -> ReadS ContainerDefinition
$creadsPrec :: Int -> ReadS ContainerDefinition
Prelude.Read, Int -> ContainerDefinition -> ShowS
[ContainerDefinition] -> ShowS
ContainerDefinition -> String
(Int -> ContainerDefinition -> ShowS)
-> (ContainerDefinition -> String)
-> ([ContainerDefinition] -> ShowS)
-> Show ContainerDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerDefinition] -> ShowS
$cshowList :: [ContainerDefinition] -> ShowS
show :: ContainerDefinition -> String
$cshow :: ContainerDefinition -> String
showsPrec :: Int -> ContainerDefinition -> ShowS
$cshowsPrec :: Int -> ContainerDefinition -> ShowS
Prelude.Show, (forall x. ContainerDefinition -> Rep ContainerDefinition x)
-> (forall x. Rep ContainerDefinition x -> ContainerDefinition)
-> Generic ContainerDefinition
forall x. Rep ContainerDefinition x -> ContainerDefinition
forall x. ContainerDefinition -> Rep ContainerDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerDefinition x -> ContainerDefinition
$cfrom :: forall x. ContainerDefinition -> Rep ContainerDefinition x
Prelude.Generic)

-- |
-- Create a value of 'ContainerDefinition' 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:
--
-- 'image', 'containerDefinition_image' - The image used to start a container. This string is passed directly to
-- the Docker daemon. Images in the Docker Hub registry are available by
-- default. Other repositories are specified with either
-- @ repository-url\/image:tag @ or @ repository-url\/image\@digest @. Up
-- to 255 letters (uppercase and lowercase), numbers, hyphens, underscores,
-- colons, periods, forward slashes, and number signs are allowed. This
-- parameter maps to @Image@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @IMAGE@ parameter of
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- -   When a new task starts, the Amazon ECS container agent pulls the
--     latest version of the specified image and tag for the container to
--     use. However, subsequent updates to a repository image are not
--     propagated to already running tasks.
--
-- -   Images in Amazon ECR repositories can be specified by either using
--     the full @registry\/repository:tag@ or
--     @registry\/repository\@digest@. For example,
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>:latest@
--     or
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>\@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE@.
--
-- -   Images in official repositories on Docker Hub use a single name (for
--     example, @ubuntu@ or @mongo@).
--
-- -   Images in other repositories on Docker Hub are qualified with an
--     organization name (for example, @amazon\/amazon-ecs-agent@).
--
-- -   Images in other online repositories are qualified further by a
--     domain name (for example, @quay.io\/assemblyline\/ubuntu@).
--
-- 'command', 'containerDefinition_command' - The command that is passed to the container. This parameter maps to
-- @Cmd@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @COMMAND@ parameter to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- For more information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd>. If there are
-- multiple arguments, each argument should be a separated string in the
-- array.
--
-- 'hostname', 'containerDefinition_hostname' - The hostname to use for your container. This parameter maps to
-- @Hostname@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--hostname@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- The @hostname@ parameter is not supported if you are using the @awsvpc@
-- network mode.
--
-- 'repositoryCredentials', 'containerDefinition_repositoryCredentials' - The private repository authentication credentials to use.
--
-- 'dockerSecurityOptions', 'containerDefinition_dockerSecurityOptions' - A list of strings to provide custom labels for SELinux and AppArmor
-- multi-level security systems. This field is not valid for containers in
-- tasks using the Fargate launch type.
--
-- With Windows containers, this parameter can be used to reference a
-- credential spec file when configuring a container for Active Directory
-- authentication. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html Using gMSAs for Windows Containers>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- This parameter maps to @SecurityOpt@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--security-opt@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- The Amazon ECS container agent running on a container instance must
-- register with the @ECS_SELINUX_CAPABLE=true@ or
-- @ECS_APPARMOR_CAPABLE=true@ environment variables before containers
-- placed on that instance can use these security options. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- For more information about valid values, see
-- <https://docs.docker.com/engine/reference/run/#security-configuration Docker Run Security Configuration>.
--
-- Valid values: \"no-new-privileges\" | \"apparmor:PROFILE\" |
-- \"label:value\" | \"credentialspec:CredentialSpecFilePath\"
--
-- 'healthCheck', 'containerDefinition_healthCheck' - The container health check command and associated configuration
-- parameters for the container. This parameter maps to @HealthCheck@ in
-- the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @HEALTHCHECK@ parameter of
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'disableNetworking', 'containerDefinition_disableNetworking' - When this parameter is true, networking is disabled within the
-- container. This parameter maps to @NetworkDisabled@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API>.
--
-- This parameter is not supported for Windows containers.
--
-- 'secrets', 'containerDefinition_secrets' - The secrets to pass to the container. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html Specifying Sensitive Data>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'volumesFrom', 'containerDefinition_volumesFrom' - Data volumes to mount from another container. This parameter maps to
-- @VolumesFrom@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--volumes-from@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'environment', 'containerDefinition_environment' - The environment variables to pass to a container. This parameter maps to
-- @Env@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--env@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- We do not recommend using plaintext environment variables for sensitive
-- information, such as credential data.
--
-- 'environmentFiles', 'containerDefinition_environmentFiles' - A list of files containing the environment variables to pass to a
-- container. This parameter maps to the @--env-file@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- You can specify up to ten environment files. The file must have a @.env@
-- file extension. Each line in an environment file should contain an
-- environment variable in @VARIABLE=VALUE@ format. Lines beginning with
-- @#@ are treated as comments and are ignored. For more information on the
-- environment variable file syntax, see
-- <https://docs.docker.com/compose/env-file/ Declare default environment variables in file>.
--
-- If there are environment variables specified using the @environment@
-- parameter in a container definition, they take precedence over the
-- variables contained within an environment file. If multiple environment
-- files are specified that contain the same variable, they are processed
-- from the top down. It is recommended to use unique variable names. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html Specifying Environment Variables>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'entryPoint', 'containerDefinition_entryPoint' - Early versions of the Amazon ECS container agent do not properly handle
-- @entryPoint@ parameters. If you have problems using @entryPoint@, update
-- your container agent or enter your commands and arguments as @command@
-- array items instead.
--
-- The entry point that is passed to the container. This parameter maps to
-- @Entrypoint@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--entrypoint@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- For more information, see
-- <https://docs.docker.com/engine/reference/builder/#entrypoint>.
--
-- 'workingDirectory', 'containerDefinition_workingDirectory' - The working directory in which to run commands inside the container.
-- This parameter maps to @WorkingDir@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--workdir@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'ulimits', 'containerDefinition_ulimits' - A list of @ulimits@ to set in the container. If a ulimit value is
-- specified in a task definition, it will override the default values set
-- by Docker. This parameter maps to @Ulimits@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--ulimit@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- Valid naming values are displayed in the Ulimit data type.
--
-- Amazon ECS tasks hosted on Fargate use the default resource limit values
-- set by the operating system with the exception of the @nofile@ resource
-- limit parameter which Fargate overrides. The @nofile@ resource limit
-- sets a restriction on the number of open files that a container can use.
-- The default @nofile@ soft limit is @1024@ and hard limit is @4096@.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
--
-- This parameter is not supported for Windows containers.
--
-- 'stopTimeout', 'containerDefinition_stopTimeout' - Time duration (in seconds) to wait before the container is forcefully
-- killed if it doesn\'t exit normally on its own.
--
-- For tasks using the Fargate launch type, the task or service requires
-- platform version 1.3.0 or later. The max stop timeout value is 120
-- seconds and if the parameter is not specified, the default value of 30
-- seconds is used.
--
-- For tasks using the EC2 launch type, if the @stopTimeout@ parameter is
-- not specified, the value set for the Amazon ECS container agent
-- configuration variable @ECS_CONTAINER_STOP_TIMEOUT@ is used by default.
-- If neither the @stopTimeout@ parameter or the
-- @ECS_CONTAINER_STOP_TIMEOUT@ agent configuration variable are set, then
-- the default values of 30 seconds for Linux containers and 30 seconds on
-- Windows containers are used. Your container instances require at least
-- version 1.26.0 of the container agent to enable a container stop timeout
-- value. However, we recommend using the latest container agent version.
-- For information about checking your agent version and updating to the
-- latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version 1.26.0-1 of the @ecs-init@ package. If your container instances
-- are launched from version @20190301@ or later, then they contain the
-- required versions of the container agent and @ecs-init@. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'privileged', 'containerDefinition_privileged' - When this parameter is true, the container is given elevated privileges
-- on the host container instance (similar to the @root@ user). This
-- parameter maps to @Privileged@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--privileged@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
--
-- 'portMappings', 'containerDefinition_portMappings' - The list of port mappings for the container. Port mappings allow
-- containers to access ports on the host container instance to send or
-- receive traffic.
--
-- For task definitions that use the @awsvpc@ network mode, you should only
-- specify the @containerPort@. The @hostPort@ can be left blank or it must
-- be the same value as the @containerPort@.
--
-- Port mappings on Windows use the @NetNAT@ gateway address rather than
-- @localhost@. There is no loopback for port mappings on Windows, so you
-- cannot access a container\'s mapped port from the host itself.
--
-- This parameter maps to @PortBindings@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--publish@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- If the network mode of a task definition is set to @none@, then you
-- can\'t specify port mappings. If the network mode of a task definition
-- is set to @host@, then host ports must either be undefined or they must
-- match the container port in the port mapping.
--
-- After a task reaches the @RUNNING@ status, manual and automatic host and
-- container port assignments are visible in the __Network Bindings__
-- section of a container description for a selected task in the Amazon ECS
-- console. The assignments are also visible in the @networkBindings@
-- section DescribeTasks responses.
--
-- 'resourceRequirements', 'containerDefinition_resourceRequirements' - The type and amount of a resource to assign to a container. The only
-- supported resource is a GPU.
--
-- 'dockerLabels', 'containerDefinition_dockerLabels' - A key\/value map of labels to add to the container. This parameter maps
-- to @Labels@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--label@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
--
-- 'extraHosts', 'containerDefinition_extraHosts' - A list of hostnames and IP address mappings to append to the
-- @\/etc\/hosts@ file on the container. This parameter maps to
-- @ExtraHosts@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--add-host@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers or tasks that use
-- the @awsvpc@ network mode.
--
-- 'memory', 'containerDefinition_memory' - The amount (in MiB) of memory to present to the container. If your
-- container attempts to exceed the memory specified here, the container is
-- killed. The total amount of memory reserved for all containers within a
-- task must be lower than the task @memory@ value, if one is specified.
-- This parameter maps to @Memory@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--memory@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- If using the Fargate launch type, this parameter is optional.
--
-- If using the EC2 launch type, you must specify either a task-level
-- memory value or a container-level memory value. If you specify both a
-- container-level @memory@ and @memoryReservation@ value, @memory@ must be
-- greater than @memoryReservation@. If you specify @memoryReservation@,
-- then that value is subtracted from the available memory resources for
-- the container instance on which the container is placed. Otherwise, the
-- value of @memory@ is used.
--
-- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
-- so you should not specify fewer than 4 MiB of memory for your
-- containers.
--
-- 'systemControls', 'containerDefinition_systemControls' - A list of namespaced kernel parameters to set in the container. This
-- parameter maps to @Sysctls@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--sysctl@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- It is not recommended that you specify network-related @systemControls@
-- parameters for multiple containers in a single task that also uses
-- either the @awsvpc@ or @host@ network modes. For tasks that use the
-- @awsvpc@ network mode, the container that is started last determines
-- which @systemControls@ parameters take effect. For tasks that use the
-- @host@ network mode, it changes the container instance\'s namespaced
-- kernel parameters as well as the containers.
--
-- 'user', 'containerDefinition_user' - The user to use inside the container. This parameter maps to @User@ in
-- the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--user@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- When running tasks 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.
--
-- You can specify the @user@ using the following formats. If specifying a
-- UID or GID, you must specify it as a positive integer.
--
-- -   @user@
--
-- -   @user:group@
--
-- -   @uid@
--
-- -   @uid:gid@
--
-- -   @user:gid@
--
-- -   @uid:group@
--
-- This parameter is not supported for Windows containers.
--
-- 'firelensConfiguration', 'containerDefinition_firelensConfiguration' - The FireLens configuration for the container. This is used to specify
-- and configure a log router for container logs. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html Custom Log Routing>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'dnsSearchDomains', 'containerDefinition_dnsSearchDomains' - A list of DNS search domains that are presented to the container. This
-- parameter maps to @DnsSearch@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--dns-search@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
--
-- 'logConfiguration', 'containerDefinition_logConfiguration' - The log configuration specification for the container.
--
-- This parameter maps to @LogConfig@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--log-driver@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- By default, containers use the same logging driver that the Docker
-- daemon uses. However the container may use a different logging driver
-- than the Docker daemon by specifying a log driver with this parameter in
-- the container definition. To use a different logging driver for a
-- container, the log system must be configured properly on the container
-- instance (or on a different log server for remote logging options). For
-- more information on the options for different supported log drivers, see
-- <https://docs.docker.com/engine/admin/logging/overview/ Configure logging drivers>
-- in the Docker documentation.
--
-- Amazon ECS currently supports a subset of the logging drivers available
-- to the Docker daemon (shown in the LogConfiguration data type).
-- Additional log drivers may be available in future releases of the Amazon
-- ECS container agent.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
--
-- The Amazon ECS container agent running on a container instance must
-- register the logging drivers available on that instance with the
-- @ECS_AVAILABLE_LOGGING_DRIVERS@ environment variable before containers
-- placed on that instance can use these log configuration options. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'linuxParameters', 'containerDefinition_linuxParameters' - Linux-specific modifications that are applied to the container, such as
-- Linux kernel capabilities. For more information see KernelCapabilities.
--
-- This parameter is not supported for Windows containers.
--
-- 'pseudoTerminal', 'containerDefinition_pseudoTerminal' - When this parameter is @true@, a TTY is allocated. This parameter maps
-- to @Tty@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--tty@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'dependsOn', 'containerDefinition_dependsOn' - The dependencies defined for container startup and shutdown. A container
-- can contain multiple dependencies. When a dependency is defined for
-- container startup, for container shutdown it is reversed.
--
-- For tasks using the EC2 launch type, the container instances require at
-- least version 1.26.0 of the container agent to enable container
-- dependencies. However, we recommend using the latest container agent
-- version. For information about checking your agent version and updating
-- to the latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version 1.26.0-1 of the @ecs-init@ package. If your container instances
-- are launched from version @20190301@ or later, then they contain the
-- required versions of the container agent and @ecs-init@. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- For tasks using the Fargate launch type, the task or service requires
-- platform version @1.3.0@ or later.
--
-- 'name', 'containerDefinition_name' - The name of a container. If you are linking multiple containers together
-- in a task definition, the @name@ of one container can be entered in the
-- @links@ of another container to connect the containers. Up to 255
-- letters (uppercase and lowercase), numbers, underscores, and hyphens are
-- allowed. This parameter maps to @name@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--name@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'dnsServers', 'containerDefinition_dnsServers' - A list of DNS servers that are presented to the container. This
-- parameter maps to @Dns@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--dns@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
--
-- 'mountPoints', 'containerDefinition_mountPoints' - The mount points for data volumes in your container.
--
-- This parameter maps to @Volumes@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--volume@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- Windows containers can mount whole directories on the same drive as
-- @$env:ProgramData@. Windows containers cannot mount directories on a
-- different drive, and mount point cannot be across drives.
--
-- 'interactive', 'containerDefinition_interactive' - When this parameter is @true@, this allows you to deploy containerized
-- applications that require @stdin@ or a @tty@ to be allocated. This
-- parameter maps to @OpenStdin@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--interactive@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- 'startTimeout', 'containerDefinition_startTimeout' - Time duration (in seconds) to wait before giving up on resolving
-- dependencies for a container. For example, you specify two containers in
-- a task definition with containerA having a dependency on containerB
-- reaching a @COMPLETE@, @SUCCESS@, or @HEALTHY@ status. If a
-- @startTimeout@ value is specified for containerB and it does not reach
-- the desired status within that time then containerA will give up and not
-- start. This results in the task transitioning to a @STOPPED@ state.
--
-- When the @ECS_CONTAINER_START_TIMEOUT@ container agent configuration
-- variable is used, it is enforced indendently from this start timeout
-- value.
--
-- For tasks using the Fargate launch type, this parameter requires that
-- the task or service uses platform version 1.3.0 or later.
--
-- For tasks using the EC2 launch type, your container instances require at
-- least version @1.26.0@ of the container agent to enable a container
-- start timeout value. However, we recommend using the latest container
-- agent version. For information about checking your agent version and
-- updating to the latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version @1.26.0-1@ of the @ecs-init@ package. If your container
-- instances are launched from version @20190301@ or later, then they
-- contain the required versions of the container agent and @ecs-init@. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'links', 'containerDefinition_links' - The @links@ parameter allows containers to communicate with each other
-- without the need for port mappings. This parameter is only supported if
-- the network mode of a task definition is @bridge@. The
-- @name:internalName@ construct is analogous to @name:alias@ in Docker
-- links. Up to 255 letters (uppercase and lowercase), numbers,
-- underscores, and hyphens are allowed. For more information about linking
-- Docker containers, go to
-- <https://docs.docker.com/network/links/ Legacy container links> in the
-- Docker documentation. This parameter maps to @Links@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--link@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
--
-- Containers that are collocated on a single container instance may be
-- able to communicate with each other without requiring links or host port
-- mappings. Network isolation is achieved on the container instance using
-- security groups and VPC settings.
--
-- 'readonlyRootFilesystem', 'containerDefinition_readonlyRootFilesystem' - When this parameter is true, the container is given read-only access to
-- its root file system. This parameter maps to @ReadonlyRootfs@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--read-only@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
--
-- 'essential', 'containerDefinition_essential' - If the @essential@ parameter of a container is marked as @true@, and
-- that container fails or stops for any reason, all other containers that
-- are part of the task are stopped. If the @essential@ parameter of a
-- container is marked as @false@, then its failure does not affect the
-- rest of the containers in a task. If this parameter is omitted, a
-- container is assumed to be essential.
--
-- All tasks must have at least one essential container. If you have an
-- application that is composed of multiple containers, you should group
-- containers that are used for a common purpose into components, and
-- separate the different components into multiple task definitions. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html Application Architecture>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'cpu', 'containerDefinition_cpu' - The number of @cpu@ units reserved for the container. This parameter
-- maps to @CpuShares@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--cpu-shares@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This field is optional for tasks using the Fargate launch type, and the
-- only requirement is that the total amount of CPU reserved for all
-- containers within a task be lower than the task-level @cpu@ value.
--
-- You can determine the number of CPU units that are available per EC2
-- instance type by multiplying the vCPUs listed for that instance type on
-- the <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instances>
-- detail page by 1,024.
--
-- Linux containers share unallocated CPU units with other containers on
-- the container instance with the same ratio as their allocated amount.
-- For example, if you run a single-container task on a single-core
-- instance type with 512 CPU units specified for that container, and that
-- is the only task running on the container instance, that container could
-- use the full 1,024 CPU unit share at any given time. However, if you
-- launched another copy of the same task on that container instance, each
-- task would be guaranteed a minimum of 512 CPU units when needed, and
-- each container could float to higher CPU usage if the other container
-- was not using it, but if both tasks were 100% active all of the time,
-- they would be limited to 512 CPU units.
--
-- On Linux container instances, the Docker daemon on the container
-- instance uses the CPU value to calculate the relative CPU share ratios
-- for running containers. For more information, see
-- <https://docs.docker.com/engine/reference/run/#cpu-share-constraint CPU share constraint>
-- in the Docker documentation. The minimum valid CPU share value that the
-- Linux kernel allows is 2. However, the CPU parameter is not required,
-- and you can use CPU values below 2 in your container definitions. For
-- CPU values below 2 (including null), the behavior varies based on your
-- Amazon ECS container agent version:
--
-- -   __Agent versions less than or equal to 1.1.0:__ Null and zero CPU
--     values are passed to Docker as 0, which Docker then converts to
--     1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which
--     the Linux kernel converts to two CPU shares.
--
-- -   __Agent versions greater than or equal to 1.2.0:__ Null, zero, and
--     CPU values of 1 are passed to Docker as 2.
--
-- On Windows container instances, the CPU limit is enforced as an absolute
-- limit, or a quota. Windows containers only have access to the specified
-- amount of CPU that is described in the task definition. A null or zero
-- CPU value is passed to Docker as @0@, which Windows interprets as 1% of
-- one CPU.
--
-- 'memoryReservation', 'containerDefinition_memoryReservation' - The soft limit (in MiB) of memory to reserve for the container. When
-- system memory is under heavy contention, Docker attempts to keep the
-- container memory to this soft limit. However, your container can consume
-- more memory when it needs to, up to either the hard limit specified with
-- the @memory@ parameter (if applicable), or all of the available memory
-- on the container instance, whichever comes first. This parameter maps to
-- @MemoryReservation@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--memory-reservation@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- If a task-level memory value is not specified, you must specify a
-- non-zero integer for one or both of @memory@ or @memoryReservation@ in a
-- container definition. If you specify both, @memory@ must be greater than
-- @memoryReservation@. If you specify @memoryReservation@, then that value
-- is subtracted from the available memory resources for the container
-- instance on which the container is placed. Otherwise, the value of
-- @memory@ is used.
--
-- For example, if your container normally uses 128 MiB of memory, but
-- occasionally bursts to 256 MiB of memory for short periods of time, you
-- can set a @memoryReservation@ of 128 MiB, and a @memory@ hard limit of
-- 300 MiB. This configuration would allow the container to only reserve
-- 128 MiB of memory from the remaining resources on the container
-- instance, but also allow the container to consume more memory resources
-- when needed.
--
-- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
-- so you should not specify fewer than 4 MiB of memory for your
-- containers.
newContainerDefinition ::
  ContainerDefinition
newContainerDefinition :: ContainerDefinition
newContainerDefinition =
  ContainerDefinition' :: Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe RepositoryCredentials
-> Maybe [Text]
-> Maybe HealthCheck
-> Maybe Bool
-> Maybe [Secret]
-> Maybe [VolumeFrom]
-> Maybe [KeyValuePair]
-> Maybe [EnvironmentFile]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Ulimit]
-> Maybe Int
-> Maybe Bool
-> Maybe [PortMapping]
-> Maybe [ResourceRequirement]
-> Maybe (HashMap Text Text)
-> Maybe [HostEntry]
-> Maybe Int
-> Maybe [SystemControl]
-> Maybe Text
-> Maybe FirelensConfiguration
-> Maybe [Text]
-> Maybe LogConfiguration
-> Maybe LinuxParameters
-> Maybe Bool
-> Maybe [ContainerDependency]
-> Maybe Text
-> Maybe [Text]
-> Maybe [MountPoint]
-> Maybe Bool
-> Maybe Int
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> ContainerDefinition
ContainerDefinition'
    { $sel:image:ContainerDefinition' :: Maybe Text
image = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:command:ContainerDefinition' :: Maybe [Text]
command = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:hostname:ContainerDefinition' :: Maybe Text
hostname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:repositoryCredentials:ContainerDefinition' :: Maybe RepositoryCredentials
repositoryCredentials = Maybe RepositoryCredentials
forall a. Maybe a
Prelude.Nothing,
      $sel:dockerSecurityOptions:ContainerDefinition' :: Maybe [Text]
dockerSecurityOptions = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheck:ContainerDefinition' :: Maybe HealthCheck
healthCheck = Maybe HealthCheck
forall a. Maybe a
Prelude.Nothing,
      $sel:disableNetworking:ContainerDefinition' :: Maybe Bool
disableNetworking = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:secrets:ContainerDefinition' :: Maybe [Secret]
secrets = Maybe [Secret]
forall a. Maybe a
Prelude.Nothing,
      $sel:volumesFrom:ContainerDefinition' :: Maybe [VolumeFrom]
volumesFrom = Maybe [VolumeFrom]
forall a. Maybe a
Prelude.Nothing,
      $sel:environment:ContainerDefinition' :: Maybe [KeyValuePair]
environment = Maybe [KeyValuePair]
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentFiles:ContainerDefinition' :: Maybe [EnvironmentFile]
environmentFiles = Maybe [EnvironmentFile]
forall a. Maybe a
Prelude.Nothing,
      $sel:entryPoint:ContainerDefinition' :: Maybe [Text]
entryPoint = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:workingDirectory:ContainerDefinition' :: Maybe Text
workingDirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ulimits:ContainerDefinition' :: Maybe [Ulimit]
ulimits = Maybe [Ulimit]
forall a. Maybe a
Prelude.Nothing,
      $sel:stopTimeout:ContainerDefinition' :: Maybe Int
stopTimeout = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:privileged:ContainerDefinition' :: Maybe Bool
privileged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:portMappings:ContainerDefinition' :: Maybe [PortMapping]
portMappings = Maybe [PortMapping]
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceRequirements:ContainerDefinition' :: Maybe [ResourceRequirement]
resourceRequirements = Maybe [ResourceRequirement]
forall a. Maybe a
Prelude.Nothing,
      $sel:dockerLabels:ContainerDefinition' :: Maybe (HashMap Text Text)
dockerLabels = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:extraHosts:ContainerDefinition' :: Maybe [HostEntry]
extraHosts = Maybe [HostEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:memory:ContainerDefinition' :: Maybe Int
memory = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:systemControls:ContainerDefinition' :: Maybe [SystemControl]
systemControls = Maybe [SystemControl]
forall a. Maybe a
Prelude.Nothing,
      $sel:user:ContainerDefinition' :: Maybe Text
user = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:firelensConfiguration:ContainerDefinition' :: Maybe FirelensConfiguration
firelensConfiguration = Maybe FirelensConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:dnsSearchDomains:ContainerDefinition' :: Maybe [Text]
dnsSearchDomains = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:logConfiguration:ContainerDefinition' :: Maybe LogConfiguration
logConfiguration = Maybe LogConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:linuxParameters:ContainerDefinition' :: Maybe LinuxParameters
linuxParameters = Maybe LinuxParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:pseudoTerminal:ContainerDefinition' :: Maybe Bool
pseudoTerminal = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:dependsOn:ContainerDefinition' :: Maybe [ContainerDependency]
dependsOn = Maybe [ContainerDependency]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ContainerDefinition' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dnsServers:ContainerDefinition' :: Maybe [Text]
dnsServers = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:mountPoints:ContainerDefinition' :: Maybe [MountPoint]
mountPoints = Maybe [MountPoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:interactive:ContainerDefinition' :: Maybe Bool
interactive = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:startTimeout:ContainerDefinition' :: Maybe Int
startTimeout = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:links:ContainerDefinition' :: Maybe [Text]
links = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:readonlyRootFilesystem:ContainerDefinition' :: Maybe Bool
readonlyRootFilesystem = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:essential:ContainerDefinition' :: Maybe Bool
essential = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:ContainerDefinition' :: Maybe Int
cpu = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:memoryReservation:ContainerDefinition' :: Maybe Int
memoryReservation = Maybe Int
forall a. Maybe a
Prelude.Nothing
    }

-- | The image used to start a container. This string is passed directly to
-- the Docker daemon. Images in the Docker Hub registry are available by
-- default. Other repositories are specified with either
-- @ repository-url\/image:tag @ or @ repository-url\/image\@digest @. Up
-- to 255 letters (uppercase and lowercase), numbers, hyphens, underscores,
-- colons, periods, forward slashes, and number signs are allowed. This
-- parameter maps to @Image@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @IMAGE@ parameter of
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- -   When a new task starts, the Amazon ECS container agent pulls the
--     latest version of the specified image and tag for the container to
--     use. However, subsequent updates to a repository image are not
--     propagated to already running tasks.
--
-- -   Images in Amazon ECR repositories can be specified by either using
--     the full @registry\/repository:tag@ or
--     @registry\/repository\@digest@. For example,
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>:latest@
--     or
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>\@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE@.
--
-- -   Images in official repositories on Docker Hub use a single name (for
--     example, @ubuntu@ or @mongo@).
--
-- -   Images in other repositories on Docker Hub are qualified with an
--     organization name (for example, @amazon\/amazon-ecs-agent@).
--
-- -   Images in other online repositories are qualified further by a
--     domain name (for example, @quay.io\/assemblyline\/ubuntu@).
containerDefinition_image :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Text)
containerDefinition_image :: (Maybe Text -> f (Maybe Text))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_image = (ContainerDefinition -> Maybe Text)
-> (ContainerDefinition -> Maybe Text -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Text
image :: Maybe Text
$sel:image:ContainerDefinition' :: ContainerDefinition -> Maybe Text
image} -> Maybe Text
image) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Text
a -> ContainerDefinition
s {$sel:image:ContainerDefinition' :: Maybe Text
image = Maybe Text
a} :: ContainerDefinition)

-- | The command that is passed to the container. This parameter maps to
-- @Cmd@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @COMMAND@ parameter to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- For more information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd>. If there are
-- multiple arguments, each argument should be a separated string in the
-- array.
containerDefinition_command :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_command :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_command = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
command :: Maybe [Text]
$sel:command:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
command} -> Maybe [Text]
command) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:command:ContainerDefinition' :: Maybe [Text]
command = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The hostname to use for your container. This parameter maps to
-- @Hostname@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--hostname@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- The @hostname@ parameter is not supported if you are using the @awsvpc@
-- network mode.
containerDefinition_hostname :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Text)
containerDefinition_hostname :: (Maybe Text -> f (Maybe Text))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_hostname = (ContainerDefinition -> Maybe Text)
-> (ContainerDefinition -> Maybe Text -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Text
hostname :: Maybe Text
$sel:hostname:ContainerDefinition' :: ContainerDefinition -> Maybe Text
hostname} -> Maybe Text
hostname) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Text
a -> ContainerDefinition
s {$sel:hostname:ContainerDefinition' :: Maybe Text
hostname = Maybe Text
a} :: ContainerDefinition)

-- | The private repository authentication credentials to use.
containerDefinition_repositoryCredentials :: Lens.Lens' ContainerDefinition (Prelude.Maybe RepositoryCredentials)
containerDefinition_repositoryCredentials :: (Maybe RepositoryCredentials -> f (Maybe RepositoryCredentials))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_repositoryCredentials = (ContainerDefinition -> Maybe RepositoryCredentials)
-> (ContainerDefinition
    -> Maybe RepositoryCredentials -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe RepositoryCredentials)
     (Maybe RepositoryCredentials)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe RepositoryCredentials
repositoryCredentials :: Maybe RepositoryCredentials
$sel:repositoryCredentials:ContainerDefinition' :: ContainerDefinition -> Maybe RepositoryCredentials
repositoryCredentials} -> Maybe RepositoryCredentials
repositoryCredentials) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe RepositoryCredentials
a -> ContainerDefinition
s {$sel:repositoryCredentials:ContainerDefinition' :: Maybe RepositoryCredentials
repositoryCredentials = Maybe RepositoryCredentials
a} :: ContainerDefinition)

-- | A list of strings to provide custom labels for SELinux and AppArmor
-- multi-level security systems. This field is not valid for containers in
-- tasks using the Fargate launch type.
--
-- With Windows containers, this parameter can be used to reference a
-- credential spec file when configuring a container for Active Directory
-- authentication. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html Using gMSAs for Windows Containers>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- This parameter maps to @SecurityOpt@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--security-opt@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- The Amazon ECS container agent running on a container instance must
-- register with the @ECS_SELINUX_CAPABLE=true@ or
-- @ECS_APPARMOR_CAPABLE=true@ environment variables before containers
-- placed on that instance can use these security options. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- For more information about valid values, see
-- <https://docs.docker.com/engine/reference/run/#security-configuration Docker Run Security Configuration>.
--
-- Valid values: \"no-new-privileges\" | \"apparmor:PROFILE\" |
-- \"label:value\" | \"credentialspec:CredentialSpecFilePath\"
containerDefinition_dockerSecurityOptions :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_dockerSecurityOptions :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_dockerSecurityOptions = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
dockerSecurityOptions :: Maybe [Text]
$sel:dockerSecurityOptions:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
dockerSecurityOptions} -> Maybe [Text]
dockerSecurityOptions) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:dockerSecurityOptions:ContainerDefinition' :: Maybe [Text]
dockerSecurityOptions = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The container health check command and associated configuration
-- parameters for the container. This parameter maps to @HealthCheck@ in
-- the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @HEALTHCHECK@ parameter of
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_healthCheck :: Lens.Lens' ContainerDefinition (Prelude.Maybe HealthCheck)
containerDefinition_healthCheck :: (Maybe HealthCheck -> f (Maybe HealthCheck))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_healthCheck = (ContainerDefinition -> Maybe HealthCheck)
-> (ContainerDefinition
    -> Maybe HealthCheck -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe HealthCheck)
     (Maybe HealthCheck)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe HealthCheck
healthCheck :: Maybe HealthCheck
$sel:healthCheck:ContainerDefinition' :: ContainerDefinition -> Maybe HealthCheck
healthCheck} -> Maybe HealthCheck
healthCheck) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe HealthCheck
a -> ContainerDefinition
s {$sel:healthCheck:ContainerDefinition' :: Maybe HealthCheck
healthCheck = Maybe HealthCheck
a} :: ContainerDefinition)

-- | When this parameter is true, networking is disabled within the
-- container. This parameter maps to @NetworkDisabled@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API>.
--
-- This parameter is not supported for Windows containers.
containerDefinition_disableNetworking :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_disableNetworking :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_disableNetworking = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
disableNetworking :: Maybe Bool
$sel:disableNetworking:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
disableNetworking} -> Maybe Bool
disableNetworking) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:disableNetworking:ContainerDefinition' :: Maybe Bool
disableNetworking = Maybe Bool
a} :: ContainerDefinition)

-- | The secrets to pass to the container. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html Specifying Sensitive Data>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_secrets :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Secret])
containerDefinition_secrets :: (Maybe [Secret] -> f (Maybe [Secret]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_secrets = (ContainerDefinition -> Maybe [Secret])
-> (ContainerDefinition -> Maybe [Secret] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Secret])
     (Maybe [Secret])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Secret]
secrets :: Maybe [Secret]
$sel:secrets:ContainerDefinition' :: ContainerDefinition -> Maybe [Secret]
secrets} -> Maybe [Secret]
secrets) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Secret]
a -> ContainerDefinition
s {$sel:secrets:ContainerDefinition' :: Maybe [Secret]
secrets = Maybe [Secret]
a} :: ContainerDefinition) ((Maybe [Secret] -> f (Maybe [Secret]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Secret] -> f (Maybe [Secret]))
    -> Maybe [Secret] -> f (Maybe [Secret]))
-> (Maybe [Secret] -> f (Maybe [Secret]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Secret] [Secret] [Secret] [Secret]
-> Iso
     (Maybe [Secret]) (Maybe [Secret]) (Maybe [Secret]) (Maybe [Secret])
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 [Secret] [Secret] [Secret] [Secret]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Data volumes to mount from another container. This parameter maps to
-- @VolumesFrom@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--volumes-from@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_volumesFrom :: Lens.Lens' ContainerDefinition (Prelude.Maybe [VolumeFrom])
containerDefinition_volumesFrom :: (Maybe [VolumeFrom] -> f (Maybe [VolumeFrom]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_volumesFrom = (ContainerDefinition -> Maybe [VolumeFrom])
-> (ContainerDefinition
    -> Maybe [VolumeFrom] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [VolumeFrom])
     (Maybe [VolumeFrom])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [VolumeFrom]
volumesFrom :: Maybe [VolumeFrom]
$sel:volumesFrom:ContainerDefinition' :: ContainerDefinition -> Maybe [VolumeFrom]
volumesFrom} -> Maybe [VolumeFrom]
volumesFrom) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [VolumeFrom]
a -> ContainerDefinition
s {$sel:volumesFrom:ContainerDefinition' :: Maybe [VolumeFrom]
volumesFrom = Maybe [VolumeFrom]
a} :: ContainerDefinition) ((Maybe [VolumeFrom] -> f (Maybe [VolumeFrom]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [VolumeFrom] -> f (Maybe [VolumeFrom]))
    -> Maybe [VolumeFrom] -> f (Maybe [VolumeFrom]))
-> (Maybe [VolumeFrom] -> f (Maybe [VolumeFrom]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [VolumeFrom] [VolumeFrom] [VolumeFrom] [VolumeFrom]
-> Iso
     (Maybe [VolumeFrom])
     (Maybe [VolumeFrom])
     (Maybe [VolumeFrom])
     (Maybe [VolumeFrom])
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 [VolumeFrom] [VolumeFrom] [VolumeFrom] [VolumeFrom]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The environment variables to pass to a container. This parameter maps to
-- @Env@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--env@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- We do not recommend using plaintext environment variables for sensitive
-- information, such as credential data.
containerDefinition_environment :: Lens.Lens' ContainerDefinition (Prelude.Maybe [KeyValuePair])
containerDefinition_environment :: (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_environment = (ContainerDefinition -> Maybe [KeyValuePair])
-> (ContainerDefinition
    -> Maybe [KeyValuePair] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [KeyValuePair]
environment :: Maybe [KeyValuePair]
$sel:environment:ContainerDefinition' :: ContainerDefinition -> Maybe [KeyValuePair]
environment} -> Maybe [KeyValuePair]
environment) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [KeyValuePair]
a -> ContainerDefinition
s {$sel:environment:ContainerDefinition' :: Maybe [KeyValuePair]
environment = Maybe [KeyValuePair]
a} :: ContainerDefinition) ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
    -> Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
-> Iso
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
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 [KeyValuePair] [KeyValuePair] [KeyValuePair] [KeyValuePair]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of files containing the environment variables to pass to a
-- container. This parameter maps to the @--env-file@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- You can specify up to ten environment files. The file must have a @.env@
-- file extension. Each line in an environment file should contain an
-- environment variable in @VARIABLE=VALUE@ format. Lines beginning with
-- @#@ are treated as comments and are ignored. For more information on the
-- environment variable file syntax, see
-- <https://docs.docker.com/compose/env-file/ Declare default environment variables in file>.
--
-- If there are environment variables specified using the @environment@
-- parameter in a container definition, they take precedence over the
-- variables contained within an environment file. If multiple environment
-- files are specified that contain the same variable, they are processed
-- from the top down. It is recommended to use unique variable names. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html Specifying Environment Variables>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_environmentFiles :: Lens.Lens' ContainerDefinition (Prelude.Maybe [EnvironmentFile])
containerDefinition_environmentFiles :: (Maybe [EnvironmentFile] -> f (Maybe [EnvironmentFile]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_environmentFiles = (ContainerDefinition -> Maybe [EnvironmentFile])
-> (ContainerDefinition
    -> Maybe [EnvironmentFile] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [EnvironmentFile])
     (Maybe [EnvironmentFile])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [EnvironmentFile]
environmentFiles :: Maybe [EnvironmentFile]
$sel:environmentFiles:ContainerDefinition' :: ContainerDefinition -> Maybe [EnvironmentFile]
environmentFiles} -> Maybe [EnvironmentFile]
environmentFiles) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [EnvironmentFile]
a -> ContainerDefinition
s {$sel:environmentFiles:ContainerDefinition' :: Maybe [EnvironmentFile]
environmentFiles = Maybe [EnvironmentFile]
a} :: ContainerDefinition) ((Maybe [EnvironmentFile] -> f (Maybe [EnvironmentFile]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [EnvironmentFile] -> f (Maybe [EnvironmentFile]))
    -> Maybe [EnvironmentFile] -> f (Maybe [EnvironmentFile]))
-> (Maybe [EnvironmentFile] -> f (Maybe [EnvironmentFile]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EnvironmentFile]
  [EnvironmentFile]
  [EnvironmentFile]
  [EnvironmentFile]
-> Iso
     (Maybe [EnvironmentFile])
     (Maybe [EnvironmentFile])
     (Maybe [EnvironmentFile])
     (Maybe [EnvironmentFile])
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
  [EnvironmentFile]
  [EnvironmentFile]
  [EnvironmentFile]
  [EnvironmentFile]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Early versions of the Amazon ECS container agent do not properly handle
-- @entryPoint@ parameters. If you have problems using @entryPoint@, update
-- your container agent or enter your commands and arguments as @command@
-- array items instead.
--
-- The entry point that is passed to the container. This parameter maps to
-- @Entrypoint@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--entrypoint@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- For more information, see
-- <https://docs.docker.com/engine/reference/builder/#entrypoint>.
containerDefinition_entryPoint :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_entryPoint :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_entryPoint = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
entryPoint :: Maybe [Text]
$sel:entryPoint:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
entryPoint} -> Maybe [Text]
entryPoint) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:entryPoint:ContainerDefinition' :: Maybe [Text]
entryPoint = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The working directory in which to run commands inside the container.
-- This parameter maps to @WorkingDir@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--workdir@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_workingDirectory :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Text)
containerDefinition_workingDirectory :: (Maybe Text -> f (Maybe Text))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_workingDirectory = (ContainerDefinition -> Maybe Text)
-> (ContainerDefinition -> Maybe Text -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Text
workingDirectory :: Maybe Text
$sel:workingDirectory:ContainerDefinition' :: ContainerDefinition -> Maybe Text
workingDirectory} -> Maybe Text
workingDirectory) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Text
a -> ContainerDefinition
s {$sel:workingDirectory:ContainerDefinition' :: Maybe Text
workingDirectory = Maybe Text
a} :: ContainerDefinition)

-- | A list of @ulimits@ to set in the container. If a ulimit value is
-- specified in a task definition, it will override the default values set
-- by Docker. This parameter maps to @Ulimits@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--ulimit@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- Valid naming values are displayed in the Ulimit data type.
--
-- Amazon ECS tasks hosted on Fargate use the default resource limit values
-- set by the operating system with the exception of the @nofile@ resource
-- limit parameter which Fargate overrides. The @nofile@ resource limit
-- sets a restriction on the number of open files that a container can use.
-- The default @nofile@ soft limit is @1024@ and hard limit is @4096@.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
--
-- This parameter is not supported for Windows containers.
containerDefinition_ulimits :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Ulimit])
containerDefinition_ulimits :: (Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_ulimits = (ContainerDefinition -> Maybe [Ulimit])
-> (ContainerDefinition -> Maybe [Ulimit] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Ulimit])
     (Maybe [Ulimit])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Ulimit]
ulimits :: Maybe [Ulimit]
$sel:ulimits:ContainerDefinition' :: ContainerDefinition -> Maybe [Ulimit]
ulimits} -> Maybe [Ulimit]
ulimits) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Ulimit]
a -> ContainerDefinition
s {$sel:ulimits:ContainerDefinition' :: Maybe [Ulimit]
ulimits = Maybe [Ulimit]
a} :: ContainerDefinition) ((Maybe [Ulimit] -> f (Maybe [Ulimit]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Ulimit] -> f (Maybe [Ulimit]))
    -> Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> (Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Ulimit] [Ulimit] [Ulimit] [Ulimit]
-> Iso
     (Maybe [Ulimit]) (Maybe [Ulimit]) (Maybe [Ulimit]) (Maybe [Ulimit])
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 [Ulimit] [Ulimit] [Ulimit] [Ulimit]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Time duration (in seconds) to wait before the container is forcefully
-- killed if it doesn\'t exit normally on its own.
--
-- For tasks using the Fargate launch type, the task or service requires
-- platform version 1.3.0 or later. The max stop timeout value is 120
-- seconds and if the parameter is not specified, the default value of 30
-- seconds is used.
--
-- For tasks using the EC2 launch type, if the @stopTimeout@ parameter is
-- not specified, the value set for the Amazon ECS container agent
-- configuration variable @ECS_CONTAINER_STOP_TIMEOUT@ is used by default.
-- If neither the @stopTimeout@ parameter or the
-- @ECS_CONTAINER_STOP_TIMEOUT@ agent configuration variable are set, then
-- the default values of 30 seconds for Linux containers and 30 seconds on
-- Windows containers are used. Your container instances require at least
-- version 1.26.0 of the container agent to enable a container stop timeout
-- value. However, we recommend using the latest container agent version.
-- For information about checking your agent version and updating to the
-- latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version 1.26.0-1 of the @ecs-init@ package. If your container instances
-- are launched from version @20190301@ or later, then they contain the
-- required versions of the container agent and @ecs-init@. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_stopTimeout :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Int)
containerDefinition_stopTimeout :: (Maybe Int -> f (Maybe Int))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_stopTimeout = (ContainerDefinition -> Maybe Int)
-> (ContainerDefinition -> Maybe Int -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Int
stopTimeout :: Maybe Int
$sel:stopTimeout:ContainerDefinition' :: ContainerDefinition -> Maybe Int
stopTimeout} -> Maybe Int
stopTimeout) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Int
a -> ContainerDefinition
s {$sel:stopTimeout:ContainerDefinition' :: Maybe Int
stopTimeout = Maybe Int
a} :: ContainerDefinition)

-- | When this parameter is true, the container is given elevated privileges
-- on the host container instance (similar to the @root@ user). This
-- parameter maps to @Privileged@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--privileged@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers or tasks run on
-- Fargate.
containerDefinition_privileged :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_privileged :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_privileged = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
privileged :: Maybe Bool
$sel:privileged:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
privileged} -> Maybe Bool
privileged) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:privileged:ContainerDefinition' :: Maybe Bool
privileged = Maybe Bool
a} :: ContainerDefinition)

-- | The list of port mappings for the container. Port mappings allow
-- containers to access ports on the host container instance to send or
-- receive traffic.
--
-- For task definitions that use the @awsvpc@ network mode, you should only
-- specify the @containerPort@. The @hostPort@ can be left blank or it must
-- be the same value as the @containerPort@.
--
-- Port mappings on Windows use the @NetNAT@ gateway address rather than
-- @localhost@. There is no loopback for port mappings on Windows, so you
-- cannot access a container\'s mapped port from the host itself.
--
-- This parameter maps to @PortBindings@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--publish@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- If the network mode of a task definition is set to @none@, then you
-- can\'t specify port mappings. If the network mode of a task definition
-- is set to @host@, then host ports must either be undefined or they must
-- match the container port in the port mapping.
--
-- After a task reaches the @RUNNING@ status, manual and automatic host and
-- container port assignments are visible in the __Network Bindings__
-- section of a container description for a selected task in the Amazon ECS
-- console. The assignments are also visible in the @networkBindings@
-- section DescribeTasks responses.
containerDefinition_portMappings :: Lens.Lens' ContainerDefinition (Prelude.Maybe [PortMapping])
containerDefinition_portMappings :: (Maybe [PortMapping] -> f (Maybe [PortMapping]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_portMappings = (ContainerDefinition -> Maybe [PortMapping])
-> (ContainerDefinition
    -> Maybe [PortMapping] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [PortMapping])
     (Maybe [PortMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [PortMapping]
portMappings :: Maybe [PortMapping]
$sel:portMappings:ContainerDefinition' :: ContainerDefinition -> Maybe [PortMapping]
portMappings} -> Maybe [PortMapping]
portMappings) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [PortMapping]
a -> ContainerDefinition
s {$sel:portMappings:ContainerDefinition' :: Maybe [PortMapping]
portMappings = Maybe [PortMapping]
a} :: ContainerDefinition) ((Maybe [PortMapping] -> f (Maybe [PortMapping]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [PortMapping] -> f (Maybe [PortMapping]))
    -> Maybe [PortMapping] -> f (Maybe [PortMapping]))
-> (Maybe [PortMapping] -> f (Maybe [PortMapping]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PortMapping] [PortMapping] [PortMapping] [PortMapping]
-> Iso
     (Maybe [PortMapping])
     (Maybe [PortMapping])
     (Maybe [PortMapping])
     (Maybe [PortMapping])
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 [PortMapping] [PortMapping] [PortMapping] [PortMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The type and amount of a resource to assign to a container. The only
-- supported resource is a GPU.
containerDefinition_resourceRequirements :: Lens.Lens' ContainerDefinition (Prelude.Maybe [ResourceRequirement])
containerDefinition_resourceRequirements :: (Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_resourceRequirements = (ContainerDefinition -> Maybe [ResourceRequirement])
-> (ContainerDefinition
    -> Maybe [ResourceRequirement] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [ResourceRequirement])
     (Maybe [ResourceRequirement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [ResourceRequirement]
resourceRequirements :: Maybe [ResourceRequirement]
$sel:resourceRequirements:ContainerDefinition' :: ContainerDefinition -> Maybe [ResourceRequirement]
resourceRequirements} -> Maybe [ResourceRequirement]
resourceRequirements) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [ResourceRequirement]
a -> ContainerDefinition
s {$sel:resourceRequirements:ContainerDefinition' :: Maybe [ResourceRequirement]
resourceRequirements = Maybe [ResourceRequirement]
a} :: ContainerDefinition) ((Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [ResourceRequirement]
     -> f (Maybe [ResourceRequirement]))
    -> Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> (Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceRequirement]
  [ResourceRequirement]
  [ResourceRequirement]
  [ResourceRequirement]
-> Iso
     (Maybe [ResourceRequirement])
     (Maybe [ResourceRequirement])
     (Maybe [ResourceRequirement])
     (Maybe [ResourceRequirement])
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
  [ResourceRequirement]
  [ResourceRequirement]
  [ResourceRequirement]
  [ResourceRequirement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A key\/value map of labels to add to the container. This parameter maps
-- to @Labels@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--label@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
containerDefinition_dockerLabels :: Lens.Lens' ContainerDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
containerDefinition_dockerLabels :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_dockerLabels = (ContainerDefinition -> Maybe (HashMap Text Text))
-> (ContainerDefinition
    -> Maybe (HashMap Text Text) -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe (HashMap Text Text)
dockerLabels :: Maybe (HashMap Text Text)
$sel:dockerLabels:ContainerDefinition' :: ContainerDefinition -> Maybe (HashMap Text Text)
dockerLabels} -> Maybe (HashMap Text Text)
dockerLabels) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe (HashMap Text Text)
a -> ContainerDefinition
s {$sel:dockerLabels:ContainerDefinition' :: Maybe (HashMap Text Text)
dockerLabels = Maybe (HashMap Text Text)
a} :: ContainerDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of hostnames and IP address mappings to append to the
-- @\/etc\/hosts@ file on the container. This parameter maps to
-- @ExtraHosts@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--add-host@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers or tasks that use
-- the @awsvpc@ network mode.
containerDefinition_extraHosts :: Lens.Lens' ContainerDefinition (Prelude.Maybe [HostEntry])
containerDefinition_extraHosts :: (Maybe [HostEntry] -> f (Maybe [HostEntry]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_extraHosts = (ContainerDefinition -> Maybe [HostEntry])
-> (ContainerDefinition
    -> Maybe [HostEntry] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [HostEntry])
     (Maybe [HostEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [HostEntry]
extraHosts :: Maybe [HostEntry]
$sel:extraHosts:ContainerDefinition' :: ContainerDefinition -> Maybe [HostEntry]
extraHosts} -> Maybe [HostEntry]
extraHosts) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [HostEntry]
a -> ContainerDefinition
s {$sel:extraHosts:ContainerDefinition' :: Maybe [HostEntry]
extraHosts = Maybe [HostEntry]
a} :: ContainerDefinition) ((Maybe [HostEntry] -> f (Maybe [HostEntry]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [HostEntry] -> f (Maybe [HostEntry]))
    -> Maybe [HostEntry] -> f (Maybe [HostEntry]))
-> (Maybe [HostEntry] -> f (Maybe [HostEntry]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [HostEntry] [HostEntry] [HostEntry] [HostEntry]
-> Iso
     (Maybe [HostEntry])
     (Maybe [HostEntry])
     (Maybe [HostEntry])
     (Maybe [HostEntry])
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 [HostEntry] [HostEntry] [HostEntry] [HostEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The amount (in MiB) of memory to present to the container. If your
-- container attempts to exceed the memory specified here, the container is
-- killed. The total amount of memory reserved for all containers within a
-- task must be lower than the task @memory@ value, if one is specified.
-- This parameter maps to @Memory@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--memory@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- If using the Fargate launch type, this parameter is optional.
--
-- If using the EC2 launch type, you must specify either a task-level
-- memory value or a container-level memory value. If you specify both a
-- container-level @memory@ and @memoryReservation@ value, @memory@ must be
-- greater than @memoryReservation@. If you specify @memoryReservation@,
-- then that value is subtracted from the available memory resources for
-- the container instance on which the container is placed. Otherwise, the
-- value of @memory@ is used.
--
-- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
-- so you should not specify fewer than 4 MiB of memory for your
-- containers.
containerDefinition_memory :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Int)
containerDefinition_memory :: (Maybe Int -> f (Maybe Int))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_memory = (ContainerDefinition -> Maybe Int)
-> (ContainerDefinition -> Maybe Int -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Int
memory :: Maybe Int
$sel:memory:ContainerDefinition' :: ContainerDefinition -> Maybe Int
memory} -> Maybe Int
memory) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Int
a -> ContainerDefinition
s {$sel:memory:ContainerDefinition' :: Maybe Int
memory = Maybe Int
a} :: ContainerDefinition)

-- | A list of namespaced kernel parameters to set in the container. This
-- parameter maps to @Sysctls@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--sysctl@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- It is not recommended that you specify network-related @systemControls@
-- parameters for multiple containers in a single task that also uses
-- either the @awsvpc@ or @host@ network modes. For tasks that use the
-- @awsvpc@ network mode, the container that is started last determines
-- which @systemControls@ parameters take effect. For tasks that use the
-- @host@ network mode, it changes the container instance\'s namespaced
-- kernel parameters as well as the containers.
containerDefinition_systemControls :: Lens.Lens' ContainerDefinition (Prelude.Maybe [SystemControl])
containerDefinition_systemControls :: (Maybe [SystemControl] -> f (Maybe [SystemControl]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_systemControls = (ContainerDefinition -> Maybe [SystemControl])
-> (ContainerDefinition
    -> Maybe [SystemControl] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [SystemControl])
     (Maybe [SystemControl])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [SystemControl]
systemControls :: Maybe [SystemControl]
$sel:systemControls:ContainerDefinition' :: ContainerDefinition -> Maybe [SystemControl]
systemControls} -> Maybe [SystemControl]
systemControls) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [SystemControl]
a -> ContainerDefinition
s {$sel:systemControls:ContainerDefinition' :: Maybe [SystemControl]
systemControls = Maybe [SystemControl]
a} :: ContainerDefinition) ((Maybe [SystemControl] -> f (Maybe [SystemControl]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [SystemControl] -> f (Maybe [SystemControl]))
    -> Maybe [SystemControl] -> f (Maybe [SystemControl]))
-> (Maybe [SystemControl] -> f (Maybe [SystemControl]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SystemControl] [SystemControl] [SystemControl] [SystemControl]
-> Iso
     (Maybe [SystemControl])
     (Maybe [SystemControl])
     (Maybe [SystemControl])
     (Maybe [SystemControl])
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
  [SystemControl] [SystemControl] [SystemControl] [SystemControl]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The user to use inside the container. This parameter maps to @User@ in
-- the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--user@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- When running tasks 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.
--
-- You can specify the @user@ using the following formats. If specifying a
-- UID or GID, you must specify it as a positive integer.
--
-- -   @user@
--
-- -   @user:group@
--
-- -   @uid@
--
-- -   @uid:gid@
--
-- -   @user:gid@
--
-- -   @uid:group@
--
-- This parameter is not supported for Windows containers.
containerDefinition_user :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Text)
containerDefinition_user :: (Maybe Text -> f (Maybe Text))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_user = (ContainerDefinition -> Maybe Text)
-> (ContainerDefinition -> Maybe Text -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Text
user :: Maybe Text
$sel:user:ContainerDefinition' :: ContainerDefinition -> Maybe Text
user} -> Maybe Text
user) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Text
a -> ContainerDefinition
s {$sel:user:ContainerDefinition' :: Maybe Text
user = Maybe Text
a} :: ContainerDefinition)

-- | The FireLens configuration for the container. This is used to specify
-- and configure a log router for container logs. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html Custom Log Routing>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_firelensConfiguration :: Lens.Lens' ContainerDefinition (Prelude.Maybe FirelensConfiguration)
containerDefinition_firelensConfiguration :: (Maybe FirelensConfiguration -> f (Maybe FirelensConfiguration))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_firelensConfiguration = (ContainerDefinition -> Maybe FirelensConfiguration)
-> (ContainerDefinition
    -> Maybe FirelensConfiguration -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe FirelensConfiguration)
     (Maybe FirelensConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe FirelensConfiguration
firelensConfiguration :: Maybe FirelensConfiguration
$sel:firelensConfiguration:ContainerDefinition' :: ContainerDefinition -> Maybe FirelensConfiguration
firelensConfiguration} -> Maybe FirelensConfiguration
firelensConfiguration) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe FirelensConfiguration
a -> ContainerDefinition
s {$sel:firelensConfiguration:ContainerDefinition' :: Maybe FirelensConfiguration
firelensConfiguration = Maybe FirelensConfiguration
a} :: ContainerDefinition)

-- | A list of DNS search domains that are presented to the container. This
-- parameter maps to @DnsSearch@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--dns-search@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
containerDefinition_dnsSearchDomains :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_dnsSearchDomains :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_dnsSearchDomains = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
dnsSearchDomains :: Maybe [Text]
$sel:dnsSearchDomains:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
dnsSearchDomains} -> Maybe [Text]
dnsSearchDomains) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:dnsSearchDomains:ContainerDefinition' :: Maybe [Text]
dnsSearchDomains = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The log configuration specification for the container.
--
-- This parameter maps to @LogConfig@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--log-driver@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
-- By default, containers use the same logging driver that the Docker
-- daemon uses. However the container may use a different logging driver
-- than the Docker daemon by specifying a log driver with this parameter in
-- the container definition. To use a different logging driver for a
-- container, the log system must be configured properly on the container
-- instance (or on a different log server for remote logging options). For
-- more information on the options for different supported log drivers, see
-- <https://docs.docker.com/engine/admin/logging/overview/ Configure logging drivers>
-- in the Docker documentation.
--
-- Amazon ECS currently supports a subset of the logging drivers available
-- to the Docker daemon (shown in the LogConfiguration data type).
-- Additional log drivers may be available in future releases of the Amazon
-- ECS container agent.
--
-- This parameter requires version 1.18 of the Docker Remote API or greater
-- on your container instance. To check the Docker Remote API version on
-- your container instance, log in to your container instance and run the
-- following command:
-- @sudo docker version --format \'{{.Server.APIVersion}}\'@
--
-- The Amazon ECS container agent running on a container instance must
-- register the logging drivers available on that instance with the
-- @ECS_AVAILABLE_LOGGING_DRIVERS@ environment variable before containers
-- placed on that instance can use these log configuration options. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html Amazon ECS Container Agent Configuration>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_logConfiguration :: Lens.Lens' ContainerDefinition (Prelude.Maybe LogConfiguration)
containerDefinition_logConfiguration :: (Maybe LogConfiguration -> f (Maybe LogConfiguration))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_logConfiguration = (ContainerDefinition -> Maybe LogConfiguration)
-> (ContainerDefinition
    -> Maybe LogConfiguration -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe LogConfiguration)
     (Maybe LogConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe LogConfiguration
logConfiguration :: Maybe LogConfiguration
$sel:logConfiguration:ContainerDefinition' :: ContainerDefinition -> Maybe LogConfiguration
logConfiguration} -> Maybe LogConfiguration
logConfiguration) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe LogConfiguration
a -> ContainerDefinition
s {$sel:logConfiguration:ContainerDefinition' :: Maybe LogConfiguration
logConfiguration = Maybe LogConfiguration
a} :: ContainerDefinition)

-- | Linux-specific modifications that are applied to the container, such as
-- Linux kernel capabilities. For more information see KernelCapabilities.
--
-- This parameter is not supported for Windows containers.
containerDefinition_linuxParameters :: Lens.Lens' ContainerDefinition (Prelude.Maybe LinuxParameters)
containerDefinition_linuxParameters :: (Maybe LinuxParameters -> f (Maybe LinuxParameters))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_linuxParameters = (ContainerDefinition -> Maybe LinuxParameters)
-> (ContainerDefinition
    -> Maybe LinuxParameters -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe LinuxParameters)
     (Maybe LinuxParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe LinuxParameters
linuxParameters :: Maybe LinuxParameters
$sel:linuxParameters:ContainerDefinition' :: ContainerDefinition -> Maybe LinuxParameters
linuxParameters} -> Maybe LinuxParameters
linuxParameters) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe LinuxParameters
a -> ContainerDefinition
s {$sel:linuxParameters:ContainerDefinition' :: Maybe LinuxParameters
linuxParameters = Maybe LinuxParameters
a} :: ContainerDefinition)

-- | When this parameter is @true@, a TTY is allocated. This parameter maps
-- to @Tty@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--tty@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_pseudoTerminal :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_pseudoTerminal :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_pseudoTerminal = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
pseudoTerminal :: Maybe Bool
$sel:pseudoTerminal:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
pseudoTerminal} -> Maybe Bool
pseudoTerminal) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:pseudoTerminal:ContainerDefinition' :: Maybe Bool
pseudoTerminal = Maybe Bool
a} :: ContainerDefinition)

-- | The dependencies defined for container startup and shutdown. A container
-- can contain multiple dependencies. When a dependency is defined for
-- container startup, for container shutdown it is reversed.
--
-- For tasks using the EC2 launch type, the container instances require at
-- least version 1.26.0 of the container agent to enable container
-- dependencies. However, we recommend using the latest container agent
-- version. For information about checking your agent version and updating
-- to the latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version 1.26.0-1 of the @ecs-init@ package. If your container instances
-- are launched from version @20190301@ or later, then they contain the
-- required versions of the container agent and @ecs-init@. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- For tasks using the Fargate launch type, the task or service requires
-- platform version @1.3.0@ or later.
containerDefinition_dependsOn :: Lens.Lens' ContainerDefinition (Prelude.Maybe [ContainerDependency])
containerDefinition_dependsOn :: (Maybe [ContainerDependency] -> f (Maybe [ContainerDependency]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_dependsOn = (ContainerDefinition -> Maybe [ContainerDependency])
-> (ContainerDefinition
    -> Maybe [ContainerDependency] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [ContainerDependency])
     (Maybe [ContainerDependency])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [ContainerDependency]
dependsOn :: Maybe [ContainerDependency]
$sel:dependsOn:ContainerDefinition' :: ContainerDefinition -> Maybe [ContainerDependency]
dependsOn} -> Maybe [ContainerDependency]
dependsOn) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [ContainerDependency]
a -> ContainerDefinition
s {$sel:dependsOn:ContainerDefinition' :: Maybe [ContainerDependency]
dependsOn = Maybe [ContainerDependency]
a} :: ContainerDefinition) ((Maybe [ContainerDependency] -> f (Maybe [ContainerDependency]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [ContainerDependency]
     -> f (Maybe [ContainerDependency]))
    -> Maybe [ContainerDependency] -> f (Maybe [ContainerDependency]))
-> (Maybe [ContainerDependency] -> f (Maybe [ContainerDependency]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContainerDependency]
  [ContainerDependency]
  [ContainerDependency]
  [ContainerDependency]
-> Iso
     (Maybe [ContainerDependency])
     (Maybe [ContainerDependency])
     (Maybe [ContainerDependency])
     (Maybe [ContainerDependency])
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
  [ContainerDependency]
  [ContainerDependency]
  [ContainerDependency]
  [ContainerDependency]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of a container. If you are linking multiple containers together
-- in a task definition, the @name@ of one container can be entered in the
-- @links@ of another container to connect the containers. Up to 255
-- letters (uppercase and lowercase), numbers, underscores, and hyphens are
-- allowed. This parameter maps to @name@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--name@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_name :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Text)
containerDefinition_name :: (Maybe Text -> f (Maybe Text))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_name = (ContainerDefinition -> Maybe Text)
-> (ContainerDefinition -> Maybe Text -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Text
name :: Maybe Text
$sel:name:ContainerDefinition' :: ContainerDefinition -> Maybe Text
name} -> Maybe Text
name) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Text
a -> ContainerDefinition
s {$sel:name:ContainerDefinition' :: Maybe Text
name = Maybe Text
a} :: ContainerDefinition)

-- | A list of DNS servers that are presented to the container. This
-- parameter maps to @Dns@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--dns@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
containerDefinition_dnsServers :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_dnsServers :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_dnsServers = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
dnsServers :: Maybe [Text]
$sel:dnsServers:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
dnsServers} -> Maybe [Text]
dnsServers) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:dnsServers:ContainerDefinition' :: Maybe [Text]
dnsServers = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The mount points for data volumes in your container.
--
-- This parameter maps to @Volumes@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--volume@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- Windows containers can mount whole directories on the same drive as
-- @$env:ProgramData@. Windows containers cannot mount directories on a
-- different drive, and mount point cannot be across drives.
containerDefinition_mountPoints :: Lens.Lens' ContainerDefinition (Prelude.Maybe [MountPoint])
containerDefinition_mountPoints :: (Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_mountPoints = (ContainerDefinition -> Maybe [MountPoint])
-> (ContainerDefinition
    -> Maybe [MountPoint] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [MountPoint])
     (Maybe [MountPoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [MountPoint]
mountPoints :: Maybe [MountPoint]
$sel:mountPoints:ContainerDefinition' :: ContainerDefinition -> Maybe [MountPoint]
mountPoints} -> Maybe [MountPoint]
mountPoints) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [MountPoint]
a -> ContainerDefinition
s {$sel:mountPoints:ContainerDefinition' :: Maybe [MountPoint]
mountPoints = Maybe [MountPoint]
a} :: ContainerDefinition) ((Maybe [MountPoint] -> f (Maybe [MountPoint]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [MountPoint] -> f (Maybe [MountPoint]))
    -> Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> (Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MountPoint] [MountPoint] [MountPoint] [MountPoint]
-> Iso
     (Maybe [MountPoint])
     (Maybe [MountPoint])
     (Maybe [MountPoint])
     (Maybe [MountPoint])
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 [MountPoint] [MountPoint] [MountPoint] [MountPoint]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | When this parameter is @true@, this allows you to deploy containerized
-- applications that require @stdin@ or a @tty@ to be allocated. This
-- parameter maps to @OpenStdin@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--interactive@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
containerDefinition_interactive :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_interactive :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_interactive = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
interactive :: Maybe Bool
$sel:interactive:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
interactive} -> Maybe Bool
interactive) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:interactive:ContainerDefinition' :: Maybe Bool
interactive = Maybe Bool
a} :: ContainerDefinition)

-- | Time duration (in seconds) to wait before giving up on resolving
-- dependencies for a container. For example, you specify two containers in
-- a task definition with containerA having a dependency on containerB
-- reaching a @COMPLETE@, @SUCCESS@, or @HEALTHY@ status. If a
-- @startTimeout@ value is specified for containerB and it does not reach
-- the desired status within that time then containerA will give up and not
-- start. This results in the task transitioning to a @STOPPED@ state.
--
-- When the @ECS_CONTAINER_START_TIMEOUT@ container agent configuration
-- variable is used, it is enforced indendently from this start timeout
-- value.
--
-- For tasks using the Fargate launch type, this parameter requires that
-- the task or service uses platform version 1.3.0 or later.
--
-- For tasks using the EC2 launch type, your container instances require at
-- least version @1.26.0@ of the container agent to enable a container
-- start timeout value. However, we recommend using the latest container
-- agent version. For information about checking your agent version and
-- updating to the latest version, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html Updating the Amazon ECS Container Agent>
-- in the /Amazon Elastic Container Service Developer Guide/. If you are
-- using an Amazon ECS-optimized Linux AMI, your instance needs at least
-- version @1.26.0-1@ of the @ecs-init@ package. If your container
-- instances are launched from version @20190301@ or later, then they
-- contain the required versions of the container agent and @ecs-init@. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html Amazon ECS-optimized Linux AMI>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_startTimeout :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Int)
containerDefinition_startTimeout :: (Maybe Int -> f (Maybe Int))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_startTimeout = (ContainerDefinition -> Maybe Int)
-> (ContainerDefinition -> Maybe Int -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Int
startTimeout :: Maybe Int
$sel:startTimeout:ContainerDefinition' :: ContainerDefinition -> Maybe Int
startTimeout} -> Maybe Int
startTimeout) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Int
a -> ContainerDefinition
s {$sel:startTimeout:ContainerDefinition' :: Maybe Int
startTimeout = Maybe Int
a} :: ContainerDefinition)

-- | The @links@ parameter allows containers to communicate with each other
-- without the need for port mappings. This parameter is only supported if
-- the network mode of a task definition is @bridge@. The
-- @name:internalName@ construct is analogous to @name:alias@ in Docker
-- links. Up to 255 letters (uppercase and lowercase), numbers,
-- underscores, and hyphens are allowed. For more information about linking
-- Docker containers, go to
-- <https://docs.docker.com/network/links/ Legacy container links> in the
-- Docker documentation. This parameter maps to @Links@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--link@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
--
-- Containers that are collocated on a single container instance may be
-- able to communicate with each other without requiring links or host port
-- mappings. Network isolation is achieved on the container instance using
-- security groups and VPC settings.
containerDefinition_links :: Lens.Lens' ContainerDefinition (Prelude.Maybe [Prelude.Text])
containerDefinition_links :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_links = (ContainerDefinition -> Maybe [Text])
-> (ContainerDefinition -> Maybe [Text] -> ContainerDefinition)
-> Lens
     ContainerDefinition
     ContainerDefinition
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe [Text]
links :: Maybe [Text]
$sel:links:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
links} -> Maybe [Text]
links) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe [Text]
a -> ContainerDefinition
s {$sel:links:ContainerDefinition' :: Maybe [Text]
links = Maybe [Text]
a} :: ContainerDefinition) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerDefinition -> f ContainerDefinition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerDefinition
-> f ContainerDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | When this parameter is true, the container is given read-only access to
-- its root file system. This parameter maps to @ReadonlyRootfs@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--read-only@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This parameter is not supported for Windows containers.
containerDefinition_readonlyRootFilesystem :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_readonlyRootFilesystem :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_readonlyRootFilesystem = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
readonlyRootFilesystem :: Maybe Bool
$sel:readonlyRootFilesystem:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
readonlyRootFilesystem} -> Maybe Bool
readonlyRootFilesystem) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:readonlyRootFilesystem:ContainerDefinition' :: Maybe Bool
readonlyRootFilesystem = Maybe Bool
a} :: ContainerDefinition)

-- | If the @essential@ parameter of a container is marked as @true@, and
-- that container fails or stops for any reason, all other containers that
-- are part of the task are stopped. If the @essential@ parameter of a
-- container is marked as @false@, then its failure does not affect the
-- rest of the containers in a task. If this parameter is omitted, a
-- container is assumed to be essential.
--
-- All tasks must have at least one essential container. If you have an
-- application that is composed of multiple containers, you should group
-- containers that are used for a common purpose into components, and
-- separate the different components into multiple task definitions. For
-- more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html Application Architecture>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerDefinition_essential :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Bool)
containerDefinition_essential :: (Maybe Bool -> f (Maybe Bool))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_essential = (ContainerDefinition -> Maybe Bool)
-> (ContainerDefinition -> Maybe Bool -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Bool
essential :: Maybe Bool
$sel:essential:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
essential} -> Maybe Bool
essential) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Bool
a -> ContainerDefinition
s {$sel:essential:ContainerDefinition' :: Maybe Bool
essential = Maybe Bool
a} :: ContainerDefinition)

-- | The number of @cpu@ units reserved for the container. This parameter
-- maps to @CpuShares@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--cpu-shares@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- This field is optional for tasks using the Fargate launch type, and the
-- only requirement is that the total amount of CPU reserved for all
-- containers within a task be lower than the task-level @cpu@ value.
--
-- You can determine the number of CPU units that are available per EC2
-- instance type by multiplying the vCPUs listed for that instance type on
-- the <http://aws.amazon.com/ec2/instance-types/ Amazon EC2 Instances>
-- detail page by 1,024.
--
-- Linux containers share unallocated CPU units with other containers on
-- the container instance with the same ratio as their allocated amount.
-- For example, if you run a single-container task on a single-core
-- instance type with 512 CPU units specified for that container, and that
-- is the only task running on the container instance, that container could
-- use the full 1,024 CPU unit share at any given time. However, if you
-- launched another copy of the same task on that container instance, each
-- task would be guaranteed a minimum of 512 CPU units when needed, and
-- each container could float to higher CPU usage if the other container
-- was not using it, but if both tasks were 100% active all of the time,
-- they would be limited to 512 CPU units.
--
-- On Linux container instances, the Docker daemon on the container
-- instance uses the CPU value to calculate the relative CPU share ratios
-- for running containers. For more information, see
-- <https://docs.docker.com/engine/reference/run/#cpu-share-constraint CPU share constraint>
-- in the Docker documentation. The minimum valid CPU share value that the
-- Linux kernel allows is 2. However, the CPU parameter is not required,
-- and you can use CPU values below 2 in your container definitions. For
-- CPU values below 2 (including null), the behavior varies based on your
-- Amazon ECS container agent version:
--
-- -   __Agent versions less than or equal to 1.1.0:__ Null and zero CPU
--     values are passed to Docker as 0, which Docker then converts to
--     1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which
--     the Linux kernel converts to two CPU shares.
--
-- -   __Agent versions greater than or equal to 1.2.0:__ Null, zero, and
--     CPU values of 1 are passed to Docker as 2.
--
-- On Windows container instances, the CPU limit is enforced as an absolute
-- limit, or a quota. Windows containers only have access to the specified
-- amount of CPU that is described in the task definition. A null or zero
-- CPU value is passed to Docker as @0@, which Windows interprets as 1% of
-- one CPU.
containerDefinition_cpu :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Int)
containerDefinition_cpu :: (Maybe Int -> f (Maybe Int))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_cpu = (ContainerDefinition -> Maybe Int)
-> (ContainerDefinition -> Maybe Int -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Int
cpu :: Maybe Int
$sel:cpu:ContainerDefinition' :: ContainerDefinition -> Maybe Int
cpu} -> Maybe Int
cpu) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Int
a -> ContainerDefinition
s {$sel:cpu:ContainerDefinition' :: Maybe Int
cpu = Maybe Int
a} :: ContainerDefinition)

-- | The soft limit (in MiB) of memory to reserve for the container. When
-- system memory is under heavy contention, Docker attempts to keep the
-- container memory to this soft limit. However, your container can consume
-- more memory when it needs to, up to either the hard limit specified with
-- the @memory@ parameter (if applicable), or all of the available memory
-- on the container instance, whichever comes first. This parameter maps to
-- @MemoryReservation@ in the
-- <https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.35/ Docker Remote API> and the
-- @--memory-reservation@ option to
-- <https://docs.docker.com/engine/reference/run/#security-configuration docker run>.
--
-- If a task-level memory value is not specified, you must specify a
-- non-zero integer for one or both of @memory@ or @memoryReservation@ in a
-- container definition. If you specify both, @memory@ must be greater than
-- @memoryReservation@. If you specify @memoryReservation@, then that value
-- is subtracted from the available memory resources for the container
-- instance on which the container is placed. Otherwise, the value of
-- @memory@ is used.
--
-- For example, if your container normally uses 128 MiB of memory, but
-- occasionally bursts to 256 MiB of memory for short periods of time, you
-- can set a @memoryReservation@ of 128 MiB, and a @memory@ hard limit of
-- 300 MiB. This configuration would allow the container to only reserve
-- 128 MiB of memory from the remaining resources on the container
-- instance, but also allow the container to consume more memory resources
-- when needed.
--
-- The Docker daemon reserves a minimum of 4 MiB of memory for a container,
-- so you should not specify fewer than 4 MiB of memory for your
-- containers.
containerDefinition_memoryReservation :: Lens.Lens' ContainerDefinition (Prelude.Maybe Prelude.Int)
containerDefinition_memoryReservation :: (Maybe Int -> f (Maybe Int))
-> ContainerDefinition -> f ContainerDefinition
containerDefinition_memoryReservation = (ContainerDefinition -> Maybe Int)
-> (ContainerDefinition -> Maybe Int -> ContainerDefinition)
-> Lens
     ContainerDefinition ContainerDefinition (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerDefinition' {Maybe Int
memoryReservation :: Maybe Int
$sel:memoryReservation:ContainerDefinition' :: ContainerDefinition -> Maybe Int
memoryReservation} -> Maybe Int
memoryReservation) (\s :: ContainerDefinition
s@ContainerDefinition' {} Maybe Int
a -> ContainerDefinition
s {$sel:memoryReservation:ContainerDefinition' :: Maybe Int
memoryReservation = Maybe Int
a} :: ContainerDefinition)

instance Core.FromJSON ContainerDefinition where
  parseJSON :: Value -> Parser ContainerDefinition
parseJSON =
    String
-> (Object -> Parser ContainerDefinition)
-> Value
-> Parser ContainerDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContainerDefinition"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe RepositoryCredentials
-> Maybe [Text]
-> Maybe HealthCheck
-> Maybe Bool
-> Maybe [Secret]
-> Maybe [VolumeFrom]
-> Maybe [KeyValuePair]
-> Maybe [EnvironmentFile]
-> Maybe [Text]
-> Maybe Text
-> Maybe [Ulimit]
-> Maybe Int
-> Maybe Bool
-> Maybe [PortMapping]
-> Maybe [ResourceRequirement]
-> Maybe (HashMap Text Text)
-> Maybe [HostEntry]
-> Maybe Int
-> Maybe [SystemControl]
-> Maybe Text
-> Maybe FirelensConfiguration
-> Maybe [Text]
-> Maybe LogConfiguration
-> Maybe LinuxParameters
-> Maybe Bool
-> Maybe [ContainerDependency]
-> Maybe Text
-> Maybe [Text]
-> Maybe [MountPoint]
-> Maybe Bool
-> Maybe Int
-> Maybe [Text]
-> Maybe Bool
-> Maybe Bool
-> Maybe Int
-> Maybe Int
-> ContainerDefinition
ContainerDefinition'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe RepositoryCredentials
 -> Maybe [Text]
 -> Maybe HealthCheck
 -> Maybe Bool
 -> Maybe [Secret]
 -> Maybe [VolumeFrom]
 -> Maybe [KeyValuePair]
 -> Maybe [EnvironmentFile]
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [Ulimit]
 -> Maybe Int
 -> Maybe Bool
 -> Maybe [PortMapping]
 -> Maybe [ResourceRequirement]
 -> Maybe (HashMap Text Text)
 -> Maybe [HostEntry]
 -> Maybe Int
 -> Maybe [SystemControl]
 -> Maybe Text
 -> Maybe FirelensConfiguration
 -> Maybe [Text]
 -> Maybe LogConfiguration
 -> Maybe LinuxParameters
 -> Maybe Bool
 -> Maybe [ContainerDependency]
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe [MountPoint]
 -> Maybe Bool
 -> Maybe Int
 -> Maybe [Text]
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe Int
 -> Maybe Int
 -> ContainerDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe RepositoryCredentials
      -> Maybe [Text]
      -> Maybe HealthCheck
      -> Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"image")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe RepositoryCredentials
   -> Maybe [Text]
   -> Maybe HealthCheck
   -> Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe RepositoryCredentials
      -> Maybe [Text]
      -> Maybe HealthCheck
      -> Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"command" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe RepositoryCredentials
   -> Maybe [Text]
   -> Maybe HealthCheck
   -> Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe RepositoryCredentials
      -> Maybe [Text]
      -> Maybe HealthCheck
      -> Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"hostname")
            Parser
  (Maybe RepositoryCredentials
   -> Maybe [Text]
   -> Maybe HealthCheck
   -> Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe RepositoryCredentials)
-> Parser
     (Maybe [Text]
      -> Maybe HealthCheck
      -> Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RepositoryCredentials)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"repositoryCredentials")
            Parser
  (Maybe [Text]
   -> Maybe HealthCheck
   -> Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe HealthCheck
      -> Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dockerSecurityOptions"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe HealthCheck
   -> Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe HealthCheck)
-> Parser
     (Maybe Bool
      -> Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe HealthCheck)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"healthCheck")
            Parser
  (Maybe Bool
   -> Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Secret]
      -> Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"disableNetworking")
            Parser
  (Maybe [Secret]
   -> Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Secret])
-> Parser
     (Maybe [VolumeFrom]
      -> Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Secret]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"secrets" Parser (Maybe (Maybe [Secret]))
-> Maybe [Secret] -> Parser (Maybe [Secret])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Secret]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [VolumeFrom]
   -> Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [VolumeFrom])
-> Parser
     (Maybe [KeyValuePair]
      -> Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [VolumeFrom]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumesFrom" Parser (Maybe (Maybe [VolumeFrom]))
-> Maybe [VolumeFrom] -> Parser (Maybe [VolumeFrom])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [VolumeFrom]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [KeyValuePair]
   -> Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [KeyValuePair])
-> Parser
     (Maybe [EnvironmentFile]
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [KeyValuePair]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"environment" Parser (Maybe (Maybe [KeyValuePair]))
-> Maybe [KeyValuePair] -> Parser (Maybe [KeyValuePair])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [KeyValuePair]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [EnvironmentFile]
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [EnvironmentFile])
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [EnvironmentFile]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"environmentFiles"
                            Parser (Maybe (Maybe [EnvironmentFile]))
-> Maybe [EnvironmentFile] -> Parser (Maybe [EnvironmentFile])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [EnvironmentFile]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entryPoint" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Ulimit]
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"workingDirectory")
            Parser
  (Maybe [Ulimit]
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Ulimit])
-> Parser
     (Maybe Int
      -> Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Ulimit]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ulimits" Parser (Maybe (Maybe [Ulimit]))
-> Maybe [Ulimit] -> Parser (Maybe [Ulimit])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Ulimit]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int
   -> Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"stopTimeout")
            Parser
  (Maybe Bool
   -> Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [PortMapping]
      -> Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"privileged")
            Parser
  (Maybe [PortMapping]
   -> Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [PortMapping])
-> Parser
     (Maybe [ResourceRequirement]
      -> Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [PortMapping]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"portMappings" Parser (Maybe (Maybe [PortMapping]))
-> Maybe [PortMapping] -> Parser (Maybe [PortMapping])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PortMapping]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [ResourceRequirement]
   -> Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [ResourceRequirement])
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ResourceRequirement]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceRequirements"
                            Parser (Maybe (Maybe [ResourceRequirement]))
-> Maybe [ResourceRequirement]
-> Parser (Maybe [ResourceRequirement])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ResourceRequirement]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe [HostEntry]
      -> Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dockerLabels" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [HostEntry]
   -> Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [HostEntry])
-> Parser
     (Maybe Int
      -> Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [HostEntry]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"extraHosts" Parser (Maybe (Maybe [HostEntry]))
-> Maybe [HostEntry] -> Parser (Maybe [HostEntry])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [HostEntry]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Int
   -> Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Int)
-> Parser
     (Maybe [SystemControl]
      -> Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"memory")
            Parser
  (Maybe [SystemControl]
   -> Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [SystemControl])
-> Parser
     (Maybe Text
      -> Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [SystemControl]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"systemControls" Parser (Maybe (Maybe [SystemControl]))
-> Maybe [SystemControl] -> Parser (Maybe [SystemControl])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [SystemControl]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe FirelensConfiguration
      -> Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"user")
            Parser
  (Maybe FirelensConfiguration
   -> Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe FirelensConfiguration)
-> Parser
     (Maybe [Text]
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FirelensConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"firelensConfiguration")
            Parser
  (Maybe [Text]
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dnsSearchDomains"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe LogConfiguration)
-> Parser
     (Maybe LinuxParameters
      -> Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LogConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"logConfiguration")
            Parser
  (Maybe LinuxParameters
   -> Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe LinuxParameters)
-> Parser
     (Maybe Bool
      -> Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LinuxParameters)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"linuxParameters")
            Parser
  (Maybe Bool
   -> Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [ContainerDependency]
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"pseudoTerminal")
            Parser
  (Maybe [ContainerDependency]
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [ContainerDependency])
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [ContainerDependency]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dependsOn" Parser (Maybe (Maybe [ContainerDependency]))
-> Maybe [ContainerDependency]
-> Parser (Maybe [ContainerDependency])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ContainerDependency]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe [Text]
   -> Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [MountPoint]
      -> Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dnsServers" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe [MountPoint]
   -> Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [MountPoint])
-> Parser
     (Maybe Bool
      -> Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [MountPoint]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"mountPoints" Parser (Maybe (Maybe [MountPoint]))
-> Maybe [MountPoint] -> Parser (Maybe [MountPoint])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [MountPoint]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Bool
   -> Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Int
      -> Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"interactive")
            Parser
  (Maybe Int
   -> Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe Int)
-> Parser
     (Maybe [Text]
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe Int
      -> Maybe Int
      -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"startTimeout")
            Parser
  (Maybe [Text]
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe Int
   -> Maybe Int
   -> ContainerDefinition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Bool
      -> Maybe Bool -> Maybe Int -> Maybe Int -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"links" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Bool
   -> Maybe Bool -> Maybe Int -> Maybe Int -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool -> Maybe Int -> Maybe Int -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"readonlyRootFilesystem")
            Parser
  (Maybe Bool -> Maybe Int -> Maybe Int -> ContainerDefinition)
-> Parser (Maybe Bool)
-> Parser (Maybe Int -> Maybe Int -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"essential")
            Parser (Maybe Int -> Maybe Int -> ContainerDefinition)
-> Parser (Maybe Int) -> Parser (Maybe Int -> ContainerDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cpu")
            Parser (Maybe Int -> ContainerDefinition)
-> Parser (Maybe Int) -> Parser ContainerDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"memoryReservation")
      )

instance Prelude.Hashable ContainerDefinition

instance Prelude.NFData ContainerDefinition

instance Core.ToJSON ContainerDefinition where
  toJSON :: ContainerDefinition -> Value
toJSON ContainerDefinition' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [ContainerDependency]
Maybe [EnvironmentFile]
Maybe [HostEntry]
Maybe [KeyValuePair]
Maybe [MountPoint]
Maybe [ResourceRequirement]
Maybe [Secret]
Maybe [SystemControl]
Maybe [PortMapping]
Maybe [Ulimit]
Maybe [VolumeFrom]
Maybe Text
Maybe (HashMap Text Text)
Maybe FirelensConfiguration
Maybe HealthCheck
Maybe RepositoryCredentials
Maybe LogConfiguration
Maybe LinuxParameters
memoryReservation :: Maybe Int
cpu :: Maybe Int
essential :: Maybe Bool
readonlyRootFilesystem :: Maybe Bool
links :: Maybe [Text]
startTimeout :: Maybe Int
interactive :: Maybe Bool
mountPoints :: Maybe [MountPoint]
dnsServers :: Maybe [Text]
name :: Maybe Text
dependsOn :: Maybe [ContainerDependency]
pseudoTerminal :: Maybe Bool
linuxParameters :: Maybe LinuxParameters
logConfiguration :: Maybe LogConfiguration
dnsSearchDomains :: Maybe [Text]
firelensConfiguration :: Maybe FirelensConfiguration
user :: Maybe Text
systemControls :: Maybe [SystemControl]
memory :: Maybe Int
extraHosts :: Maybe [HostEntry]
dockerLabels :: Maybe (HashMap Text Text)
resourceRequirements :: Maybe [ResourceRequirement]
portMappings :: Maybe [PortMapping]
privileged :: Maybe Bool
stopTimeout :: Maybe Int
ulimits :: Maybe [Ulimit]
workingDirectory :: Maybe Text
entryPoint :: Maybe [Text]
environmentFiles :: Maybe [EnvironmentFile]
environment :: Maybe [KeyValuePair]
volumesFrom :: Maybe [VolumeFrom]
secrets :: Maybe [Secret]
disableNetworking :: Maybe Bool
healthCheck :: Maybe HealthCheck
dockerSecurityOptions :: Maybe [Text]
repositoryCredentials :: Maybe RepositoryCredentials
hostname :: Maybe Text
command :: Maybe [Text]
image :: Maybe Text
$sel:memoryReservation:ContainerDefinition' :: ContainerDefinition -> Maybe Int
$sel:cpu:ContainerDefinition' :: ContainerDefinition -> Maybe Int
$sel:essential:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:readonlyRootFilesystem:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:links:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:startTimeout:ContainerDefinition' :: ContainerDefinition -> Maybe Int
$sel:interactive:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:mountPoints:ContainerDefinition' :: ContainerDefinition -> Maybe [MountPoint]
$sel:dnsServers:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:name:ContainerDefinition' :: ContainerDefinition -> Maybe Text
$sel:dependsOn:ContainerDefinition' :: ContainerDefinition -> Maybe [ContainerDependency]
$sel:pseudoTerminal:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:linuxParameters:ContainerDefinition' :: ContainerDefinition -> Maybe LinuxParameters
$sel:logConfiguration:ContainerDefinition' :: ContainerDefinition -> Maybe LogConfiguration
$sel:dnsSearchDomains:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:firelensConfiguration:ContainerDefinition' :: ContainerDefinition -> Maybe FirelensConfiguration
$sel:user:ContainerDefinition' :: ContainerDefinition -> Maybe Text
$sel:systemControls:ContainerDefinition' :: ContainerDefinition -> Maybe [SystemControl]
$sel:memory:ContainerDefinition' :: ContainerDefinition -> Maybe Int
$sel:extraHosts:ContainerDefinition' :: ContainerDefinition -> Maybe [HostEntry]
$sel:dockerLabels:ContainerDefinition' :: ContainerDefinition -> Maybe (HashMap Text Text)
$sel:resourceRequirements:ContainerDefinition' :: ContainerDefinition -> Maybe [ResourceRequirement]
$sel:portMappings:ContainerDefinition' :: ContainerDefinition -> Maybe [PortMapping]
$sel:privileged:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:stopTimeout:ContainerDefinition' :: ContainerDefinition -> Maybe Int
$sel:ulimits:ContainerDefinition' :: ContainerDefinition -> Maybe [Ulimit]
$sel:workingDirectory:ContainerDefinition' :: ContainerDefinition -> Maybe Text
$sel:entryPoint:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:environmentFiles:ContainerDefinition' :: ContainerDefinition -> Maybe [EnvironmentFile]
$sel:environment:ContainerDefinition' :: ContainerDefinition -> Maybe [KeyValuePair]
$sel:volumesFrom:ContainerDefinition' :: ContainerDefinition -> Maybe [VolumeFrom]
$sel:secrets:ContainerDefinition' :: ContainerDefinition -> Maybe [Secret]
$sel:disableNetworking:ContainerDefinition' :: ContainerDefinition -> Maybe Bool
$sel:healthCheck:ContainerDefinition' :: ContainerDefinition -> Maybe HealthCheck
$sel:dockerSecurityOptions:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:repositoryCredentials:ContainerDefinition' :: ContainerDefinition -> Maybe RepositoryCredentials
$sel:hostname:ContainerDefinition' :: ContainerDefinition -> Maybe Text
$sel:command:ContainerDefinition' :: ContainerDefinition -> Maybe [Text]
$sel:image:ContainerDefinition' :: ContainerDefinition -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"image" 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
image,
            (Text
"command" 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]
command,
            (Text
"hostname" 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
hostname,
            (Text
"repositoryCredentials" Text -> RepositoryCredentials -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RepositoryCredentials -> Pair)
-> Maybe RepositoryCredentials -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RepositoryCredentials
repositoryCredentials,
            (Text
"dockerSecurityOptions" 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]
dockerSecurityOptions,
            (Text
"healthCheck" Text -> HealthCheck -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HealthCheck -> Pair) -> Maybe HealthCheck -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheck
healthCheck,
            (Text
"disableNetworking" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableNetworking,
            (Text
"secrets" Text -> [Secret] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Secret] -> Pair) -> Maybe [Secret] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Secret]
secrets,
            (Text
"volumesFrom" Text -> [VolumeFrom] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([VolumeFrom] -> Pair) -> Maybe [VolumeFrom] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [VolumeFrom]
volumesFrom,
            (Text
"environment" Text -> [KeyValuePair] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([KeyValuePair] -> Pair) -> Maybe [KeyValuePair] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [KeyValuePair]
environment,
            (Text
"environmentFiles" Text -> [EnvironmentFile] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([EnvironmentFile] -> Pair)
-> Maybe [EnvironmentFile] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [EnvironmentFile]
environmentFiles,
            (Text
"entryPoint" 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]
entryPoint,
            (Text
"workingDirectory" 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
workingDirectory,
            (Text
"ulimits" Text -> [Ulimit] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Ulimit] -> Pair) -> Maybe [Ulimit] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Ulimit]
ulimits,
            (Text
"stopTimeout" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
stopTimeout,
            (Text
"privileged" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
privileged,
            (Text
"portMappings" Text -> [PortMapping] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PortMapping] -> Pair) -> Maybe [PortMapping] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PortMapping]
portMappings,
            (Text
"resourceRequirements" Text -> [ResourceRequirement] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ResourceRequirement] -> Pair)
-> Maybe [ResourceRequirement] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ResourceRequirement]
resourceRequirements,
            (Text
"dockerLabels" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
dockerLabels,
            (Text
"extraHosts" Text -> [HostEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([HostEntry] -> Pair) -> Maybe [HostEntry] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [HostEntry]
extraHosts,
            (Text
"memory" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
memory,
            (Text
"systemControls" Text -> [SystemControl] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([SystemControl] -> Pair) -> Maybe [SystemControl] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SystemControl]
systemControls,
            (Text
"user" 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
user,
            (Text
"firelensConfiguration" Text -> FirelensConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FirelensConfiguration -> Pair)
-> Maybe FirelensConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FirelensConfiguration
firelensConfiguration,
            (Text
"dnsSearchDomains" 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]
dnsSearchDomains,
            (Text
"logConfiguration" Text -> LogConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LogConfiguration -> Pair) -> Maybe LogConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LogConfiguration
logConfiguration,
            (Text
"linuxParameters" Text -> LinuxParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (LinuxParameters -> Pair) -> Maybe LinuxParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LinuxParameters
linuxParameters,
            (Text
"pseudoTerminal" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
pseudoTerminal,
            (Text
"dependsOn" Text -> [ContainerDependency] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ContainerDependency] -> Pair)
-> Maybe [ContainerDependency] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ContainerDependency]
dependsOn,
            (Text
"name" 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
name,
            (Text
"dnsServers" 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]
dnsServers,
            (Text
"mountPoints" Text -> [MountPoint] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([MountPoint] -> Pair) -> Maybe [MountPoint] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [MountPoint]
mountPoints,
            (Text
"interactive" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
interactive,
            (Text
"startTimeout" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
startTimeout,
            (Text
"links" 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]
links,
            (Text
"readonlyRootFilesystem" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
readonlyRootFilesystem,
            (Text
"essential" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
essential,
            (Text
"cpu" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
cpu,
            (Text
"memoryReservation" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
memoryReservation
          ]
      )