{-# 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.Batch.Types.ContainerProperties
-- 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.Batch.Types.ContainerProperties where

import Amazonka.Batch.Types.FargatePlatformConfiguration
import Amazonka.Batch.Types.KeyValuePair
import Amazonka.Batch.Types.LinuxParameters
import Amazonka.Batch.Types.LogConfiguration
import Amazonka.Batch.Types.MountPoint
import Amazonka.Batch.Types.NetworkConfiguration
import Amazonka.Batch.Types.ResourceRequirement
import Amazonka.Batch.Types.Secret
import Amazonka.Batch.Types.Ulimit
import Amazonka.Batch.Types.Volume
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Container properties are used in job definitions to describe the
-- container that\'s launched as part of a job.
--
-- /See:/ 'newContainerProperties' smart constructor.
data ContainerProperties = ContainerProperties'
  { -- | 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
    -- @ repository-url\/image:tag @. 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.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @IMAGE@ parameter of
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    --
    -- Docker image architecture must match the processor architecture of the
    -- compute resources that they\'re scheduled on. For example, ARM-based
    -- Docker images can only run on ARM-based compute resources.
    --
    -- -   Images in Amazon ECR repositories use the full registry and
    --     repository URI (for example,
    --     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>@).
    --
    -- -   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@).
    ContainerProperties -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The command that\'s passed to the container. This parameter maps to
    -- @Cmd@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @COMMAND@ parameter to
    -- <https://docs.docker.com/engine/reference/run/ docker run>. For more
    -- information, see
    -- <https://docs.docker.com/engine/reference/builder/#cmd>.
    ContainerProperties -> Maybe [Text]
command :: Prelude.Maybe [Prelude.Text],
    -- | The secrets for the container. For more information, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying sensitive data>
    -- in the /Batch User Guide/.
    ContainerProperties -> Maybe [Secret]
secrets :: Prelude.Maybe [Secret],
    -- | The environment variables to pass to a container. This parameter maps to
    -- @Env@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--env@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    --
    -- We don\'t recommend using plaintext environment variables for sensitive
    -- information, such as credential data.
    --
    -- Environment variables must not start with @AWS_BATCH@; this naming
    -- convention is reserved for variables that are set by the Batch service.
    ContainerProperties -> Maybe [KeyValuePair]
environment :: Prelude.Maybe [KeyValuePair],
    -- | A list of @ulimits@ to set in the container. This parameter maps to
    -- @Ulimits@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--ulimit@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    --
    -- This parameter isn\'t applicable to jobs that are running on Fargate
    -- resources and shouldn\'t be provided.
    ContainerProperties -> Maybe [Ulimit]
ulimits :: Prelude.Maybe [Ulimit],
    -- | The Amazon Resource Name (ARN) of the execution role that Batch can
    -- assume. For jobs that run on Fargate resources, you must provide an
    -- execution role. For more information, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html Batch execution IAM role>
    -- in the /Batch User Guide/.
    ContainerProperties -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | When this parameter is true, the container is given elevated permissions
    -- on the host container instance (similar to the @root@ user). This
    -- parameter maps to @Privileged@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--privileged@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>. The default
    -- value is false.
    --
    -- This parameter isn\'t applicable to jobs that are running on Fargate
    -- resources and shouldn\'t be provided, or specified as false.
    ContainerProperties -> Maybe Bool
privileged :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the IAM role that the container can
    -- assume for Amazon Web Services permissions. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerProperties -> Maybe Text
jobRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The type and amount of resources to assign to a container. The supported
    -- resources include @GPU@, @MEMORY@, and @VCPU@.
    ContainerProperties -> Maybe [ResourceRequirement]
resourceRequirements :: Prelude.Maybe [ResourceRequirement],
    -- | The instance type to use for a multi-node parallel job. All node groups
    -- in a multi-node parallel job must use the same instance type.
    --
    -- This parameter isn\'t applicable to single-node container jobs or jobs
    -- that run on Fargate resources, and shouldn\'t be provided.
    ContainerProperties -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | This parameter indicates the memory hard limit (in MiB) for a container.
    -- If your container attempts to exceed the specified number, it\'s
    -- terminated. You must specify at least 4 MiB of memory for a job using
    -- this parameter. The memory hard limit can be specified in several
    -- places. It must be specified for each node at least once.
    --
    -- This parameter maps to @Memory@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--memory@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    --
    -- This parameter is supported on EC2 resources but isn\'t supported on
    -- Fargate resources. For Fargate resources, you should specify the memory
    -- requirement using @resourceRequirement@. You can also do this for EC2
    -- resources.
    --
    -- If you\'re trying to maximize your resource utilization by providing
    -- your jobs as much memory as possible for a particular instance type, see
    -- <https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html Memory Management>
    -- in the /Batch User Guide/.
    ContainerProperties -> Maybe Int
memory :: Prelude.Maybe Prelude.Int,
    -- | The user name to use inside the container. This parameter maps to @User@
    -- in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--user@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    ContainerProperties -> Maybe Text
user :: 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.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--log-driver@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>. By default,
    -- containers use the same logging driver that the Docker daemon uses.
    -- However the container might 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.
    --
    -- Batch currently supports a subset of the logging drivers available to
    -- the Docker daemon (shown in the LogConfiguration data type).
    --
    -- 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 into your container instance and run the
    -- following command: @sudo docker version | grep \"Server API version\"@
    --
    -- 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/.
    ContainerProperties -> Maybe LogConfiguration
logConfiguration :: Prelude.Maybe LogConfiguration,
    -- | Linux-specific modifications that are applied to the container, such as
    -- details for device mappings.
    ContainerProperties -> Maybe LinuxParameters
linuxParameters :: Prelude.Maybe LinuxParameters,
    -- | The mount points for data volumes in your container. This parameter maps
    -- to @Volumes@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--volume@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>.
    ContainerProperties -> Maybe [MountPoint]
mountPoints :: Prelude.Maybe [MountPoint],
    -- | The platform configuration for jobs that are running on Fargate
    -- resources. Jobs that are running on EC2 resources must not specify this
    -- parameter.
    ContainerProperties -> Maybe FargatePlatformConfiguration
fargatePlatformConfiguration :: Prelude.Maybe FargatePlatformConfiguration,
    -- | The number of vCPUs reserved for the job. Each vCPU is equivalent to
    -- 1,024 CPU shares. This parameter maps to @CpuShares@ in the
    -- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--cpu-shares@ option to
    -- <https://docs.docker.com/engine/reference/run/ docker run>. The number
    -- of vCPUs must be specified but can be specified in several places. You
    -- must specify it at least once for each node.
    --
    -- This parameter is supported on EC2 resources but isn\'t supported for
    -- jobs that run on Fargate resources. For these resources, use
    -- @resourceRequirement@ instead. You can use this parameter or
    -- @resourceRequirements@ structure but not both.
    --
    -- This parameter isn\'t applicable to jobs that are running on Fargate
    -- resources and shouldn\'t be provided. For jobs that run on Fargate
    -- resources, you must specify the vCPU requirement for the job using
    -- @resourceRequirements@.
    ContainerProperties -> Maybe Int
vcpus :: Prelude.Maybe Prelude.Int,
    -- | 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.23/#create-a-container Create a container>
    -- section of the
    -- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
    -- @--read-only@ option to @docker run@.
    ContainerProperties -> Maybe Bool
readonlyRootFilesystem :: Prelude.Maybe Prelude.Bool,
    -- | A list of data volumes used in a job.
    ContainerProperties -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume],
    -- | The network configuration for jobs that are running on Fargate
    -- resources. Jobs that are running on EC2 resources must not specify this
    -- parameter.
    ContainerProperties -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration
  }
  deriving (ContainerProperties -> ContainerProperties -> Bool
(ContainerProperties -> ContainerProperties -> Bool)
-> (ContainerProperties -> ContainerProperties -> Bool)
-> Eq ContainerProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerProperties -> ContainerProperties -> Bool
$c/= :: ContainerProperties -> ContainerProperties -> Bool
== :: ContainerProperties -> ContainerProperties -> Bool
$c== :: ContainerProperties -> ContainerProperties -> Bool
Prelude.Eq, ReadPrec [ContainerProperties]
ReadPrec ContainerProperties
Int -> ReadS ContainerProperties
ReadS [ContainerProperties]
(Int -> ReadS ContainerProperties)
-> ReadS [ContainerProperties]
-> ReadPrec ContainerProperties
-> ReadPrec [ContainerProperties]
-> Read ContainerProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerProperties]
$creadListPrec :: ReadPrec [ContainerProperties]
readPrec :: ReadPrec ContainerProperties
$creadPrec :: ReadPrec ContainerProperties
readList :: ReadS [ContainerProperties]
$creadList :: ReadS [ContainerProperties]
readsPrec :: Int -> ReadS ContainerProperties
$creadsPrec :: Int -> ReadS ContainerProperties
Prelude.Read, Int -> ContainerProperties -> ShowS
[ContainerProperties] -> ShowS
ContainerProperties -> String
(Int -> ContainerProperties -> ShowS)
-> (ContainerProperties -> String)
-> ([ContainerProperties] -> ShowS)
-> Show ContainerProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerProperties] -> ShowS
$cshowList :: [ContainerProperties] -> ShowS
show :: ContainerProperties -> String
$cshow :: ContainerProperties -> String
showsPrec :: Int -> ContainerProperties -> ShowS
$cshowsPrec :: Int -> ContainerProperties -> ShowS
Prelude.Show, (forall x. ContainerProperties -> Rep ContainerProperties x)
-> (forall x. Rep ContainerProperties x -> ContainerProperties)
-> Generic ContainerProperties
forall x. Rep ContainerProperties x -> ContainerProperties
forall x. ContainerProperties -> Rep ContainerProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerProperties x -> ContainerProperties
$cfrom :: forall x. ContainerProperties -> Rep ContainerProperties x
Prelude.Generic)

-- |
-- Create a value of 'ContainerProperties' 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', 'containerProperties_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
-- @ repository-url\/image:tag @. 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.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @IMAGE@ parameter of
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- Docker image architecture must match the processor architecture of the
-- compute resources that they\'re scheduled on. For example, ARM-based
-- Docker images can only run on ARM-based compute resources.
--
-- -   Images in Amazon ECR repositories use the full registry and
--     repository URI (for example,
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>@).
--
-- -   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', 'containerProperties_command' - The command that\'s passed to the container. This parameter maps to
-- @Cmd@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @COMMAND@ parameter to
-- <https://docs.docker.com/engine/reference/run/ docker run>. For more
-- information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd>.
--
-- 'secrets', 'containerProperties_secrets' - The secrets for the container. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying sensitive data>
-- in the /Batch User Guide/.
--
-- 'environment', 'containerProperties_environment' - The environment variables to pass to a container. This parameter maps to
-- @Env@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--env@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- We don\'t recommend using plaintext environment variables for sensitive
-- information, such as credential data.
--
-- Environment variables must not start with @AWS_BATCH@; this naming
-- convention is reserved for variables that are set by the Batch service.
--
-- 'ulimits', 'containerProperties_ulimits' - A list of @ulimits@ to set in the container. This parameter maps to
-- @Ulimits@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--ulimit@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided.
--
-- 'executionRoleArn', 'containerProperties_executionRoleArn' - The Amazon Resource Name (ARN) of the execution role that Batch can
-- assume. For jobs that run on Fargate resources, you must provide an
-- execution role. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html Batch execution IAM role>
-- in the /Batch User Guide/.
--
-- 'privileged', 'containerProperties_privileged' - When this parameter is true, the container is given elevated permissions
-- on the host container instance (similar to the @root@ user). This
-- parameter maps to @Privileged@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--privileged@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. The default
-- value is false.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided, or specified as false.
--
-- 'jobRoleArn', 'containerProperties_jobRoleArn' - The Amazon Resource Name (ARN) of the IAM role that the container can
-- assume for Amazon Web Services permissions. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'resourceRequirements', 'containerProperties_resourceRequirements' - The type and amount of resources to assign to a container. The supported
-- resources include @GPU@, @MEMORY@, and @VCPU@.
--
-- 'instanceType', 'containerProperties_instanceType' - The instance type to use for a multi-node parallel job. All node groups
-- in a multi-node parallel job must use the same instance type.
--
-- This parameter isn\'t applicable to single-node container jobs or jobs
-- that run on Fargate resources, and shouldn\'t be provided.
--
-- 'memory', 'containerProperties_memory' - This parameter indicates the memory hard limit (in MiB) for a container.
-- If your container attempts to exceed the specified number, it\'s
-- terminated. You must specify at least 4 MiB of memory for a job using
-- this parameter. The memory hard limit can be specified in several
-- places. It must be specified for each node at least once.
--
-- This parameter maps to @Memory@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--memory@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- This parameter is supported on EC2 resources but isn\'t supported on
-- Fargate resources. For Fargate resources, you should specify the memory
-- requirement using @resourceRequirement@. You can also do this for EC2
-- resources.
--
-- If you\'re trying to maximize your resource utilization by providing
-- your jobs as much memory as possible for a particular instance type, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html Memory Management>
-- in the /Batch User Guide/.
--
-- 'user', 'containerProperties_user' - The user name to use inside the container. This parameter maps to @User@
-- in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--user@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- 'logConfiguration', 'containerProperties_logConfiguration' - The log configuration specification for the container.
--
-- This parameter maps to @LogConfig@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--log-driver@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. By default,
-- containers use the same logging driver that the Docker daemon uses.
-- However the container might 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.
--
-- Batch currently supports a subset of the logging drivers available to
-- the Docker daemon (shown in the LogConfiguration data type).
--
-- 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 into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
--
-- 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', 'containerProperties_linuxParameters' - Linux-specific modifications that are applied to the container, such as
-- details for device mappings.
--
-- 'mountPoints', 'containerProperties_mountPoints' - The mount points for data volumes in your container. This parameter maps
-- to @Volumes@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--volume@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- 'fargatePlatformConfiguration', 'containerProperties_fargatePlatformConfiguration' - The platform configuration for jobs that are running on Fargate
-- resources. Jobs that are running on EC2 resources must not specify this
-- parameter.
--
-- 'vcpus', 'containerProperties_vcpus' - The number of vCPUs reserved for the job. Each vCPU is equivalent to
-- 1,024 CPU shares. This parameter maps to @CpuShares@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--cpu-shares@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. The number
-- of vCPUs must be specified but can be specified in several places. You
-- must specify it at least once for each node.
--
-- This parameter is supported on EC2 resources but isn\'t supported for
-- jobs that run on Fargate resources. For these resources, use
-- @resourceRequirement@ instead. You can use this parameter or
-- @resourceRequirements@ structure but not both.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided. For jobs that run on Fargate
-- resources, you must specify the vCPU requirement for the job using
-- @resourceRequirements@.
--
-- 'readonlyRootFilesystem', 'containerProperties_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.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--read-only@ option to @docker run@.
--
-- 'volumes', 'containerProperties_volumes' - A list of data volumes used in a job.
--
-- 'networkConfiguration', 'containerProperties_networkConfiguration' - The network configuration for jobs that are running on Fargate
-- resources. Jobs that are running on EC2 resources must not specify this
-- parameter.
newContainerProperties ::
  ContainerProperties
