{-# 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.StartTask
-- 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 from the specified task definition on the specified
-- container instance or instances.
--
-- Alternatively, you can use RunTask to place tasks for you. 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/.
module Amazonka.ECS.StartTask
  ( -- * Creating a Request
    StartTask (..),
    newStartTask,

    -- * Request Lenses
    startTask_cluster,
    startTask_enableECSManagedTags,
    startTask_enableExecuteCommand,
    startTask_group,
    startTask_networkConfiguration,
    startTask_overrides,
    startTask_propagateTags,
    startTask_referenceId,
    startTask_startedBy,
    startTask_tags,
    startTask_containerInstances,
    startTask_taskDefinition,

    -- * Destructuring the Response
    StartTaskResponse (..),
    newStartTaskResponse,

    -- * Response Lenses
    startTaskResponse_failures,
    startTaskResponse_tasks,
    startTaskResponse_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:/ 'newStartTask' smart constructor.
data StartTask = StartTask'
  { -- | The short name or full Amazon Resource Name (ARN) of the cluster where
    -- to start your task. If you do not specify a cluster, the default cluster
    -- is assumed.
    StartTask -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
    -- | 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/.
    StartTask -> Maybe Bool
enableECSManagedTags :: Prelude.Maybe Prelude.Bool,
    -- | Whether or not the execute command functionality is enabled for the
    -- task. If @true@, this enables execute command functionality on all
    -- containers in the task.
    StartTask -> 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).
    StartTask -> Maybe Text
group' :: Prelude.Maybe Prelude.Text,
    -- | The VPC subnet and security group configuration for tasks that receive
    -- their own elastic network interface by using the @awsvpc@ networking
    -- mode.
    StartTask -> 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
    -- receives. 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.
    StartTask -> Maybe TaskOverride
overrides :: Prelude.Maybe TaskOverride,
    -- | Specifies whether to propagate the tags from the task definition or the
    -- service to the task. If no value is specified, the tags aren\'t
    -- propagated.
    StartTask -> Maybe PropagateTags
propagateTags :: Prelude.Maybe PropagateTags,
    -- | The reference ID to use for the task.
    StartTask -> 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, the @startedBy@ parameter
    -- contains the deployment ID of the service that starts it.
    StartTask -> 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.
    StartTask -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The container instance IDs or full ARN entries for the container
    -- instances where you would like to place your task. You can specify up to
    -- 10 container instances.
    StartTask -> [Text]
containerInstances :: [Prelude.Text],
    -- | The @family@ and @revision@ (@family:revision@) or full ARN of the task
    -- definition to start. If a @revision@ isn\'t specified, the latest
    -- @ACTIVE@ revision is used.
    StartTask -> Text
taskDefinition :: Prelude.Text
  }
  deriving (StartTask -> StartTask -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartTask -> StartTask -> Bool
$c/= :: StartTask -> StartTask -> Bool
== :: StartTask -> StartTask -> Bool
$c== :: StartTask -> StartTask -> Bool
Prelude.Eq, ReadPrec [StartTask]
ReadPrec StartTask
Int -> ReadS StartTask
ReadS [StartTask]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartTask]
$creadListPrec :: ReadPrec [StartTask]
readPrec :: ReadPrec StartTask
$creadPrec :: ReadPrec StartTask
readList :: ReadS [StartTask]
$creadList :: ReadS [StartTask]
readsPrec :: Int -> ReadS StartTask
$creadsPrec :: Int -> ReadS StartTask
Prelude.Read, Int -> StartTask -> ShowS
[StartTask] -> ShowS
StartTask -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartTask] -> ShowS
$cshowList :: [StartTask] -> ShowS
show :: StartTask -> String
$cshow :: StartTask -> String
showsPrec :: Int -> StartTask -> ShowS
$cshowsPrec :: Int -> StartTask -> ShowS
Prelude.Show, forall x. Rep StartTask x -> StartTask
forall x. StartTask -> Rep StartTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartTask x -> StartTask
$cfrom :: forall x. StartTask -> Rep StartTask x
Prelude.Generic)

-- |
-- Create a value of 'StartTask' 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:
--
-- 'cluster', 'startTask_cluster' - The short name or full Amazon Resource Name (ARN) of the cluster where
-- to start your task. If you do not specify a cluster, the default cluster
-- is assumed.
--
-- 'enableECSManagedTags', 'startTask_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', 'startTask_enableExecuteCommand' - Whether or not the execute command functionality is enabled for the
-- task. If @true@, this enables execute command functionality on all
-- containers in the task.
--
-- 'group'', 'startTask_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).
--
-- 'networkConfiguration', 'startTask_networkConfiguration' - The VPC subnet and security group configuration for tasks that receive
-- their own elastic network interface by using the @awsvpc@ networking
-- mode.
--
-- 'overrides', 'startTask_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
-- receives. 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.
--
-- 'propagateTags', 'startTask_propagateTags' - Specifies whether to propagate the tags from the task definition or the
-- service to the task. If no value is specified, the tags aren\'t
-- propagated.
--
-- 'referenceId', 'startTask_referenceId' - The reference ID to use for the task.
--
-- 'startedBy', 'startTask_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, the @startedBy@ parameter
-- contains the deployment ID of the service that starts it.
--
-- 'tags', 'startTask_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.
--
-- 'containerInstances', 'startTask_containerInstances' - The container instance IDs or full ARN entries for the container
-- instances where you would like to place your task. You can specify up to
-- 10 container instances.
--
-- 'taskDefinition', 'startTask_taskDefinition' - The @family@ and @revision@ (@family:revision@) or full ARN of the task
-- definition to start. If a @revision@ isn\'t specified, the latest
-- @ACTIVE@ revision is used.
newStartTask ::
  -- | 'taskDefinition'
  Prelude.Text ->
  StartTask
newStartTask :: Text -> StartTask
newStartTask Text
pTaskDefinition_ =
  StartTask'
    { $sel:cluster:StartTask' :: Maybe Text
cluster = forall a. Maybe a
Prelude.Nothing,
      $sel:enableECSManagedTags:StartTask' :: Maybe Bool
enableECSManagedTags = forall a. Maybe a
Prelude.Nothing,
      $sel:enableExecuteCommand:StartTask' :: Maybe Bool
enableExecuteCommand = forall a. Maybe a
Prelude.Nothing,
      $sel:group':StartTask' :: Maybe Text
group' = forall a. Maybe a
Prelude.Nothing,
      $sel:networkConfiguration:StartTask' :: Maybe NetworkConfiguration
networkConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:overrides:StartTask' :: Maybe TaskOverride
overrides = forall a. Maybe a
Prelude.Nothing,
      $sel:propagateTags:StartTask' :: Maybe PropagateTags
propagateTags = forall a. Maybe a
Prelude.Nothing,
      $sel:referenceId:StartTask' :: Maybe Text
referenceId = forall a. Maybe a
Prelude.Nothing,
      $sel:startedBy:StartTask' :: Maybe Text
startedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:StartTask' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:containerInstances:StartTask' :: [Text]
containerInstances = forall a. Monoid a => a
Prelude.mempty,
      $sel:taskDefinition:StartTask' :: Text
taskDefinition = Text
pTaskDefinition_
    }

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

-- | 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/.
startTask_enableECSManagedTags :: Lens.Lens' StartTask (Prelude.Maybe Prelude.Bool)
startTask_enableECSManagedTags :: Lens' StartTask (Maybe Bool)
startTask_enableECSManagedTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe Bool
enableECSManagedTags :: Maybe Bool
$sel:enableECSManagedTags:StartTask' :: StartTask -> Maybe Bool
enableECSManagedTags} -> Maybe Bool
enableECSManagedTags) (\s :: StartTask
s@StartTask' {} Maybe Bool
a -> StartTask
s {$sel:enableECSManagedTags:StartTask' :: Maybe Bool
enableECSManagedTags = Maybe Bool
a} :: StartTask)

-- | Whether or not the execute command functionality is enabled for the
-- task. If @true@, this enables execute command functionality on all
-- containers in the task.
startTask_enableExecuteCommand :: Lens.Lens' StartTask (Prelude.Maybe Prelude.Bool)
startTask_enableExecuteCommand :: Lens' StartTask (Maybe Bool)
startTask_enableExecuteCommand = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe Bool
enableExecuteCommand :: Maybe Bool
$sel:enableExecuteCommand:StartTask' :: StartTask -> Maybe Bool
enableExecuteCommand} -> Maybe Bool
enableExecuteCommand) (\s :: StartTask
s@StartTask' {} Maybe Bool
a -> StartTask
s {$sel:enableExecuteCommand:StartTask' :: Maybe Bool
enableExecuteCommand = Maybe Bool
a} :: StartTask)

-- | 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).
startTask_group :: Lens.Lens' StartTask (Prelude.Maybe Prelude.Text)
startTask_group :: Lens' StartTask (Maybe Text)
startTask_group = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe Text
group' :: Maybe Text
$sel:group':StartTask' :: StartTask -> Maybe Text
group'} -> Maybe Text
group') (\s :: StartTask
s@StartTask' {} Maybe Text
a -> StartTask
s {$sel:group':StartTask' :: Maybe Text
group' = Maybe Text
a} :: StartTask)

-- | The VPC subnet and security group configuration for tasks that receive
-- their own elastic network interface by using the @awsvpc@ networking
-- mode.
startTask_networkConfiguration :: Lens.Lens' StartTask (Prelude.Maybe NetworkConfiguration)
startTask_networkConfiguration :: Lens' StartTask (Maybe NetworkConfiguration)
startTask_networkConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe NetworkConfiguration
networkConfiguration :: Maybe NetworkConfiguration
$sel:networkConfiguration:StartTask' :: StartTask -> Maybe NetworkConfiguration
networkConfiguration} -> Maybe NetworkConfiguration
networkConfiguration) (\s :: StartTask
s@StartTask' {} Maybe NetworkConfiguration
a -> StartTask
s {$sel:networkConfiguration:StartTask' :: Maybe NetworkConfiguration
networkConfiguration = Maybe NetworkConfiguration
a} :: StartTask)

-- | A list of container overrides in JSON format that specify the name of a
-- container in the specified task definition and the overrides it
-- receives. 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.
startTask_overrides :: Lens.Lens' StartTask (Prelude.Maybe TaskOverride)
startTask_overrides :: Lens' StartTask (Maybe TaskOverride)
startTask_overrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe TaskOverride
overrides :: Maybe TaskOverride
$sel:overrides:StartTask' :: StartTask -> Maybe TaskOverride
overrides} -> Maybe TaskOverride
overrides) (\s :: StartTask
s@StartTask' {} Maybe TaskOverride
a -> StartTask
s {$sel:overrides:StartTask' :: Maybe TaskOverride
overrides = Maybe TaskOverride
a} :: StartTask)

-- | Specifies whether to propagate the tags from the task definition or the
-- service to the task. If no value is specified, the tags aren\'t
-- propagated.
startTask_propagateTags :: Lens.Lens' StartTask (Prelude.Maybe PropagateTags)
startTask_propagateTags :: Lens' StartTask (Maybe PropagateTags)
startTask_propagateTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe PropagateTags
propagateTags :: Maybe PropagateTags
$sel:propagateTags:StartTask' :: StartTask -> Maybe PropagateTags
propagateTags} -> Maybe PropagateTags
propagateTags) (\s :: StartTask
s@StartTask' {} Maybe PropagateTags
a -> StartTask
s {$sel:propagateTags:StartTask' :: Maybe PropagateTags
propagateTags = Maybe PropagateTags
a} :: StartTask)

-- | The reference ID to use for the task.
startTask_referenceId :: Lens.Lens' StartTask (Prelude.Maybe Prelude.Text)
startTask_referenceId :: Lens' StartTask (Maybe Text)
startTask_referenceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe Text
referenceId :: Maybe Text
$sel:referenceId:StartTask' :: StartTask -> Maybe Text
referenceId} -> Maybe Text
referenceId) (\s :: StartTask
s@StartTask' {} Maybe Text
a -> StartTask
s {$sel:referenceId:StartTask' :: Maybe Text
referenceId = Maybe Text
a} :: StartTask)

-- | 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, the @startedBy@ parameter
-- contains the deployment ID of the service that starts it.
startTask_startedBy :: Lens.Lens' StartTask (Prelude.Maybe Prelude.Text)
startTask_startedBy :: Lens' StartTask (Maybe Text)
startTask_startedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe Text
startedBy :: Maybe Text
$sel:startedBy:StartTask' :: StartTask -> Maybe Text
startedBy} -> Maybe Text
startedBy) (\s :: StartTask
s@StartTask' {} Maybe Text
a -> StartTask
s {$sel:startedBy:StartTask' :: Maybe Text
startedBy = Maybe Text
a} :: StartTask)

-- | 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.
startTask_tags :: Lens.Lens' StartTask (Prelude.Maybe [Tag])
startTask_tags :: Lens' StartTask (Maybe [Tag])
startTask_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartTask' :: StartTask -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartTask
s@StartTask' {} Maybe [Tag]
a -> StartTask
s {$sel:tags:StartTask' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartTask) 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 container instance IDs or full ARN entries for the container
-- instances where you would like to place your task. You can specify up to
-- 10 container instances.
startTask_containerInstances :: Lens.Lens' StartTask [Prelude.Text]
startTask_containerInstances :: Lens' StartTask [Text]
startTask_containerInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {[Text]
containerInstances :: [Text]
$sel:containerInstances:StartTask' :: StartTask -> [Text]
containerInstances} -> [Text]
containerInstances) (\s :: StartTask
s@StartTask' {} [Text]
a -> StartTask
s {$sel:containerInstances:StartTask' :: [Text]
containerInstances = [Text]
a} :: StartTask) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The @family@ and @revision@ (@family:revision@) or full ARN of the task
-- definition to start. If a @revision@ isn\'t specified, the latest
-- @ACTIVE@ revision is used.
startTask_taskDefinition :: Lens.Lens' StartTask Prelude.Text
startTask_taskDefinition :: Lens' StartTask Text
startTask_taskDefinition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTask' {Text
taskDefinition :: Text
$sel:taskDefinition:StartTask' :: StartTask -> Text
taskDefinition} -> Text
taskDefinition) (\s :: StartTask
s@StartTask' {} Text
a -> StartTask
s {$sel:taskDefinition:StartTask' :: Text
taskDefinition = Text
a} :: StartTask)

instance Core.AWSRequest StartTask where
  type AWSResponse StartTask = StartTaskResponse
  request :: (Service -> Service) -> StartTask -> Request StartTask
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 StartTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartTask)))
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 -> StartTaskResponse
StartTaskResponse'
            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 StartTask where
  hashWithSalt :: Int -> StartTask -> Int
hashWithSalt Int
_salt StartTask' {[Text]
Maybe Bool
Maybe [Tag]
Maybe Text
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
containerInstances :: [Text]
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
cluster :: Maybe Text
$sel:taskDefinition:StartTask' :: StartTask -> Text
$sel:containerInstances:StartTask' :: StartTask -> [Text]
$sel:tags:StartTask' :: StartTask -> Maybe [Tag]
$sel:startedBy:StartTask' :: StartTask -> Maybe Text
$sel:referenceId:StartTask' :: StartTask -> Maybe Text
$sel:propagateTags:StartTask' :: StartTask -> Maybe PropagateTags
$sel:overrides:StartTask' :: StartTask -> Maybe TaskOverride
$sel:networkConfiguration:StartTask' :: StartTask -> Maybe NetworkConfiguration
$sel:group':StartTask' :: StartTask -> Maybe Text
$sel:enableExecuteCommand:StartTask' :: StartTask -> Maybe Bool
$sel:enableECSManagedTags:StartTask' :: StartTask -> Maybe Bool
$sel:cluster:StartTask' :: StartTask -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cluster
      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 NetworkConfiguration
networkConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TaskOverride
overrides
      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]
containerInstances
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
taskDefinition

instance Prelude.NFData StartTask where
  rnf :: StartTask -> ()
rnf StartTask' {[Text]
Maybe Bool
Maybe [Tag]
Maybe Text
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
containerInstances :: [Text]
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
cluster :: Maybe Text
$sel:taskDefinition:StartTask' :: StartTask -> Text
$sel:containerInstances:StartTask' :: StartTask -> [Text]
$sel:tags:StartTask' :: StartTask -> Maybe [Tag]
$sel:startedBy:StartTask' :: StartTask -> Maybe Text
$sel:referenceId:StartTask' :: StartTask -> Maybe Text
$sel:propagateTags:StartTask' :: StartTask -> Maybe PropagateTags
$sel:overrides:StartTask' :: StartTask -> Maybe TaskOverride
$sel:networkConfiguration:StartTask' :: StartTask -> Maybe NetworkConfiguration
$sel:group':StartTask' :: StartTask -> Maybe Text
$sel:enableExecuteCommand:StartTask' :: StartTask -> Maybe Bool
$sel:enableECSManagedTags:StartTask' :: StartTask -> Maybe Bool
$sel:cluster:StartTask' :: StartTask -> Maybe Text
..} =
    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 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 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 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]
containerInstances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
taskDefinition

instance Data.ToHeaders StartTask where
  toHeaders :: StartTask -> 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.StartTask" ::
                          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 StartTask where
  toJSON :: StartTask -> Value
toJSON StartTask' {[Text]
Maybe Bool
Maybe [Tag]
Maybe Text
Maybe NetworkConfiguration
Maybe PropagateTags
Maybe TaskOverride
Text
taskDefinition :: Text
containerInstances :: [Text]
tags :: Maybe [Tag]
startedBy :: Maybe Text
referenceId :: Maybe Text
propagateTags :: Maybe PropagateTags
overrides :: Maybe TaskOverride
networkConfiguration :: Maybe NetworkConfiguration
group' :: Maybe Text
enableExecuteCommand :: Maybe Bool
enableECSManagedTags :: Maybe Bool
cluster :: Maybe Text
$sel:taskDefinition:StartTask' :: StartTask -> Text
$sel:containerInstances:StartTask' :: StartTask -> [Text]
$sel:tags:StartTask' :: StartTask -> Maybe [Tag]
$sel:startedBy:StartTask' :: StartTask -> Maybe Text
$sel:referenceId:StartTask' :: StartTask -> Maybe Text
$sel:propagateTags:StartTask' :: StartTask -> Maybe PropagateTags
$sel:overrides:StartTask' :: StartTask -> Maybe TaskOverride
$sel:networkConfiguration:StartTask' :: StartTask -> Maybe NetworkConfiguration
$sel:group':StartTask' :: StartTask -> Maybe Text
$sel:enableExecuteCommand:StartTask' :: StartTask -> Maybe Bool
$sel:enableECSManagedTags:StartTask' :: StartTask -> Maybe Bool
$sel:cluster:StartTask' :: StartTask -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"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
"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
"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
"containerInstances" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
containerInstances),
            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 StartTask where
  toPath :: StartTask -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'StartTaskResponse' 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', 'startTaskResponse_failures' - Any failures associated with the call.
--
-- 'tasks', 'startTaskResponse_tasks' - A full description of the tasks that were started. Each task that was
-- successfully placed on your container instances is described.
--
-- 'httpStatus', 'startTaskResponse_httpStatus' - The response's http status code.
newStartTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartTaskResponse
newStartTaskResponse :: Int -> StartTaskResponse
newStartTaskResponse Int
pHttpStatus_ =
  StartTaskResponse'
    { $sel:failures:StartTaskResponse' :: Maybe [Failure]
failures = forall a. Maybe a
Prelude.Nothing,
      $sel:tasks:StartTaskResponse' :: Maybe [Task]
tasks = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Any failures associated with the call.
startTaskResponse_failures :: Lens.Lens' StartTaskResponse (Prelude.Maybe [Failure])
startTaskResponse_failures :: Lens' StartTaskResponse (Maybe [Failure])
startTaskResponse_failures = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskResponse' {Maybe [Failure]
failures :: Maybe [Failure]
$sel:failures:StartTaskResponse' :: StartTaskResponse -> Maybe [Failure]
failures} -> Maybe [Failure]
failures) (\s :: StartTaskResponse
s@StartTaskResponse' {} Maybe [Failure]
a -> StartTaskResponse
s {$sel:failures:StartTaskResponse' :: Maybe [Failure]
failures = Maybe [Failure]
a} :: StartTaskResponse) 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 started. Each task that was
-- successfully placed on your container instances is described.
startTaskResponse_tasks :: Lens.Lens' StartTaskResponse (Prelude.Maybe [Task])
startTaskResponse_tasks :: Lens' StartTaskResponse (Maybe [Task])
startTaskResponse_tasks = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskResponse' {Maybe [Task]
tasks :: Maybe [Task]
$sel:tasks:StartTaskResponse' :: StartTaskResponse -> Maybe [Task]
tasks} -> Maybe [Task]
tasks) (\s :: StartTaskResponse
s@StartTaskResponse' {} Maybe [Task]
a -> StartTaskResponse
s {$sel:tasks:StartTaskResponse' :: Maybe [Task]
tasks = Maybe [Task]
a} :: StartTaskResponse) 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.
startTaskResponse_httpStatus :: Lens.Lens' StartTaskResponse Prelude.Int
startTaskResponse_httpStatus :: Lens' StartTaskResponse Int
startTaskResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartTaskResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartTaskResponse' :: StartTaskResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartTaskResponse
s@StartTaskResponse' {} Int
a -> StartTaskResponse
s {$sel:httpStatus:StartTaskResponse' :: Int
httpStatus = Int
a} :: StartTaskResponse)

instance Prelude.NFData StartTaskResponse where
  rnf :: StartTaskResponse -> ()
rnf StartTaskResponse' {Int
Maybe [Failure]
Maybe [Task]
httpStatus :: Int
tasks :: Maybe [Task]
failures :: Maybe [Failure]
$sel:httpStatus:StartTaskResponse' :: StartTaskResponse -> Int
$sel:tasks:StartTaskResponse' :: StartTaskResponse -> Maybe [Task]
$sel:failures:StartTaskResponse' :: StartTaskResponse -> 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