{-# 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.SSM.GetMaintenanceWindowTask
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the details of a maintenance window task.
--
-- For maintenance window tasks without a specified target, you can\'t
-- supply values for @--max-errors@ and @--max-concurrency@. Instead, the
-- system inserts a placeholder value of @1@, which may be reported in the
-- response to this command. These values don\'t affect the running of your
-- task and can be ignored.
--
-- To retrieve a list of tasks in a maintenance window, instead use the
-- DescribeMaintenanceWindowTasks command.
module Amazonka.SSM.GetMaintenanceWindowTask
  ( -- * Creating a Request
    GetMaintenanceWindowTask (..),
    newGetMaintenanceWindowTask,

    -- * Request Lenses
    getMaintenanceWindowTask_windowId,
    getMaintenanceWindowTask_windowTaskId,

    -- * Destructuring the Response
    GetMaintenanceWindowTaskResponse (..),
    newGetMaintenanceWindowTaskResponse,

    -- * Response Lenses
    getMaintenanceWindowTaskResponse_alarmConfiguration,
    getMaintenanceWindowTaskResponse_cutoffBehavior,
    getMaintenanceWindowTaskResponse_description,
    getMaintenanceWindowTaskResponse_loggingInfo,
    getMaintenanceWindowTaskResponse_maxConcurrency,
    getMaintenanceWindowTaskResponse_maxErrors,
    getMaintenanceWindowTaskResponse_name,
    getMaintenanceWindowTaskResponse_priority,
    getMaintenanceWindowTaskResponse_serviceRoleArn,
    getMaintenanceWindowTaskResponse_targets,
    getMaintenanceWindowTaskResponse_taskArn,
    getMaintenanceWindowTaskResponse_taskInvocationParameters,
    getMaintenanceWindowTaskResponse_taskParameters,
    getMaintenanceWindowTaskResponse_taskType,
    getMaintenanceWindowTaskResponse_windowId,
    getMaintenanceWindowTaskResponse_windowTaskId,
    getMaintenanceWindowTaskResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetMaintenanceWindowTask' smart constructor.
data GetMaintenanceWindowTask = GetMaintenanceWindowTask'
  { -- | The maintenance window ID that includes the task to retrieve.
    GetMaintenanceWindowTask -> Text
windowId :: Prelude.Text,
    -- | The maintenance window task ID to retrieve.
    GetMaintenanceWindowTask -> Text
windowTaskId :: Prelude.Text
  }
  deriving (GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool
$c/= :: GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool
== :: GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool
$c== :: GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool
Prelude.Eq, ReadPrec [GetMaintenanceWindowTask]
ReadPrec GetMaintenanceWindowTask
Int -> ReadS GetMaintenanceWindowTask
ReadS [GetMaintenanceWindowTask]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMaintenanceWindowTask]
$creadListPrec :: ReadPrec [GetMaintenanceWindowTask]
readPrec :: ReadPrec GetMaintenanceWindowTask
$creadPrec :: ReadPrec GetMaintenanceWindowTask
readList :: ReadS [GetMaintenanceWindowTask]
$creadList :: ReadS [GetMaintenanceWindowTask]
readsPrec :: Int -> ReadS GetMaintenanceWindowTask
$creadsPrec :: Int -> ReadS GetMaintenanceWindowTask
Prelude.Read, Int -> GetMaintenanceWindowTask -> ShowS
[GetMaintenanceWindowTask] -> ShowS
GetMaintenanceWindowTask -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMaintenanceWindowTask] -> ShowS
$cshowList :: [GetMaintenanceWindowTask] -> ShowS
show :: GetMaintenanceWindowTask -> String
$cshow :: GetMaintenanceWindowTask -> String
showsPrec :: Int -> GetMaintenanceWindowTask -> ShowS
$cshowsPrec :: Int -> GetMaintenanceWindowTask -> ShowS
Prelude.Show, forall x.
Rep GetMaintenanceWindowTask x -> GetMaintenanceWindowTask
forall x.
GetMaintenanceWindowTask -> Rep GetMaintenanceWindowTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetMaintenanceWindowTask x -> GetMaintenanceWindowTask
$cfrom :: forall x.
GetMaintenanceWindowTask -> Rep GetMaintenanceWindowTask x
Prelude.Generic)

