{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.CreateAssociationBatchRequestEntry
-- 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)
module Amazonka.SSM.Types.CreateAssociationBatchRequestEntry where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.AssociationComplianceSeverity
import Amazonka.SSM.Types.AssociationSyncCompliance
import Amazonka.SSM.Types.InstanceAssociationOutputLocation
import Amazonka.SSM.Types.Target
import Amazonka.SSM.Types.TargetLocation

-- | Describes the association of a Amazon Web Services Systems Manager
-- document (SSM document) and an instance.
--
-- /See:/ 'newCreateAssociationBatchRequestEntry' smart constructor.
data CreateAssociationBatchRequestEntry = CreateAssociationBatchRequestEntry'
  { -- | The instance ID.
    --
    -- @InstanceId@ has been deprecated. To specify an instance ID for an
    -- association, use the @Targets@ parameter. Requests that include the
    -- parameter @InstanceID@ with Systems Manager documents (SSM documents)
    -- that use schema version 2.0 or later will fail. In addition, if you use
    -- the parameter @InstanceId@, you can\'t use the parameters
    -- @AssociationName@, @DocumentVersion@, @MaxErrors@, @MaxConcurrency@,
    -- @OutputLocation@, or @ScheduleExpression@. To use these parameters, you
    -- must use the @Targets@ parameter.
    CreateAssociationBatchRequestEntry -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | Use this action to create an association in multiple Regions and
    -- multiple accounts.
    CreateAssociationBatchRequestEntry
-> Maybe (NonEmpty TargetLocation)
targetLocations :: Prelude.Maybe (Prelude.NonEmpty TargetLocation),
    -- | By default, when you create a new associations, the system runs it
    -- immediately after it is created and then according to the schedule you
    -- specified. Specify this option if you don\'t want an association to run
    -- immediately after you create it. This parameter isn\'t supported for
    -- rate expressions.
    CreateAssociationBatchRequestEntry -> Maybe Bool
applyOnlyAtCronInterval :: Prelude.Maybe Prelude.Bool,
    -- | The number of errors that are allowed before the system stops sending
    -- requests to run the association on additional targets. You can specify
    -- either an absolute number of errors, for example 10, or a percentage of
    -- the target set, for example 10%. If you specify 3, for example, the
    -- system stops sending requests when the fourth error is received. If you
    -- specify 0, then the system stops sending requests after the first error
    -- is returned. If you run an association on 50 instances and set
    -- @MaxError@ to 10%, then the system stops sending the request when the
    -- sixth error is received.
    --
    -- Executions that are already running an association when @MaxErrors@ is
    -- reached are allowed to complete, but some of these executions may fail
    -- as well. If you need to ensure that there won\'t be more than max-errors
    -- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
    -- one at a time.
    CreateAssociationBatchRequestEntry -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
    -- | A cron expression that specifies a schedule when the association runs.
    CreateAssociationBatchRequestEntry -> Maybe Text
scheduleExpression :: Prelude.Maybe Prelude.Text,
    -- | An S3 bucket where you want to store the results of this request.
    CreateAssociationBatchRequestEntry
-> Maybe InstanceAssociationOutputLocation
outputLocation :: Prelude.Maybe InstanceAssociationOutputLocation,
    -- | The mode for generating association compliance. You can specify @AUTO@
    -- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
    -- association execution to determine the compliance status. If the
    -- association execution runs successfully, then the association is
    -- @COMPLIANT@. If the association execution doesn\'t run successfully, the
    -- association is @NON-COMPLIANT@.
    --
    -- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
    -- for the PutComplianceItems API operation. In this case, compliance data
    -- isn\'t managed by State Manager, a capability of Amazon Web Services
    -- Systems Manager. It is managed by your direct call to the
    -- PutComplianceItems API operation.
    --
    -- By default, all associations use @AUTO@ mode.
    CreateAssociationBatchRequestEntry
-> Maybe AssociationSyncCompliance
syncCompliance :: Prelude.Maybe AssociationSyncCompliance,
    -- | The instances targeted by the request.
    CreateAssociationBatchRequestEntry -> Maybe [Target]
targets :: Prelude.Maybe [Target],
    -- | A description of the parameters for a document.
    CreateAssociationBatchRequestEntry -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
    -- | The document version.
    CreateAssociationBatchRequestEntry -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
    -- | Specify the target for the association. This target is required for
    -- associations that use an Automation runbook and target resources by
    -- using rate controls. Automation is a capability of Amazon Web Services
    -- Systems Manager.
    CreateAssociationBatchRequestEntry -> Maybe Text
automationTargetParameterName :: Prelude.Maybe Prelude.Text,
    -- | Specify a descriptive name for the association.
    CreateAssociationBatchRequestEntry -> Maybe Text
associationName :: Prelude.Maybe Prelude.Text,
    -- | The names or Amazon Resource Names (ARNs) of the Change Calendar type
    -- documents your associations are gated under. The associations only run
    -- when that Change Calendar is open. For more information, see
    -- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
    CreateAssociationBatchRequestEntry -> Maybe [Text]
calendarNames :: Prelude.Maybe [Prelude.Text],
    -- | The severity level to assign to the association.
    CreateAssociationBatchRequestEntry
-> Maybe AssociationComplianceSeverity
complianceSeverity :: Prelude.Maybe AssociationComplianceSeverity,
    -- | The maximum number of targets allowed to run the association at the same
    -- time. You can specify a number, for example 10, or a percentage of the
    -- target set, for example 10%. The default value is 100%, which means all
    -- targets run the association at the same time.
    --
    -- If a new instance starts and attempts to run an association while
    -- Systems Manager is running @MaxConcurrency@ associations, the
    -- association is allowed to run. During the next association interval, the
    -- new instance will process its association within the limit specified for
    -- @MaxConcurrency@.
    CreateAssociationBatchRequestEntry -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
    -- | The name of the SSM document that contains the configuration information
    -- for the instance. You can specify Command or Automation runbooks.
    --
    -- You can specify Amazon Web Services-predefined documents, documents you
    -- created, or a document that is shared with you from another account.
    --
    -- For SSM documents that are shared with you from other Amazon Web
    -- Services accounts, you must specify the complete SSM document ARN, in
    -- the following format:
    --
    -- @arn:aws:ssm:region:account-id:document\/document-name @
    --
    -- For example:
    --
    -- @arn:aws:ssm:us-east-2:12345678912:document\/My-Shared-Document@
    --
    -- For Amazon Web Services-predefined documents and SSM documents you
    -- created in your account, you only need to specify the document name. For
    -- example, @AWS-ApplyPatchBaseline@ or @My-Document@.
    CreateAssociationBatchRequestEntry -> Text
name :: Prelude.Text
  }
  deriving (CreateAssociationBatchRequestEntry
-> CreateAssociationBatchRequestEntry -> Bool
(CreateAssociationBatchRequestEntry
 -> CreateAssociationBatchRequestEntry -> Bool)
-> (CreateAssociationBatchRequestEntry
    -> CreateAssociationBatchRequestEntry -> Bool)
-> Eq CreateAssociationBatchRequestEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssociationBatchRequestEntry
-> CreateAssociationBatchRequestEntry -> Bool
$c/= :: CreateAssociationBatchRequestEntry
-> CreateAssociationBatchRequestEntry -> Bool
== :: CreateAssociationBatchRequestEntry
-> CreateAssociationBatchRequestEntry -> Bool
$c== :: CreateAssociationBatchRequestEntry
-> CreateAssociationBatchRequestEntry -> Bool
Prelude.Eq, ReadPrec [CreateAssociationBatchRequestEntry]
ReadPrec CreateAssociationBatchRequestEntry
Int -> ReadS CreateAssociationBatchRequestEntry
ReadS [CreateAssociationBatchRequestEntry]
(Int -> ReadS CreateAssociationBatchRequestEntry)
-> ReadS [CreateAssociationBatchRequestEntry]
-> ReadPrec CreateAssociationBatchRequestEntry
-> ReadPrec [CreateAssociationBatchRequestEntry]
-> Read CreateAssociationBatchRequestEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssociationBatchRequestEntry]
$creadListPrec :: ReadPrec [CreateAssociationBatchRequestEntry]
readPrec :: ReadPrec CreateAssociationBatchRequestEntry
$creadPrec :: ReadPrec CreateAssociationBatchRequestEntry
readList :: ReadS [CreateAssociationBatchRequestEntry]
$creadList :: ReadS [CreateAssociationBatchRequestEntry]
readsPrec :: Int -> ReadS CreateAssociationBatchRequestEntry
$creadsPrec :: Int -> ReadS CreateAssociationBatchRequestEntry
Prelude.Read, Int -> CreateAssociationBatchRequestEntry -> ShowS
[CreateAssociationBatchRequestEntry] -> ShowS
CreateAssociationBatchRequestEntry -> String
(Int -> CreateAssociationBatchRequestEntry -> ShowS)
-> (CreateAssociationBatchRequestEntry -> String)
-> ([CreateAssociationBatchRequestEntry] -> ShowS)
-> Show CreateAssociationBatchRequestEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssociationBatchRequestEntry] -> ShowS
$cshowList :: [CreateAssociationBatchRequestEntry] -> ShowS
show :: CreateAssociationBatchRequestEntry -> String
$cshow :: CreateAssociationBatchRequestEntry -> String
showsPrec :: Int -> CreateAssociationBatchRequestEntry -> ShowS
$cshowsPrec :: Int -> CreateAssociationBatchRequestEntry -> ShowS
Prelude.Show, (forall x.
 CreateAssociationBatchRequestEntry
 -> Rep CreateAssociationBatchRequestEntry x)
-> (forall x.
    Rep CreateAssociationBatchRequestEntry x
    -> CreateAssociationBatchRequestEntry)
-> Generic CreateAssociationBatchRequestEntry
forall x.
Rep CreateAssociationBatchRequestEntry x
-> CreateAssociationBatchRequestEntry
forall x.
CreateAssociationBatchRequestEntry
-> Rep CreateAssociationBatchRequestEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAssociationBatchRequestEntry x
-> CreateAssociationBatchRequestEntry
$cfrom :: forall x.
CreateAssociationBatchRequestEntry
-> Rep CreateAssociationBatchRequestEntry x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssociationBatchRequestEntry' 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:
--
-- 'instanceId', 'createAssociationBatchRequestEntry_instanceId' - The instance ID.
--
-- @InstanceId@ has been deprecated. To specify an instance ID for an
-- association, use the @Targets@ parameter. Requests that include the
-- parameter @InstanceID@ with Systems Manager documents (SSM documents)
-- that use schema version 2.0 or later will fail. In addition, if you use
-- the parameter @InstanceId@, you can\'t use the parameters
-- @AssociationName@, @DocumentVersion@, @MaxErrors@, @MaxConcurrency@,
-- @OutputLocation@, or @ScheduleExpression@. To use these parameters, you
-- must use the @Targets@ parameter.
--
-- 'targetLocations', 'createAssociationBatchRequestEntry_targetLocations' - Use this action to create an association in multiple Regions and
-- multiple accounts.
--
-- 'applyOnlyAtCronInterval', 'createAssociationBatchRequestEntry_applyOnlyAtCronInterval' - By default, when you create a new associations, the system runs it
-- immediately after it is created and then according to the schedule you
-- specified. Specify this option if you don\'t want an association to run
-- immediately after you create it. This parameter isn\'t supported for
-- rate expressions.
--
-- 'maxErrors', 'createAssociationBatchRequestEntry_maxErrors' - The number of errors that are allowed before the system stops sending
-- requests to run the association on additional targets. You can specify
-- either an absolute number of errors, for example 10, or a percentage of
-- the target set, for example 10%. If you specify 3, for example, the
-- system stops sending requests when the fourth error is received. If you
-- specify 0, then the system stops sending requests after the first error
-- is returned. If you run an association on 50 instances and set
-- @MaxError@ to 10%, then the system stops sending the request when the
-- sixth error is received.
--
-- Executions that are already running an association when @MaxErrors@ is
-- reached are allowed to complete, but some of these executions may fail
-- as well. If you need to ensure that there won\'t be more than max-errors
-- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
-- one at a time.
--
-- 'scheduleExpression', 'createAssociationBatchRequestEntry_scheduleExpression' - A cron expression that specifies a schedule when the association runs.
--
-- 'outputLocation', 'createAssociationBatchRequestEntry_outputLocation' - An S3 bucket where you want to store the results of this request.
--
-- 'syncCompliance', 'createAssociationBatchRequestEntry_syncCompliance' - The mode for generating association compliance. You can specify @AUTO@
-- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
-- association execution to determine the compliance status. If the
-- association execution runs successfully, then the association is
-- @COMPLIANT@. If the association execution doesn\'t run successfully, the
-- association is @NON-COMPLIANT@.
--
-- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
-- for the PutComplianceItems API operation. In this case, compliance data
-- isn\'t managed by State Manager, a capability of Amazon Web Services
-- Systems Manager. It is managed by your direct call to the
-- PutComplianceItems API operation.
--
-- By default, all associations use @AUTO@ mode.
--
-- 'targets', 'createAssociationBatchRequestEntry_targets' - The instances targeted by the request.
--
-- 'parameters', 'createAssociationBatchRequestEntry_parameters' - A description of the parameters for a document.
--
-- 'documentVersion', 'createAssociationBatchRequestEntry_documentVersion' - The document version.
--
-- 'automationTargetParameterName', 'createAssociationBatchRequestEntry_automationTargetParameterName' - Specify the target for the association. This target is required for
-- associations that use an Automation runbook and target resources by
-- using rate controls. Automation is a capability of Amazon Web Services
-- Systems Manager.
--
-- 'associationName', 'createAssociationBatchRequestEntry_associationName' - Specify a descriptive name for the association.
--
-- 'calendarNames', 'createAssociationBatchRequestEntry_calendarNames' - The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations only run
-- when that Change Calendar is open. For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
--
-- 'complianceSeverity', 'createAssociationBatchRequestEntry_complianceSeverity' - The severity level to assign to the association.
--
-- 'maxConcurrency', 'createAssociationBatchRequestEntry_maxConcurrency' - The maximum number of targets allowed to run the association at the same
-- time. You can specify a number, for example 10, or a percentage of the
-- target set, for example 10%. The default value is 100%, which means all
-- targets run the association at the same time.
--
-- If a new instance starts and attempts to run an association while
-- Systems Manager is running @MaxConcurrency@ associations, the
-- association is allowed to run. During the next association interval, the
-- new instance will process its association within the limit specified for
-- @MaxConcurrency@.
--
-- 'name', 'createAssociationBatchRequestEntry_name' - The name of the SSM document that contains the configuration information
-- for the instance. You can specify Command or Automation runbooks.
--
-- You can specify Amazon Web Services-predefined documents, documents you
-- created, or a document that is shared with you from another account.
--
-- For SSM documents that are shared with you from other Amazon Web
-- Services accounts, you must specify the complete SSM document ARN, in
-- the following format:
--
-- @arn:aws:ssm:region:account-id:document\/document-name @
--
-- For example:
--
-- @arn:aws:ssm:us-east-2:12345678912:document\/My-Shared-Document@
--
-- For Amazon Web Services-predefined documents and SSM documents you
-- created in your account, you only need to specify the document name. For
-- example, @AWS-ApplyPatchBaseline@ or @My-Document@.
newCreateAssociationBatchRequestEntry ::
  -- | 'name'
  Prelude.Text ->
  CreateAssociationBatchRequestEntry
newCreateAssociationBatchRequestEntry :: Text -> CreateAssociationBatchRequestEntry
newCreateAssociationBatchRequestEntry Text
pName_ =
  CreateAssociationBatchRequestEntry' :: Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe InstanceAssociationOutputLocation
-> Maybe AssociationSyncCompliance
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe AssociationComplianceSeverity
-> Maybe Text
-> Text
-> CreateAssociationBatchRequestEntry
CreateAssociationBatchRequestEntry'
    { $sel:instanceId:CreateAssociationBatchRequestEntry' :: Maybe Text
instanceId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:targetLocations:CreateAssociationBatchRequestEntry' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
forall a. Maybe a
Prelude.Nothing,
      $sel:applyOnlyAtCronInterval:CreateAssociationBatchRequestEntry' :: Maybe Bool
applyOnlyAtCronInterval =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:maxErrors:CreateAssociationBatchRequestEntry' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:scheduleExpression:CreateAssociationBatchRequestEntry' :: Maybe Text
scheduleExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:outputLocation:CreateAssociationBatchRequestEntry' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
forall a. Maybe a
Prelude.Nothing,
      $sel:syncCompliance:CreateAssociationBatchRequestEntry' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
forall a. Maybe a
Prelude.Nothing,
      $sel:targets:CreateAssociationBatchRequestEntry' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateAssociationBatchRequestEntry' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
      $sel:documentVersion:CreateAssociationBatchRequestEntry' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:automationTargetParameterName:CreateAssociationBatchRequestEntry' :: Maybe Text
automationTargetParameterName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationName:CreateAssociationBatchRequestEntry' :: Maybe Text
associationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:calendarNames:CreateAssociationBatchRequestEntry' :: Maybe [Text]
calendarNames = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:complianceSeverity:CreateAssociationBatchRequestEntry' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
forall a. Maybe a
Prelude.Nothing,
      $sel:maxConcurrency:CreateAssociationBatchRequestEntry' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateAssociationBatchRequestEntry' :: Text
name = Text
pName_
    }

-- | The instance ID.
--
-- @InstanceId@ has been deprecated. To specify an instance ID for an
-- association, use the @Targets@ parameter. Requests that include the
-- parameter @InstanceID@ with Systems Manager documents (SSM documents)
-- that use schema version 2.0 or later will fail. In addition, if you use
-- the parameter @InstanceId@, you can\'t use the parameters
-- @AssociationName@, @DocumentVersion@, @MaxErrors@, @MaxConcurrency@,
-- @OutputLocation@, or @ScheduleExpression@. To use these parameters, you
-- must use the @Targets@ parameter.
createAssociationBatchRequestEntry_instanceId :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_instanceId :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_instanceId = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:instanceId:CreateAssociationBatchRequestEntry' :: Maybe Text
instanceId = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | Use this action to create an association in multiple Regions and
-- multiple accounts.
createAssociationBatchRequestEntry_targetLocations :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe (Prelude.NonEmpty TargetLocation))
createAssociationBatchRequestEntry_targetLocations :: (Maybe (NonEmpty TargetLocation)
 -> f (Maybe (NonEmpty TargetLocation)))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_targetLocations = (CreateAssociationBatchRequestEntry
 -> Maybe (NonEmpty TargetLocation))
-> (CreateAssociationBatchRequestEntry
    -> Maybe (NonEmpty TargetLocation)
    -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe (NonEmpty TargetLocation)
targetLocations :: Maybe (NonEmpty TargetLocation)
$sel:targetLocations:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe (NonEmpty TargetLocation)
targetLocations} -> Maybe (NonEmpty TargetLocation)
targetLocations) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe (NonEmpty TargetLocation)
a -> CreateAssociationBatchRequestEntry
s {$sel:targetLocations:CreateAssociationBatchRequestEntry' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
a} :: CreateAssociationBatchRequestEntry) ((Maybe (NonEmpty TargetLocation)
  -> f (Maybe (NonEmpty TargetLocation)))
 -> CreateAssociationBatchRequestEntry
 -> f CreateAssociationBatchRequestEntry)
-> ((Maybe (NonEmpty TargetLocation)
     -> f (Maybe (NonEmpty TargetLocation)))
    -> Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> (Maybe (NonEmpty TargetLocation)
    -> f (Maybe (NonEmpty TargetLocation)))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
-> Iso
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
     (Maybe (NonEmpty TargetLocation))
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
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
  (NonEmpty TargetLocation)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | By default, when you create a new associations, the system runs it
-- immediately after it is created and then according to the schedule you
-- specified. Specify this option if you don\'t want an association to run
-- immediately after you create it. This parameter isn\'t supported for
-- rate expressions.
createAssociationBatchRequestEntry_applyOnlyAtCronInterval :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Bool)
createAssociationBatchRequestEntry_applyOnlyAtCronInterval :: (Maybe Bool -> f (Maybe Bool))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_applyOnlyAtCronInterval = (CreateAssociationBatchRequestEntry -> Maybe Bool)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Bool -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Bool
applyOnlyAtCronInterval :: Maybe Bool
$sel:applyOnlyAtCronInterval:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Bool
applyOnlyAtCronInterval} -> Maybe Bool
applyOnlyAtCronInterval) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Bool
a -> CreateAssociationBatchRequestEntry
s {$sel:applyOnlyAtCronInterval:CreateAssociationBatchRequestEntry' :: Maybe Bool
applyOnlyAtCronInterval = Maybe Bool
a} :: CreateAssociationBatchRequestEntry)

-- | The number of errors that are allowed before the system stops sending
-- requests to run the association on additional targets. You can specify
-- either an absolute number of errors, for example 10, or a percentage of
-- the target set, for example 10%. If you specify 3, for example, the
-- system stops sending requests when the fourth error is received. If you
-- specify 0, then the system stops sending requests after the first error
-- is returned. If you run an association on 50 instances and set
-- @MaxError@ to 10%, then the system stops sending the request when the
-- sixth error is received.
--
-- Executions that are already running an association when @MaxErrors@ is
-- reached are allowed to complete, but some of these executions may fail
-- as well. If you need to ensure that there won\'t be more than max-errors
-- failed executions, set @MaxConcurrency@ to 1 so that executions proceed
-- one at a time.
createAssociationBatchRequestEntry_maxErrors :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_maxErrors :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_maxErrors = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:maxErrors:CreateAssociationBatchRequestEntry' :: Maybe Text
maxErrors = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | A cron expression that specifies a schedule when the association runs.
createAssociationBatchRequestEntry_scheduleExpression :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_scheduleExpression :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_scheduleExpression = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
scheduleExpression :: Maybe Text
$sel:scheduleExpression:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
scheduleExpression} -> Maybe Text
scheduleExpression) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:scheduleExpression:CreateAssociationBatchRequestEntry' :: Maybe Text
scheduleExpression = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | An S3 bucket where you want to store the results of this request.
createAssociationBatchRequestEntry_outputLocation :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe InstanceAssociationOutputLocation)
createAssociationBatchRequestEntry_outputLocation :: (Maybe InstanceAssociationOutputLocation
 -> f (Maybe InstanceAssociationOutputLocation))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_outputLocation = (CreateAssociationBatchRequestEntry
 -> Maybe InstanceAssociationOutputLocation)
-> (CreateAssociationBatchRequestEntry
    -> Maybe InstanceAssociationOutputLocation
    -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe InstanceAssociationOutputLocation)
     (Maybe InstanceAssociationOutputLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe InstanceAssociationOutputLocation
outputLocation :: Maybe InstanceAssociationOutputLocation
$sel:outputLocation:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe InstanceAssociationOutputLocation
outputLocation} -> Maybe InstanceAssociationOutputLocation
outputLocation) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe InstanceAssociationOutputLocation
a -> CreateAssociationBatchRequestEntry
s {$sel:outputLocation:CreateAssociationBatchRequestEntry' :: Maybe InstanceAssociationOutputLocation
outputLocation = Maybe InstanceAssociationOutputLocation
a} :: CreateAssociationBatchRequestEntry)

-- | The mode for generating association compliance. You can specify @AUTO@
-- or @MANUAL@. In @AUTO@ mode, the system uses the status of the
-- association execution to determine the compliance status. If the
-- association execution runs successfully, then the association is
-- @COMPLIANT@. If the association execution doesn\'t run successfully, the
-- association is @NON-COMPLIANT@.
--
-- In @MANUAL@ mode, you must specify the @AssociationId@ as a parameter
-- for the PutComplianceItems API operation. In this case, compliance data
-- isn\'t managed by State Manager, a capability of Amazon Web Services
-- Systems Manager. It is managed by your direct call to the
-- PutComplianceItems API operation.
--
-- By default, all associations use @AUTO@ mode.
createAssociationBatchRequestEntry_syncCompliance :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe AssociationSyncCompliance)
createAssociationBatchRequestEntry_syncCompliance :: (Maybe AssociationSyncCompliance
 -> f (Maybe AssociationSyncCompliance))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_syncCompliance = (CreateAssociationBatchRequestEntry
 -> Maybe AssociationSyncCompliance)
-> (CreateAssociationBatchRequestEntry
    -> Maybe AssociationSyncCompliance
    -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe AssociationSyncCompliance)
     (Maybe AssociationSyncCompliance)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe AssociationSyncCompliance
syncCompliance :: Maybe AssociationSyncCompliance
$sel:syncCompliance:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe AssociationSyncCompliance
syncCompliance} -> Maybe AssociationSyncCompliance
syncCompliance) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe AssociationSyncCompliance
a -> CreateAssociationBatchRequestEntry
s {$sel:syncCompliance:CreateAssociationBatchRequestEntry' :: Maybe AssociationSyncCompliance
syncCompliance = Maybe AssociationSyncCompliance
a} :: CreateAssociationBatchRequestEntry)

-- | The instances targeted by the request.
createAssociationBatchRequestEntry_targets :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe [Target])
createAssociationBatchRequestEntry_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_targets = (CreateAssociationBatchRequestEntry -> Maybe [Target])
-> (CreateAssociationBatchRequestEntry
    -> Maybe [Target] -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe [Target])
     (Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe [Target]
a -> CreateAssociationBatchRequestEntry
s {$sel:targets:CreateAssociationBatchRequestEntry' :: Maybe [Target]
targets = Maybe [Target]
a} :: CreateAssociationBatchRequestEntry) ((Maybe [Target] -> f (Maybe [Target]))
 -> CreateAssociationBatchRequestEntry
 -> f CreateAssociationBatchRequestEntry)
-> ((Maybe [Target] -> f (Maybe [Target]))
    -> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
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

-- | A description of the parameters for a document.
createAssociationBatchRequestEntry_parameters :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
createAssociationBatchRequestEntry_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_parameters = (CreateAssociationBatchRequestEntry -> Maybe (HashMap Text [Text]))
-> (CreateAssociationBatchRequestEntry
    -> Maybe (HashMap Text [Text])
    -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe (HashMap Text [Text])
a -> CreateAssociationBatchRequestEntry
s {$sel:parameters:CreateAssociationBatchRequestEntry' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: CreateAssociationBatchRequestEntry) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
 -> CreateAssociationBatchRequestEntry
 -> f CreateAssociationBatchRequestEntry)
-> ((Maybe (HashMap Text [Text])
     -> f (Maybe (HashMap Text [Text])))
    -> Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
-> Iso
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [Text]))
     (Maybe (HashMap Text [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
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
  (HashMap Text [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The document version.
createAssociationBatchRequestEntry_documentVersion :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_documentVersion :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_documentVersion = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:documentVersion:CreateAssociationBatchRequestEntry' :: Maybe Text
documentVersion = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | Specify the target for the association. This target is required for
-- associations that use an Automation runbook and target resources by
-- using rate controls. Automation is a capability of Amazon Web Services
-- Systems Manager.
createAssociationBatchRequestEntry_automationTargetParameterName :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_automationTargetParameterName :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_automationTargetParameterName = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
automationTargetParameterName :: Maybe Text
$sel:automationTargetParameterName:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
automationTargetParameterName} -> Maybe Text
automationTargetParameterName) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:automationTargetParameterName:CreateAssociationBatchRequestEntry' :: Maybe Text
automationTargetParameterName = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | Specify a descriptive name for the association.
createAssociationBatchRequestEntry_associationName :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_associationName :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_associationName = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
associationName :: Maybe Text
$sel:associationName:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
associationName} -> Maybe Text
associationName) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:associationName:CreateAssociationBatchRequestEntry' :: Maybe Text
associationName = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | The names or Amazon Resource Names (ARNs) of the Change Calendar type
-- documents your associations are gated under. The associations only run
-- when that Change Calendar is open. For more information, see
-- <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar Amazon Web Services Systems Manager Change Calendar>.
createAssociationBatchRequestEntry_calendarNames :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe [Prelude.Text])
createAssociationBatchRequestEntry_calendarNames :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_calendarNames = (CreateAssociationBatchRequestEntry -> Maybe [Text])
-> (CreateAssociationBatchRequestEntry
    -> Maybe [Text] -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe [Text]
calendarNames :: Maybe [Text]
$sel:calendarNames:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe [Text]
calendarNames} -> Maybe [Text]
calendarNames) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe [Text]
a -> CreateAssociationBatchRequestEntry
s {$sel:calendarNames:CreateAssociationBatchRequestEntry' :: Maybe [Text]
calendarNames = Maybe [Text]
a} :: CreateAssociationBatchRequestEntry) ((Maybe [Text] -> f (Maybe [Text]))
 -> CreateAssociationBatchRequestEntry
 -> f CreateAssociationBatchRequestEntry)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The severity level to assign to the association.
createAssociationBatchRequestEntry_complianceSeverity :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe AssociationComplianceSeverity)
createAssociationBatchRequestEntry_complianceSeverity :: (Maybe AssociationComplianceSeverity
 -> f (Maybe AssociationComplianceSeverity))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_complianceSeverity = (CreateAssociationBatchRequestEntry
 -> Maybe AssociationComplianceSeverity)
-> (CreateAssociationBatchRequestEntry
    -> Maybe AssociationComplianceSeverity
    -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe AssociationComplianceSeverity)
     (Maybe AssociationComplianceSeverity)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe AssociationComplianceSeverity
complianceSeverity :: Maybe AssociationComplianceSeverity
$sel:complianceSeverity:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe AssociationComplianceSeverity
complianceSeverity} -> Maybe AssociationComplianceSeverity
complianceSeverity) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe AssociationComplianceSeverity
a -> CreateAssociationBatchRequestEntry
s {$sel:complianceSeverity:CreateAssociationBatchRequestEntry' :: Maybe AssociationComplianceSeverity
complianceSeverity = Maybe AssociationComplianceSeverity
a} :: CreateAssociationBatchRequestEntry)

-- | The maximum number of targets allowed to run the association at the same
-- time. You can specify a number, for example 10, or a percentage of the
-- target set, for example 10%. The default value is 100%, which means all
-- targets run the association at the same time.
--
-- If a new instance starts and attempts to run an association while
-- Systems Manager is running @MaxConcurrency@ associations, the
-- association is allowed to run. During the next association interval, the
-- new instance will process its association within the limit specified for
-- @MaxConcurrency@.
createAssociationBatchRequestEntry_maxConcurrency :: Lens.Lens' CreateAssociationBatchRequestEntry (Prelude.Maybe Prelude.Text)
createAssociationBatchRequestEntry_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_maxConcurrency = (CreateAssociationBatchRequestEntry -> Maybe Text)
-> (CreateAssociationBatchRequestEntry
    -> Maybe Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Maybe Text
a -> CreateAssociationBatchRequestEntry
s {$sel:maxConcurrency:CreateAssociationBatchRequestEntry' :: Maybe Text
maxConcurrency = Maybe Text
a} :: CreateAssociationBatchRequestEntry)

-- | The name of the SSM document that contains the configuration information
-- for the instance. You can specify Command or Automation runbooks.
--
-- You can specify Amazon Web Services-predefined documents, documents you
-- created, or a document that is shared with you from another account.
--
-- For SSM documents that are shared with you from other Amazon Web
-- Services accounts, you must specify the complete SSM document ARN, in
-- the following format:
--
-- @arn:aws:ssm:region:account-id:document\/document-name @
--
-- For example:
--
-- @arn:aws:ssm:us-east-2:12345678912:document\/My-Shared-Document@
--
-- For Amazon Web Services-predefined documents and SSM documents you
-- created in your account, you only need to specify the document name. For
-- example, @AWS-ApplyPatchBaseline@ or @My-Document@.
createAssociationBatchRequestEntry_name :: Lens.Lens' CreateAssociationBatchRequestEntry Prelude.Text
createAssociationBatchRequestEntry_name :: (Text -> f Text)
-> CreateAssociationBatchRequestEntry
-> f CreateAssociationBatchRequestEntry
createAssociationBatchRequestEntry_name = (CreateAssociationBatchRequestEntry -> Text)
-> (CreateAssociationBatchRequestEntry
    -> Text -> CreateAssociationBatchRequestEntry)
-> Lens
     CreateAssociationBatchRequestEntry
     CreateAssociationBatchRequestEntry
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssociationBatchRequestEntry' {Text
name :: Text
$sel:name:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Text
name} -> Text
name) (\s :: CreateAssociationBatchRequestEntry
s@CreateAssociationBatchRequestEntry' {} Text
a -> CreateAssociationBatchRequestEntry
s {$sel:name:CreateAssociationBatchRequestEntry' :: Text
name = Text
a} :: CreateAssociationBatchRequestEntry)

instance
  Core.FromJSON
    CreateAssociationBatchRequestEntry
  where
  parseJSON :: Value -> Parser CreateAssociationBatchRequestEntry
parseJSON =
    String
-> (Object -> Parser CreateAssociationBatchRequestEntry)
-> Value
-> Parser CreateAssociationBatchRequestEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CreateAssociationBatchRequestEntry"
      ( \Object
x ->
          Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe InstanceAssociationOutputLocation
-> Maybe AssociationSyncCompliance
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe AssociationComplianceSeverity
-> Maybe Text
-> Text
-> CreateAssociationBatchRequestEntry
CreateAssociationBatchRequestEntry'
            (Maybe Text
 -> Maybe (NonEmpty TargetLocation)
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe InstanceAssociationOutputLocation
 -> Maybe AssociationSyncCompliance
 -> Maybe [Target]
 -> Maybe (HashMap Text [Text])
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe AssociationComplianceSeverity
 -> Maybe Text
 -> Text
 -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty TargetLocation)
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceId")
            Parser
  (Maybe (NonEmpty TargetLocation)
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe (NonEmpty TargetLocation))
-> Parser
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty TargetLocation))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TargetLocations")
            Parser
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ApplyOnlyAtCronInterval")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxErrors")
            Parser
  (Maybe Text
   -> Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe InstanceAssociationOutputLocation
      -> Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScheduleExpression")
            Parser
  (Maybe InstanceAssociationOutputLocation
   -> Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe InstanceAssociationOutputLocation)
-> Parser
     (Maybe AssociationSyncCompliance
      -> Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceAssociationOutputLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputLocation")
            Parser
  (Maybe AssociationSyncCompliance
   -> Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe AssociationSyncCompliance)
-> Parser
     (Maybe [Target]
      -> Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationSyncCompliance)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SyncCompliance")
            Parser
  (Maybe [Target]
   -> Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe [Target])
-> Parser
     (Maybe (HashMap Text [Text])
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Target]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Targets" Parser (Maybe (Maybe [Target]))
-> Maybe [Target] -> Parser (Maybe [Target])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Target]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe (HashMap Text [Text])
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe (HashMap Text [Text]))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text [Text])))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text [Text])))
-> Maybe (HashMap Text [Text])
-> Parser (Maybe (HashMap Text [Text]))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text [Text])
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DocumentVersion")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutomationTargetParameterName")
            Parser
  (Maybe Text
   -> Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Text]
      -> Maybe AssociationComplianceSeverity
      -> Maybe Text
      -> Text
      -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssociationName")
            Parser
  (Maybe [Text]
   -> Maybe AssociationComplianceSeverity
   -> Maybe Text
   -> Text
   -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe [Text])
-> Parser
     (Maybe AssociationComplianceSeverity
      -> Maybe Text -> Text -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CalendarNames" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe AssociationComplianceSeverity
   -> Maybe Text -> Text -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe AssociationComplianceSeverity)
-> Parser
     (Maybe Text -> Text -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationComplianceSeverity)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ComplianceSeverity")
            Parser (Maybe Text -> Text -> CreateAssociationBatchRequestEntry)
-> Parser (Maybe Text)
-> Parser (Text -> CreateAssociationBatchRequestEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxConcurrency")
            Parser (Text -> CreateAssociationBatchRequestEntry)
-> Parser Text -> Parser CreateAssociationBatchRequestEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance
  Prelude.Hashable
    CreateAssociationBatchRequestEntry

instance
  Prelude.NFData
    CreateAssociationBatchRequestEntry

instance
  Core.ToJSON
    CreateAssociationBatchRequestEntry
  where
  toJSON :: CreateAssociationBatchRequestEntry -> Value
toJSON CreateAssociationBatchRequestEntry' {Maybe Bool
Maybe [Text]
Maybe [Target]
Maybe (NonEmpty TargetLocation)
Maybe Text
Maybe (HashMap Text [Text])
Maybe AssociationComplianceSeverity
Maybe AssociationSyncCompliance
Maybe InstanceAssociationOutputLocation
Text
name :: Text
maxConcurrency :: Maybe Text
complianceSeverity :: Maybe AssociationComplianceSeverity
calendarNames :: Maybe [Text]
associationName :: Maybe Text
automationTargetParameterName :: Maybe Text
documentVersion :: Maybe Text
parameters :: Maybe (HashMap Text [Text])
targets :: Maybe [Target]
syncCompliance :: Maybe AssociationSyncCompliance
outputLocation :: Maybe InstanceAssociationOutputLocation
scheduleExpression :: Maybe Text
maxErrors :: Maybe Text
applyOnlyAtCronInterval :: Maybe Bool
targetLocations :: Maybe (NonEmpty TargetLocation)
instanceId :: Maybe Text
$sel:name:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Text
$sel:maxConcurrency:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:complianceSeverity:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe AssociationComplianceSeverity
$sel:calendarNames:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe [Text]
$sel:associationName:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:automationTargetParameterName:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:documentVersion:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:parameters:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe (HashMap Text [Text])
$sel:targets:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe [Target]
$sel:syncCompliance:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe AssociationSyncCompliance
$sel:outputLocation:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe InstanceAssociationOutputLocation
$sel:scheduleExpression:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:maxErrors:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
$sel:applyOnlyAtCronInterval:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Bool
$sel:targetLocations:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry
-> Maybe (NonEmpty TargetLocation)
$sel:instanceId:CreateAssociationBatchRequestEntry' :: CreateAssociationBatchRequestEntry -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InstanceId" 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
instanceId,
            (Text
"TargetLocations" Text -> NonEmpty TargetLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty TargetLocation -> Pair)
-> Maybe (NonEmpty TargetLocation) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty TargetLocation)
targetLocations,
            (Text
"ApplyOnlyAtCronInterval" 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
applyOnlyAtCronInterval,
            (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
"ScheduleExpression" 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
scheduleExpression,
            (Text
"OutputLocation" Text -> InstanceAssociationOutputLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InstanceAssociationOutputLocation -> Pair)
-> Maybe InstanceAssociationOutputLocation -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceAssociationOutputLocation
outputLocation,
            (Text
"SyncCompliance" Text -> AssociationSyncCompliance -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AssociationSyncCompliance -> Pair)
-> Maybe AssociationSyncCompliance -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AssociationSyncCompliance
syncCompliance,
            (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
"Parameters" Text -> HashMap Text [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text [Text] -> Pair)
-> Maybe (HashMap Text [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text [Text])
parameters,
            (Text
"DocumentVersion" 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
documentVersion,
            (Text
"AutomationTargetParameterName" 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
automationTargetParameterName,
            (Text
"AssociationName" 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
associationName,
            (Text
"CalendarNames" 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]
calendarNames,
            (Text
"ComplianceSeverity" Text -> AssociationComplianceSeverity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AssociationComplianceSeverity -> Pair)
-> Maybe AssociationComplianceSeverity -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AssociationComplianceSeverity
complianceSeverity,
            (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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
          ]
      )