{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the tasks in a maintenance window.
--
-- 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.
module Amazonka.SSM.GetMaintenanceWindowTask
  ( -- * Creating a Request
    GetMaintenanceWindowTask (..),
    newGetMaintenanceWindowTask,

    -- * Request Lenses
    getMaintenanceWindowTask_windowId,
    getMaintenanceWindowTask_windowTaskId,

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

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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool)
-> (GetMaintenanceWindowTask -> GetMaintenanceWindowTask -> Bool)
-> Eq GetMaintenanceWindowTask
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]
(Int -> ReadS GetMaintenanceWindowTask)
-> ReadS [GetMaintenanceWindowTask]
-> ReadPrec GetMaintenanceWindowTask
-> ReadPrec [GetMaintenanceWindowTask]
-> Read 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
(Int -> GetMaintenanceWindowTask -> ShowS)
-> (GetMaintenanceWindowTask -> String)
-> ([GetMaintenanceWindowTask] -> ShowS)
-> Show GetMaintenanceWindowTask
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.
 GetMaintenanceWindowTask -> Rep GetMaintenanceWindowTask x)
-> (forall x.
    Rep GetMaintenanceWindowTask x -> GetMaintenanceWindowTask)
-> Generic GetMaintenanceWindowTask
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' :: Text -> Text -> GetMaintenanceWindowTask
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 :: (Text -> f Text)
-> GetMaintenanceWindowTask -> f GetMaintenanceWindowTask
getMaintenanceWindowTask_windowId = (GetMaintenanceWindowTask -> Text)
-> (GetMaintenanceWindowTask -> Text -> GetMaintenanceWindowTask)
-> Lens GetMaintenanceWindowTask GetMaintenanceWindowTask Text Text
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 :: (Text -> f Text)
-> GetMaintenanceWindowTask -> f GetMaintenanceWindowTask
getMaintenanceWindowTask_windowTaskId = (GetMaintenanceWindowTask -> Text)
-> (GetMaintenanceWindowTask -> Text -> GetMaintenanceWindowTask)
-> Lens GetMaintenanceWindowTask GetMaintenanceWindowTask Text Text
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 :: GetMaintenanceWindowTask -> Request GetMaintenanceWindowTask
request = Service
-> GetMaintenanceWindowTask -> Request GetMaintenanceWindowTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetMaintenanceWindowTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetMaintenanceWindowTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetMaintenanceWindowTask))
-> Logger
-> Service
-> Proxy GetMaintenanceWindowTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetMaintenanceWindowTask)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe MaintenanceWindowTaskType
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Int
-> GetMaintenanceWindowTaskResponse
GetMaintenanceWindowTaskResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
 -> Maybe Natural
 -> Maybe MaintenanceWindowTaskType
 -> Maybe Text
 -> Maybe MaintenanceWindowTaskCutoffBehavior
 -> Maybe Text
 -> Maybe MaintenanceWindowTaskInvocationParameters
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe LoggingInfo
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe
           (Sensitive
              (HashMap
                 Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ServiceRoleArn")
            Either
  String
  (Maybe Text
   -> Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
   -> Maybe Natural
   -> Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WindowTaskId")
            Either
  String
  (Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
   -> Maybe Natural
   -> Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either
     String
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> Either
     String
     (Maybe Natural
      -> Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either
     String
     (Maybe
        (Maybe
           (Sensitive
              (HashMap
                 Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TaskParameters" Either
  String
  (Maybe
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Either
     String
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Natural
   -> Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe MaintenanceWindowTaskType
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Priority")
            Either
  String
  (Maybe MaintenanceWindowTaskType
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe MaintenanceWindowTaskType)
-> Either
     String
     (Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MaintenanceWindowTaskType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TaskType")
            Either
  String
  (Maybe Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TaskArn")
            Either
  String
  (Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe MaintenanceWindowTaskCutoffBehavior)
-> Either
     String
     (Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe MaintenanceWindowTaskCutoffBehavior)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CutoffBehavior")
            Either
  String
  (Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MaxErrors")
            Either
  String
  (Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe MaintenanceWindowTaskInvocationParameters)
-> Either
     String
     (Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe MaintenanceWindowTaskInvocationParameters)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TaskInvocationParameters")
            Either
  String
  (Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe [Target])
-> Either
     String
     (Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Targets" Either String (Maybe (Maybe [Target]))
-> Maybe [Target] -> Either String (Maybe [Target])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe LoggingInfo)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe LoggingInfo)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LoggingInfo")
            Either
  String
  (Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MaxConcurrency")
            Either
  String (Maybe Text -> Int -> GetMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetMaintenanceWindowTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"WindowId")
            Either String (Int -> GetMaintenanceWindowTaskResponse)
-> Either String Int
-> Either String GetMaintenanceWindowTaskResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetMaintenanceWindowTask

instance Prelude.NFData GetMaintenanceWindowTask

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

instance Core.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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WindowId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
windowId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WindowTaskId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
windowTaskId)
          ]
      )

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

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

-- | /See:/ 'newGetMaintenanceWindowTaskResponse' smart constructor.
data GetMaintenanceWindowTaskResponse = 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 -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The retrieved maintenance window task ID.
    GetMaintenanceWindowTaskResponse -> Maybe Text
windowTaskId :: Prelude.Maybe Prelude.Text,
    -- | 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 (Core.Sensitive (Prelude.HashMap Prelude.Text (Core.Sensitive MaintenanceWindowTaskParameterValueExpression))),
    -- | 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 type of task to run.
    GetMaintenanceWindowTaskResponse -> Maybe MaintenanceWindowTaskType
taskType :: Prelude.Maybe MaintenanceWindowTaskType,
    -- | 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 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 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 parameters to pass to the task when it runs.
    GetMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Prelude.Maybe MaintenanceWindowTaskInvocationParameters,
    -- | The retrieved task name.
    GetMaintenanceWindowTaskResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The targets where the task should run.
    GetMaintenanceWindowTaskResponse -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | 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 retrieved task description.
    GetMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | 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 retrieved maintenance window ID.
    GetMaintenanceWindowTaskResponse -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetMaintenanceWindowTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMaintenanceWindowTaskResponse
-> GetMaintenanceWindowTaskResponse -> Bool
(GetMaintenanceWindowTaskResponse
 -> GetMaintenanceWindowTaskResponse -> Bool)
-> (GetMaintenanceWindowTaskResponse
    -> GetMaintenanceWindowTaskResponse -> Bool)
-> Eq GetMaintenanceWindowTaskResponse
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
(Int -> GetMaintenanceWindowTaskResponse -> ShowS)
-> (GetMaintenanceWindowTaskResponse -> String)
-> ([GetMaintenanceWindowTaskResponse] -> ShowS)
-> Show GetMaintenanceWindowTaskResponse
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.
 GetMaintenanceWindowTaskResponse
 -> Rep GetMaintenanceWindowTaskResponse x)
-> (forall x.
    Rep GetMaintenanceWindowTaskResponse x
    -> GetMaintenanceWindowTaskResponse)
-> Generic GetMaintenanceWindowTaskResponse
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:
--
-- '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.
--
-- 'windowTaskId', 'getMaintenanceWindowTaskResponse_windowTaskId' - The retrieved maintenance window task ID.
--
-- '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.
--
-- '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.
--
-- 'taskType', 'getMaintenanceWindowTaskResponse_taskType' - The type of task to 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.
--
-- '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.
--
-- '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.
--
-- 'taskInvocationParameters', 'getMaintenanceWindowTaskResponse_taskInvocationParameters' - The parameters to pass to the task when it runs.
--
-- 'name', 'getMaintenanceWindowTaskResponse_name' - The retrieved task name.
--
-- 'targets', 'getMaintenanceWindowTaskResponse_targets' - The targets where the task should run.
--
-- '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.
--
-- 'description', 'getMaintenanceWindowTaskResponse_description' - The retrieved task description.
--
-- '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.
--
-- 'windowId', 'getMaintenanceWindowTaskResponse_windowId' - The retrieved maintenance window ID.
--
-- 'httpStatus', 'getMaintenanceWindowTaskResponse_httpStatus' - The response's http status code.
newGetMaintenanceWindowTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMaintenanceWindowTaskResponse
newGetMaintenanceWindowTaskResponse :: Int -> GetMaintenanceWindowTaskResponse
newGetMaintenanceWindowTaskResponse Int
pHttpStatus_ =
  GetMaintenanceWindowTaskResponse' :: Maybe Text
-> Maybe Text
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe MaintenanceWindowTaskType
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Int
-> GetMaintenanceWindowTaskResponse
GetMaintenanceWindowTaskResponse'
    { $sel:serviceRoleArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
serviceRoleArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowTaskId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowTaskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskParameters:GetMaintenanceWindowTaskResponse' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:GetMaintenanceWindowTaskResponse' :: Maybe Natural
priority = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:taskType:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskType
taskType = Maybe MaintenanceWindowTaskType
forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:GetMaintenanceWindowTaskResponse' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cutoffBehavior:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskInvocationParameters:GetMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters =
        Maybe MaintenanceWindowTaskInvocationParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetMaintenanceWindowTaskResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:GetMaintenanceWindowTaskResponse' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingInfo:GetMaintenanceWindowTaskResponse' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetMaintenanceWindowTaskResponse' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:GetMaintenanceWindowTaskResponse' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:GetMaintenanceWindowTaskResponse' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMaintenanceWindowTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_serviceRoleArn = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 retrieved maintenance window task ID.
getMaintenanceWindowTaskResponse_windowTaskId :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_windowTaskId :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_windowTaskId = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe (HashMap Text MaintenanceWindowTaskParameterValueExpression)
 -> f (Maybe
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_taskParameters = (GetMaintenanceWindowTaskResponse
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> (GetMaintenanceWindowTaskResponse
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
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) ((Maybe
    (Sensitive
       (HashMap
          Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  -> f (Maybe
          (Sensitive
             (HashMap
                Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
 -> GetMaintenanceWindowTaskResponse
 -> f GetMaintenanceWindowTaskResponse)
-> ((Maybe
       (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     -> f (Maybe
             (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> f (Maybe
            (Sensitive
               (HashMap
                  Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> (Maybe
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
    -> f (Maybe
            (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
-> Iso
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
     (Maybe
        (HashMap Text MaintenanceWindowTaskParameterValueExpression))
     (Maybe
        (HashMap Text MaintenanceWindowTaskParameterValueExpression))
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 (Exchange
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap
     Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
  (Identity
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Exchange
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (Identity
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Exchange
   (HashMap Text MaintenanceWindowTaskParameterValueExpression)
   (HashMap Text MaintenanceWindowTaskParameterValueExpression)
   (HashMap
      Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
   (Identity
      (HashMap
         Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
 -> Exchange
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      (Identity
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
-> (Exchange
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (HashMap Text MaintenanceWindowTaskParameterValueExpression)
      (Identity
         (HashMap Text MaintenanceWindowTaskParameterValueExpression))
    -> Exchange
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
         (Identity
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> AnIso
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (HashMap Text MaintenanceWindowTaskParameterValueExpression)
  (Identity
     (HashMap Text MaintenanceWindowTaskParameterValueExpression))
-> Exchange
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap Text MaintenanceWindowTaskParameterValueExpression)
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
     (Identity
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)

-- | 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 :: (Maybe Natural -> f (Maybe Natural))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_priority = (GetMaintenanceWindowTaskResponse -> Maybe Natural)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Natural -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Natural)
     (Maybe Natural)
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 type of task to run.
getMaintenanceWindowTaskResponse_taskType :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskType)
getMaintenanceWindowTaskResponse_taskType :: (Maybe MaintenanceWindowTaskType
 -> f (Maybe MaintenanceWindowTaskType))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_taskType = (GetMaintenanceWindowTaskResponse
 -> Maybe MaintenanceWindowTaskType)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe MaintenanceWindowTaskType
    -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe MaintenanceWindowTaskType)
     (Maybe MaintenanceWindowTaskType)
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 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 :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_taskArn = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 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 :: (Maybe MaintenanceWindowTaskCutoffBehavior
 -> f (Maybe MaintenanceWindowTaskCutoffBehavior))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_cutoffBehavior = (GetMaintenanceWindowTaskResponse
 -> Maybe MaintenanceWindowTaskCutoffBehavior)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe MaintenanceWindowTaskCutoffBehavior
    -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe MaintenanceWindowTaskCutoffBehavior)
     (Maybe MaintenanceWindowTaskCutoffBehavior)
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 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 :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_maxErrors = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 parameters to pass to the task when it runs.
getMaintenanceWindowTaskResponse_taskInvocationParameters :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskInvocationParameters)
getMaintenanceWindowTaskResponse_taskInvocationParameters :: (Maybe MaintenanceWindowTaskInvocationParameters
 -> f (Maybe MaintenanceWindowTaskInvocationParameters))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_taskInvocationParameters = (GetMaintenanceWindowTaskResponse
 -> Maybe MaintenanceWindowTaskInvocationParameters)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe MaintenanceWindowTaskInvocationParameters
    -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe MaintenanceWindowTaskInvocationParameters)
     (Maybe MaintenanceWindowTaskInvocationParameters)
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 retrieved task name.
getMaintenanceWindowTaskResponse_name :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_name = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 targets where the task should run.
getMaintenanceWindowTaskResponse_targets :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe [Target])
getMaintenanceWindowTaskResponse_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_targets = (GetMaintenanceWindowTaskResponse -> Maybe [Target])
-> (GetMaintenanceWindowTaskResponse
    -> Maybe [Target] -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe [Target])
     (Maybe [Target])
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) ((Maybe [Target] -> f (Maybe [Target]))
 -> GetMaintenanceWindowTaskResponse
 -> f GetMaintenanceWindowTaskResponse)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Target] [Target] [Target] [Target]
-> Iso
     (Maybe [Target]) (Maybe [Target]) (Maybe [Target]) (Maybe [Target])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Target] [Target] [Target] [Target]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe LoggingInfo -> f (Maybe LoggingInfo))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_loggingInfo = (GetMaintenanceWindowTaskResponse -> Maybe LoggingInfo)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe LoggingInfo -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe LoggingInfo)
     (Maybe 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 retrieved task description.
getMaintenanceWindowTaskResponse_description :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_description = (GetMaintenanceWindowTaskResponse -> Maybe (Sensitive Text))
-> (GetMaintenanceWindowTaskResponse
    -> Maybe (Sensitive Text) -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> GetMaintenanceWindowTaskResponse
 -> f GetMaintenanceWindowTaskResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
     (Maybe Text)
     (Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_maxConcurrency = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 retrieved maintenance window ID.
getMaintenanceWindowTaskResponse_windowId :: Lens.Lens' GetMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
getMaintenanceWindowTaskResponse_windowId :: (Maybe Text -> f (Maybe Text))
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_windowId = (GetMaintenanceWindowTaskResponse -> Maybe Text)
-> (GetMaintenanceWindowTaskResponse
    -> Maybe Text -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
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 response's http status code.
getMaintenanceWindowTaskResponse_httpStatus :: Lens.Lens' GetMaintenanceWindowTaskResponse Prelude.Int
getMaintenanceWindowTaskResponse_httpStatus :: (Int -> f Int)
-> GetMaintenanceWindowTaskResponse
-> f GetMaintenanceWindowTaskResponse
getMaintenanceWindowTaskResponse_httpStatus = (GetMaintenanceWindowTaskResponse -> Int)
-> (GetMaintenanceWindowTaskResponse
    -> Int -> GetMaintenanceWindowTaskResponse)
-> Lens
     GetMaintenanceWindowTaskResponse
     GetMaintenanceWindowTaskResponse
     Int
     Int
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