-- |
-- Create a value of 'GetMaintenanceWindowTask' 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:
--
-- 'windowId', 'getMaintenanceWindowTask_windowId' - The maintenance window ID that includes the task to retrieve.
--
-- 'windowTaskId', 'getMaintenanceWindowTask_windowTaskId' - The maintenance window task ID to retrieve.
newGetMaintenanceWindowTask ::
  -- | 'windowId'
  Prelude.Text ->
  -- | 'windowTaskId'
  Prelude.Text ->
  GetMaintenanceWindowTask
newGetMaintenanceWindowTask :: Text -> Text -> GetMaintenanceWindowTask
newGetMaintenanceWindowTask Text
pWindowId_ Text
pWindowTaskId_ =
  GetMaintenanceWindowTask'
    { $sel:windowId:GetMaintenanceWindowTask' :: Text
windowId = Text
pWindowId_,
      $sel:windowTaskId:GetMaintenanceWindowTask' :: Text
windowTaskId = Text
pWindowTaskId_
    }

-- | The maintenance window ID that includes the task to retrieve.
getMaintenanceWindowTask_windowId :: Lens.Lens' GetMaintenanceWindowTask Prelude.Text
getMaintenanceWindowTask_windowId :: Lens' GetMaintenanceWindowTask Text
getMaintenanceWindowTask_windowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTask' {Text
windowId :: Text
$sel:windowId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
windowId} -> Text
windowId) (\s :: GetMaintenanceWindowTask
s@GetMaintenanceWindowTask' {} Text
a -> GetMaintenanceWindowTask
s {$sel:windowId:GetMaintenanceWindowTask' :: Text
windowId = Text
a} :: GetMaintenanceWindowTask)

-- | The maintenance window task ID to retrieve.
getMaintenanceWindowTask_windowTaskId :: Lens.Lens' GetMaintenanceWindowTask Prelude.Text
getMaintenanceWindowTask_windowTaskId :: Lens' GetMaintenanceWindowTask Text
getMaintenanceWindowTask_windowTaskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTask' {Text
windowTaskId :: Text
$sel:windowTaskId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
windowTaskId} -> Text
windowTaskId) (\s :: GetMaintenanceWindowTask
s@GetMaintenanceWindowTask' {} Text
a -> GetMaintenanceWindowTask
s {$sel:windowTaskId:GetMaintenanceWindowTask' :: Text
windowTaskId = Text
a} :: GetMaintenanceWindowTask)

instance Core.AWSRequest GetMaintenanceWindowTask where
  type
    AWSResponse GetMaintenanceWindowTask =
      GetMaintenanceWindowTaskResponse
  request :: (Service -> Service)
-> GetMaintenanceWindowTask -> Request GetMaintenanceWindowTask
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 GetMaintenanceWindowTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetMaintenanceWindowTask)))
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 AlarmConfiguration
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe (Sensitive Text)
-> Maybe LoggingInfo
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe [Target]
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe MaintenanceWindowTaskType
-> Maybe Text
-> Maybe Text
-> Int
-> GetMaintenanceWindowTaskResponse
GetMaintenanceWindowTaskResponse'
            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
"AlarmConfiguration")
            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
"CutoffBehavior")
            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
"Description")
            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
"LoggingInfo")
            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
"MaxConcurrency")
            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
"MaxErrors")
            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
"Name")
            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
"Priority")
            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
"ServiceRoleArn")
            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
"Targets" 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
"TaskArn")
            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
"TaskInvocationParameters")
            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
"TaskParameters" 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
"TaskType")
            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
"WindowId")
            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
"WindowTaskId")
            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 GetMaintenanceWindowTask where
  hashWithSalt :: Int -> GetMaintenanceWindowTask -> Int
hashWithSalt Int
_salt GetMaintenanceWindowTask' {Text
windowTaskId :: Text
windowId :: Text
$sel:windowTaskId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
$sel:windowId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
windowId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
windowTaskId

instance Prelude.NFData GetMaintenanceWindowTask where
  rnf :: GetMaintenanceWindowTask -> ()
rnf GetMaintenanceWindowTask' {Text
windowTaskId :: Text
windowId :: Text
$sel:windowTaskId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
$sel:windowId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
windowId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
windowTaskId

instance Data.ToHeaders GetMaintenanceWindowTask where
  toHeaders :: GetMaintenanceWindowTask -> 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
"AmazonSSM.GetMaintenanceWindowTask" ::
                          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 GetMaintenanceWindowTask where
  toJSON :: GetMaintenanceWindowTask -> Value
toJSON GetMaintenanceWindowTask' {Text
windowTaskId :: Text
windowId :: Text
$sel:windowTaskId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
$sel:windowId:GetMaintenanceWindowTask' :: GetMaintenanceWindowTask -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"WindowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
windowId),
            forall a. a -> Maybe a
Prelude.Just (Key
"WindowTaskId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
windowTaskId)
          ]
      )

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

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

-- | /See:/ 'newGetMaintenanceWindowTaskResponse' smart constructor.
data GetMaintenanceWindowTaskResponse = GetMaintenanceWindowTaskResponse'
  { -- | The details for the CloudWatch alarm you applied to your maintenance
    -- window task.
    GetMaintenanceWindowTaskResponse -> Maybe AlarmConfiguration
alarmConfiguration :: Prelude.Maybe AlarmConfiguration,
    -- | The action to take on tasks when the maintenance window cutoff time is
    -- reached. @CONTINUE_TASK@ means that tasks continue to run. For
    -- Automation, Lambda, Step Functions tasks, @CANCEL_TASK@ means that
    -- currently running task invocations continue, but no new task invocations
    -- are started. For Run Command tasks, @CANCEL_TASK@ means the system
    -- attempts to stop the task by sending a @CancelCommand@ operation.
    GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Prelude.Maybe MaintenanceWindowTaskCutoffBehavior,
    -- | The retrieved task description.
    GetMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The location in Amazon Simple Storage Service (Amazon S3) where the task
    -- results are logged.
    --
    -- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
    -- Service (Amazon S3) bucket to contain logs, instead use the
    -- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
    -- @TaskInvocationParameters@ structure. For information about how Amazon
    -- Web Services Systems Manager handles these options for the supported
    -- maintenance window task types, see
    -- MaintenanceWindowTaskInvocationParameters.
    GetMaintenanceWindowTaskResponse -> Maybe LoggingInfo
loggingInfo :: Prelude.Maybe LoggingInfo,
    -- | The maximum number of targets allowed to run this task in parallel.
    --
    -- For maintenance window tasks without a target specified, you can\'t
    -- supply a value for this option. Instead, the system inserts a
    -- placeholder value of @1@, which may be reported in the response to this
    -- command. This value doesn\'t affect the running of your task and can be
    -- ignored.
    GetMaintenanceWindowTaskResponse -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of errors allowed before the task stops being
    -- scheduled.
    --
    -- For maintenance window tasks without a target specified, you can\'t
    -- supply a value for this option. Instead, the system inserts a
    -- placeholder value of @1@, which may be reported in the response to this
    -- command. This value doesn\'t affect the running of your task and can be
    -- ignored.
    GetMaintenanceWindowTaskResponse -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The retrieved task name.
    GetMaintenanceWindowTaskResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The priority of the task when it runs. The lower the number, the higher
    -- the priority. Tasks that have the same priority are scheduled in
    -- parallel.
    GetMaintenanceWindowTaskResponse -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the Identity and Access Management
    -- (IAM) service role to use to publish Amazon Simple Notification Service
    -- (Amazon SNS) notifications for maintenance window Run Command tasks.
    GetMaintenanceWindowTaskResponse -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The targets where the task should run.
    GetMaintenanceWindowTaskResponse -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The resource that the task used during execution. For @RUN_COMMAND@ and
    -- @AUTOMATION@ task types, the value of @TaskArn@ is the SSM document
    -- name\/ARN. For @LAMBDA@ tasks, the value is the function name\/ARN. For
    -- @STEP_FUNCTIONS@ tasks, the value is the state machine ARN.
    GetMaintenanceWindowTaskResponse -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | The parameters to pass to the task when it runs.
    GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Prelude.Maybe MaintenanceWindowTaskInvocationParameters,
    -- | The parameters to pass to the task when it runs.
    --
    -- @TaskParameters@ has been deprecated. To specify parameters to pass to a
    -- task when it runs, instead use the @Parameters@ option in the
    -- @TaskInvocationParameters@ structure. For information about how Systems
    -- Manager handles these options for the supported maintenance window task
    -- types, see MaintenanceWindowTaskInvocationParameters.
    GetMaintenanceWindowTaskResponse
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Prelude.Maybe (Data.Sensitive (Prelude.HashMap Prelude.Text (Data.Sensitive MaintenanceWindowTaskParameterValueExpression))),
    -- | The type of task to run.
    GetMaintenanceWindowTaskResponse -> Maybe MaintenanceWindowTaskType
taskType :: Prelude.Maybe MaintenanceWindowTaskType,
    -- | The retrieved maintenance window ID.
    GetMaintenanceWindowTaskResponse -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text,
    -- | The retrieved maintenance window task ID.
    GetMaintenanceWindowTaskResponse -> Maybe Text
windowTaskId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetMaintenanceWindowTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
$c/= :: GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
== :: GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
$c== :: GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
Prelude.Eq, Int -> GetMaintenanceWindowTaskResponse -> ShowS
[GetMaintenanceWindowTaskResponse] -> ShowS
GetMaintenanceWindowTaskResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMaintenanceWindowTaskResponse] -> ShowS
$cshowList :: [GetMaintenanceWindowTaskResponse] -> ShowS
show :: GetMaintenanceWindowTaskResponse -> String
$cshow :: GetMaintenanceWindowTaskResponse -> String
showsPrec :: Int -> GetMaintenanceWindowTaskResponse -> ShowS
$cshowsPrec :: Int -> GetMaintenanceWindowTaskResponse -> ShowS
Prelude.Show, forall x.
Rep GetMaintenanceWindowTaskResponse x
-> GetMaintenanceWindowTaskResponse
forall x.
GetMaintenanceWindowTaskResponse
-> Rep GetMaintenanceWindowTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetMaintenanceWindowTaskResponse x
-> GetMaintenanceWindowTaskResponse
$cfrom :: forall x.
GetMaintenanceWindowTaskResponse
-> Rep GetMaintenanceWindowTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMaintenanceWindowTaskResponse' 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:
--
-- 'alarmConfiguration', 'getMaintenanceWindowTaskResponse_alarmConfiguration' - The details for the CloudWatch alarm you applied to your maintenance
-- window task.
--
-- 'cutoffBehavior', 'getMaintenanceWindowTaskResponse_cutoffBehavior' - The action to take on tasks when the maintenance window cutoff time is
-- reached. @CONTINUE_TASK@ means that tasks continue to run. For
-- Automation, Lambda, Step Functions tasks, @CANCEL_TASK@ means that
-- currently running task invocations continue, but no new task invocations
-- are started. For Run Command tasks, @CANCEL_TASK@ means the system
-- attempts to stop the task by sending a @CancelCommand@ operation.
--
-- 'description', 'getMaintenanceWindowTaskResponse_description' - The retrieved task description.
--
-- 'loggingInfo', 'getMaintenanceWindowTaskResponse_loggingInfo' - The location in Amazon Simple Storage Service (Amazon S3) where the task
-- results are logged.
--
-- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
-- Service (Amazon S3) bucket to contain logs, instead use the
-- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
-- @TaskInvocationParameters@ structure. For information about how Amazon
-- Web Services Systems Manager handles these options for the supported
-- maintenance window task types, see
-- MaintenanceWindowTaskInvocationParameters.
--
-- 'maxConcurrency', 'getMaintenanceWindowTaskResponse_maxConcurrency' - The maximum number of targets allowed to run this task in parallel.
--
-- For maintenance window tasks without a target specified, you can\'t
-- supply a value for this option. Instead, the system inserts a
-- placeholder value of @1@, which may be reported in the response to this
-- command. This value doesn\'t affect the running of your task and can be
-- ignored.
--
-- 'maxErrors', 'getMaintenanceWindowTaskResponse_maxErrors' - The maximum number of errors allowed before the task stops being
-- scheduled.
--
-- For maintenance window tasks without a target specified, you can\'t
-- supply a value for this option. Instead, the system inserts a
-- placeholder value of @1@, which may be reported in the response to this
-- command. This value doesn\'t affect the running of your task and can be
-- ignored.
--
-- 'name', 'getMaintenanceWindowTaskResponse_name' - The retrieved task name.
--
-- 'priority', 'getMaintenanceWindowTaskResponse_priority' - The priority of the task when it runs. The lower the number, the higher
-- the priority. Tasks that have the same priority are scheduled in
-- parallel.
--
-- 'serviceRoleArn', 'getMaintenanceWindowTaskResponse_serviceRoleArn' - The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) service role to use to publish Amazon Simple Notification Service
-- (Amazon SNS) notifications for maintenance window Run Command tasks.
--
-- 'targets', 'getMaintenanceWindowTaskResponse_targets' - The targets where the task should run.
--
-- 'taskArn', 'getMaintenanceWindowTaskResponse_taskArn' - The resource that the task used during execution. For @RUN_COMMAND@ and
-- @AUTOMATION@ task types, the value of @TaskArn@ is the SSM document
-- name\/ARN. For @LAMBDA@ tasks, the value is the function name\/ARN. For
-- @STEP_FUNCTIONS@ tasks, the value is the state machine ARN.
--
-- 'taskInvocationParameters', 'getMaintenanceWindowTaskResponse_taskInvocationParameters' - The parameters to pass to the task when it runs.
--
-- 'taskParameters', 'getMaintenanceWindowTaskResponse_taskParameters' - The parameters to pass to the task when it runs.
--
-- @TaskParameters@ has been deprecated. To specify parameters to pass to a
-- task when it runs, instead use the @Parameters@ option in the
-- @TaskInvocationParameters@ structure. For information about how Systems
-- Manager handles these options for the supported maintenance window task
-- types, see MaintenanceWindowTaskInvocationParameters.
--
-- 'taskType', 'getMaintenanceWindowTaskResponse_taskType' - The type of task to run.
--
-- 'windowId', 'getMaintenanceWindowTaskResponse_windowId' - The retrieved maintenance window ID.
--
-- 'windowTaskId', 'getMaintenanceWindowTaskResponse_windowTaskId' - The retrieved maintenance window task ID.
--
-- 'httpStatus', 'getMaintenanceWindowTaskResponse_httpStatus' - The response's http status code.
newGetMaintenanceWindowTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMaintenanceWindowTaskResponse
newGetMaintenanceWindowTaskResponse :: Int -> GetMaintenanceWindowTaskResponse
newGetMaintenanceWindowTaskResponse Int
pHttpStatus_ =
  GetMaintenanceWindowTaskResponse'
    { $sel:alarmConfiguration:GetMaintenanceWindowTaskResponse' :: Maybe AlarmConfiguration
alarmConfiguration =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cutoffBehavior:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetMaintenanceWindowTaskResponse' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
      $sel:loggingInfo:GetMaintenanceWindowTaskResponse' :: Maybe LoggingInfo
loggingInfo = forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxConcurrency = forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxErrors = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetMaintenanceWindowTaskResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:priority:GetMaintenanceWindowTaskResponse' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRoleArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
serviceRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:targets:GetMaintenanceWindowTaskResponse' :: Maybe [Target]
targets = forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
taskArn = forall a. Maybe a
Prelude.Nothing,
      $sel:taskInvocationParameters:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters =
        forall a. Maybe a
Prelude.Nothing,
      $sel:taskParameters:GetMaintenanceWindowTaskResponse' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:taskType:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskType
taskType = forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowId = forall a. Maybe a
Prelude.Nothing,
      $sel:windowTaskId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowTaskId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMaintenanceWindowTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The details for the CloudWatch alarm you applied to your maintenance
-- window task.
getMaintenanceWindowTaskResponse_alarmConfiguration :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe AlarmConfiguration)
getMaintenanceWindowTaskResponse_alarmConfiguration :: Lens' GetMaintenanceWindowTaskResponse (Maybe AlarmConfiguration)
getMaintenanceWindowTaskResponse_alarmConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe AlarmConfiguration
alarmConfiguration :: Maybe AlarmConfiguration
$sel:alarmConfiguration:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe AlarmConfiguration
alarmConfiguration} -> Maybe AlarmConfiguration
alarmConfiguration) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe AlarmConfiguration
a -> GetMaintenanceWindowTaskResponse
s {$sel:alarmConfiguration:GetMaintenanceWindowTaskResponse' :: Maybe AlarmConfiguration
alarmConfiguration = Maybe AlarmConfiguration
a} :: GetMaintenanceWindowTaskResponse)

