{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Container properties are used for Amazon ECS based job definitions.
-- These properties to describe the container that\'s launched as part of a
-- job.
--
-- /See:/ 'newContainerProperties' smart constructor.
data ContainerProperties = 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 -> Maybe [Text]
command :: Prelude.Maybe [Prelude.Text],
    -- | 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 cannot start with \"@AWS_BATCH@\". This naming
    -- convention is reserved for variables that Batch sets.
    ContainerProperties -> Maybe [KeyValuePair]
environment :: Prelude.Maybe [KeyValuePair],
    -- | 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,
    -- | 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 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@/@ @. It can be 255
    -- characters long. It can contain uppercase and lowercase letters,
    -- numbers, hyphens (-), underscores (_), colons (:), periods (.), forward
    -- slashes (\/), and number signs (#). 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 Public repositories use the full
    --     @registry\/repository[:tag]@ or @registry\/repository[\@digest]@
    --     naming conventions. For example,
    --     @public.ecr.aws\/@/@registry_alias@/@\/@/@my-web-app@/@:@/@latest@/@ @.
    --
    -- -   Images in Amazon ECR repositories use the full registry and
    --     repository URI (for example,
    --     @123456789012.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 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,
    -- | 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,
    -- | Linux-specific modifications that are applied to the container, such as
    -- details for device mappings.
    ContainerProperties -> Maybe LinuxParameters
linuxParameters :: Prelude.Maybe LinuxParameters,
    -- | 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 in to 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,
    -- | This parameter is deprecated, use @resourceRequirements@ to specify the
    -- memory requirements for the job definition. It\'s not supported for jobs
    -- running on Fargate resources. For jobs that run on EC2 resources, it
    -- specifies 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.
    ContainerProperties -> Maybe Int
memory :: Prelude.Maybe Prelude.Int,
    -- | 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 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,
    -- | 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,
    -- | 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,
    -- | 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 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],
    -- | 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 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,
    -- | This parameter is deprecated, use @resourceRequirements@ to specify the
    -- vCPU requirements for the job definition. It\'s not supported for jobs
    -- running on Fargate resources. For jobs running on EC2 resources, it
    -- specifies 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.
    ContainerProperties -> Maybe Int
vcpus :: Prelude.Maybe Prelude.Int,
    -- | A list of data volumes used in a job.
    ContainerProperties -> Maybe [Volume]
volumes :: Prelude.Maybe [Volume]
  }
  deriving (ContainerProperties -> ContainerProperties -> Bool
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]
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
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. 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:
--
-- '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>.
--
-- '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 cannot start with \"@AWS_BATCH@\". This naming
-- convention is reserved for variables that Batch sets.
--
-- '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/.
--
-- '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.
--
-- '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@/@ @. It can be 255
-- characters long. It can contain uppercase and lowercase letters,
-- numbers, hyphens (-), underscores (_), colons (:), periods (.), forward
-- slashes (\/), and number signs (#). 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 Public repositories use the full
--     @registry\/repository[:tag]@ or @registry\/repository[\@digest]@
--     naming conventions. For example,
--     @public.ecr.aws\/@/@registry_alias@/@\/@/@my-web-app@/@:@/@latest@/@ @.
--
-- -   Images in Amazon ECR repositories use the full registry and
--     repository URI (for example,
--     @123456789012.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@).
--
-- '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.
--
-- '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/.
--
-- 'linuxParameters', 'containerProperties_linuxParameters' - Linux-specific modifications that are applied to the container, such as
-- details for device mappings.
--
-- '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 in to 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/.
--
-- 'memory', 'containerProperties_memory' - This parameter is deprecated, use @resourceRequirements@ to specify the
-- memory requirements for the job definition. It\'s not supported for jobs
-- running on Fargate resources. For jobs that run on EC2 resources, it
-- specifies 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.
--
-- '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>.
--
-- '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.
--
-- '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.
--
-- '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@.
--
-- 'resourceRequirements', 'containerProperties_resourceRequirements' - The type and amount of resources to assign to a container. The supported
-- resources include @GPU@, @MEMORY@, and @VCPU@.
--
-- '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/.
--
-- '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.
--
-- '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>.
--
-- 'vcpus', 'containerProperties_vcpus' - This parameter is deprecated, use @resourceRequirements@ to specify the
-- vCPU requirements for the job definition. It\'s not supported for jobs
-- running on Fargate resources. For jobs running on EC2 resources, it
-- specifies 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.
--
-- 'volumes', 'containerProperties_volumes' - A list of data volumes used in a job.
newContainerProperties ::
  ContainerProperties
newContainerProperties :: ContainerProperties
newContainerProperties =
  ContainerProperties'
    { $sel:command:ContainerProperties' :: Maybe [Text]
command = forall a. Maybe a
Prelude.Nothing,
      $sel:environment:ContainerProperties' :: Maybe [KeyValuePair]
environment = forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:ContainerProperties' :: Maybe Text
executionRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:fargatePlatformConfiguration:ContainerProperties' :: Maybe FargatePlatformConfiguration
fargatePlatformConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:image:ContainerProperties' :: Maybe Text
image = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:ContainerProperties' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing,
      $sel:jobRoleArn:ContainerProperties' :: Maybe Text
jobRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:linuxParameters:ContainerProperties' :: Maybe LinuxParameters
linuxParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:logConfiguration:ContainerProperties' :: Maybe LogConfiguration
logConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:memory:ContainerProperties' :: Maybe Int
memory = forall a. Maybe a
Prelude.Nothing,
      $sel:mountPoints:ContainerProperties' :: Maybe [MountPoint]
mountPoints = forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:ContainerProperties' :: Maybe NetworkConfiguration
networkConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:privileged:ContainerProperties' :: Maybe Bool
privileged = forall a. Maybe a
Prelude.Nothing,
      $sel:readonlyRootFilesystem:ContainerProperties' :: Maybe Bool
readonlyRootFilesystem = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceRequirements:ContainerProperties' :: Maybe [ResourceRequirement]
resourceRequirements = forall a. Maybe a
Prelude.Nothing,
      $sel:secrets:ContainerProperties' :: Maybe [Secret]
secrets = forall a. Maybe a
Prelude.Nothing,
      $sel:ulimits:ContainerProperties' :: Maybe [Ulimit]
ulimits = forall a. Maybe a
Prelude.Nothing,
      $sel:user:ContainerProperties' :: Maybe Text
user = forall a. Maybe a
Prelude.Nothing,
      $sel:vcpus:ContainerProperties' :: Maybe Int
vcpus = forall a. Maybe a
Prelude.Nothing,
      $sel:volumes:ContainerProperties' :: Maybe [Volume]
volumes = forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: Lens' ContainerProperties (Maybe [Text])
containerProperties_command = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 cannot start with \"@AWS_BATCH@\". This naming
-- convention is reserved for variables that Batch sets.
containerProperties_environment :: Lens.Lens' ContainerProperties (Prelude.Maybe [KeyValuePair])
containerProperties_environment :: Lens' ContainerProperties (Maybe [KeyValuePair])
containerProperties_environment = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' ContainerProperties (Maybe Text)
containerProperties_executionRoleArn = 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)

-- | 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 :: Lens' ContainerProperties (Maybe FargatePlatformConfiguration)
containerProperties_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 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@/@ @. It can be 255
-- characters long. It can contain uppercase and lowercase letters,
-- numbers, hyphens (-), underscores (_), colons (:), periods (.), forward
-- slashes (\/), and number signs (#). 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 Public repositories use the full
--     @registry\/repository[:tag]@ or @registry\/repository[\@digest]@
--     naming conventions. For example,
--     @public.ecr.aws\/@/@registry_alias@/@\/@/@my-web-app@/@:@/@latest@/@ @.
--
-- -   Images in Amazon ECR repositories use the full registry and
--     repository URI (for example,
--     @123456789012.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 :: Lens' ContainerProperties (Maybe Text)
containerProperties_image = 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 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 :: Lens' ContainerProperties (Maybe Text)
containerProperties_instanceType = 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)

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

-- | 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 :: Lens' ContainerProperties (Maybe LinuxParameters)
containerProperties_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 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 in to 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 :: Lens' ContainerProperties (Maybe LogConfiguration)
containerProperties_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)

-- | This parameter is deprecated, use @resourceRequirements@ to specify the
-- memory requirements for the job definition. It\'s not supported for jobs
-- running on Fargate resources. For jobs that run on EC2 resources, it
-- specifies 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.
containerProperties_memory :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Int)
containerProperties_memory :: Lens' ContainerProperties (Maybe Int)
containerProperties_memory = 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 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 :: Lens' ContainerProperties (Maybe [MountPoint])
containerProperties_mountPoints = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' ContainerProperties (Maybe NetworkConfiguration)
containerProperties_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)

-- | 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 :: Lens' ContainerProperties (Maybe Bool)
containerProperties_privileged = 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)

-- | 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 :: Lens' ContainerProperties (Maybe Bool)
containerProperties_readonlyRootFilesystem = 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)

-- | 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 :: Lens' ContainerProperties (Maybe [ResourceRequirement])
containerProperties_resourceRequirements = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' ContainerProperties (Maybe [Secret])
containerProperties_secrets = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: Lens' ContainerProperties (Maybe [Ulimit])
containerProperties_ulimits = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The 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 :: Lens' ContainerProperties (Maybe Text)
containerProperties_user = 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)

-- | This parameter is deprecated, use @resourceRequirements@ to specify the
-- vCPU requirements for the job definition. It\'s not supported for jobs
-- running on Fargate resources. For jobs running on EC2 resources, it
-- specifies 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.
containerProperties_vcpus :: Lens.Lens' ContainerProperties (Prelude.Maybe Prelude.Int)
containerProperties_vcpus :: Lens' ContainerProperties (Maybe Int)
containerProperties_vcpus = 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)

-- | A list of data volumes used in a job.
containerProperties_volumes :: Lens.Lens' ContainerProperties (Prelude.Maybe [Volume])
containerProperties_volumes :: Lens' ContainerProperties (Maybe [Volume])
containerProperties_volumes = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON ContainerProperties where
  parseJSON :: Value -> Parser ContainerProperties
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ContainerProperties"
      ( \Object
x ->
          Maybe [Text]
-> Maybe [KeyValuePair]
-> Maybe Text
-> Maybe FargatePlatformConfiguration
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe LinuxParameters
-> Maybe LogConfiguration
-> Maybe Int
-> Maybe [MountPoint]
-> Maybe NetworkConfiguration
-> Maybe Bool
-> Maybe Bool
-> Maybe [ResourceRequirement]
-> Maybe [Secret]
-> Maybe [Ulimit]
-> Maybe Text
-> Maybe Int
-> Maybe [Volume]
-> ContainerProperties
ContainerProperties'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"command" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"environment" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"executionRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fargatePlatformConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"image")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"instanceType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"jobRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"linuxParameters")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"logConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"memory")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"mountPoints" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"networkConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"privileged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"readonlyRootFilesystem")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resourceRequirements"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"secrets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ulimits" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"user")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"vcpus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"volumes" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ContainerProperties where
  hashWithSalt :: Int -> ContainerProperties -> Int
hashWithSalt Int
_salt 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
volumes :: Maybe [Volume]
vcpus :: Maybe Int
user :: Maybe Text
ulimits :: Maybe [Ulimit]
secrets :: Maybe [Secret]
resourceRequirements :: Maybe [ResourceRequirement]
readonlyRootFilesystem :: Maybe Bool
privileged :: Maybe Bool
networkConfiguration :: Maybe NetworkConfiguration
mountPoints :: Maybe [MountPoint]
memory :: Maybe Int
logConfiguration :: Maybe LogConfiguration
linuxParameters :: Maybe LinuxParameters
jobRoleArn :: Maybe Text
instanceType :: Maybe Text
image :: Maybe Text
fargatePlatformConfiguration :: Maybe FargatePlatformConfiguration
executionRoleArn :: Maybe Text
environment :: Maybe [KeyValuePair]
command :: Maybe [Text]
$sel:volumes:ContainerProperties' :: ContainerProperties -> Maybe [Volume]
$sel:vcpus:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:user:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:ulimits:ContainerProperties' :: ContainerProperties -> Maybe [Ulimit]
$sel:secrets:ContainerProperties' :: ContainerProperties -> Maybe [Secret]
$sel:resourceRequirements:ContainerProperties' :: ContainerProperties -> Maybe [ResourceRequirement]
$sel:readonlyRootFilesystem:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:privileged:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:networkConfiguration:ContainerProperties' :: ContainerProperties -> Maybe NetworkConfiguration
$sel:mountPoints:ContainerProperties' :: ContainerProperties -> Maybe [MountPoint]
$sel:memory:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:logConfiguration:ContainerProperties' :: ContainerProperties -> Maybe LogConfiguration
$sel:linuxParameters:ContainerProperties' :: ContainerProperties -> Maybe LinuxParameters
$sel:jobRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:instanceType:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:image:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:fargatePlatformConfiguration:ContainerProperties' :: ContainerProperties -> Maybe FargatePlatformConfiguration
$sel:executionRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:environment:ContainerProperties' :: ContainerProperties -> Maybe [KeyValuePair]
$sel:command:ContainerProperties' :: ContainerProperties -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
command
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [KeyValuePair]
environment
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FargatePlatformConfiguration
fargatePlatformConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
image
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LinuxParameters
linuxParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LogConfiguration
logConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
memory
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [MountPoint]
mountPoints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkConfiguration
networkConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
privileged
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
readonlyRootFilesystem
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ResourceRequirement]
resourceRequirements
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Secret]
secrets
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Ulimit]
ulimits
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
user
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
vcpus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Volume]
volumes

instance Prelude.NFData ContainerProperties where
  rnf :: ContainerProperties -> ()
rnf 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
volumes :: Maybe [Volume]
vcpus :: Maybe Int
user :: Maybe Text
ulimits :: Maybe [Ulimit]
secrets :: Maybe [Secret]
resourceRequirements :: Maybe [ResourceRequirement]
readonlyRootFilesystem :: Maybe Bool
privileged :: Maybe Bool
networkConfiguration :: Maybe NetworkConfiguration
mountPoints :: Maybe [MountPoint]
memory :: Maybe Int
logConfiguration :: Maybe LogConfiguration
linuxParameters :: Maybe LinuxParameters
jobRoleArn :: Maybe Text
instanceType :: Maybe Text
image :: Maybe Text
fargatePlatformConfiguration :: Maybe FargatePlatformConfiguration
executionRoleArn :: Maybe Text
environment :: Maybe [KeyValuePair]
command :: Maybe [Text]
$sel:volumes:ContainerProperties' :: ContainerProperties -> Maybe [Volume]
$sel:vcpus:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:user:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:ulimits:ContainerProperties' :: ContainerProperties -> Maybe [Ulimit]
$sel:secrets:ContainerProperties' :: ContainerProperties -> Maybe [Secret]
$sel:resourceRequirements:ContainerProperties' :: ContainerProperties -> Maybe [ResourceRequirement]
$sel:readonlyRootFilesystem:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:privileged:ContainerProperties' :: ContainerProperties -> Maybe Bool
$sel:networkConfiguration:ContainerProperties' :: ContainerProperties -> Maybe NetworkConfiguration
$sel:mountPoints:ContainerProperties' :: ContainerProperties -> Maybe [MountPoint]
$sel:memory:ContainerProperties' :: ContainerProperties -> Maybe Int
$sel:logConfiguration:ContainerProperties' :: ContainerProperties -> Maybe LogConfiguration
$sel:linuxParameters:ContainerProperties' :: ContainerProperties -> Maybe LinuxParameters
$sel:jobRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:instanceType:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:image:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:fargatePlatformConfiguration:ContainerProperties' :: ContainerProperties -> Maybe FargatePlatformConfiguration
$sel:executionRoleArn:ContainerProperties' :: ContainerProperties -> Maybe Text
$sel:environment:ContainerProperties' :: ContainerProperties -> Maybe [KeyValuePair]
$sel:command:ContainerProperties' :: ContainerProperties -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
command
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [KeyValuePair]
environment
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FargatePlatformConfiguration
fargatePlatformConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
image
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LinuxParameters
linuxParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LogConfiguration
logConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
memory
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MountPoint]
mountPoints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NetworkConfiguration
networkConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
privileged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
readonlyRootFilesystem
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ResourceRequirement]
resourceRequirements
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Secret]
secrets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Ulimit]
ulimits
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
user
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
vcpus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Volume]
volumes

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