newContainerProperties :: ContainerProperties
newContainerProperties =
  ContainerProperties' :: Maybe Text
-> Maybe [Text]
-> Maybe [Secret]
-> Maybe [KeyValuePair]
-> Maybe [Ulimit]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [ResourceRequirement]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe LogConfiguration
-> Maybe LinuxParameters
-> Maybe [MountPoint]
-> Maybe FargatePlatformConfiguration
-> Maybe Int
-> Maybe Bool
-> Maybe [Volume]
-> Maybe NetworkConfiguration
-> ContainerProperties
ContainerProperties'
    { $sel:image:ContainerProperties' :: Maybe Text
image = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:command:ContainerProperties' :: Maybe [Text]
command = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:secrets:ContainerProperties' :: Maybe [Secret]
secrets = Maybe [Secret]
forall a. Maybe a
Prelude.Nothing,
      $sel:environment:ContainerProperties' :: Maybe [KeyValuePair]
environment = Maybe [KeyValuePair]
forall a. Maybe a
Prelude.Nothing,
      $sel:ulimits:ContainerProperties' :: Maybe [Ulimit]
ulimits = Maybe [Ulimit]
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:ContainerProperties' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:privileged:ContainerProperties' :: Maybe Bool
privileged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:jobRoleArn:ContainerProperties' :: Maybe Text
jobRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceRequirements:ContainerProperties' :: Maybe [ResourceRequirement]
resourceRequirements = Maybe [ResourceRequirement]
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:ContainerProperties' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:memory:ContainerProperties' :: Maybe Int
memory = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:user:ContainerProperties' :: Maybe Text
user = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:logConfiguration:ContainerProperties' :: Maybe LogConfiguration
logConfiguration = Maybe LogConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:linuxParameters:ContainerProperties' :: Maybe LinuxParameters
linuxParameters = Maybe LinuxParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:mountPoints:ContainerProperties' :: Maybe [MountPoint]
mountPoints = Maybe [MountPoint]
forall a. Maybe a
Prelude.Nothing,
      $sel:fargatePlatformConfiguration:ContainerProperties' :: Maybe FargatePlatformConfiguration
fargatePlatformConfiguration = Maybe FargatePlatformConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:vcpus:ContainerProperties' :: Maybe Int
vcpus = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:readonlyRootFilesystem:ContainerProperties' :: Maybe Bool
readonlyRootFilesystem = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:volumes:ContainerProperties' :: Maybe [Volume]
volumes = Maybe [Volume]
forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:ContainerProperties' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
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
-- @ repository-url\/image:tag @. 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.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @IMAGE@ parameter of
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- Docker image architecture must match the processor architecture of the
-- compute resources that they\'re scheduled on. For example, ARM-based
-- Docker images can only run on ARM-based compute resources.
--
-- -   Images in Amazon ECR repositories use the full registry and
--     repository URI (for example,
--     @012345678910.dkr.ecr.\<region-name>.amazonaws.com\/\<repository-name>@).
--
-- -   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@).
containerProperties_image :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Text)
containerProperties_image :: (Maybe Text -> f (Maybe Text))
-> ContainerProperties -> f ContainerProperties
containerProperties_image = (ContainerProperties -> Maybe Text)
-> (ContainerProperties -> Maybe Text -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Text
image :: Maybe Text
$sel:image:ContainerProperties' :: ContainerProperties -> Maybe Text
image} -> Maybe Text
image) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Text
a -> ContainerProperties
s {$sel:image:ContainerProperties' :: Maybe Text
image = Maybe Text
a} :: ContainerProperties)

-- | The command that\'s passed to the container. This parameter maps to
-- @Cmd@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @COMMAND@ parameter to
-- <https://docs.docker.com/engine/reference/run/ docker run>. For more
-- information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd>.
containerProperties_command :: Lens.Lens' ContainerProperties (Prelude.Maybe [Prelude.Text])
containerProperties_command :: (Maybe [Text] -> f (Maybe [Text]))
-> ContainerProperties -> f ContainerProperties
containerProperties_command = (ContainerProperties -> Maybe [Text])
-> (ContainerProperties -> Maybe [Text] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [Text]
command :: Maybe [Text]
$sel:command:ContainerProperties' :: ContainerProperties -> Maybe [Text]
command} -> Maybe [Text]
command) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [Text]
a -> ContainerProperties
s {$sel:command:ContainerProperties' :: Maybe [Text]
command = Maybe [Text]
a} :: ContainerProperties) ((Maybe [Text] -> f (Maybe [Text]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContainerProperties
-> f ContainerProperties
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 secrets for the container. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/specifying-sensitive-data.html Specifying sensitive data>
-- in the /Batch User Guide/.
containerProperties_secrets :: Lens.Lens' ContainerProperties (Prelude.Maybe [Secret])
containerProperties_secrets :: (Maybe [Secret] -> f (Maybe [Secret]))
-> ContainerProperties -> f ContainerProperties
containerProperties_secrets = (ContainerProperties -> Maybe [Secret])
-> (ContainerProperties -> Maybe [Secret] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [Secret])
     (Maybe [Secret])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [Secret]
secrets :: Maybe [Secret]
$sel:secrets:ContainerProperties' :: ContainerProperties -> Maybe [Secret]
secrets} -> Maybe [Secret]
secrets) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [Secret]
a -> ContainerProperties
s {$sel:secrets:ContainerProperties' :: Maybe [Secret]
secrets = Maybe [Secret]
a} :: ContainerProperties) ((Maybe [Secret] -> f (Maybe [Secret]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [Secret] -> f (Maybe [Secret]))
    -> Maybe [Secret] -> f (Maybe [Secret]))
-> (Maybe [Secret] -> f (Maybe [Secret]))
-> ContainerProperties
-> f ContainerProperties
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

-- | The environment variables to pass to a container. This parameter maps to
-- @Env@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--env@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- We don\'t recommend using plaintext environment variables for sensitive
-- information, such as credential data.
--
-- Environment variables must not start with @AWS_BATCH@; this naming
-- convention is reserved for variables that are set by the Batch service.
containerProperties_environment :: Lens.Lens' ContainerProperties (Prelude.Maybe [KeyValuePair])
containerProperties_environment :: (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> ContainerProperties -> f ContainerProperties
containerProperties_environment = (ContainerProperties -> Maybe [KeyValuePair])
-> (ContainerProperties
    -> Maybe [KeyValuePair] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [KeyValuePair])
     (Maybe [KeyValuePair])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [KeyValuePair]
environment :: Maybe [KeyValuePair]
$sel:environment:ContainerProperties' :: ContainerProperties -> Maybe [KeyValuePair]
environment} -> Maybe [KeyValuePair]
environment) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [KeyValuePair]
a -> ContainerProperties
s {$sel:environment:ContainerProperties' :: Maybe [KeyValuePair]
environment = Maybe [KeyValuePair]
a} :: ContainerProperties) ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
    -> Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> (Maybe [KeyValuePair] -> f (Maybe [KeyValuePair]))
-> ContainerProperties
-> f ContainerProperties
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 @ulimits@ to set in the container. This parameter maps to
-- @Ulimits@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--ulimit@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided.
containerProperties_ulimits :: Lens.Lens' ContainerProperties (Prelude.Maybe [Ulimit])
containerProperties_ulimits :: (Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> ContainerProperties -> f ContainerProperties
containerProperties_ulimits = (ContainerProperties -> Maybe [Ulimit])
-> (ContainerProperties -> Maybe [Ulimit] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [Ulimit])
     (Maybe [Ulimit])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [Ulimit]
ulimits :: Maybe [Ulimit]
$sel:ulimits:ContainerProperties' :: ContainerProperties -> Maybe [Ulimit]
ulimits} -> Maybe [Ulimit]
ulimits) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [Ulimit]
a -> ContainerProperties
s {$sel:ulimits:ContainerProperties' :: Maybe [Ulimit]
ulimits = Maybe [Ulimit]
a} :: ContainerProperties) ((Maybe [Ulimit] -> f (Maybe [Ulimit]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [Ulimit] -> f (Maybe [Ulimit]))
    -> Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> (Maybe [Ulimit] -> f (Maybe [Ulimit]))
-> ContainerProperties
-> f ContainerProperties
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

-- | The Amazon Resource Name (ARN) of the execution role that Batch can
-- assume. For jobs that run on Fargate resources, you must provide an
-- execution role. For more information, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html Batch execution IAM role>
-- in the /Batch User Guide/.
containerProperties_executionRoleArn :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Text)
containerProperties_executionRoleArn :: (Maybe Text -> f (Maybe Text))
-> ContainerProperties -> f ContainerProperties
containerProperties_executionRoleArn = (ContainerProperties -> Maybe Text)
-> (ContainerProperties -> Maybe Text -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Text
a -> ContainerProperties
s {$sel:executionRoleArn:ContainerProperties' :: Maybe Text
executionRoleArn = Maybe Text
a} :: ContainerProperties)

-- | When this parameter is true, the container is given elevated permissions
-- on the host container instance (similar to the @root@ user). This
-- parameter maps to @Privileged@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--privileged@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. The default
-- value is false.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided, or specified as false.
containerProperties_privileged :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Bool)
containerProperties_privileged :: (Maybe Bool -> f (Maybe Bool))
-> ContainerProperties -> f ContainerProperties
containerProperties_privileged = (ContainerProperties -> Maybe Bool)
-> (ContainerProperties -> Maybe Bool -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Bool
privileged :: Maybe Bool
$sel:privileged:ContainerProperties' :: ContainerProperties -> Maybe Bool
privileged} -> Maybe Bool
privileged) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Bool
a -> ContainerProperties
s {$sel:privileged:ContainerProperties' :: Maybe Bool
privileged = Maybe Bool
a} :: ContainerProperties)

-- | The Amazon Resource Name (ARN) of the IAM role that the container can
-- assume for Amazon Web Services permissions. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html IAM Roles for Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerProperties_jobRoleArn :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Text)
containerProperties_jobRoleArn :: (Maybe Text -> f (Maybe Text))
-> ContainerProperties -> f ContainerProperties
containerProperties_jobRoleArn = (ContainerProperties -> Maybe Text)
-> (ContainerProperties -> Maybe Text -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Text
jobRoleArn :: Maybe Text
$sel:jobRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
jobRoleArn} -> Maybe Text
jobRoleArn) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Text
a -> ContainerProperties
s {$sel:jobRoleArn:ContainerProperties' :: Maybe Text
jobRoleArn = Maybe Text
a} :: ContainerProperties)

-- | The type and amount of resources to assign to a container. The supported
-- resources include @GPU@, @MEMORY@, and @VCPU@.
containerProperties_resourceRequirements :: Lens.Lens' ContainerProperties (Prelude.Maybe [ResourceRequirement])
containerProperties_resourceRequirements :: (Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> ContainerProperties -> f ContainerProperties
containerProperties_resourceRequirements = (ContainerProperties -> Maybe [ResourceRequirement])
-> (ContainerProperties
    -> Maybe [ResourceRequirement] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [ResourceRequirement])
     (Maybe [ResourceRequirement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [ResourceRequirement]
resourceRequirements :: Maybe [ResourceRequirement]
$sel:resourceRequirements:ContainerProperties' :: ContainerProperties -> Maybe [ResourceRequirement]
resourceRequirements} -> Maybe [ResourceRequirement]
resourceRequirements) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [ResourceRequirement]
a -> ContainerProperties
s {$sel:resourceRequirements:ContainerProperties' :: Maybe [ResourceRequirement]
resourceRequirements = Maybe [ResourceRequirement]
a} :: ContainerProperties) ((Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [ResourceRequirement]
     -> f (Maybe [ResourceRequirement]))
    -> Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> (Maybe [ResourceRequirement] -> f (Maybe [ResourceRequirement]))
-> ContainerProperties
-> f ContainerProperties
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

-- | The instance type to use for a multi-node parallel job. All node groups
-- in a multi-node parallel job must use the same instance type.
--
-- This parameter isn\'t applicable to single-node container jobs or jobs
-- that run on Fargate resources, and shouldn\'t be provided.
containerProperties_instanceType :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Text)
containerProperties_instanceType :: (Maybe Text -> f (Maybe Text))
-> ContainerProperties -> f ContainerProperties
containerProperties_instanceType = (ContainerProperties -> Maybe Text)
-> (ContainerProperties -> Maybe Text -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:ContainerProperties' :: ContainerProperties -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Text
a -> ContainerProperties
s {$sel:instanceType:ContainerProperties' :: Maybe Text
instanceType = Maybe Text
a} :: ContainerProperties)

-- | This parameter indicates the memory hard limit (in MiB) for a container.
-- If your container attempts to exceed the specified number, it\'s
-- terminated. You must specify at least 4 MiB of memory for a job using
-- this parameter. The memory hard limit can be specified in several
-- places. It must be specified for each node at least once.
--
-- This parameter maps to @Memory@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--memory@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
--
-- This parameter is supported on EC2 resources but isn\'t supported on
-- Fargate resources. For Fargate resources, you should specify the memory
-- requirement using @resourceRequirement@. You can also do this for EC2
-- resources.
--
-- If you\'re trying to maximize your resource utilization by providing
-- your jobs as much memory as possible for a particular instance type, see
-- <https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html Memory Management>
-- in the /Batch User Guide/.
containerProperties_memory :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Int)
containerProperties_memory :: (Maybe Int -> f (Maybe Int))
-> ContainerProperties -> f ContainerProperties
containerProperties_memory = (ContainerProperties -> Maybe Int)
-> (ContainerProperties -> Maybe Int -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Int
memory :: Maybe Int
$sel:memory:ContainerProperties' :: ContainerProperties -> Maybe Int
memory} -> Maybe Int
memory) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Int
a -> ContainerProperties
s {$sel:memory:ContainerProperties' :: Maybe Int
memory = Maybe Int
a} :: ContainerProperties)

-- | The user name to use inside the container. This parameter maps to @User@
-- in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--user@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
containerProperties_user :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Text)
containerProperties_user :: (Maybe Text -> f (Maybe Text))
-> ContainerProperties -> f ContainerProperties
containerProperties_user = (ContainerProperties -> Maybe Text)
-> (ContainerProperties -> Maybe Text -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Text
user :: Maybe Text
$sel:user:ContainerProperties' :: ContainerProperties -> Maybe Text
user} -> Maybe Text
user) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Text
a -> ContainerProperties
s {$sel:user:ContainerProperties' :: Maybe Text
user = Maybe Text
a} :: ContainerProperties)

-- | The log configuration specification for the container.
--
-- This parameter maps to @LogConfig@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--log-driver@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. By default,
-- containers use the same logging driver that the Docker daemon uses.
-- However the container might 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.
--
-- Batch currently supports a subset of the logging drivers available to
-- the Docker daemon (shown in the LogConfiguration data type).
--
-- 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 into your container instance and run the
-- following command: @sudo docker version | grep \"Server API version\"@
--
-- 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/.
containerProperties_logConfiguration :: Lens.Lens' ContainerProperties (Prelude.Maybe LogConfiguration)
containerProperties_logConfiguration :: (Maybe LogConfiguration -> f (Maybe LogConfiguration))
-> ContainerProperties -> f ContainerProperties
containerProperties_logConfiguration = (ContainerProperties -> Maybe LogConfiguration)
-> (ContainerProperties
    -> Maybe LogConfiguration -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe LogConfiguration)
     (Maybe LogConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe LogConfiguration
logConfiguration :: Maybe LogConfiguration
$sel:logConfiguration:ContainerProperties' :: ContainerProperties -> Maybe LogConfiguration
logConfiguration} -> Maybe LogConfiguration
logConfiguration) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe LogConfiguration
a -> ContainerProperties
s {$sel:logConfiguration:ContainerProperties' :: Maybe LogConfiguration
logConfiguration = Maybe LogConfiguration
a} :: ContainerProperties)

-- | Linux-specific modifications that are applied to the container, such as
-- details for device mappings.
containerProperties_linuxParameters :: Lens.Lens' ContainerProperties (Prelude.Maybe LinuxParameters)
containerProperties_linuxParameters :: (Maybe LinuxParameters -> f (Maybe LinuxParameters))
-> ContainerProperties -> f ContainerProperties
containerProperties_linuxParameters = (ContainerProperties -> Maybe LinuxParameters)
-> (ContainerProperties
    -> Maybe LinuxParameters -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe LinuxParameters)
     (Maybe LinuxParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe LinuxParameters
linuxParameters :: Maybe LinuxParameters
$sel:linuxParameters:ContainerProperties' :: ContainerProperties -> Maybe LinuxParameters
linuxParameters} -> Maybe LinuxParameters
linuxParameters) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe LinuxParameters
a -> ContainerProperties
s {$sel:linuxParameters:ContainerProperties' :: Maybe LinuxParameters
linuxParameters = Maybe LinuxParameters
a} :: ContainerProperties)

-- | The mount points for data volumes in your container. This parameter maps
-- to @Volumes@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--volume@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>.
containerProperties_mountPoints :: Lens.Lens' ContainerProperties (Prelude.Maybe [MountPoint])
containerProperties_mountPoints :: (Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> ContainerProperties -> f ContainerProperties
containerProperties_mountPoints = (ContainerProperties -> Maybe [MountPoint])
-> (ContainerProperties
    -> Maybe [MountPoint] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [MountPoint])
     (Maybe [MountPoint])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [MountPoint]
mountPoints :: Maybe [MountPoint]
$sel:mountPoints:ContainerProperties' :: ContainerProperties -> Maybe [MountPoint]
mountPoints} -> Maybe [MountPoint]
mountPoints) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [MountPoint]
a -> ContainerProperties
s {$sel:mountPoints:ContainerProperties' :: Maybe [MountPoint]
mountPoints = Maybe [MountPoint]
a} :: ContainerProperties) ((Maybe [MountPoint] -> f (Maybe [MountPoint]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [MountPoint] -> f (Maybe [MountPoint]))
    -> Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> (Maybe [MountPoint] -> f (Maybe [MountPoint]))
-> ContainerProperties
-> f ContainerProperties
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

-- | The platform configuration for jobs that are running on Fargate
-- resources. Jobs that are running on EC2 resources must not specify this
-- parameter.
containerProperties_fargatePlatformConfiguration :: Lens.Lens' ContainerProperties (Prelude.Maybe FargatePlatformConfiguration)
containerProperties_fargatePlatformConfiguration :: (Maybe FargatePlatformConfiguration
 -> f (Maybe FargatePlatformConfiguration))
-> ContainerProperties -> f ContainerProperties
containerProperties_fargatePlatformConfiguration = (ContainerProperties -> Maybe FargatePlatformConfiguration)
-> (ContainerProperties
    -> Maybe FargatePlatformConfiguration -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe FargatePlatformConfiguration)
     (Maybe FargatePlatformConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe FargatePlatformConfiguration
fargatePlatformConfiguration :: Maybe FargatePlatformConfiguration
$sel:fargatePlatformConfiguration:ContainerProperties' :: ContainerProperties -> Maybe FargatePlatformConfiguration
fargatePlatformConfiguration} -> Maybe FargatePlatformConfiguration
fargatePlatformConfiguration) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe FargatePlatformConfiguration
a -> ContainerProperties
s {$sel:fargatePlatformConfiguration:ContainerProperties' :: Maybe FargatePlatformConfiguration
fargatePlatformConfiguration = Maybe FargatePlatformConfiguration
a} :: ContainerProperties)

-- | The number of vCPUs reserved for the job. Each vCPU is equivalent to
-- 1,024 CPU shares. This parameter maps to @CpuShares@ in the
-- <https://docs.docker.com/engine/api/v1.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--cpu-shares@ option to
-- <https://docs.docker.com/engine/reference/run/ docker run>. The number
-- of vCPUs must be specified but can be specified in several places. You
-- must specify it at least once for each node.
--
-- This parameter is supported on EC2 resources but isn\'t supported for
-- jobs that run on Fargate resources. For these resources, use
-- @resourceRequirement@ instead. You can use this parameter or
-- @resourceRequirements@ structure but not both.
--
-- This parameter isn\'t applicable to jobs that are running on Fargate
-- resources and shouldn\'t be provided. For jobs that run on Fargate
-- resources, you must specify the vCPU requirement for the job using
-- @resourceRequirements@.
containerProperties_vcpus :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Int)
containerProperties_vcpus :: (Maybe Int -> f (Maybe Int))
-> ContainerProperties -> f ContainerProperties
containerProperties_vcpus = (ContainerProperties -> Maybe Int)
-> (ContainerProperties -> Maybe Int -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Int
vcpus :: Maybe Int
$sel:vcpus:ContainerProperties' :: ContainerProperties -> Maybe Int
vcpus} -> Maybe Int
vcpus) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Int
a -> ContainerProperties
s {$sel:vcpus:ContainerProperties' :: Maybe Int
vcpus = Maybe Int
a} :: ContainerProperties)

-- | 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.23/#create-a-container Create a container>
-- section of the
-- <https://docs.docker.com/engine/api/v1.23/ Docker Remote API> and the
-- @--read-only@ option to @docker run@.
containerProperties_readonlyRootFilesystem :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Bool)
containerProperties_readonlyRootFilesystem :: (Maybe Bool -> f (Maybe Bool))
-> ContainerProperties -> f ContainerProperties
containerProperties_readonlyRootFilesystem = (ContainerProperties -> Maybe Bool)
-> (ContainerProperties -> Maybe Bool -> ContainerProperties)
-> Lens
     ContainerProperties ContainerProperties (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe Bool
readonlyRootFilesystem :: Maybe Bool
$sel:readonlyRootFilesystem:ContainerProperties' :: ContainerProperties -> Maybe Bool
readonlyRootFilesystem} -> Maybe Bool
readonlyRootFilesystem) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe Bool
a -> ContainerProperties
s {$sel:readonlyRootFilesystem:ContainerProperties' :: Maybe Bool
readonlyRootFilesystem = Maybe Bool
a} :: ContainerProperties)

-- | A list of data volumes used in a job.
containerProperties_volumes :: Lens.Lens' ContainerProperties (Prelude.Maybe [Volume])
containerProperties_volumes :: (Maybe [Volume] -> f (Maybe [Volume]))
-> ContainerProperties -> f ContainerProperties
containerProperties_volumes = (ContainerProperties -> Maybe [Volume])
-> (ContainerProperties -> Maybe [Volume] -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe [Volume])
     (Maybe [Volume])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe [Volume]
volumes :: Maybe [Volume]
$sel:volumes:ContainerProperties' :: ContainerProperties -> Maybe [Volume]
volumes} -> Maybe [Volume]
volumes) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe [Volume]
a -> ContainerProperties
s {$sel:volumes:ContainerProperties' :: Maybe [Volume]
volumes = Maybe [Volume]
a} :: ContainerProperties) ((Maybe [Volume] -> f (Maybe [Volume]))
 -> ContainerProperties -> f ContainerProperties)
-> ((Maybe [Volume] -> f (Maybe [Volume]))
    -> Maybe [Volume] -> f (Maybe [Volume]))
-> (Maybe [Volume] -> f (Maybe [Volume]))
-> ContainerProperties
-> f ContainerProperties
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Volume] [Volume] [Volume] [Volume]
-> Iso
     (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume]) (Maybe [Volume])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Volume] [Volume] [Volume] [Volume]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The network configuration for jobs that are running on Fargate
-- resources. Jobs that are running on EC2 resources must not specify this
-- parameter.
containerProperties_networkConfiguration :: Lens.Lens' ContainerProperties (Prelude.Maybe NetworkConfiguration)
containerProperties_networkConfiguration :: (Maybe NetworkConfiguration -> f (Maybe NetworkConfiguration))
-> ContainerProperties -> f ContainerProperties
containerProperties_networkConfiguration = (ContainerProperties -> Maybe NetworkConfiguration)
-> (ContainerProperties
    -> Maybe NetworkConfiguration -> ContainerProperties)
-> Lens
     ContainerProperties
     ContainerProperties
     (Maybe NetworkConfiguration)
     (Maybe NetworkConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerProperties' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:ContainerProperties' :: ContainerProperties -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: ContainerProperties
s@ContainerProperties' {} Maybe NetworkConfiguration
a -> ContainerProperties
s {$sel:networkConfiguration:ContainerProperties' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: ContainerProperties)

instance Core.FromJSON ContainerProperties where
  parseJSON :: Value -> Parser ContainerProperties
parseJSON =
    String
-> (Object -> Parser ContainerProperties)
-> Value
-> Parser ContainerProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ContainerProperties"
      ( \Object
x ->
          Maybe Text
-> Maybe [Text]
-> Maybe [Secret]
-> Maybe [KeyValuePair]
-> Maybe [Ulimit]
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe [ResourceRequirement]
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe LogConfiguration
-> Maybe LinuxParameters
-> Maybe [MountPoint]
-> Maybe FargatePlatformConfiguration
-> Maybe Int
-> Maybe Bool
-> Maybe [Volume]
-> Maybe NetworkConfiguration
-> ContainerProperties
ContainerProperties'
            (Maybe Text
 -> Maybe [Text]
 -> Maybe [Secret]
 -> Maybe [KeyValuePair]
 -> Maybe [Ulimit]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe [ResourceRequirement]
 -> Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe LogConfiguration
 -> Maybe LinuxParameters
 -> Maybe [MountPoint]
 -> Maybe FargatePlatformConfiguration
 -> Maybe Int
 -> Maybe Bool
 -> Maybe [Volume]
 -> Maybe NetworkConfiguration
 -> ContainerProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe [Secret]
      -> Maybe [KeyValuePair]
      -> Maybe [Ulimit]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [Secret]
   -> Maybe [KeyValuePair]
   -> Maybe [Ulimit]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [Text])
-> Parser
     (Maybe [Secret]
      -> Maybe [KeyValuePair]
      -> Maybe [Ulimit]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [Secret]
   -> Maybe [KeyValuePair]
   -> Maybe [Ulimit]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [Secret])
-> Parser
     (Maybe [KeyValuePair]
      -> Maybe [Ulimit]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [KeyValuePair]
   -> Maybe [Ulimit]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [KeyValuePair])
-> Parser
     (Maybe [Ulimit]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [Ulimit]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [Ulimit])
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionRoleArn")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 Text
   -> Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ResourceRequirement]
      -> Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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
"jobRoleArn")
            Parser
  (Maybe [ResourceRequirement]
   -> Maybe Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [ResourceRequirement])
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 Text
   -> Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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
"instanceType")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 Text
   -> Maybe LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Text)
-> Parser
     (Maybe LogConfiguration
      -> Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 LogConfiguration
   -> Maybe LinuxParameters
   -> Maybe [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe LogConfiguration)
-> Parser
     (Maybe LinuxParameters
      -> Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe LinuxParameters)
-> Parser
     (Maybe [MountPoint]
      -> Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 [MountPoint]
   -> Maybe FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe [MountPoint])
-> Parser
     (Maybe FargatePlatformConfiguration
      -> Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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 FargatePlatformConfiguration
   -> Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe FargatePlatformConfiguration)
-> Parser
     (Maybe Int
      -> Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FargatePlatformConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fargatePlatformConfiguration")
            Parser
  (Maybe Int
   -> Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Int)
-> Parser
     (Maybe Bool
      -> Maybe [Volume]
      -> Maybe NetworkConfiguration
      -> ContainerProperties)
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
"vcpus")
            Parser
  (Maybe Bool
   -> Maybe [Volume]
   -> Maybe NetworkConfiguration
   -> ContainerProperties)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [Volume]
      -> Maybe NetworkConfiguration -> ContainerProperties)
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 [Volume]
   -> Maybe NetworkConfiguration -> ContainerProperties)
-> Parser (Maybe [Volume])
-> Parser (Maybe NetworkConfiguration -> ContainerProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Volume]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"volumes" Parser (Maybe (Maybe [Volume]))
-> Maybe [Volume] -> Parser (Maybe [Volume])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Volume]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe NetworkConfiguration -> ContainerProperties)
-> Parser (Maybe NetworkConfiguration)
-> Parser ContainerProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"networkConfiguration")
      )

instance Prelude.Hashable ContainerProperties

instance Prelude.NFData ContainerProperties

instance Core.ToJSON ContainerProperties where
  toJSON :: ContainerProperties -> Value
toJSON ContainerProperties' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [KeyValuePair]
Maybe [MountPoint]
Maybe [ResourceRequirement]
Maybe [Secret]
Maybe [Ulimit]
Maybe [Volume]
Maybe Text
Maybe FargatePlatformConfiguration
Maybe NetworkConfiguration
Maybe LogConfiguration
Maybe LinuxParameters
networkConfiguration :: Maybe NetworkConfiguration
volumes :: Maybe [Volume]
readonlyRootFilesystem :: Maybe Bool
vcpus :: Maybe Int
fargatePlatformConfiguration :: Maybe FargatePlatformConfiguration
mountPoints :: Maybe [MountPoint]
linuxParameters :: Maybe LinuxParameters
logConfiguration :: Maybe LogConfiguration
user :: Maybe Text
memory :: Maybe Int
instanceType :: Maybe Text
resourceRequirements :: Maybe [ResourceRequirement]
jobRoleArn :: Maybe Text
privileged :: Maybe Bool
executionRoleArn :: Maybe Text
ulimits :: Maybe [Ulimit]
environment :: Maybe [KeyValuePair]
secrets :: Maybe [Secret]
command :: Maybe [Text]
image :: Maybe Text
$sel:networkConfiguration:ContainerProperties' :: ContainerProperties -> Maybe NetworkConfiguration
$sel:volumes:ContainerProperties' :: ContainerProperties -> Maybe [Volume]
$sel:readonlyRootFilesystem:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:vcpus:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:fargatePlatformConfiguration:ContainerProperties' :: ContainerProperties -> Maybe FargatePlatformConfiguration
$sel:mountPoints:ContainerProperties' :: ContainerProperties -> Maybe [MountPoint]
$sel:linuxParameters:ContainerProperties' :: ContainerProperties -> Maybe LinuxParameters
$sel:logConfiguration:ContainerProperties' :: ContainerProperties -> Maybe LogConfiguration
$sel:user:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:memory:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:instanceType:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:resourceRequirements:ContainerProperties' :: ContainerProperties -> Maybe [ResourceRequirement]
$sel:jobRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:privileged:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:executionRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:ulimits:ContainerProperties' :: ContainerProperties -> Maybe [Ulimit]
$sel:environment:ContainerProperties' :: ContainerProperties -> Maybe [KeyValuePair]
$sel:secrets:ContainerProperties' :: ContainerProperties -> Maybe [Secret]
$sel:command:ContainerProperties' :: ContainerProperties -> Maybe [Text]
$sel:image:ContainerProperties' :: ContainerProperties -> 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
"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
"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
"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
"executionRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
executionRoleArn,
            (Text
"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
"jobRoleArn" 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
jobRoleArn,
            (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
"instanceType" 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
instanceType,
            (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
"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
"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
"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
"fargatePlatformConfiguration" Text -> FargatePlatformConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (FargatePlatformConfiguration -> Pair)
-> Maybe FargatePlatformConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FargatePlatformConfiguration
fargatePlatformConfiguration,
            (Text
"vcpus" 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
vcpus,
            (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
"volumes" Text -> [Volume] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Volume] -> Pair) -> Maybe [Volume] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Volume]
volumes,
            (Text
"networkConfiguration" Text -> NetworkConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NetworkConfiguration -> Pair)
-> Maybe NetworkConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkConfiguration
networkConfiguration
          ]
      )