-- | The action to take on tasks when the maintenance window cutoff time is
-- reached. @CONTINUE_TASK@ means that tasks continue to run. For
-- Automation, Lambda, Step Functions tasks, @CANCEL_TASK@ means that
-- currently running task invocations continue, but no new task invocations
-- are started. For Run Command tasks, @CANCEL_TASK@ means the system
-- attempts to stop the task by sending a @CancelCommand@ operation.
getMaintenanceWindowTaskResponse_cutoffBehavior :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskCutoffBehavior)
getMaintenanceWindowTaskResponse_cutoffBehavior :: Lens'
  GetMaintenanceWindowTaskResponse
  (Maybe MaintenanceWindowTaskCutoffBehavior)
getMaintenanceWindowTaskResponse_cutoffBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
$sel:cutoffBehavior:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior} -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe MaintenanceWindowTaskCutoffBehavior
a -> GetMaintenanceWindowTaskResponse
s {$sel:cutoffBehavior:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
a} :: GetMaintenanceWindowTaskResponse)

-- | The retrieved task description.
getMaintenanceWindowTaskResponse_description :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_description :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe (Sensitive Text)
a -> GetMaintenanceWindowTaskResponse
s {$sel:description:GetMaintenanceWindowTaskResponse' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: GetMaintenanceWindowTaskResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The location in Amazon Simple Storage Service (Amazon S3) where the task
-- results are logged.
--
-- @LoggingInfo@ has been deprecated. To specify an Amazon Simple Storage
-- Service (Amazon S3) bucket to contain logs, instead use the
-- @OutputS3BucketName@ and @OutputS3KeyPrefix@ options in the
-- @TaskInvocationParameters@ structure. For information about how Amazon
-- Web Services Systems Manager handles these options for the supported
-- maintenance window task types, see
-- MaintenanceWindowTaskInvocationParameters.
getMaintenanceWindowTaskResponse_loggingInfo :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe LoggingInfo)
getMaintenanceWindowTaskResponse_loggingInfo :: Lens' GetMaintenanceWindowTaskResponse (Maybe LoggingInfo)
getMaintenanceWindowTaskResponse_loggingInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe LoggingInfo
loggingInfo :: Maybe LoggingInfo
$sel:loggingInfo:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe LoggingInfo
loggingInfo} -> Maybe LoggingInfo
loggingInfo) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe LoggingInfo
a -> GetMaintenanceWindowTaskResponse
s {$sel:loggingInfo:GetMaintenanceWindowTaskResponse' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
a} :: GetMaintenanceWindowTaskResponse)

-- | The maximum number of targets allowed to run this task in parallel.
--
-- For maintenance window tasks without a target specified, you can\'t
-- supply a value for this option. Instead, the system inserts a
-- placeholder value of @1@, which may be reported in the response to this
-- command. This value doesn\'t affect the running of your task and can be
-- ignored.
getMaintenanceWindowTaskResponse_maxConcurrency :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_maxConcurrency :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_maxConcurrency = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:maxConcurrency:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxConcurrency = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The maximum number of errors allowed before the task stops being
-- scheduled.
--
-- For maintenance window tasks without a target specified, you can\'t
-- supply a value for this option. Instead, the system inserts a
-- placeholder value of @1@, which may be reported in the response to this
-- command. This value doesn\'t affect the running of your task and can be
-- ignored.
getMaintenanceWindowTaskResponse_maxErrors :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_maxErrors :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_maxErrors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:maxErrors:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxErrors = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The retrieved task name.
getMaintenanceWindowTaskResponse_name :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_name :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:name:GetMaintenanceWindowTaskResponse' :: Maybe Text
name = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The priority of the task when it runs. The lower the number, the higher
-- the priority. Tasks that have the same priority are scheduled in
-- parallel.
getMaintenanceWindowTaskResponse_priority :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Natural)
getMaintenanceWindowTaskResponse_priority :: Lens' GetMaintenanceWindowTaskResponse (Maybe Natural)
getMaintenanceWindowTaskResponse_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Natural
priority :: Maybe Natural
$sel:priority:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Natural
a -> GetMaintenanceWindowTaskResponse
s {$sel:priority:GetMaintenanceWindowTaskResponse' :: Maybe Natural
priority = Maybe Natural
a} :: GetMaintenanceWindowTaskResponse)

-- | The Amazon Resource Name (ARN) of the Identity and Access Management
-- (IAM) service role to use to publish Amazon Simple Notification Service
-- (Amazon SNS) notifications for maintenance window Run Command tasks.
getMaintenanceWindowTaskResponse_serviceRoleArn :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_serviceRoleArn :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_serviceRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:serviceRoleArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The targets where the task should run.
getMaintenanceWindowTaskResponse_targets :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe [Target])
getMaintenanceWindowTaskResponse_targets :: Lens' GetMaintenanceWindowTaskResponse (Maybe [Target])
getMaintenanceWindowTaskResponse_targets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe [Target]
a -> GetMaintenanceWindowTaskResponse
s {$sel:targets:GetMaintenanceWindowTaskResponse' :: Maybe [Target]
targets = Maybe [Target]
a} :: GetMaintenanceWindowTaskResponse) 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 resource that the task used during execution. For @RUN_COMMAND@ and
-- @AUTOMATION@ task types, the value of @TaskArn@ is the SSM document
-- name\/ARN. For @LAMBDA@ tasks, the value is the function name\/ARN. For
-- @STEP_FUNCTIONS@ tasks, the value is the state machine ARN.
getMaintenanceWindowTaskResponse_taskArn :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_taskArn :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_taskArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:taskArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
taskArn = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The parameters to pass to the task when it runs.
getMaintenanceWindowTaskResponse_taskInvocationParameters :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskInvocationParameters)
getMaintenanceWindowTaskResponse_taskInvocationParameters :: Lens'
  GetMaintenanceWindowTaskResponse
  (Maybe MaintenanceWindowTaskInvocationParameters)
getMaintenanceWindowTaskResponse_taskInvocationParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Maybe MaintenanceWindowTaskInvocationParameters
$sel:taskInvocationParameters:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters} -> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe MaintenanceWindowTaskInvocationParameters
a -> GetMaintenanceWindowTaskResponse
s {$sel:taskInvocationParameters:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters = Maybe MaintenanceWindowTaskInvocationParameters
a} :: GetMaintenanceWindowTaskResponse)

-- | The parameters to pass to the task when it runs.
--
-- @TaskParameters@ has been deprecated. To specify parameters to pass to a
-- task when it runs, instead use the @Parameters@ option in the
-- @TaskInvocationParameters@ structure. For information about how Systems
-- Manager handles these options for the supported maintenance window task
-- types, see MaintenanceWindowTaskInvocationParameters.
getMaintenanceWindowTaskResponse_taskParameters :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text MaintenanceWindowTaskParameterValueExpression))
getMaintenanceWindowTaskResponse_taskParameters :: Lens'
  GetMaintenanceWindowTaskResponse
  (Maybe
     (HashMap Text MaintenanceWindowTaskParameterValueExpression))
getMaintenanceWindowTaskResponse_taskParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:taskParameters:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters} -> Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a -> GetMaintenanceWindowTaskResponse
s {$sel:taskParameters:GetMaintenanceWindowTaskResponse' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a} :: GetMaintenanceWindowTaskResponse) 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 a. Iso' (Sensitive a) a
Data._Sensitive 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 type of task to run.
getMaintenanceWindowTaskResponse_taskType :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskType)
getMaintenanceWindowTaskResponse_taskType :: Lens'
  GetMaintenanceWindowTaskResponse (Maybe MaintenanceWindowTaskType)
getMaintenanceWindowTaskResponse_taskType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe MaintenanceWindowTaskType
taskType :: Maybe MaintenanceWindowTaskType
$sel:taskType:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe MaintenanceWindowTaskType
taskType} -> Maybe MaintenanceWindowTaskType
taskType) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe MaintenanceWindowTaskType
a -> GetMaintenanceWindowTaskResponse
s {$sel:taskType:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskType
taskType = Maybe MaintenanceWindowTaskType
a} :: GetMaintenanceWindowTaskResponse)

-- | The retrieved maintenance window ID.
getMaintenanceWindowTaskResponse_windowId :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_windowId :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_windowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
windowId :: Maybe Text
$sel:windowId:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:windowId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowId = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The retrieved maintenance window task ID.
getMaintenanceWindowTaskResponse_windowTaskId :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_windowTaskId :: Lens' GetMaintenanceWindowTaskResponse (Maybe Text)
getMaintenanceWindowTaskResponse_windowTaskId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Maybe Text
windowTaskId :: Maybe Text
$sel:windowTaskId:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
windowTaskId} -> Maybe Text
windowTaskId) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Maybe Text
a -> GetMaintenanceWindowTaskResponse
s {$sel:windowTaskId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowTaskId = Maybe Text
a} :: GetMaintenanceWindowTaskResponse)

-- | The response's http status code.
getMaintenanceWindowTaskResponse_httpStatus :: Lens.Lens' GetMaintenanceWindowTaskResponse Prelude.Int
getMaintenanceWindowTaskResponse_httpStatus :: Lens' GetMaintenanceWindowTaskResponse Int
getMaintenanceWindowTaskResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMaintenanceWindowTaskResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetMaintenanceWindowTaskResponse
s@GetMaintenanceWindowTaskResponse' {} Int
a -> GetMaintenanceWindowTaskResponse
s {$sel:httpStatus:GetMaintenanceWindowTaskResponse' :: Int
httpStatus = Int
a} :: GetMaintenanceWindowTaskResponse)

instance
  Prelude.NFData
    GetMaintenanceWindowTaskResponse
  where
  rnf :: GetMaintenanceWindowTaskResponse -> ()
rnf GetMaintenanceWindowTaskResponse' {Int
Maybe Natural
Maybe [Target]
Maybe Text
Maybe (Sensitive Text)
Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
Maybe AlarmConfiguration
Maybe LoggingInfo
Maybe MaintenanceWindowTaskCutoffBehavior
Maybe MaintenanceWindowTaskType
Maybe MaintenanceWindowTaskInvocationParameters
httpStatus :: Int
windowTaskId :: Maybe Text
windowId :: Maybe Text
taskType :: Maybe MaintenanceWindowTaskType
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskInvocationParameters :: Maybe MaintenanceWindowTaskInvocationParameters
taskArn :: Maybe Text
targets :: Maybe [Target]
serviceRoleArn :: Maybe Text
priority :: Maybe Natural
name :: Maybe Text
maxErrors :: Maybe Text
maxConcurrency :: Maybe Text
loggingInfo :: Maybe LoggingInfo
description :: Maybe (Sensitive Text)
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
alarmConfiguration :: Maybe AlarmConfiguration
$sel:httpStatus:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Int
$sel:windowTaskId:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:windowId:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:taskType:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe MaintenanceWindowTaskType
$sel:taskParameters:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:taskInvocationParameters:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
$sel:taskArn:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:targets:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe [Target]
$sel:serviceRoleArn:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:priority:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Natural
$sel:name:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:maxErrors:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:maxConcurrency:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe Text
$sel:loggingInfo:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe LoggingInfo
$sel:description:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
$sel:cutoffBehavior:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskCutoffBehavior
$sel:alarmConfiguration:GetMaintenanceWindowTaskResponse' :: GetMaintenanceWindowTaskResponse -> Maybe AlarmConfiguration
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AlarmConfiguration
alarmConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LoggingInfo
loggingInfo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxConcurrency
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxErrors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Target]
targets
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
taskArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MaintenanceWindowTaskType
taskType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowTaskId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus