{-# 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.UpdateMaintenanceWindowTask
-- 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)
--
-- Modifies a task assigned to a maintenance window. You can\'t change the
-- task type, but you can change the following values:
--
-- -   @TaskARN@. For example, you can change a @RUN_COMMAND@ task from
--     @AWS-RunPowerShellScript@ to @AWS-RunShellScript@.
--
-- -   @ServiceRoleArn@
--
-- -   @TaskInvocationParameters@
--
-- -   @Priority@
--
-- -   @MaxConcurrency@
--
-- -   @MaxErrors@
--
-- One or more targets must be specified for maintenance window Run
-- Command-type tasks. Depending on the task, targets are optional for
-- other maintenance window task types (Automation, Lambda, and Step
-- Functions). For more information about running tasks that don\'t specify
-- targets, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html Registering maintenance window tasks without targets>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- If the value for a parameter in @UpdateMaintenanceWindowTask@ is null,
-- then the corresponding field isn\'t modified. If you set @Replace@ to
-- true, then all fields required by the RegisterTaskWithMaintenanceWindow
-- operation are required for this request. Optional fields that aren\'t
-- specified are set to null.
--
-- When you update a maintenance window task that has options specified in
-- @TaskInvocationParameters@, you must provide again all the
-- @TaskInvocationParameters@ values that you want to retain. The values
-- you don\'t specify again are removed. For example, suppose that when you
-- registered a Run Command task, you specified @TaskInvocationParameters@
-- values for @Comment@, @NotificationConfig@, and @OutputS3BucketName@. If
-- you update the maintenance window task and specify only a different
-- @OutputS3BucketName@ value, the values for @Comment@ and
-- @NotificationConfig@ are removed.
module Amazonka.SSM.UpdateMaintenanceWindowTask
  ( -- * Creating a Request
    UpdateMaintenanceWindowTask (..),
    newUpdateMaintenanceWindowTask,

    -- * Request Lenses
    updateMaintenanceWindowTask_serviceRoleArn,
    updateMaintenanceWindowTask_replace,
    updateMaintenanceWindowTask_taskParameters,
    updateMaintenanceWindowTask_priority,
    updateMaintenanceWindowTask_taskArn,
    updateMaintenanceWindowTask_cutoffBehavior,
    updateMaintenanceWindowTask_maxErrors,
    updateMaintenanceWindowTask_taskInvocationParameters,
    updateMaintenanceWindowTask_name,
    updateMaintenanceWindowTask_targets,
    updateMaintenanceWindowTask_loggingInfo,
    updateMaintenanceWindowTask_description,
    updateMaintenanceWindowTask_maxConcurrency,
    updateMaintenanceWindowTask_windowId,
    updateMaintenanceWindowTask_windowTaskId,

    -- * Destructuring the Response
    UpdateMaintenanceWindowTaskResponse (..),
    newUpdateMaintenanceWindowTaskResponse,

    -- * Response Lenses
    updateMaintenanceWindowTaskResponse_serviceRoleArn,
    updateMaintenanceWindowTaskResponse_windowTaskId,
    updateMaintenanceWindowTaskResponse_taskParameters,
    updateMaintenanceWindowTaskResponse_priority,
    updateMaintenanceWindowTaskResponse_taskArn,
    updateMaintenanceWindowTaskResponse_cutoffBehavior,
    updateMaintenanceWindowTaskResponse_maxErrors,
    updateMaintenanceWindowTaskResponse_taskInvocationParameters,
    updateMaintenanceWindowTaskResponse_name,
    updateMaintenanceWindowTaskResponse_targets,
    updateMaintenanceWindowTaskResponse_loggingInfo,
    updateMaintenanceWindowTaskResponse_description,
    updateMaintenanceWindowTaskResponse_maxConcurrency,
    updateMaintenanceWindowTaskResponse_windowId,
    updateMaintenanceWindowTaskResponse_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:/ 'newUpdateMaintenanceWindowTask' smart constructor.
data UpdateMaintenanceWindowTask = UpdateMaintenanceWindowTask'
  { -- | The Amazon Resource Name (ARN) of the IAM service role for Amazon Web
    -- Services Systems Manager to assume when running a maintenance window
    -- task. If you do not specify a service role ARN, Systems Manager uses
    -- your account\'s service-linked role. If no service-linked role for
    -- Systems Manager exists in your account, it is created when you run
    -- @RegisterTaskWithMaintenanceWindow@.
    --
    -- For more information, see the following topics in the in the /Amazon Web
    -- Services Systems Manager User Guide/:
    --
    -- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions Using service-linked roles for Systems Manager>
    --
    -- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role Should I use a service-linked role or a custom service role to run maintenance window tasks?>
    UpdateMaintenanceWindowTask -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | If True, then all fields that are required by the
    -- RegisterTaskWithMaintenanceWindow operation are also required for this
    -- API request. Optional fields that aren\'t specified are set to null.
    UpdateMaintenanceWindowTask -> Maybe Bool
replace :: Prelude.Maybe Prelude.Bool,
    -- | The parameters to modify.
    --
    -- @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.
    --
    -- The map has the following format:
    --
    -- Key: string, between 1 and 255 characters
    --
    -- Value: an array of strings, each string is between 1 and 255 characters
    UpdateMaintenanceWindowTask
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text (Core.Sensitive MaintenanceWindowTaskParameterValueExpression))),
    -- | The new task priority to specify. The lower the number, the higher the
    -- priority. Tasks that have the same priority are scheduled in parallel.
    UpdateMaintenanceWindowTask -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | The task ARN to modify.
    UpdateMaintenanceWindowTask -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | Indicates whether tasks should continue to run after the cutoff time
    -- specified in the maintenance windows is reached.
    --
    -- -   @CONTINUE_TASK@: When the cutoff time is reached, any tasks that are
    --     running continue. The default value.
    --
    -- -   @CANCEL_TASK@:
    --
    --     -   For Automation, Lambda, Step Functions tasks: When the cutoff
    --         time is reached, any task invocations that are already running
    --         continue, but no new task invocations are started.
    --
    --     -   For Run Command tasks: When the cutoff time is reached, the
    --         system sends a CancelCommand operation that attempts to cancel
    --         the command associated with the task. However, there is no
    --         guarantee that the command will be terminated and the underlying
    --         process stopped.
    --
    --     The status for tasks that are not completed is @TIMED_OUT@.
    UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Prelude.Maybe MaintenanceWindowTaskCutoffBehavior,
    -- | The new @MaxErrors@ value to specify. @MaxErrors@ is the maximum number
    -- of errors that are 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.
    UpdateMaintenanceWindowTask -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The parameters that the task should use during execution. Populate only
    -- the fields that match the task type. All other fields should be empty.
    --
    -- When you update a maintenance window task that has options specified in
    -- @TaskInvocationParameters@, you must provide again all the
    -- @TaskInvocationParameters@ values that you want to retain. The values
    -- you don\'t specify again are removed. For example, suppose that when you
    -- registered a Run Command task, you specified @TaskInvocationParameters@
    -- values for @Comment@, @NotificationConfig@, and @OutputS3BucketName@. If
    -- you update the maintenance window task and specify only a different
    -- @OutputS3BucketName@ value, the values for @Comment@ and
    -- @NotificationConfig@ are removed.
    UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Prelude.Maybe MaintenanceWindowTaskInvocationParameters,
    -- | The new task name to specify.
    UpdateMaintenanceWindowTask -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The targets (either instances or tags) to modify. Instances are
    -- specified using the format
    -- @Key=instanceids,Values=instanceID_1,instanceID_2@. Tags are specified
    -- using the format @ Key=tag_name,Values=tag_value@.
    --
    -- One or more targets must be specified for maintenance window Run
    -- Command-type tasks. Depending on the task, targets are optional for
    -- other maintenance window task types (Automation, Lambda, and Step
    -- Functions). For more information about running tasks that don\'t specify
    -- targets, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html Registering maintenance window tasks without targets>
    -- in the /Amazon Web Services Systems Manager User Guide/.
    UpdateMaintenanceWindowTask -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The new logging location in Amazon S3 to specify.
    --
    -- @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.
    UpdateMaintenanceWindowTask -> Maybe LoggingInfo
loggingInfo :: Prelude.Maybe LoggingInfo,
    -- | The new task description to specify.
    UpdateMaintenanceWindowTask -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The new @MaxConcurrency@ value you want to specify. @MaxConcurrency@ is
    -- the number of targets that are 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.
    UpdateMaintenanceWindowTask -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The maintenance window ID that contains the task to modify.
    UpdateMaintenanceWindowTask -> Text
windowId :: Prelude.Text,
    -- | The task ID to modify.
    UpdateMaintenanceWindowTask -> Text
windowTaskId :: Prelude.Text
  }
  deriving (UpdateMaintenanceWindowTask -> UpdateMaintenanceWindowTask -> Bool
(UpdateMaintenanceWindowTask
 -> UpdateMaintenanceWindowTask -> Bool)
-> (UpdateMaintenanceWindowTask
    -> UpdateMaintenanceWindowTask -> Bool)
-> Eq UpdateMaintenanceWindowTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMaintenanceWindowTask -> UpdateMaintenanceWindowTask -> Bool
$c/= :: UpdateMaintenanceWindowTask -> UpdateMaintenanceWindowTask -> Bool
== :: UpdateMaintenanceWindowTask -> UpdateMaintenanceWindowTask -> Bool
$c== :: UpdateMaintenanceWindowTask -> UpdateMaintenanceWindowTask -> Bool
Prelude.Eq, Int -> UpdateMaintenanceWindowTask -> ShowS
[UpdateMaintenanceWindowTask] -> ShowS
UpdateMaintenanceWindowTask -> String
(Int -> UpdateMaintenanceWindowTask -> ShowS)
-> (UpdateMaintenanceWindowTask -> String)
-> ([UpdateMaintenanceWindowTask] -> ShowS)
-> Show UpdateMaintenanceWindowTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMaintenanceWindowTask] -> ShowS
$cshowList :: [UpdateMaintenanceWindowTask] -> ShowS
show :: UpdateMaintenanceWindowTask -> String
$cshow :: UpdateMaintenanceWindowTask -> String
showsPrec :: Int -> UpdateMaintenanceWindowTask -> ShowS
$cshowsPrec :: Int -> UpdateMaintenanceWindowTask -> ShowS
Prelude.Show, (forall x.
 UpdateMaintenanceWindowTask -> Rep UpdateMaintenanceWindowTask x)
-> (forall x.
    Rep UpdateMaintenanceWindowTask x -> UpdateMaintenanceWindowTask)
-> Generic UpdateMaintenanceWindowTask
forall x.
Rep UpdateMaintenanceWindowTask x -> UpdateMaintenanceWindowTask
forall x.
UpdateMaintenanceWindowTask -> Rep UpdateMaintenanceWindowTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMaintenanceWindowTask x -> UpdateMaintenanceWindowTask
$cfrom :: forall x.
UpdateMaintenanceWindowTask -> Rep UpdateMaintenanceWindowTask x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMaintenanceWindowTask' 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', 'updateMaintenanceWindowTask_serviceRoleArn' - The Amazon Resource Name (ARN) of the IAM service role for Amazon Web
-- Services Systems Manager to assume when running a maintenance window
-- task. If you do not specify a service role ARN, Systems Manager uses
-- your account\'s service-linked role. If no service-linked role for
-- Systems Manager exists in your account, it is created when you run
-- @RegisterTaskWithMaintenanceWindow@.
--
-- For more information, see the following topics in the in the /Amazon Web
-- Services Systems Manager User Guide/:
--
-- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions Using service-linked roles for Systems Manager>
--
-- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role Should I use a service-linked role or a custom service role to run maintenance window tasks?>
--
-- 'replace', 'updateMaintenanceWindowTask_replace' - If True, then all fields that are required by the
-- RegisterTaskWithMaintenanceWindow operation are also required for this
-- API request. Optional fields that aren\'t specified are set to null.
--
-- 'taskParameters', 'updateMaintenanceWindowTask_taskParameters' - The parameters to modify.
--
-- @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.
--
-- The map has the following format:
--
-- Key: string, between 1 and 255 characters
--
-- Value: an array of strings, each string is between 1 and 255 characters
--
-- 'priority', 'updateMaintenanceWindowTask_priority' - The new task priority to specify. The lower the number, the higher the
-- priority. Tasks that have the same priority are scheduled in parallel.
--
-- 'taskArn', 'updateMaintenanceWindowTask_taskArn' - The task ARN to modify.
--
-- 'cutoffBehavior', 'updateMaintenanceWindowTask_cutoffBehavior' - Indicates whether tasks should continue to run after the cutoff time
-- specified in the maintenance windows is reached.
--
-- -   @CONTINUE_TASK@: When the cutoff time is reached, any tasks that are
--     running continue. The default value.
--
-- -   @CANCEL_TASK@:
--
--     -   For Automation, Lambda, Step Functions tasks: When the cutoff
--         time is reached, any task invocations that are already running
--         continue, but no new task invocations are started.
--
--     -   For Run Command tasks: When the cutoff time is reached, the
--         system sends a CancelCommand operation that attempts to cancel
--         the command associated with the task. However, there is no
--         guarantee that the command will be terminated and the underlying
--         process stopped.
--
--     The status for tasks that are not completed is @TIMED_OUT@.
--
-- 'maxErrors', 'updateMaintenanceWindowTask_maxErrors' - The new @MaxErrors@ value to specify. @MaxErrors@ is the maximum number
-- of errors that are 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', 'updateMaintenanceWindowTask_taskInvocationParameters' - The parameters that the task should use during execution. Populate only
-- the fields that match the task type. All other fields should be empty.
--
-- When you update a maintenance window task that has options specified in
-- @TaskInvocationParameters@, you must provide again all the
-- @TaskInvocationParameters@ values that you want to retain. The values
-- you don\'t specify again are removed. For example, suppose that when you
-- registered a Run Command task, you specified @TaskInvocationParameters@
-- values for @Comment@, @NotificationConfig@, and @OutputS3BucketName@. If
-- you update the maintenance window task and specify only a different
-- @OutputS3BucketName@ value, the values for @Comment@ and
-- @NotificationConfig@ are removed.
--
-- 'name', 'updateMaintenanceWindowTask_name' - The new task name to specify.
--
-- 'targets', 'updateMaintenanceWindowTask_targets' - The targets (either instances or tags) to modify. Instances are
-- specified using the format
-- @Key=instanceids,Values=instanceID_1,instanceID_2@. Tags are specified
-- using the format @ Key=tag_name,Values=tag_value@.
--
-- One or more targets must be specified for maintenance window Run
-- Command-type tasks. Depending on the task, targets are optional for
-- other maintenance window task types (Automation, Lambda, and Step
-- Functions). For more information about running tasks that don\'t specify
-- targets, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html Registering maintenance window tasks without targets>
-- in the /Amazon Web Services Systems Manager User Guide/.
--
-- 'loggingInfo', 'updateMaintenanceWindowTask_loggingInfo' - The new logging location in Amazon S3 to specify.
--
-- @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', 'updateMaintenanceWindowTask_description' - The new task description to specify.
--
-- 'maxConcurrency', 'updateMaintenanceWindowTask_maxConcurrency' - The new @MaxConcurrency@ value you want to specify. @MaxConcurrency@ is
-- the number of targets that are 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', 'updateMaintenanceWindowTask_windowId' - The maintenance window ID that contains the task to modify.
--
-- 'windowTaskId', 'updateMaintenanceWindowTask_windowTaskId' - The task ID to modify.
newUpdateMaintenanceWindowTask ::
  -- | 'windowId'
  Prelude.Text ->
  -- | 'windowTaskId'
  Prelude.Text ->
  UpdateMaintenanceWindowTask
newUpdateMaintenanceWindowTask :: Text -> Text -> UpdateMaintenanceWindowTask
newUpdateMaintenanceWindowTask
  Text
pWindowId_
  Text
pWindowTaskId_ =
    UpdateMaintenanceWindowTask' :: Maybe Text
-> Maybe Bool
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe (Sensitive Text)
-> Maybe Text
-> Text
-> Text
-> UpdateMaintenanceWindowTask
UpdateMaintenanceWindowTask'
      { $sel:serviceRoleArn:UpdateMaintenanceWindowTask' :: Maybe Text
serviceRoleArn =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:replace:UpdateMaintenanceWindowTask' :: Maybe Bool
replace = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:taskParameters:UpdateMaintenanceWindowTask' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Maybe a
Prelude.Nothing,
        $sel:priority:UpdateMaintenanceWindowTask' :: Maybe Natural
priority = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:taskArn:UpdateMaintenanceWindowTask' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:cutoffBehavior:UpdateMaintenanceWindowTask' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
forall a. Maybe a
Prelude.Nothing,
        $sel:maxErrors:UpdateMaintenanceWindowTask' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:taskInvocationParameters:UpdateMaintenanceWindowTask' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters = Maybe MaintenanceWindowTaskInvocationParameters
forall a. Maybe a
Prelude.Nothing,
        $sel:name:UpdateMaintenanceWindowTask' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:targets:UpdateMaintenanceWindowTask' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
        $sel:loggingInfo:UpdateMaintenanceWindowTask' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
forall a. Maybe a
Prelude.Nothing,
        $sel:description:UpdateMaintenanceWindowTask' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:maxConcurrency:UpdateMaintenanceWindowTask' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:windowId:UpdateMaintenanceWindowTask' :: Text
windowId = Text
pWindowId_,
        $sel:windowTaskId:UpdateMaintenanceWindowTask' :: Text
windowTaskId = Text
pWindowTaskId_
      }

-- | The Amazon Resource Name (ARN) of the IAM service role for Amazon Web
-- Services Systems Manager to assume when running a maintenance window
-- task. If you do not specify a service role ARN, Systems Manager uses
-- your account\'s service-linked role. If no service-linked role for
-- Systems Manager exists in your account, it is created when you run
-- @RegisterTaskWithMaintenanceWindow@.
--
-- For more information, see the following topics in the in the /Amazon Web
-- Services Systems Manager User Guide/:
--
-- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html#slr-permissions Using service-linked roles for Systems Manager>
--
-- -   <https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html#maintenance-window-tasks-service-role Should I use a service-linked role or a custom service role to run maintenance window tasks?>
updateMaintenanceWindowTask_serviceRoleArn :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_serviceRoleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_serviceRoleArn = (UpdateMaintenanceWindowTask -> Maybe Text)
-> (UpdateMaintenanceWindowTask
    -> Maybe Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Text
a -> UpdateMaintenanceWindowTask
s {$sel:serviceRoleArn:UpdateMaintenanceWindowTask' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: UpdateMaintenanceWindowTask)

-- | If True, then all fields that are required by the
-- RegisterTaskWithMaintenanceWindow operation are also required for this
-- API request. Optional fields that aren\'t specified are set to null.
updateMaintenanceWindowTask_replace :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Bool)
updateMaintenanceWindowTask_replace :: (Maybe Bool -> f (Maybe Bool))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_replace = (UpdateMaintenanceWindowTask -> Maybe Bool)
-> (UpdateMaintenanceWindowTask
    -> Maybe Bool -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Bool
replace :: Maybe Bool
$sel:replace:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Bool
replace} -> Maybe Bool
replace) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Bool
a -> UpdateMaintenanceWindowTask
s {$sel:replace:UpdateMaintenanceWindowTask' :: Maybe Bool
replace = Maybe Bool
a} :: UpdateMaintenanceWindowTask)

-- | The parameters to modify.
--
-- @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.
--
-- The map has the following format:
--
-- Key: string, between 1 and 255 characters
--
-- Value: an array of strings, each string is between 1 and 255 characters
updateMaintenanceWindowTask_taskParameters :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe (Prelude.HashMap Prelude.Text MaintenanceWindowTaskParameterValueExpression))
updateMaintenanceWindowTask_taskParameters :: (Maybe (HashMap Text MaintenanceWindowTaskParameterValueExpression)
 -> f (Maybe
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_taskParameters = (UpdateMaintenanceWindowTask
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> (UpdateMaintenanceWindowTask
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (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 (\UpdateMaintenanceWindowTask' {Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:taskParameters:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters} -> Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a -> UpdateMaintenanceWindowTask
s {$sel:taskParameters:UpdateMaintenanceWindowTask' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a} :: UpdateMaintenanceWindowTask) ((Maybe
    (Sensitive
       (HashMap
          Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  -> f (Maybe
          (Sensitive
             (HashMap
                Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
 -> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask)
-> ((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)))
-> UpdateMaintenanceWindowTask
-> f UpdateMaintenanceWindowTask
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 new task priority to specify. The lower the number, the higher the
-- priority. Tasks that have the same priority are scheduled in parallel.
updateMaintenanceWindowTask_priority :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Natural)
updateMaintenanceWindowTask_priority :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_priority = (UpdateMaintenanceWindowTask -> Maybe Natural)
-> (UpdateMaintenanceWindowTask
    -> Maybe Natural -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Natural
priority :: Maybe Natural
$sel:priority:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Natural
a -> UpdateMaintenanceWindowTask
s {$sel:priority:UpdateMaintenanceWindowTask' :: Maybe Natural
priority = Maybe Natural
a} :: UpdateMaintenanceWindowTask)

-- | The task ARN to modify.
updateMaintenanceWindowTask_taskArn :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_taskArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_taskArn = (UpdateMaintenanceWindowTask -> Maybe Text)
-> (UpdateMaintenanceWindowTask
    -> Maybe Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Text
a -> UpdateMaintenanceWindowTask
s {$sel:taskArn:UpdateMaintenanceWindowTask' :: Maybe Text
taskArn = Maybe Text
a} :: UpdateMaintenanceWindowTask)

-- | Indicates whether tasks should continue to run after the cutoff time
-- specified in the maintenance windows is reached.
--
-- -   @CONTINUE_TASK@: When the cutoff time is reached, any tasks that are
--     running continue. The default value.
--
-- -   @CANCEL_TASK@:
--
--     -   For Automation, Lambda, Step Functions tasks: When the cutoff
--         time is reached, any task invocations that are already running
--         continue, but no new task invocations are started.
--
--     -   For Run Command tasks: When the cutoff time is reached, the
--         system sends a CancelCommand operation that attempts to cancel
--         the command associated with the task. However, there is no
--         guarantee that the command will be terminated and the underlying
--         process stopped.
--
--     The status for tasks that are not completed is @TIMED_OUT@.
updateMaintenanceWindowTask_cutoffBehavior :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe MaintenanceWindowTaskCutoffBehavior)
updateMaintenanceWindowTask_cutoffBehavior :: (Maybe MaintenanceWindowTaskCutoffBehavior
 -> f (Maybe MaintenanceWindowTaskCutoffBehavior))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_cutoffBehavior = (UpdateMaintenanceWindowTask
 -> Maybe MaintenanceWindowTaskCutoffBehavior)
-> (UpdateMaintenanceWindowTask
    -> Maybe MaintenanceWindowTaskCutoffBehavior
    -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe MaintenanceWindowTaskCutoffBehavior)
     (Maybe MaintenanceWindowTaskCutoffBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
$sel:cutoffBehavior:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior} -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe MaintenanceWindowTaskCutoffBehavior
a -> UpdateMaintenanceWindowTask
s {$sel:cutoffBehavior:UpdateMaintenanceWindowTask' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
a} :: UpdateMaintenanceWindowTask)

-- | The new @MaxErrors@ value to specify. @MaxErrors@ is the maximum number
-- of errors that are 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.
updateMaintenanceWindowTask_maxErrors :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_maxErrors :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_maxErrors = (UpdateMaintenanceWindowTask -> Maybe Text)
-> (UpdateMaintenanceWindowTask
    -> Maybe Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Text
a -> UpdateMaintenanceWindowTask
s {$sel:maxErrors:UpdateMaintenanceWindowTask' :: Maybe Text
maxErrors = Maybe Text
a} :: UpdateMaintenanceWindowTask)

-- | The parameters that the task should use during execution. Populate only
-- the fields that match the task type. All other fields should be empty.
--
-- When you update a maintenance window task that has options specified in
-- @TaskInvocationParameters@, you must provide again all the
-- @TaskInvocationParameters@ values that you want to retain. The values
-- you don\'t specify again are removed. For example, suppose that when you
-- registered a Run Command task, you specified @TaskInvocationParameters@
-- values for @Comment@, @NotificationConfig@, and @OutputS3BucketName@. If
-- you update the maintenance window task and specify only a different
-- @OutputS3BucketName@ value, the values for @Comment@ and
-- @NotificationConfig@ are removed.
updateMaintenanceWindowTask_taskInvocationParameters :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe MaintenanceWindowTaskInvocationParameters)
updateMaintenanceWindowTask_taskInvocationParameters :: (Maybe MaintenanceWindowTaskInvocationParameters
 -> f (Maybe MaintenanceWindowTaskInvocationParameters))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_taskInvocationParameters = (UpdateMaintenanceWindowTask
 -> Maybe MaintenanceWindowTaskInvocationParameters)
-> (UpdateMaintenanceWindowTask
    -> Maybe MaintenanceWindowTaskInvocationParameters
    -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe MaintenanceWindowTaskInvocationParameters)
     (Maybe MaintenanceWindowTaskInvocationParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Maybe MaintenanceWindowTaskInvocationParameters
$sel:taskInvocationParameters:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters} -> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe MaintenanceWindowTaskInvocationParameters
a -> UpdateMaintenanceWindowTask
s {$sel:taskInvocationParameters:UpdateMaintenanceWindowTask' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters = Maybe MaintenanceWindowTaskInvocationParameters
a} :: UpdateMaintenanceWindowTask)

-- | The new task name to specify.
updateMaintenanceWindowTask_name :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_name :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_name = (UpdateMaintenanceWindowTask -> Maybe Text)
-> (UpdateMaintenanceWindowTask
    -> Maybe Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Text
name :: Maybe Text
$sel:name:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Text
a -> UpdateMaintenanceWindowTask
s {$sel:name:UpdateMaintenanceWindowTask' :: Maybe Text
name = Maybe Text
a} :: UpdateMaintenanceWindowTask)

-- | The targets (either instances or tags) to modify. Instances are
-- specified using the format
-- @Key=instanceids,Values=instanceID_1,instanceID_2@. Tags are specified
-- using the format @ Key=tag_name,Values=tag_value@.
--
-- One or more targets must be specified for maintenance window Run
-- Command-type tasks. Depending on the task, targets are optional for
-- other maintenance window task types (Automation, Lambda, and Step
-- Functions). For more information about running tasks that don\'t specify
-- targets, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html Registering maintenance window tasks without targets>
-- in the /Amazon Web Services Systems Manager User Guide/.
updateMaintenanceWindowTask_targets :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe [Target])
updateMaintenanceWindowTask_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_targets = (UpdateMaintenanceWindowTask -> Maybe [Target])
-> (UpdateMaintenanceWindowTask
    -> Maybe [Target] -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe [Target]
a -> UpdateMaintenanceWindowTask
s {$sel:targets:UpdateMaintenanceWindowTask' :: Maybe [Target]
targets = Maybe [Target]
a} :: UpdateMaintenanceWindowTask) ((Maybe [Target] -> f (Maybe [Target]))
 -> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> UpdateMaintenanceWindowTask
-> f UpdateMaintenanceWindowTask
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 new logging location in Amazon S3 to specify.
--
-- @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.
updateMaintenanceWindowTask_loggingInfo :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe LoggingInfo)
updateMaintenanceWindowTask_loggingInfo :: (Maybe LoggingInfo -> f (Maybe LoggingInfo))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_loggingInfo = (UpdateMaintenanceWindowTask -> Maybe LoggingInfo)
-> (UpdateMaintenanceWindowTask
    -> Maybe LoggingInfo -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe LoggingInfo)
     (Maybe LoggingInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe LoggingInfo
loggingInfo :: Maybe LoggingInfo
$sel:loggingInfo:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe LoggingInfo
loggingInfo} -> Maybe LoggingInfo
loggingInfo) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe LoggingInfo
a -> UpdateMaintenanceWindowTask
s {$sel:loggingInfo:UpdateMaintenanceWindowTask' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
a} :: UpdateMaintenanceWindowTask)

-- | The new task description to specify.
updateMaintenanceWindowTask_description :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_description :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_description = (UpdateMaintenanceWindowTask -> Maybe (Sensitive Text))
-> (UpdateMaintenanceWindowTask
    -> Maybe (Sensitive Text) -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe (Sensitive Text)
a -> UpdateMaintenanceWindowTask
s {$sel:description:UpdateMaintenanceWindowTask' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: UpdateMaintenanceWindowTask) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask
-> f UpdateMaintenanceWindowTask
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 new @MaxConcurrency@ value you want to specify. @MaxConcurrency@ is
-- the number of targets that are 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.
updateMaintenanceWindowTask_maxConcurrency :: Lens.Lens' UpdateMaintenanceWindowTask (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTask_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_maxConcurrency = (UpdateMaintenanceWindowTask -> Maybe Text)
-> (UpdateMaintenanceWindowTask
    -> Maybe Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask
     UpdateMaintenanceWindowTask
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Maybe Text
a -> UpdateMaintenanceWindowTask
s {$sel:maxConcurrency:UpdateMaintenanceWindowTask' :: Maybe Text
maxConcurrency = Maybe Text
a} :: UpdateMaintenanceWindowTask)

-- | The maintenance window ID that contains the task to modify.
updateMaintenanceWindowTask_windowId :: Lens.Lens' UpdateMaintenanceWindowTask Prelude.Text
updateMaintenanceWindowTask_windowId :: (Text -> f Text)
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_windowId = (UpdateMaintenanceWindowTask -> Text)
-> (UpdateMaintenanceWindowTask
    -> Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask UpdateMaintenanceWindowTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Text
windowId :: Text
$sel:windowId:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Text
windowId} -> Text
windowId) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Text
a -> UpdateMaintenanceWindowTask
s {$sel:windowId:UpdateMaintenanceWindowTask' :: Text
windowId = Text
a} :: UpdateMaintenanceWindowTask)

-- | The task ID to modify.
updateMaintenanceWindowTask_windowTaskId :: Lens.Lens' UpdateMaintenanceWindowTask Prelude.Text
updateMaintenanceWindowTask_windowTaskId :: (Text -> f Text)
-> UpdateMaintenanceWindowTask -> f UpdateMaintenanceWindowTask
updateMaintenanceWindowTask_windowTaskId = (UpdateMaintenanceWindowTask -> Text)
-> (UpdateMaintenanceWindowTask
    -> Text -> UpdateMaintenanceWindowTask)
-> Lens
     UpdateMaintenanceWindowTask UpdateMaintenanceWindowTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTask' {Text
windowTaskId :: Text
$sel:windowTaskId:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Text
windowTaskId} -> Text
windowTaskId) (\s :: UpdateMaintenanceWindowTask
s@UpdateMaintenanceWindowTask' {} Text
a -> UpdateMaintenanceWindowTask
s {$sel:windowTaskId:UpdateMaintenanceWindowTask' :: Text
windowTaskId = Text
a} :: UpdateMaintenanceWindowTask)

instance Core.AWSRequest UpdateMaintenanceWindowTask where
  type
    AWSResponse UpdateMaintenanceWindowTask =
      UpdateMaintenanceWindowTaskResponse
  request :: UpdateMaintenanceWindowTask -> Request UpdateMaintenanceWindowTask
request = Service
-> UpdateMaintenanceWindowTask
-> Request UpdateMaintenanceWindowTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateMaintenanceWindowTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMaintenanceWindowTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateMaintenanceWindowTask))
-> Logger
-> Service
-> Proxy UpdateMaintenanceWindowTask
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateMaintenanceWindowTask)))
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 Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateMaintenanceWindowTaskResponse
UpdateMaintenanceWindowTaskResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
 -> Maybe Natural
 -> Maybe Text
 -> Maybe MaintenanceWindowTaskCutoffBehavior
 -> Maybe Text
 -> Maybe MaintenanceWindowTaskInvocationParameters
 -> Maybe Text
 -> Maybe [Target]
 -> Maybe LoggingInfo
 -> Maybe (Sensitive Text)
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe
           (Sensitive
              (HashMap
                 Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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 Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
      -> Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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 Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateMaintenanceWindowTaskResponse)
-> Either
     String
     (Maybe
        (Sensitive
           (HashMap
              Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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 Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe MaintenanceWindowTaskCutoffBehavior
      -> Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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 Text
   -> Maybe MaintenanceWindowTaskCutoffBehavior
   -> Maybe Text
   -> Maybe MaintenanceWindowTaskInvocationParameters
   -> Maybe Text
   -> Maybe [Target]
   -> Maybe LoggingInfo
   -> Maybe (Sensitive Text)
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateMaintenanceWindowTaskResponse)
-> 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
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe MaintenanceWindowTaskCutoffBehavior)
-> Either
     String
     (Maybe Text
      -> Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe MaintenanceWindowTaskInvocationParameters
      -> Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe MaintenanceWindowTaskInvocationParameters)
-> Either
     String
     (Maybe Text
      -> Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Target]
      -> Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe [Target])
-> Either
     String
     (Maybe LoggingInfo
      -> Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe LoggingInfo)
-> Either
     String
     (Maybe (Sensitive Text)
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateMaintenanceWindowTaskResponse)
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
   -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> UpdateMaintenanceWindowTaskResponse)
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 -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateMaintenanceWindowTaskResponse)
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 -> UpdateMaintenanceWindowTaskResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateMaintenanceWindowTaskResponse)
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 -> UpdateMaintenanceWindowTaskResponse)
-> Either String Int
-> Either String UpdateMaintenanceWindowTaskResponse
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 UpdateMaintenanceWindowTask

instance Prelude.NFData UpdateMaintenanceWindowTask

instance Core.ToHeaders UpdateMaintenanceWindowTask where
  toHeaders :: UpdateMaintenanceWindowTask -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateMaintenanceWindowTask -> 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.UpdateMaintenanceWindowTask" ::
                          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 UpdateMaintenanceWindowTask where
  toJSON :: UpdateMaintenanceWindowTask -> Value
toJSON UpdateMaintenanceWindowTask' {Maybe Bool
Maybe Natural
Maybe [Target]
Maybe Text
Maybe (Sensitive Text)
Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
Maybe LoggingInfo
Maybe MaintenanceWindowTaskCutoffBehavior
Maybe MaintenanceWindowTaskInvocationParameters
Text
windowTaskId :: Text
windowId :: Text
maxConcurrency :: Maybe Text
description :: Maybe (Sensitive Text)
loggingInfo :: Maybe LoggingInfo
targets :: Maybe [Target]
name :: Maybe Text
taskInvocationParameters :: Maybe MaintenanceWindowTaskInvocationParameters
maxErrors :: Maybe Text
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
taskArn :: Maybe Text
priority :: Maybe Natural
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
replace :: Maybe Bool
serviceRoleArn :: Maybe Text
$sel:windowTaskId:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Text
$sel:windowId:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Text
$sel:maxConcurrency:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
$sel:description:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe (Sensitive Text)
$sel:loggingInfo:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe LoggingInfo
$sel:targets:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe [Target]
$sel:name:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
$sel:taskInvocationParameters:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskInvocationParameters
$sel:maxErrors:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
$sel:cutoffBehavior:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe MaintenanceWindowTaskCutoffBehavior
$sel:taskArn:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
$sel:priority:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Natural
$sel:taskParameters:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:replace:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Bool
$sel:serviceRoleArn:UpdateMaintenanceWindowTask' :: UpdateMaintenanceWindowTask -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ServiceRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceRoleArn,
            (Text
"Replace" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
replace,
            (Text
"TaskParameters" Text
-> Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
-> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Sensitive
   (HashMap
      Text (Sensitive MaintenanceWindowTaskParameterValueExpression))
 -> Pair)
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters,
            (Text
"Priority" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
priority,
            (Text
"TaskArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
taskArn,
            (Text
"CutoffBehavior" Text -> MaintenanceWindowTaskCutoffBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MaintenanceWindowTaskCutoffBehavior -> Pair)
-> Maybe MaintenanceWindowTaskCutoffBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior,
            (Text
"MaxErrors" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxErrors,
            (Text
"TaskInvocationParameters" Text -> MaintenanceWindowTaskInvocationParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MaintenanceWindowTaskInvocationParameters -> Pair)
-> Maybe MaintenanceWindowTaskInvocationParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters,
            (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"Targets" Text -> [Target] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Target] -> Pair) -> Maybe [Target] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Target]
targets,
            (Text
"LoggingInfo" Text -> LoggingInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (LoggingInfo -> Pair) -> Maybe LoggingInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LoggingInfo
loggingInfo,
            (Text
"Description" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
description,
            (Text
"MaxConcurrency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
maxConcurrency,
            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 UpdateMaintenanceWindowTask where
  toPath :: UpdateMaintenanceWindowTask -> ByteString
toPath = ByteString -> UpdateMaintenanceWindowTask -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateMaintenanceWindowTaskResponse' smart constructor.
data UpdateMaintenanceWindowTaskResponse = UpdateMaintenanceWindowTaskResponse'
  { -- | 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.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
serviceRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The task ID of the maintenance window that was updated.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
windowTaskId :: Prelude.Maybe Prelude.Text,
    -- | The updated parameter values.
    --
    -- @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.
    UpdateMaintenanceWindowTaskResponse
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text (Core.Sensitive MaintenanceWindowTaskParameterValueExpression))),
    -- | The updated priority value.
    UpdateMaintenanceWindowTaskResponse -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
    -- | The updated task ARN value.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | The specification for whether tasks should continue to run after the
    -- cutoff time specified in the maintenance windows is reached.
    UpdateMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Prelude.Maybe MaintenanceWindowTaskCutoffBehavior,
    -- | The updated @MaxErrors@ value.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | The updated parameter values.
    UpdateMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Prelude.Maybe MaintenanceWindowTaskInvocationParameters,
    -- | The updated task name.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The updated target values.
    UpdateMaintenanceWindowTaskResponse -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | The updated logging information in Amazon S3.
    --
    -- @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.
    UpdateMaintenanceWindowTaskResponse -> Maybe LoggingInfo
loggingInfo :: Prelude.Maybe LoggingInfo,
    -- | The updated task description.
    UpdateMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The updated @MaxConcurrency@ value.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The ID of the maintenance window that was updated.
    UpdateMaintenanceWindowTaskResponse -> Maybe Text
windowId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateMaintenanceWindowTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateMaintenanceWindowTaskResponse
-> UpdateMaintenanceWindowTaskResponse -> Bool
(UpdateMaintenanceWindowTaskResponse
 -> UpdateMaintenanceWindowTaskResponse -> Bool)
-> (UpdateMaintenanceWindowTaskResponse
    -> UpdateMaintenanceWindowTaskResponse -> Bool)
-> Eq UpdateMaintenanceWindowTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateMaintenanceWindowTaskResponse
-> UpdateMaintenanceWindowTaskResponse -> Bool
$c/= :: UpdateMaintenanceWindowTaskResponse
-> UpdateMaintenanceWindowTaskResponse -> Bool
== :: UpdateMaintenanceWindowTaskResponse
-> UpdateMaintenanceWindowTaskResponse -> Bool
$c== :: UpdateMaintenanceWindowTaskResponse
-> UpdateMaintenanceWindowTaskResponse -> Bool
Prelude.Eq, Int -> UpdateMaintenanceWindowTaskResponse -> ShowS
[UpdateMaintenanceWindowTaskResponse] -> ShowS
UpdateMaintenanceWindowTaskResponse -> String
(Int -> UpdateMaintenanceWindowTaskResponse -> ShowS)
-> (UpdateMaintenanceWindowTaskResponse -> String)
-> ([UpdateMaintenanceWindowTaskResponse] -> ShowS)
-> Show UpdateMaintenanceWindowTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateMaintenanceWindowTaskResponse] -> ShowS
$cshowList :: [UpdateMaintenanceWindowTaskResponse] -> ShowS
show :: UpdateMaintenanceWindowTaskResponse -> String
$cshow :: UpdateMaintenanceWindowTaskResponse -> String
showsPrec :: Int -> UpdateMaintenanceWindowTaskResponse -> ShowS
$cshowsPrec :: Int -> UpdateMaintenanceWindowTaskResponse -> ShowS
Prelude.Show, (forall x.
 UpdateMaintenanceWindowTaskResponse
 -> Rep UpdateMaintenanceWindowTaskResponse x)
-> (forall x.
    Rep UpdateMaintenanceWindowTaskResponse x
    -> UpdateMaintenanceWindowTaskResponse)
-> Generic UpdateMaintenanceWindowTaskResponse
forall x.
Rep UpdateMaintenanceWindowTaskResponse x
-> UpdateMaintenanceWindowTaskResponse
forall x.
UpdateMaintenanceWindowTaskResponse
-> Rep UpdateMaintenanceWindowTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateMaintenanceWindowTaskResponse x
-> UpdateMaintenanceWindowTaskResponse
$cfrom :: forall x.
UpdateMaintenanceWindowTaskResponse
-> Rep UpdateMaintenanceWindowTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateMaintenanceWindowTaskResponse' 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', 'updateMaintenanceWindowTaskResponse_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', 'updateMaintenanceWindowTaskResponse_windowTaskId' - The task ID of the maintenance window that was updated.
--
-- 'taskParameters', 'updateMaintenanceWindowTaskResponse_taskParameters' - The updated parameter values.
--
-- @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', 'updateMaintenanceWindowTaskResponse_priority' - The updated priority value.
--
-- 'taskArn', 'updateMaintenanceWindowTaskResponse_taskArn' - The updated task ARN value.
--
-- 'cutoffBehavior', 'updateMaintenanceWindowTaskResponse_cutoffBehavior' - The specification for whether tasks should continue to run after the
-- cutoff time specified in the maintenance windows is reached.
--
-- 'maxErrors', 'updateMaintenanceWindowTaskResponse_maxErrors' - The updated @MaxErrors@ value.
--
-- 'taskInvocationParameters', 'updateMaintenanceWindowTaskResponse_taskInvocationParameters' - The updated parameter values.
--
-- 'name', 'updateMaintenanceWindowTaskResponse_name' - The updated task name.
--
-- 'targets', 'updateMaintenanceWindowTaskResponse_targets' - The updated target values.
--
-- 'loggingInfo', 'updateMaintenanceWindowTaskResponse_loggingInfo' - The updated logging information in Amazon S3.
--
-- @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', 'updateMaintenanceWindowTaskResponse_description' - The updated task description.
--
-- 'maxConcurrency', 'updateMaintenanceWindowTaskResponse_maxConcurrency' - The updated @MaxConcurrency@ value.
--
-- 'windowId', 'updateMaintenanceWindowTaskResponse_windowId' - The ID of the maintenance window that was updated.
--
-- 'httpStatus', 'updateMaintenanceWindowTaskResponse_httpStatus' - The response's http status code.
newUpdateMaintenanceWindowTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateMaintenanceWindowTaskResponse
newUpdateMaintenanceWindowTaskResponse :: Int -> UpdateMaintenanceWindowTaskResponse
newUpdateMaintenanceWindowTaskResponse Int
pHttpStatus_ =
  UpdateMaintenanceWindowTaskResponse' :: Maybe Text
-> Maybe Text
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
-> Maybe Natural
-> Maybe Text
-> Maybe MaintenanceWindowTaskCutoffBehavior
-> Maybe Text
-> Maybe MaintenanceWindowTaskInvocationParameters
-> Maybe Text
-> Maybe [Target]
-> Maybe LoggingInfo
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateMaintenanceWindowTaskResponse
UpdateMaintenanceWindowTaskResponse'
    { $sel:serviceRoleArn:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
serviceRoleArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowTaskId:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
windowTaskId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskParameters:UpdateMaintenanceWindowTaskResponse' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
forall a. Maybe a
Prelude.Nothing,
      $sel:priority:UpdateMaintenanceWindowTaskResponse' :: Maybe Natural
priority = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cutoffBehavior:UpdateMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:taskInvocationParameters:UpdateMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters =
        Maybe MaintenanceWindowTaskInvocationParameters
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:UpdateMaintenanceWindowTaskResponse' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:loggingInfo:UpdateMaintenanceWindowTaskResponse' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateMaintenanceWindowTaskResponse' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:windowId:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
windowId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateMaintenanceWindowTaskResponse' :: 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.
updateMaintenanceWindowTaskResponse_serviceRoleArn :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_serviceRoleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_serviceRoleArn = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
serviceRoleArn :: Maybe Text
$sel:serviceRoleArn:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
serviceRoleArn} -> Maybe Text
serviceRoleArn) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:serviceRoleArn:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
serviceRoleArn = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The task ID of the maintenance window that was updated.
updateMaintenanceWindowTaskResponse_windowTaskId :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_windowTaskId :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_windowTaskId = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
windowTaskId :: Maybe Text
$sel:windowTaskId:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
windowTaskId} -> Maybe Text
windowTaskId) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:windowTaskId:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
windowTaskId = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The updated parameter values.
--
-- @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.
updateMaintenanceWindowTaskResponse_taskParameters :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text MaintenanceWindowTaskParameterValueExpression))
updateMaintenanceWindowTaskResponse_taskParameters :: (Maybe (HashMap Text MaintenanceWindowTaskParameterValueExpression)
 -> f (Maybe
         (HashMap Text MaintenanceWindowTaskParameterValueExpression)))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_taskParameters = (UpdateMaintenanceWindowTaskResponse
 -> Maybe
      (Sensitive
         (HashMap
            Text (Sensitive MaintenanceWindowTaskParameterValueExpression))))
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe
         (Sensitive
            (HashMap
               Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
    -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (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 (\UpdateMaintenanceWindowTaskResponse' {Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
$sel:taskParameters:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse
-> Maybe
     (Sensitive
        (HashMap
           Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters} -> Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:taskParameters:UpdateMaintenanceWindowTaskResponse' :: Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
taskParameters = Maybe
  (Sensitive
     (HashMap
        Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
a} :: UpdateMaintenanceWindowTaskResponse) ((Maybe
    (Sensitive
       (HashMap
          Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))
  -> f (Maybe
          (Sensitive
             (HashMap
                Text (Sensitive MaintenanceWindowTaskParameterValueExpression)))))
 -> UpdateMaintenanceWindowTaskResponse
 -> f UpdateMaintenanceWindowTaskResponse)
-> ((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)))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
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 updated priority value.
updateMaintenanceWindowTaskResponse_priority :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Natural)
updateMaintenanceWindowTaskResponse_priority :: (Maybe Natural -> f (Maybe Natural))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_priority = (UpdateMaintenanceWindowTaskResponse -> Maybe Natural)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Natural -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Natural
priority :: Maybe Natural
$sel:priority:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Natural
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:priority:UpdateMaintenanceWindowTaskResponse' :: Maybe Natural
priority = Maybe Natural
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The updated task ARN value.
updateMaintenanceWindowTaskResponse_taskArn :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_taskArn :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_taskArn = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:taskArn:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
taskArn = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The specification for whether tasks should continue to run after the
-- cutoff time specified in the maintenance windows is reached.
updateMaintenanceWindowTaskResponse_cutoffBehavior :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskCutoffBehavior)
updateMaintenanceWindowTaskResponse_cutoffBehavior :: (Maybe MaintenanceWindowTaskCutoffBehavior
 -> f (Maybe MaintenanceWindowTaskCutoffBehavior))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_cutoffBehavior = (UpdateMaintenanceWindowTaskResponse
 -> Maybe MaintenanceWindowTaskCutoffBehavior)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe MaintenanceWindowTaskCutoffBehavior
    -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe MaintenanceWindowTaskCutoffBehavior)
     (Maybe MaintenanceWindowTaskCutoffBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior :: Maybe MaintenanceWindowTaskCutoffBehavior
$sel:cutoffBehavior:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior} -> Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe MaintenanceWindowTaskCutoffBehavior
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:cutoffBehavior:UpdateMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskCutoffBehavior
cutoffBehavior = Maybe MaintenanceWindowTaskCutoffBehavior
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The updated @MaxErrors@ value.
updateMaintenanceWindowTaskResponse_maxErrors :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_maxErrors :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_maxErrors = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:maxErrors:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
maxErrors = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The updated parameter values.
updateMaintenanceWindowTaskResponse_taskInvocationParameters :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe MaintenanceWindowTaskInvocationParameters)
updateMaintenanceWindowTaskResponse_taskInvocationParameters :: (Maybe MaintenanceWindowTaskInvocationParameters
 -> f (Maybe MaintenanceWindowTaskInvocationParameters))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_taskInvocationParameters = (UpdateMaintenanceWindowTaskResponse
 -> Maybe MaintenanceWindowTaskInvocationParameters)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe MaintenanceWindowTaskInvocationParameters
    -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe MaintenanceWindowTaskInvocationParameters)
     (Maybe MaintenanceWindowTaskInvocationParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters :: Maybe MaintenanceWindowTaskInvocationParameters
$sel:taskInvocationParameters:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse
-> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters} -> Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe MaintenanceWindowTaskInvocationParameters
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:taskInvocationParameters:UpdateMaintenanceWindowTaskResponse' :: Maybe MaintenanceWindowTaskInvocationParameters
taskInvocationParameters = Maybe MaintenanceWindowTaskInvocationParameters
a} :: UpdateMaintenanceWindowTaskResponse)

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

-- | The updated target values.
updateMaintenanceWindowTaskResponse_targets :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe [Target])
updateMaintenanceWindowTaskResponse_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_targets = (UpdateMaintenanceWindowTaskResponse -> Maybe [Target])
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe [Target] -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe [Target]
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:targets:UpdateMaintenanceWindowTaskResponse' :: Maybe [Target]
targets = Maybe [Target]
a} :: UpdateMaintenanceWindowTaskResponse) ((Maybe [Target] -> f (Maybe [Target]))
 -> UpdateMaintenanceWindowTaskResponse
 -> f UpdateMaintenanceWindowTaskResponse)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
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 updated logging information in Amazon S3.
--
-- @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.
updateMaintenanceWindowTaskResponse_loggingInfo :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe LoggingInfo)
updateMaintenanceWindowTaskResponse_loggingInfo :: (Maybe LoggingInfo -> f (Maybe LoggingInfo))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_loggingInfo = (UpdateMaintenanceWindowTaskResponse -> Maybe LoggingInfo)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe LoggingInfo -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe LoggingInfo)
     (Maybe LoggingInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe LoggingInfo
loggingInfo :: Maybe LoggingInfo
$sel:loggingInfo:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe LoggingInfo
loggingInfo} -> Maybe LoggingInfo
loggingInfo) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe LoggingInfo
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:loggingInfo:UpdateMaintenanceWindowTaskResponse' :: Maybe LoggingInfo
loggingInfo = Maybe LoggingInfo
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The updated task description.
updateMaintenanceWindowTaskResponse_description :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_description :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_description = (UpdateMaintenanceWindowTaskResponse -> Maybe (Sensitive Text))
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe (Sensitive Text) -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe (Sensitive Text)
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:description:UpdateMaintenanceWindowTaskResponse' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: UpdateMaintenanceWindowTaskResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateMaintenanceWindowTaskResponse
 -> f UpdateMaintenanceWindowTaskResponse)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
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 updated @MaxConcurrency@ value.
updateMaintenanceWindowTaskResponse_maxConcurrency :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_maxConcurrency = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:maxConcurrency:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
maxConcurrency = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

-- | The ID of the maintenance window that was updated.
updateMaintenanceWindowTaskResponse_windowId :: Lens.Lens' UpdateMaintenanceWindowTaskResponse (Prelude.Maybe Prelude.Text)
updateMaintenanceWindowTaskResponse_windowId :: (Maybe Text -> f (Maybe Text))
-> UpdateMaintenanceWindowTaskResponse
-> f UpdateMaintenanceWindowTaskResponse
updateMaintenanceWindowTaskResponse_windowId = (UpdateMaintenanceWindowTaskResponse -> Maybe Text)
-> (UpdateMaintenanceWindowTaskResponse
    -> Maybe Text -> UpdateMaintenanceWindowTaskResponse)
-> Lens
     UpdateMaintenanceWindowTaskResponse
     UpdateMaintenanceWindowTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateMaintenanceWindowTaskResponse' {Maybe Text
windowId :: Maybe Text
$sel:windowId:UpdateMaintenanceWindowTaskResponse' :: UpdateMaintenanceWindowTaskResponse -> Maybe Text
windowId} -> Maybe Text
windowId) (\s :: UpdateMaintenanceWindowTaskResponse
s@UpdateMaintenanceWindowTaskResponse' {} Maybe Text
a -> UpdateMaintenanceWindowTaskResponse
s {$sel:windowId:UpdateMaintenanceWindowTaskResponse' :: Maybe Text
windowId = Maybe Text
a} :: UpdateMaintenanceWindowTaskResponse)

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

instance
  Prelude.NFData
    UpdateMaintenanceWindowTaskResponse