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

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

-- |
-- Module      : Amazonka.ECS.RunTask
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Starts a new task using the specified task definition.
--
-- You can allow Amazon ECS to place tasks for you, or you can customize
-- how Amazon ECS places tasks using placement constraints and placement
-- strategies. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html Scheduling Tasks>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- Alternatively, you can use StartTask to use your own scheduler or place
-- tasks manually on specific container instances.
--
-- The Amazon ECS API follows an eventual consistency model. This is
-- because of the distributed nature of the system supporting the API. This
-- means that the result of an API command you run that affects your Amazon
-- ECS resources might not be immediately visible to all subsequent
-- commands you run. Keep this in mind when you carry out an API command
-- that immediately follows a previous API command.
--
-- To manage eventual consistency, you can do the following:
--
-- -   Confirm the state of the resource before you run a command to modify
--     it. Run the DescribeTasks command using an exponential backoff
--     algorithm to ensure that you allow enough time for the previous
--     command to propagate through the system. To do this, run the
--     DescribeTasks command repeatedly, starting with a couple of seconds
--     of wait time and increasing gradually up to five minutes of wait
--     time.
--
-- -   Add wait time between subsequent commands, even if the DescribeTasks
--     command returns an accurate response. Apply an exponential backoff
--     algorithm starting with a couple of seconds of wait time, and
--     increase gradually up to about five minutes of wait time.
module Amazonka.ECS.RunTask
  ( -- * Creating a Request
    RunTask (..),
    newRunTask,

    -- * Request Lenses
    runTask_capacityProviderStrategy,
    runTask_cluster,
    runTask_count,
    runTask_enableECSManagedTags,
    runTask_enableExecuteCommand,
    runTask_group,
    runTask_launchType,
    runTask_networkConfiguration,
    runTask_overrides,
    runTask_placementConstraints,
    runTask_placementStrategy,
    runTask_platformVersion,
    runTask_propagateTags,
    runTask_referenceId,
    runTask_startedBy,
    runTask_tags,
    runTask_taskDefinition,

    -- * Destructuring the Response
    RunTaskResponse (..),
    newRunTaskResponse,

    -- * Response Lenses
    runTaskResponse_failures,
    runTaskResponse_tasks,
    runTaskResponse_httpStatus,
  )
where

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

-- | /See:/ 'newRunTask' smart constructor.
data RunTask = RunTask'
  { -- | The capacity provider strategy to use for the task.
    --
    -- If a @capacityProviderStrategy@ is specified, the @launchType@ parameter
    -- must be omitted. If no @capacityProviderStrategy@ or @launchType@ is
    -- specified, the @defaultCapacityProviderStrategy@ for the cluster is
    -- used.
    --
    -- When you use cluster auto scaling, you must specify
    -- @capacityProviderStrategy@ and not @launchType@.
    --
    -- A capacity provider strategy may contain a maximum of 6 capacity
    -- providers.
    RunTask -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Prelude.Maybe [CapacityProviderStrategyItem],
    -- | The short name or full Amazon Resource Name (ARN) of the cluster to run
    -- your task on. If you do not specify a cluster, the default cluster is
    -- assumed.
    RunTask -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
    -- | The number of instantiations of the specified task to place on your
    -- cluster. You can specify up to 10 tasks for each call.
    RunTask -> Maybe Int
count :: Prelude.Maybe Prelude.Int,
    -- | Specifies whether to use Amazon ECS managed tags for the task. For more
    -- information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    RunTask -> Maybe Bool
enableECSManagedTags :: Prelude.Maybe Prelude.Bool,
    -- | Determines whether to use the execute command functionality for the
    -- containers in this task. If @true@, this enables execute command
    -- functionality on all containers in the task.
    --
    -- If @true@, then the task definition must have a task role, or you must
    -- provide one as an override.
    RunTask -> Maybe Bool
enableExecuteCommand :: Prelude.Maybe Prelude.Bool,
    -- | The name of the task group to associate with the task. The default value
    -- is the family name of the task definition (for example,
    -- @family:my-family-name@).
    RunTask -> Maybe Text
group' :: Prelude.Maybe Prelude.Text,
    -- | The infrastructure to run your standalone task on. For more information,
    -- see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    --
    -- The @FARGATE@ launch type runs your tasks on Fargate On-Demand
    -- infrastructure.
    --
    -- Fargate Spot infrastructure is available for use but a capacity provider
    -- strategy must be used. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-capacity-providers.html Fargate capacity providers>
    -- in the /Amazon ECS User Guide for Fargate/.
    --
    -- The @EC2@ launch type runs your tasks on Amazon EC2 instances registered
    -- to your cluster.
    --
    -- The @EXTERNAL@ launch type runs your tasks on your on-premises server or
    -- virtual machine (VM) capacity registered to your cluster.
    --
    -- A task can use either a launch type or a capacity provider strategy. If
    -- a @launchType@ is specified, the @capacityProviderStrategy@ parameter
    -- must be omitted.
    --
    -- When you use cluster auto scaling, you must specify
    -- @capacityProviderStrategy@ and not @launchType@.
    RunTask -> Maybe LaunchType
launchType :: Prelude.Maybe LaunchType,
    -- | The network configuration for the task. This parameter is required for
    -- task definitions that use the @awsvpc@ network mode to receive their own
    -- elastic network interface, and it isn\'t supported for other network
    -- modes. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task networking>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    RunTask -> Maybe NetworkConfiguration
networkConfiguration :: Prelude.Maybe NetworkConfiguration,
    -- | A list of container overrides in JSON format that specify the name of a
    -- container in the specified task definition and the overrides it should
    -- receive. You can override the default command for a container (that\'s
    -- specified in the task definition or Docker image) with a @command@
    -- override. You can also override existing environment variables (that are
    -- specified in the task definition or Docker image) on a container or add
    -- new environment variables to it with an @environment@ override.
    --
    -- A total of 8192 characters are allowed for overrides. This limit
    -- includes the JSON formatting characters of the override structure.
    RunTask -> Maybe TaskOverride
overrides :: Prelude.Maybe TaskOverride,
    -- | An array of placement constraint objects to use for the task. You can
    -- specify up to 10 constraints for each task (including constraints in the
    -- task definition and those specified at runtime).
    RunTask -> Maybe [PlacementConstraint]
placementConstraints :: Prelude.Maybe [PlacementConstraint],
    -- | The placement strategy objects to use for the task. You can specify a
    -- maximum of 5 strategy rules for each task.
    RunTask -> Maybe [PlacementStrategy]
placementStrategy :: Prelude.Maybe [PlacementStrategy],
    -- | The platform version the task uses. A platform version is only specified
    -- for tasks hosted on Fargate. If one isn\'t specified, the @LATEST@
    -- platform version is used. For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    RunTask -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether to propagate the tags from the task definition to the
    -- task. If no value is specified, the tags aren\'t propagated. Tags can
    -- only be propagated to the task during task creation. To add tags to a
    -- task after task creation, use the TagResource API action.
    --
    -- An error will be received if you specify the @SERVICE@ option when
    -- running a task.
    RunTask -> Maybe PropagateTags
propagateTags :: Prelude.Maybe PropagateTags,
    -- | The reference ID to use for the task. The reference ID can have a
    -- maximum length of 1024 characters.
    RunTask -> Maybe Text
referenceId :: Prelude.Maybe Prelude.Text,
    -- | An optional tag specified when a task is started. For example, if you
    -- automatically trigger a task to run a batch process job, you could apply
    -- a unique identifier for that job to your task with the @startedBy@
    -- parameter. You can then identify which tasks belong to that job by
    -- filtering the results of a ListTasks call with the @startedBy@ value. Up
    -- to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
    -- underscores (_) are allowed.
    --
    -- If a task is started by an Amazon ECS service, then the @startedBy@
    -- parameter contains the deployment ID of the service that starts it.
    RunTask -> Maybe Text
startedBy :: Prelude.Maybe Prelude.Text,
    -- | The metadata that you apply to the task to help you categorize and
    -- organize them. Each tag consists of a key and an optional value, both of
    -- which you define.
    --
    -- The following basic restrictions apply to tags:
    --
    -- -   Maximum number of tags per resource - 50
    --
    -- -   For each resource, each tag key must be unique, and each tag key can
    --     have only one value.
    --
    -- -   Maximum key length - 128 Unicode characters in UTF-8
    --
    -- -   Maximum value length - 256 Unicode characters in UTF-8
    --
    -- -   If your tagging schema is used across multiple services and
    --     resources, remember that other services may have restrictions on
    --     allowed characters. Generally allowed characters are: letters,
    --     numbers, and spaces representable in UTF-8, and the following
    --     characters: + - = . _ : \/ \@.
    --
    -- -   Tag keys and values are case-sensitive.
    --
    -- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
    --     such as a prefix for either keys or values as it is reserved for
    --     Amazon Web Services use. You cannot edit or delete tag keys or
    --     values with this prefix. Tags with this prefix do not count against
    --     your tags per resource limit.
    RunTask -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The @family@ and @revision@ (@family:revision@) or full ARN of the task
    -- definition to run. If a @revision@ isn\'t specified, the latest @ACTIVE@
    -- revision is used.
    --
    -- When you create an IAM policy for run-task, you can set the resource to
    -- be the latest task definition revision, or a specific revision.
    --
    -- The full ARN value must match the value that you specified as the
    -- @Resource@ of the IAM principal\'s permissions policy.
    --
    -- When you specify the policy resource as the latest task definition
    -- version (by setting the @Resource@ in the policy to
    -- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@),
    -- then set this value to
    -- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@.
    --
    -- When you specify the policy resource as a specific task definition
    -- version (by setting the @Resource@ in the policy to
    -- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@
    -- or
    -- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:*@),
    -- then set this value to
    -- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources Policy Resources for Amazon ECS>
    -- in the Amazon Elastic Container Service developer Guide.
    RunTask -> Text
taskDefinition :: Prelude.Text
  }
  deriving (RunTask -> RunTask -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunTask -> RunTask -> Bool
$c/= :: RunTask -> RunTask -> Bool
== :: RunTask -> RunTask -> Bool
$c== :: RunTask -> RunTask -> Bool
Prelude.Eq, ReadPrec [RunTask]
ReadPrec RunTask
Int -> ReadS RunTask
ReadS [RunTask]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunTask]
$creadListPrec :: ReadPrec [RunTask]
readPrec :: ReadPrec RunTask
$creadPrec :: ReadPrec RunTask
readList :: ReadS [RunTask]
$creadList :: ReadS [RunTask]
readsPrec :: Int -> ReadS RunTask
$creadsPrec :: Int -> ReadS RunTask
Prelude.Read, Int -> RunTask -> ShowS
[RunTask] -> ShowS
RunTask -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunTask] -> ShowS
$cshowList :: [RunTask] -> ShowS
show :: RunTask -> String
$cshow :: RunTask -> String
showsPrec :: Int -> RunTask -> ShowS
$cshowsPrec :: Int -> RunTask -> ShowS
Prelude.Show, forall x. Rep RunTask x -> RunTask
forall x. RunTask -> Rep RunTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunTask x -> RunTask
$cfrom :: forall x. RunTask -> Rep RunTask x
Prelude.Generic)

-- |
-- Create a value of 'RunTask' 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:
--
-- 'capacityProviderStrategy', 'runTask_capacityProviderStrategy' - The capacity provider strategy to use for the task.
--
-- If a @capacityProviderStrategy@ is specified, the @launchType@ parameter
-- must be omitted. If no @capacityProviderStrategy@ or @launchType@ is
-- specified, the @defaultCapacityProviderStrategy@ for the cluster is
-- used.
--
-- When you use cluster auto scaling, you must specify
-- @capacityProviderStrategy@ and not @launchType@.
--
-- A capacity provider strategy may contain a maximum of 6 capacity
-- providers.
--
-- 'cluster', 'runTask_cluster' - The short name or full Amazon Resource Name (ARN) of the cluster to run
-- your task on. If you do not specify a cluster, the default cluster is
-- assumed.
--
-- 'count', 'runTask_count' - The number of instantiations of the specified task to place on your
-- cluster. You can specify up to 10 tasks for each call.
--
-- 'enableECSManagedTags', 'runTask_enableECSManagedTags' - Specifies whether to use Amazon ECS managed tags for the task. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'enableExecuteCommand', 'runTask_enableExecuteCommand' - Determines whether to use the execute command functionality for the
-- containers in this task. If @true@, this enables execute command
-- functionality on all containers in the task.
--
-- If @true@, then the task definition must have a task role, or you must
-- provide one as an override.
--
-- 'group'', 'runTask_group' - The name of the task group to associate with the task. The default value
-- is the family name of the task definition (for example,
-- @family:my-family-name@).
--
-- 'launchType', 'runTask_launchType' - The infrastructure to run your standalone task on. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- The @FARGATE@ launch type runs your tasks on Fargate On-Demand
-- infrastructure.
--
-- Fargate Spot infrastructure is available for use but a capacity provider
-- strategy must be used. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-capacity-providers.html Fargate capacity providers>
-- in the /Amazon ECS User Guide for Fargate/.
--
-- The @EC2@ launch type runs your tasks on Amazon EC2 instances registered
-- to your cluster.
--
-- The @EXTERNAL@ launch type runs your tasks on your on-premises server or
-- virtual machine (VM) capacity registered to your cluster.
--
-- A task can use either a launch type or a capacity provider strategy. If
-- a @launchType@ is specified, the @capacityProviderStrategy@ parameter
-- must be omitted.
--
-- When you use cluster auto scaling, you must specify
-- @capacityProviderStrategy@ and not @launchType@.
--
-- 'networkConfiguration', 'runTask_networkConfiguration' - The network configuration for the task. This parameter is required for
-- task definitions that use the @awsvpc@ network mode to receive their own
-- elastic network interface, and it isn\'t supported for other network
-- modes. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task networking>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'overrides', 'runTask_overrides' - A list of container overrides in JSON format that specify the name of a
-- container in the specified task definition and the overrides it should
-- receive. You can override the default command for a container (that\'s
-- specified in the task definition or Docker image) with a @command@
-- override. You can also override existing environment variables (that are
-- specified in the task definition or Docker image) on a container or add
-- new environment variables to it with an @environment@ override.
--
-- A total of 8192 characters are allowed for overrides. This limit
-- includes the JSON formatting characters of the override structure.
--
-- 'placementConstraints', 'runTask_placementConstraints' - An array of placement constraint objects to use for the task. You can
-- specify up to 10 constraints for each task (including constraints in the
-- task definition and those specified at runtime).
--
-- 'placementStrategy', 'runTask_placementStrategy' - The placement strategy objects to use for the task. You can specify a
-- maximum of 5 strategy rules for each task.
--
-- 'platformVersion', 'runTask_platformVersion' - The platform version the task uses. A platform version is only specified
-- for tasks hosted on Fargate. If one isn\'t specified, the @LATEST@
-- platform version is used. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'propagateTags', 'runTask_propagateTags' - Specifies whether to propagate the tags from the task definition to the
-- task. If no value is specified, the tags aren\'t propagated. Tags can
-- only be propagated to the task during task creation. To add tags to a
-- task after task creation, use the TagResource API action.
--
-- An error will be received if you specify the @SERVICE@ option when
-- running a task.
--
-- 'referenceId', 'runTask_referenceId' - The reference ID to use for the task. The reference ID can have a
-- maximum length of 1024 characters.
--
-- 'startedBy', 'runTask_startedBy' - An optional tag specified when a task is started. For example, if you
-- automatically trigger a task to run a batch process job, you could apply
-- a unique identifier for that job to your task with the @startedBy@
-- parameter. You can then identify which tasks belong to that job by
-- filtering the results of a ListTasks call with the @startedBy@ value. Up
-- to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
-- underscores (_) are allowed.
--
-- If a task is started by an Amazon ECS service, then the @startedBy@
-- parameter contains the deployment ID of the service that starts it.
--
-- 'tags', 'runTask_tags' - The metadata that you apply to the task to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
--
-- 'taskDefinition', 'runTask_taskDefinition' - The @family@ and @revision@ (@family:revision@) or full ARN of the task
-- definition to run. If a @revision@ isn\'t specified, the latest @ACTIVE@
-- revision is used.
--
-- When you create an IAM policy for run-task, you can set the resource to
-- be the latest task definition revision, or a specific revision.
--
-- The full ARN value must match the value that you specified as the
-- @Resource@ of the IAM principal\'s permissions policy.
--
-- When you specify the policy resource as the latest task definition
-- version (by setting the @Resource@ in the policy to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@),
-- then set this value to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@.
--
-- When you specify the policy resource as a specific task definition
-- version (by setting the @Resource@ in the policy to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@
-- or
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:*@),
-- then set this value to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources Policy Resources for Amazon ECS>
-- in the Amazon Elastic Container Service developer Guide.
newRunTask ::
  -- | 'taskDefinition'
  Prelude.Text ->
  RunTask
newRunTask :: Text -> RunTask
newRunTask Text
pTaskDefinition_ =
  RunTask'
    { $sel:capacityProviderStrategy:RunTask' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cluster:RunTask' :: Maybe Text
cluster = forall a. Maybe a
Prelude.Nothing,
      $sel:count:RunTask' :: Maybe Int
count = forall a. Maybe a
Prelude.Nothing,
      $sel:enableECSManagedTags:RunTask' :: Maybe Bool
enableECSManagedTags = forall a. Maybe a
Prelude.Nothing,
      $sel:enableExecuteCommand:RunTask' :: Maybe Bool
enableExecuteCommand = forall a. Maybe a
Prelude.Nothing,
      $sel:group':RunTask' :: Maybe Text
group' = forall a. Maybe a
Prelude.Nothing,
      $sel:launchType:RunTask' :: Maybe LaunchType
launchType = forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:RunTask' :: Maybe NetworkConfiguration
networkConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:overrides:RunTask' :: Maybe TaskOverride
overrides = forall a. Maybe a
Prelude.Nothing,
      $sel:placementConstraints:RunTask' :: Maybe [PlacementConstraint]
placementConstraints = forall a. Maybe a
Prelude.Nothing,
      $sel:placementStrategy:RunTask' :: Maybe [PlacementStrategy]
placementStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:platformVersion:RunTask' :: Maybe Text
platformVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:propagateTags:RunTask' :: Maybe PropagateTags
propagateTags = forall a. Maybe a
Prelude.Nothing,
      $sel:referenceId:RunTask' :: Maybe Text
referenceId = forall a. Maybe a
Prelude.Nothing,
      $sel:startedBy:RunTask' :: Maybe Text
startedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:RunTask' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:taskDefinition:RunTask' :: Text
taskDefinition = Text
pTaskDefinition_
    }

-- | The capacity provider strategy to use for the task.
--
-- If a @capacityProviderStrategy@ is specified, the @launchType@ parameter
-- must be omitted. If no @capacityProviderStrategy@ or @launchType@ is
-- specified, the @defaultCapacityProviderStrategy@ for the cluster is
-- used.
--
-- When you use cluster auto scaling, you must specify
-- @capacityProviderStrategy@ and not @launchType@.
--
-- A capacity provider strategy may contain a maximum of 6 capacity
-- providers.
runTask_capacityProviderStrategy :: Lens.Lens' RunTask (Prelude.Maybe [CapacityProviderStrategyItem])
runTask_capacityProviderStrategy :: Lens' RunTask (Maybe [CapacityProviderStrategyItem])
runTask_capacityProviderStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:capacityProviderStrategy:RunTask' :: RunTask -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy} -> Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy) (\s :: RunTask
s@RunTask' {} Maybe [CapacityProviderStrategyItem]
a -> RunTask
s {$sel:capacityProviderStrategy:RunTask' :: Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy = Maybe [CapacityProviderStrategyItem]
a} :: RunTask) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The short name or full Amazon Resource Name (ARN) of the cluster to run
-- your task on. If you do not specify a cluster, the default cluster is
-- assumed.
runTask_cluster :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Text)
runTask_cluster :: Lens' RunTask (Maybe Text)
runTask_cluster = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Text
cluster :: Maybe Text
$sel:cluster:RunTask' :: RunTask -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: RunTask
s@RunTask' {} Maybe Text
a -> RunTask
s {$sel:cluster:RunTask' :: Maybe Text
cluster = Maybe Text
a} :: RunTask)

-- | The number of instantiations of the specified task to place on your
-- cluster. You can specify up to 10 tasks for each call.
runTask_count :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Int)
runTask_count :: Lens' RunTask (Maybe Int)
runTask_count = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Int
count :: Maybe Int
$sel:count:RunTask' :: RunTask -> Maybe Int
count} -> Maybe Int
count) (\s :: RunTask
s@RunTask' {} Maybe Int
a -> RunTask
s {$sel:count:RunTask' :: Maybe Int
count = Maybe Int
a} :: RunTask)

-- | Specifies whether to use Amazon ECS managed tags for the task. For more
-- information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html Tagging Your Amazon ECS Resources>
-- in the /Amazon Elastic Container Service Developer Guide/.
runTask_enableECSManagedTags :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Bool)
runTask_enableECSManagedTags :: Lens' RunTask (Maybe Bool)
runTask_enableECSManagedTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Bool
enableECSManagedTags :: Maybe Bool
$sel:enableECSManagedTags:RunTask' :: RunTask -> Maybe Bool
enableECSManagedTags} -> Maybe Bool
enableECSManagedTags) (\s :: RunTask
s@RunTask' {} Maybe Bool
a -> RunTask
s {$sel:enableECSManagedTags:RunTask' :: Maybe Bool
enableECSManagedTags = Maybe Bool
a} :: RunTask)

-- | Determines whether to use the execute command functionality for the
-- containers in this task. If @true@, this enables execute command
-- functionality on all containers in the task.
--
-- If @true@, then the task definition must have a task role, or you must
-- provide one as an override.
runTask_enableExecuteCommand :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Bool)
runTask_enableExecuteCommand :: Lens' RunTask (Maybe Bool)
runTask_enableExecuteCommand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Bool
enableExecuteCommand :: Maybe Bool
$sel:enableExecuteCommand:RunTask' :: RunTask -> Maybe Bool
enableExecuteCommand} -> Maybe Bool
enableExecuteCommand) (\s :: RunTask
s@RunTask' {} Maybe Bool
a -> RunTask
s {$sel:enableExecuteCommand:RunTask' :: Maybe Bool
enableExecuteCommand = Maybe Bool
a} :: RunTask)

-- | The name of the task group to associate with the task. The default value
-- is the family name of the task definition (for example,
-- @family:my-family-name@).
runTask_group :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Text)
runTask_group :: Lens' RunTask (Maybe Text)
runTask_group = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Text
group' :: Maybe Text
$sel:group':RunTask' :: RunTask -> Maybe Text
group'} -> Maybe Text
group') (\s :: RunTask
s@RunTask' {} Maybe Text
a -> RunTask
s {$sel:group':RunTask' :: Maybe Text
group' = Maybe Text
a} :: RunTask)

-- | The infrastructure to run your standalone task on. For more information,
-- see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html Amazon ECS launch types>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- The @FARGATE@ launch type runs your tasks on Fargate On-Demand
-- infrastructure.
--
-- Fargate Spot infrastructure is available for use but a capacity provider
-- strategy must be used. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-capacity-providers.html Fargate capacity providers>
-- in the /Amazon ECS User Guide for Fargate/.
--
-- The @EC2@ launch type runs your tasks on Amazon EC2 instances registered
-- to your cluster.
--
-- The @EXTERNAL@ launch type runs your tasks on your on-premises server or
-- virtual machine (VM) capacity registered to your cluster.
--
-- A task can use either a launch type or a capacity provider strategy. If
-- a @launchType@ is specified, the @capacityProviderStrategy@ parameter
-- must be omitted.
--
-- When you use cluster auto scaling, you must specify
-- @capacityProviderStrategy@ and not @launchType@.
runTask_launchType :: Lens.Lens' RunTask (Prelude.Maybe LaunchType)
runTask_launchType :: Lens' RunTask (Maybe LaunchType)
runTask_launchType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe LaunchType
launchType :: Maybe LaunchType
$sel:launchType:RunTask' :: RunTask -> Maybe LaunchType
launchType} -> Maybe LaunchType
launchType) (\s :: RunTask
s@RunTask' {} Maybe LaunchType
a -> RunTask
s {$sel:launchType:RunTask' :: Maybe LaunchType
launchType = Maybe LaunchType
a} :: RunTask)

-- | The network configuration for the task. This parameter is required for
-- task definitions that use the @awsvpc@ network mode to receive their own
-- elastic network interface, and it isn\'t supported for other network
-- modes. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html Task networking>
-- in the /Amazon Elastic Container Service Developer Guide/.
runTask_networkConfiguration :: Lens.Lens' RunTask (Prelude.Maybe NetworkConfiguration)
runTask_networkConfiguration :: Lens' RunTask (Maybe NetworkConfiguration)
runTask_networkConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:RunTask' :: RunTask -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: RunTask
s@RunTask' {} Maybe NetworkConfiguration
a -> RunTask
s {$sel:networkConfiguration:RunTask' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: RunTask)

-- | A list of container overrides in JSON format that specify the name of a
-- container in the specified task definition and the overrides it should
-- receive. You can override the default command for a container (that\'s
-- specified in the task definition or Docker image) with a @command@
-- override. You can also override existing environment variables (that are
-- specified in the task definition or Docker image) on a container or add
-- new environment variables to it with an @environment@ override.
--
-- A total of 8192 characters are allowed for overrides. This limit
-- includes the JSON formatting characters of the override structure.
runTask_overrides :: Lens.Lens' RunTask (Prelude.Maybe TaskOverride)
runTask_overrides :: Lens' RunTask (Maybe TaskOverride)
runTask_overrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe TaskOverride
overrides :: Maybe TaskOverride
$sel:overrides:RunTask' :: RunTask -> Maybe TaskOverride
overrides} -> Maybe TaskOverride
overrides) (\s :: RunTask
s@RunTask' {} Maybe TaskOverride
a -> RunTask
s {$sel:overrides:RunTask' :: Maybe TaskOverride
overrides = Maybe TaskOverride
a} :: RunTask)

-- | An array of placement constraint objects to use for the task. You can
-- specify up to 10 constraints for each task (including constraints in the
-- task definition and those specified at runtime).
runTask_placementConstraints :: Lens.Lens' RunTask (Prelude.Maybe [PlacementConstraint])
runTask_placementConstraints :: Lens' RunTask (Maybe [PlacementConstraint])
runTask_placementConstraints = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe [PlacementConstraint]
placementConstraints :: Maybe [PlacementConstraint]
$sel:placementConstraints:RunTask' :: RunTask -> Maybe [PlacementConstraint]
placementConstraints} -> Maybe [PlacementConstraint]
placementConstraints) (\s :: RunTask
s@RunTask' {} Maybe [PlacementConstraint]
a -> RunTask
s {$sel:placementConstraints:RunTask' :: Maybe [PlacementConstraint]
placementConstraints = Maybe [PlacementConstraint]
a} :: RunTask) 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 placement strategy objects to use for the task. You can specify a
-- maximum of 5 strategy rules for each task.
runTask_placementStrategy :: Lens.Lens' RunTask (Prelude.Maybe [PlacementStrategy])
runTask_placementStrategy :: Lens' RunTask (Maybe [PlacementStrategy])
runTask_placementStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe [PlacementStrategy]
placementStrategy :: Maybe [PlacementStrategy]
$sel:placementStrategy:RunTask' :: RunTask -> Maybe [PlacementStrategy]
placementStrategy} -> Maybe [PlacementStrategy]
placementStrategy) (\s :: RunTask
s@RunTask' {} Maybe [PlacementStrategy]
a -> RunTask
s {$sel:placementStrategy:RunTask' :: Maybe [PlacementStrategy]
placementStrategy = Maybe [PlacementStrategy]
a} :: RunTask) 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 platform version the task uses. A platform version is only specified
-- for tasks hosted on Fargate. If one isn\'t specified, the @LATEST@
-- platform version is used. For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html Fargate platform versions>
-- in the /Amazon Elastic Container Service Developer Guide/.
runTask_platformVersion :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Text)
runTask_platformVersion :: Lens' RunTask (Maybe Text)
runTask_platformVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:RunTask' :: RunTask -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: RunTask
s@RunTask' {} Maybe Text
a -> RunTask
s {$sel:platformVersion:RunTask' :: Maybe Text
platformVersion = Maybe Text
a} :: RunTask)

-- | Specifies whether to propagate the tags from the task definition to the
-- task. If no value is specified, the tags aren\'t propagated. Tags can
-- only be propagated to the task during task creation. To add tags to a
-- task after task creation, use the TagResource API action.
--
-- An error will be received if you specify the @SERVICE@ option when
-- running a task.
runTask_propagateTags :: Lens.Lens' RunTask (Prelude.Maybe PropagateTags)
runTask_propagateTags :: Lens' RunTask (Maybe PropagateTags)
runTask_propagateTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe PropagateTags
propagateTags :: Maybe PropagateTags
$sel:propagateTags:RunTask' :: RunTask -> Maybe PropagateTags
propagateTags} -> Maybe PropagateTags
propagateTags) (\s :: RunTask
s@RunTask' {} Maybe PropagateTags
a -> RunTask
s {$sel:propagateTags:RunTask' :: Maybe PropagateTags
propagateTags = Maybe PropagateTags
a} :: RunTask)

-- | The reference ID to use for the task. The reference ID can have a
-- maximum length of 1024 characters.
runTask_referenceId :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Text)
runTask_referenceId :: Lens' RunTask (Maybe Text)
runTask_referenceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Text
referenceId :: Maybe Text
$sel:referenceId:RunTask' :: RunTask -> Maybe Text
referenceId} -> Maybe Text
referenceId) (\s :: RunTask
s@RunTask' {} Maybe Text
a -> RunTask
s {$sel:referenceId:RunTask' :: Maybe Text
referenceId = Maybe Text
a} :: RunTask)

-- | An optional tag specified when a task is started. For example, if you
-- automatically trigger a task to run a batch process job, you could apply
-- a unique identifier for that job to your task with the @startedBy@
-- parameter. You can then identify which tasks belong to that job by
-- filtering the results of a ListTasks call with the @startedBy@ value. Up
-- to 36 letters (uppercase and lowercase), numbers, hyphens (-), and
-- underscores (_) are allowed.
--
-- If a task is started by an Amazon ECS service, then the @startedBy@
-- parameter contains the deployment ID of the service that starts it.
runTask_startedBy :: Lens.Lens' RunTask (Prelude.Maybe Prelude.Text)
runTask_startedBy :: Lens' RunTask (Maybe Text)
runTask_startedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:RunTask' :: RunTask -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: RunTask
s@RunTask' {} Maybe Text
a -> RunTask
s {$sel:startedBy:RunTask' :: Maybe Text
startedBy = Maybe Text
a} :: RunTask)

-- | The metadata that you apply to the task to help you categorize and
-- organize them. Each tag consists of a key and an optional value, both of
-- which you define.
--
-- The following basic restrictions apply to tags:
--
-- -   Maximum number of tags per resource - 50
--
-- -   For each resource, each tag key must be unique, and each tag key can
--     have only one value.
--
-- -   Maximum key length - 128 Unicode characters in UTF-8
--
-- -   Maximum value length - 256 Unicode characters in UTF-8
--
-- -   If your tagging schema is used across multiple services and
--     resources, remember that other services may have restrictions on
--     allowed characters. Generally allowed characters are: letters,
--     numbers, and spaces representable in UTF-8, and the following
--     characters: + - = . _ : \/ \@.
--
-- -   Tag keys and values are case-sensitive.
--
-- -   Do not use @aws:@, @AWS:@, or any upper or lowercase combination of
--     such as a prefix for either keys or values as it is reserved for
--     Amazon Web Services use. You cannot edit or delete tag keys or
--     values with this prefix. Tags with this prefix do not count against
--     your tags per resource limit.
runTask_tags :: Lens.Lens' RunTask (Prelude.Maybe [Tag])
runTask_tags :: Lens' RunTask (Maybe [Tag])
runTask_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:RunTask' :: RunTask -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: RunTask
s@RunTask' {} Maybe [Tag]
a -> RunTask
s {$sel:tags:RunTask' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: RunTask) 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 @family@ and @revision@ (@family:revision@) or full ARN of the task
-- definition to run. If a @revision@ isn\'t specified, the latest @ACTIVE@
-- revision is used.
--
-- When you create an IAM policy for run-task, you can set the resource to
-- be the latest task definition revision, or a specific revision.
--
-- The full ARN value must match the value that you specified as the
-- @Resource@ of the IAM principal\'s permissions policy.
--
-- When you specify the policy resource as the latest task definition
-- version (by setting the @Resource@ in the policy to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@),
-- then set this value to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName@.
--
-- When you specify the policy resource as a specific task definition
-- version (by setting the @Resource@ in the policy to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@
-- or
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:*@),
-- then set this value to
-- @arn:aws:ecs:us-east-1:111122223333:task-definition\/TaskFamilyName:1@.
--
-- For more information, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security_iam_service-with-iam.html#security_iam_service-with-iam-id-based-policies-resources Policy Resources for Amazon ECS>
-- in the Amazon Elastic Container Service developer Guide.
runTask_taskDefinition :: Lens.Lens' RunTask Prelude.Text
runTask_taskDefinition :: Lens' RunTask Text
runTask_taskDefinition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTask' {Text
taskDefinition :: Text
$sel:taskDefinition:RunTask' :: RunTask -> Text
taskDefinition} -> Text
taskDefinition) (\s :: RunTask
s@RunTask' {} Text
a -> RunTask
s {$sel:taskDefinition:RunTask' :: Text
taskDefinition = Text
a} :: RunTask)

instance Core.AWSRequest RunTask where
  type AWSResponse RunTask = RunTaskResponse
  request :: (Service -> Service) -> RunTask -> Request RunTask
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RunTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RunTask)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Failure] -> Maybe [Task] -> Int -> RunTaskResponse
RunTaskResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"failures" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tasks" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable RunTask where
  hashWithSalt :: Int -> RunTask -> Int
hashWithSalt Int
_salt RunTask' {Maybe Bool
Maybe Int
Maybe [CapacityProviderStrategyItem]
Maybe [PlacementConstraint]
Maybe [PlacementStrategy]
Maybe [Tag]
Maybe Text
Maybe LaunchType
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
platformVersion :: Maybe Text
placementStrategy :: Maybe [PlacementStrategy]
placementConstraints :: Maybe [PlacementConstraint]
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
launchType :: Maybe LaunchType
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
count :: Maybe Int
cluster :: Maybe Text
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:taskDefinition:RunTask' :: RunTask -> Text
$sel:tags:RunTask' :: RunTask -> Maybe [Tag]
$sel:startedBy:RunTask' :: RunTask -> Maybe Text
$sel:referenceId:RunTask' :: RunTask -> Maybe Text
$sel:propagateTags:RunTask' :: RunTask -> Maybe PropagateTags
$sel:platformVersion:RunTask' :: RunTask -> Maybe Text
$sel:placementStrategy:RunTask' :: RunTask -> Maybe [PlacementStrategy]
$sel:placementConstraints:RunTask' :: RunTask -> Maybe [PlacementConstraint]
$sel:overrides:RunTask' :: RunTask -> Maybe TaskOverride
$sel:networkConfiguration:RunTask' :: RunTask -> Maybe NetworkConfiguration
$sel:launchType:RunTask' :: RunTask -> Maybe LaunchType
$sel:group':RunTask' :: RunTask -> Maybe Text
$sel:enableExecuteCommand:RunTask' :: RunTask -> Maybe Bool
$sel:enableECSManagedTags:RunTask' :: RunTask -> Maybe Bool
$sel:count:RunTask' :: RunTask -> Maybe Int
$sel:cluster:RunTask' :: RunTask -> Maybe Text
$sel:capacityProviderStrategy:RunTask' :: RunTask -> Maybe [CapacityProviderStrategyItem]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cluster
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
count
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableECSManagedTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableExecuteCommand
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
group'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LaunchType
launchType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NetworkConfiguration
networkConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TaskOverride
overrides
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PlacementConstraint]
placementConstraints
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [PlacementStrategy]
placementStrategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
platformVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PropagateTags
propagateTags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
referenceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
startedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
taskDefinition

instance Prelude.NFData RunTask where
  rnf :: RunTask -> ()
rnf RunTask' {Maybe Bool
Maybe Int
Maybe [CapacityProviderStrategyItem]
Maybe [PlacementConstraint]
Maybe [PlacementStrategy]
Maybe [Tag]
Maybe Text
Maybe LaunchType
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
platformVersion :: Maybe Text
placementStrategy :: Maybe [PlacementStrategy]
placementConstraints :: Maybe [PlacementConstraint]
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
launchType :: Maybe LaunchType
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
count :: Maybe Int
cluster :: Maybe Text
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:taskDefinition:RunTask' :: RunTask -> Text
$sel:tags:RunTask' :: RunTask -> Maybe [Tag]
$sel:startedBy:RunTask' :: RunTask -> Maybe Text
$sel:referenceId:RunTask' :: RunTask -> Maybe Text
$sel:propagateTags:RunTask' :: RunTask -> Maybe PropagateTags
$sel:platformVersion:RunTask' :: RunTask -> Maybe Text
$sel:placementStrategy:RunTask' :: RunTask -> Maybe [PlacementStrategy]
$sel:placementConstraints:RunTask' :: RunTask -> Maybe [PlacementConstraint]
$sel:overrides:RunTask' :: RunTask -> Maybe TaskOverride
$sel:networkConfiguration:RunTask' :: RunTask -> Maybe NetworkConfiguration
$sel:launchType:RunTask' :: RunTask -> Maybe LaunchType
$sel:group':RunTask' :: RunTask -> Maybe Text
$sel:enableExecuteCommand:RunTask' :: RunTask -> Maybe Bool
$sel:enableECSManagedTags:RunTask' :: RunTask -> Maybe Bool
$sel:count:RunTask' :: RunTask -> Maybe Int
$sel:cluster:RunTask' :: RunTask -> Maybe Text
$sel:capacityProviderStrategy:RunTask' :: RunTask -> Maybe [CapacityProviderStrategyItem]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [CapacityProviderStrategyItem]
capacityProviderStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cluster
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
count
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableECSManagedTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableExecuteCommand
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
group'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchType
launchType
      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 TaskOverride
overrides
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PlacementConstraint]
placementConstraints
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PlacementStrategy]
placementStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
platformVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PropagateTags
propagateTags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
referenceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
startedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
taskDefinition

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

instance Data.ToJSON RunTask where
  toJSON :: RunTask -> Value
toJSON RunTask' {Maybe Bool
Maybe Int
Maybe [CapacityProviderStrategyItem]
Maybe [PlacementConstraint]
Maybe [PlacementStrategy]
Maybe [Tag]
Maybe Text
Maybe LaunchType
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
platformVersion :: Maybe Text
placementStrategy :: Maybe [PlacementStrategy]
placementConstraints :: Maybe [PlacementConstraint]
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
launchType :: Maybe LaunchType
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
count :: Maybe Int
cluster :: Maybe Text
capacityProviderStrategy :: Maybe [CapacityProviderStrategyItem]
$sel:taskDefinition:RunTask' :: RunTask -> Text
$sel:tags:RunTask' :: RunTask -> Maybe [Tag]
$sel:startedBy:RunTask' :: RunTask -> Maybe Text
$sel:referenceId:RunTask' :: RunTask -> Maybe Text
$sel:propagateTags:RunTask' :: RunTask -> Maybe PropagateTags
$sel:platformVersion:RunTask' :: RunTask -> Maybe Text
$sel:placementStrategy:RunTask' :: RunTask -> Maybe [PlacementStrategy]
$sel:placementConstraints:RunTask' :: RunTask -> Maybe [PlacementConstraint]
$sel:overrides:RunTask' :: RunTask -> Maybe TaskOverride
$sel:networkConfiguration:RunTask' :: RunTask -> Maybe NetworkConfiguration
$sel:launchType:RunTask' :: RunTask -> Maybe LaunchType
$sel:group':RunTask' :: RunTask -> Maybe Text
$sel:enableExecuteCommand:RunTask' :: RunTask -> Maybe Bool
$sel:enableECSManagedTags:RunTask' :: RunTask -> Maybe Bool
$sel:count:RunTask' :: RunTask -> Maybe Int
$sel:cluster:RunTask' :: RunTask -> Maybe Text
$sel:capacityProviderStrategy:RunTask' :: RunTask -> Maybe [CapacityProviderStrategyItem]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"capacityProviderStrategy" 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 [CapacityProviderStrategyItem]
capacityProviderStrategy,
            (Key
"cluster" 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
cluster,
            (Key
"count" 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
count,
            (Key
"enableECSManagedTags" 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
enableECSManagedTags,
            (Key
"enableExecuteCommand" 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
enableExecuteCommand,
            (Key
"group" 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
group',
            (Key
"launchType" 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 LaunchType
launchType,
            (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
"overrides" 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 TaskOverride
overrides,
            (Key
"placementConstraints" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PlacementConstraint]
placementConstraints,
            (Key
"placementStrategy" 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 [PlacementStrategy]
placementStrategy,
            (Key
"platformVersion" 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
platformVersion,
            (Key
"propagateTags" 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 PropagateTags
propagateTags,
            (Key
"referenceId" 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
referenceId,
            (Key
"startedBy" 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
startedBy,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"taskDefinition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
taskDefinition)
          ]
      )

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

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

-- | /See:/ 'newRunTaskResponse' smart constructor.
data RunTaskResponse = RunTaskResponse'
  { -- | Any failures associated with the call.
    RunTaskResponse -> Maybe [Failure]
failures :: Prelude.Maybe [Failure],
    -- | A full description of the tasks that were run. The tasks that were
    -- successfully placed on your cluster are described here.
    RunTaskResponse -> Maybe [Task]
tasks :: Prelude.Maybe [Task],
    -- | The response's http status code.
    RunTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (RunTaskResponse -> RunTaskResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RunTaskResponse -> RunTaskResponse -> Bool
$c/= :: RunTaskResponse -> RunTaskResponse -> Bool
== :: RunTaskResponse -> RunTaskResponse -> Bool
$c== :: RunTaskResponse -> RunTaskResponse -> Bool
Prelude.Eq, ReadPrec [RunTaskResponse]
ReadPrec RunTaskResponse
Int -> ReadS RunTaskResponse
ReadS [RunTaskResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RunTaskResponse]
$creadListPrec :: ReadPrec [RunTaskResponse]
readPrec :: ReadPrec RunTaskResponse
$creadPrec :: ReadPrec RunTaskResponse
readList :: ReadS [RunTaskResponse]
$creadList :: ReadS [RunTaskResponse]
readsPrec :: Int -> ReadS RunTaskResponse
$creadsPrec :: Int -> ReadS RunTaskResponse
Prelude.Read, Int -> RunTaskResponse -> ShowS
[RunTaskResponse] -> ShowS
RunTaskResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RunTaskResponse] -> ShowS
$cshowList :: [RunTaskResponse] -> ShowS
show :: RunTaskResponse -> String
$cshow :: RunTaskResponse -> String
showsPrec :: Int -> RunTaskResponse -> ShowS
$cshowsPrec :: Int -> RunTaskResponse -> ShowS
Prelude.Show, forall x. Rep RunTaskResponse x -> RunTaskResponse
forall x. RunTaskResponse -> Rep RunTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RunTaskResponse x -> RunTaskResponse
$cfrom :: forall x. RunTaskResponse -> Rep RunTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'RunTaskResponse' 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:
--
-- 'failures', 'runTaskResponse_failures' - Any failures associated with the call.
--
-- 'tasks', 'runTaskResponse_tasks' - A full description of the tasks that were run. The tasks that were
-- successfully placed on your cluster are described here.
--
-- 'httpStatus', 'runTaskResponse_httpStatus' - The response's http status code.
newRunTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  RunTaskResponse
newRunTaskResponse :: Int -> RunTaskResponse
newRunTaskResponse Int
pHttpStatus_ =
  RunTaskResponse'
    { $sel:failures:RunTaskResponse' :: Maybe [Failure]
failures = forall a. Maybe a
Prelude.Nothing,
      $sel:tasks:RunTaskResponse' :: Maybe [Task]
tasks = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:RunTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Any failures associated with the call.
runTaskResponse_failures :: Lens.Lens' RunTaskResponse (Prelude.Maybe [Failure])
runTaskResponse_failures :: Lens' RunTaskResponse (Maybe [Failure])
runTaskResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTaskResponse' {Maybe [Failure]
failures :: Maybe [Failure]
$sel:failures:RunTaskResponse' :: RunTaskResponse -> Maybe [Failure]
failures} -> Maybe [Failure]
failures) (\s :: RunTaskResponse
s@RunTaskResponse' {} Maybe [Failure]
a -> RunTaskResponse
s {$sel:failures:RunTaskResponse' :: Maybe [Failure]
failures = Maybe [Failure]
a} :: RunTaskResponse) 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 full description of the tasks that were run. The tasks that were
-- successfully placed on your cluster are described here.
runTaskResponse_tasks :: Lens.Lens' RunTaskResponse (Prelude.Maybe [Task])
runTaskResponse_tasks :: Lens' RunTaskResponse (Maybe [Task])
runTaskResponse_tasks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTaskResponse' {Maybe [Task]
tasks :: Maybe [Task]
$sel:tasks:RunTaskResponse' :: RunTaskResponse -> Maybe [Task]
tasks} -> Maybe [Task]
tasks) (\s :: RunTaskResponse
s@RunTaskResponse' {} Maybe [Task]
a -> RunTaskResponse
s {$sel:tasks:RunTaskResponse' :: Maybe [Task]
tasks = Maybe [Task]
a} :: RunTaskResponse) 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 response's http status code.
runTaskResponse_httpStatus :: Lens.Lens' RunTaskResponse Prelude.Int
runTaskResponse_httpStatus :: Lens' RunTaskResponse Int
runTaskResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RunTaskResponse' {Int
httpStatus :: Int
$sel:httpStatus:RunTaskResponse' :: RunTaskResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RunTaskResponse
s@RunTaskResponse' {} Int
a -> RunTaskResponse
s {$sel:httpStatus:RunTaskResponse' :: Int
httpStatus = Int
a} :: RunTaskResponse)

instance Prelude.NFData RunTaskResponse where
  rnf :: RunTaskResponse -> ()
rnf RunTaskResponse' {Int
Maybe [Failure]
Maybe [Task]
httpStatus :: Int
tasks :: Maybe [Task]
failures :: Maybe [Failure]
$sel:httpStatus:RunTaskResponse' :: RunTaskResponse -> Int
$sel:tasks:RunTaskResponse' :: RunTaskResponse -> Maybe [Task]
$sel:failures:RunTaskResponse' :: RunTaskResponse -> Maybe [Failure]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Failure]
failures
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Task]
tasks
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus