{-# 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 #-}
module Amazonka.SSM.StartAutomationExecution
(
StartAutomationExecution (..),
newStartAutomationExecution,
startAutomationExecution_targetParameterName,
startAutomationExecution_targetLocations,
startAutomationExecution_clientToken,
startAutomationExecution_mode,
startAutomationExecution_targetMaps,
startAutomationExecution_maxErrors,
startAutomationExecution_targets,
startAutomationExecution_parameters,
startAutomationExecution_documentVersion,
startAutomationExecution_tags,
startAutomationExecution_maxConcurrency,
startAutomationExecution_documentName,
StartAutomationExecutionResponse (..),
newStartAutomationExecutionResponse,
startAutomationExecutionResponse_automationExecutionId,
startAutomationExecutionResponse_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
data StartAutomationExecution = StartAutomationExecution'
{
StartAutomationExecution -> Maybe Text
targetParameterName :: Prelude.Maybe Prelude.Text,
StartAutomationExecution -> Maybe (NonEmpty TargetLocation)
targetLocations :: Prelude.Maybe (Prelude.NonEmpty TargetLocation),
StartAutomationExecution -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartAutomationExecution -> Maybe ExecutionMode
mode :: Prelude.Maybe ExecutionMode,
StartAutomationExecution -> Maybe [HashMap Text [Text]]
targetMaps :: Prelude.Maybe [Prelude.HashMap Prelude.Text [Prelude.Text]],
StartAutomationExecution -> Maybe Text
maxErrors :: Prelude.Maybe Prelude.Text,
StartAutomationExecution -> Maybe [Target]
targets :: Prelude.Maybe [Target],
StartAutomationExecution -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
StartAutomationExecution -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
StartAutomationExecution -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartAutomationExecution -> Maybe Text
maxConcurrency :: Prelude.Maybe Prelude.Text,
StartAutomationExecution -> Text
documentName :: Prelude.Text
}
deriving (StartAutomationExecution -> StartAutomationExecution -> Bool
(StartAutomationExecution -> StartAutomationExecution -> Bool)
-> (StartAutomationExecution -> StartAutomationExecution -> Bool)
-> Eq StartAutomationExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAutomationExecution -> StartAutomationExecution -> Bool
$c/= :: StartAutomationExecution -> StartAutomationExecution -> Bool
== :: StartAutomationExecution -> StartAutomationExecution -> Bool
$c== :: StartAutomationExecution -> StartAutomationExecution -> Bool
Prelude.Eq, ReadPrec [StartAutomationExecution]
ReadPrec StartAutomationExecution
Int -> ReadS StartAutomationExecution
ReadS [StartAutomationExecution]
(Int -> ReadS StartAutomationExecution)
-> ReadS [StartAutomationExecution]
-> ReadPrec StartAutomationExecution
-> ReadPrec [StartAutomationExecution]
-> Read StartAutomationExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAutomationExecution]
$creadListPrec :: ReadPrec [StartAutomationExecution]
readPrec :: ReadPrec StartAutomationExecution
$creadPrec :: ReadPrec StartAutomationExecution
readList :: ReadS [StartAutomationExecution]
$creadList :: ReadS [StartAutomationExecution]
readsPrec :: Int -> ReadS StartAutomationExecution
$creadsPrec :: Int -> ReadS StartAutomationExecution
Prelude.Read, Int -> StartAutomationExecution -> ShowS
[StartAutomationExecution] -> ShowS
StartAutomationExecution -> String
(Int -> StartAutomationExecution -> ShowS)
-> (StartAutomationExecution -> String)
-> ([StartAutomationExecution] -> ShowS)
-> Show StartAutomationExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAutomationExecution] -> ShowS
$cshowList :: [StartAutomationExecution] -> ShowS
show :: StartAutomationExecution -> String
$cshow :: StartAutomationExecution -> String
showsPrec :: Int -> StartAutomationExecution -> ShowS
$cshowsPrec :: Int -> StartAutomationExecution -> ShowS
Prelude.Show, (forall x.
StartAutomationExecution -> Rep StartAutomationExecution x)
-> (forall x.
Rep StartAutomationExecution x -> StartAutomationExecution)
-> Generic StartAutomationExecution
forall x.
Rep StartAutomationExecution x -> StartAutomationExecution
forall x.
StartAutomationExecution -> Rep StartAutomationExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAutomationExecution x -> StartAutomationExecution
$cfrom :: forall x.
StartAutomationExecution -> Rep StartAutomationExecution x
Prelude.Generic)
newStartAutomationExecution ::
Prelude.Text ->
StartAutomationExecution
newStartAutomationExecution :: Text -> StartAutomationExecution
newStartAutomationExecution Text
pDocumentName_ =
StartAutomationExecution' :: Maybe Text
-> Maybe (NonEmpty TargetLocation)
-> Maybe Text
-> Maybe ExecutionMode
-> Maybe [HashMap Text [Text]]
-> Maybe Text
-> Maybe [Target]
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Text
-> StartAutomationExecution
StartAutomationExecution'
{ $sel:targetParameterName:StartAutomationExecution' :: Maybe Text
targetParameterName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetLocations:StartAutomationExecution' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:StartAutomationExecution' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mode:StartAutomationExecution' :: Maybe ExecutionMode
mode = Maybe ExecutionMode
forall a. Maybe a
Prelude.Nothing,
$sel:targetMaps:StartAutomationExecution' :: Maybe [HashMap Text [Text]]
targetMaps = Maybe [HashMap Text [Text]]
forall a. Maybe a
Prelude.Nothing,
$sel:maxErrors:StartAutomationExecution' :: Maybe Text
maxErrors = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targets:StartAutomationExecution' :: Maybe [Target]
targets = Maybe [Target]
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:StartAutomationExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:documentVersion:StartAutomationExecution' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartAutomationExecution' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:maxConcurrency:StartAutomationExecution' :: Maybe Text
maxConcurrency = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:documentName:StartAutomationExecution' :: Text
documentName = Text
pDocumentName_
}
startAutomationExecution_targetParameterName :: Lens.Lens' StartAutomationExecution (Prelude.Maybe Prelude.Text)
startAutomationExecution_targetParameterName :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_targetParameterName = (StartAutomationExecution -> Maybe Text)
-> (StartAutomationExecution
-> Maybe Text -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe Text
targetParameterName :: Maybe Text
$sel:targetParameterName:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
targetParameterName} -> Maybe Text
targetParameterName) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe Text
a -> StartAutomationExecution
s {$sel:targetParameterName:StartAutomationExecution' :: Maybe Text
targetParameterName = Maybe Text
a} :: StartAutomationExecution)
startAutomationExecution_targetLocations :: Lens.Lens' StartAutomationExecution (Prelude.Maybe (Prelude.NonEmpty TargetLocation))
startAutomationExecution_targetLocations :: (Maybe (NonEmpty TargetLocation)
-> f (Maybe (NonEmpty TargetLocation)))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_targetLocations = (StartAutomationExecution -> Maybe (NonEmpty TargetLocation))
-> (StartAutomationExecution
-> Maybe (NonEmpty TargetLocation) -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe (NonEmpty TargetLocation))
(Maybe (NonEmpty TargetLocation))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe (NonEmpty TargetLocation)
targetLocations :: Maybe (NonEmpty TargetLocation)
$sel:targetLocations:StartAutomationExecution' :: StartAutomationExecution -> Maybe (NonEmpty TargetLocation)
targetLocations} -> Maybe (NonEmpty TargetLocation)
targetLocations) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe (NonEmpty TargetLocation)
a -> StartAutomationExecution
s {$sel:targetLocations:StartAutomationExecution' :: Maybe (NonEmpty TargetLocation)
targetLocations = Maybe (NonEmpty TargetLocation)
a} :: StartAutomationExecution) ((Maybe (NonEmpty TargetLocation)
-> f (Maybe (NonEmpty TargetLocation)))
-> StartAutomationExecution -> f StartAutomationExecution)
-> ((Maybe (NonEmpty TargetLocation)
-> f (Maybe (NonEmpty TargetLocation)))
-> Maybe (NonEmpty TargetLocation)
-> f (Maybe (NonEmpty TargetLocation)))
-> (Maybe (NonEmpty TargetLocation)
-> f (Maybe (NonEmpty TargetLocation)))
-> StartAutomationExecution
-> f StartAutomationExecution
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
startAutomationExecution_clientToken :: Lens.Lens' StartAutomationExecution (Prelude.Maybe Prelude.Text)
startAutomationExecution_clientToken :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_clientToken = (StartAutomationExecution -> Maybe Text)
-> (StartAutomationExecution
-> Maybe Text -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe Text
a -> StartAutomationExecution
s {$sel:clientToken:StartAutomationExecution' :: Maybe Text
clientToken = Maybe Text
a} :: StartAutomationExecution)
startAutomationExecution_mode :: Lens.Lens' StartAutomationExecution (Prelude.Maybe ExecutionMode)
startAutomationExecution_mode :: (Maybe ExecutionMode -> f (Maybe ExecutionMode))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_mode = (StartAutomationExecution -> Maybe ExecutionMode)
-> (StartAutomationExecution
-> Maybe ExecutionMode -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe ExecutionMode)
(Maybe ExecutionMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe ExecutionMode
mode :: Maybe ExecutionMode
$sel:mode:StartAutomationExecution' :: StartAutomationExecution -> Maybe ExecutionMode
mode} -> Maybe ExecutionMode
mode) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe ExecutionMode
a -> StartAutomationExecution
s {$sel:mode:StartAutomationExecution' :: Maybe ExecutionMode
mode = Maybe ExecutionMode
a} :: StartAutomationExecution)
startAutomationExecution_targetMaps :: Lens.Lens' StartAutomationExecution (Prelude.Maybe [Prelude.HashMap Prelude.Text [Prelude.Text]])
startAutomationExecution_targetMaps :: (Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_targetMaps = (StartAutomationExecution -> Maybe [HashMap Text [Text]])
-> (StartAutomationExecution
-> Maybe [HashMap Text [Text]] -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(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 (\StartAutomationExecution' {Maybe [HashMap Text [Text]]
targetMaps :: Maybe [HashMap Text [Text]]
$sel:targetMaps:StartAutomationExecution' :: StartAutomationExecution -> Maybe [HashMap Text [Text]]
targetMaps} -> Maybe [HashMap Text [Text]]
targetMaps) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe [HashMap Text [Text]]
a -> StartAutomationExecution
s {$sel:targetMaps:StartAutomationExecution' :: Maybe [HashMap Text [Text]]
targetMaps = Maybe [HashMap Text [Text]]
a} :: StartAutomationExecution) ((Maybe [HashMap Text [Text]] -> f (Maybe [HashMap Text [Text]]))
-> StartAutomationExecution -> f StartAutomationExecution)
-> ((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]]))
-> StartAutomationExecution
-> f StartAutomationExecution
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
startAutomationExecution_maxErrors :: Lens.Lens' StartAutomationExecution (Prelude.Maybe Prelude.Text)
startAutomationExecution_maxErrors :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_maxErrors = (StartAutomationExecution -> Maybe Text)
-> (StartAutomationExecution
-> Maybe Text -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe Text
maxErrors :: Maybe Text
$sel:maxErrors:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
maxErrors} -> Maybe Text
maxErrors) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe Text
a -> StartAutomationExecution
s {$sel:maxErrors:StartAutomationExecution' :: Maybe Text
maxErrors = Maybe Text
a} :: StartAutomationExecution)
startAutomationExecution_targets :: Lens.Lens' StartAutomationExecution (Prelude.Maybe [Target])
startAutomationExecution_targets :: (Maybe [Target] -> f (Maybe [Target]))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_targets = (StartAutomationExecution -> Maybe [Target])
-> (StartAutomationExecution
-> Maybe [Target] -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe [Target])
(Maybe [Target])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe [Target]
targets :: Maybe [Target]
$sel:targets:StartAutomationExecution' :: StartAutomationExecution -> Maybe [Target]
targets} -> Maybe [Target]
targets) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe [Target]
a -> StartAutomationExecution
s {$sel:targets:StartAutomationExecution' :: Maybe [Target]
targets = Maybe [Target]
a} :: StartAutomationExecution) ((Maybe [Target] -> f (Maybe [Target]))
-> StartAutomationExecution -> f StartAutomationExecution)
-> ((Maybe [Target] -> f (Maybe [Target]))
-> Maybe [Target] -> f (Maybe [Target]))
-> (Maybe [Target] -> f (Maybe [Target]))
-> StartAutomationExecution
-> f StartAutomationExecution
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
startAutomationExecution_parameters :: Lens.Lens' StartAutomationExecution (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
startAutomationExecution_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_parameters = (StartAutomationExecution -> Maybe (HashMap Text [Text]))
-> (StartAutomationExecution
-> Maybe (HashMap Text [Text]) -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(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 (\StartAutomationExecution' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:StartAutomationExecution' :: StartAutomationExecution -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe (HashMap Text [Text])
a -> StartAutomationExecution
s {$sel:parameters:StartAutomationExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: StartAutomationExecution) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> StartAutomationExecution -> f StartAutomationExecution)
-> ((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])))
-> StartAutomationExecution
-> f StartAutomationExecution
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
startAutomationExecution_documentVersion :: Lens.Lens' StartAutomationExecution (Prelude.Maybe Prelude.Text)
startAutomationExecution_documentVersion :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_documentVersion = (StartAutomationExecution -> Maybe Text)
-> (StartAutomationExecution
-> Maybe Text -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe Text
a -> StartAutomationExecution
s {$sel:documentVersion:StartAutomationExecution' :: Maybe Text
documentVersion = Maybe Text
a} :: StartAutomationExecution)
startAutomationExecution_tags :: Lens.Lens' StartAutomationExecution (Prelude.Maybe [Tag])
startAutomationExecution_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_tags = (StartAutomationExecution -> Maybe [Tag])
-> (StartAutomationExecution
-> Maybe [Tag] -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartAutomationExecution' :: StartAutomationExecution -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe [Tag]
a -> StartAutomationExecution
s {$sel:tags:StartAutomationExecution' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartAutomationExecution) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartAutomationExecution -> f StartAutomationExecution)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartAutomationExecution
-> f StartAutomationExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startAutomationExecution_maxConcurrency :: Lens.Lens' StartAutomationExecution (Prelude.Maybe Prelude.Text)
startAutomationExecution_maxConcurrency :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_maxConcurrency = (StartAutomationExecution -> Maybe Text)
-> (StartAutomationExecution
-> Maybe Text -> StartAutomationExecution)
-> Lens
StartAutomationExecution
StartAutomationExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Maybe Text
maxConcurrency :: Maybe Text
$sel:maxConcurrency:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
maxConcurrency} -> Maybe Text
maxConcurrency) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Maybe Text
a -> StartAutomationExecution
s {$sel:maxConcurrency:StartAutomationExecution' :: Maybe Text
maxConcurrency = Maybe Text
a} :: StartAutomationExecution)
startAutomationExecution_documentName :: Lens.Lens' StartAutomationExecution Prelude.Text
startAutomationExecution_documentName :: (Text -> f Text)
-> StartAutomationExecution -> f StartAutomationExecution
startAutomationExecution_documentName = (StartAutomationExecution -> Text)
-> (StartAutomationExecution -> Text -> StartAutomationExecution)
-> Lens StartAutomationExecution StartAutomationExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecution' {Text
documentName :: Text
$sel:documentName:StartAutomationExecution' :: StartAutomationExecution -> Text
documentName} -> Text
documentName) (\s :: StartAutomationExecution
s@StartAutomationExecution' {} Text
a -> StartAutomationExecution
s {$sel:documentName:StartAutomationExecution' :: Text
documentName = Text
a} :: StartAutomationExecution)
instance Core.AWSRequest StartAutomationExecution where
type
AWSResponse StartAutomationExecution =
StartAutomationExecutionResponse
request :: StartAutomationExecution -> Request StartAutomationExecution
request = Service
-> StartAutomationExecution -> Request StartAutomationExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartAutomationExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartAutomationExecution)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartAutomationExecution))
-> Logger
-> Service
-> Proxy StartAutomationExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartAutomationExecution)))
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 -> Int -> StartAutomationExecutionResponse
StartAutomationExecutionResponse'
(Maybe Text -> Int -> StartAutomationExecutionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartAutomationExecutionResponse)
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
"AutomationExecutionId")
Either String (Int -> StartAutomationExecutionResponse)
-> Either String Int
-> Either String StartAutomationExecutionResponse
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 StartAutomationExecution
instance Prelude.NFData StartAutomationExecution
instance Core.ToHeaders StartAutomationExecution where
toHeaders :: StartAutomationExecution -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartAutomationExecution -> 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.StartAutomationExecution" ::
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 StartAutomationExecution where
toJSON :: StartAutomationExecution -> Value
toJSON StartAutomationExecution' {Maybe [HashMap Text [Text]]
Maybe [Tag]
Maybe [Target]
Maybe (NonEmpty TargetLocation)
Maybe Text
Maybe (HashMap Text [Text])
Maybe ExecutionMode
Text
documentName :: Text
maxConcurrency :: Maybe Text
tags :: Maybe [Tag]
documentVersion :: Maybe Text
parameters :: Maybe (HashMap Text [Text])
targets :: Maybe [Target]
maxErrors :: Maybe Text
targetMaps :: Maybe [HashMap Text [Text]]
mode :: Maybe ExecutionMode
clientToken :: Maybe Text
targetLocations :: Maybe (NonEmpty TargetLocation)
targetParameterName :: Maybe Text
$sel:documentName:StartAutomationExecution' :: StartAutomationExecution -> Text
$sel:maxConcurrency:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
$sel:tags:StartAutomationExecution' :: StartAutomationExecution -> Maybe [Tag]
$sel:documentVersion:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
$sel:parameters:StartAutomationExecution' :: StartAutomationExecution -> Maybe (HashMap Text [Text])
$sel:targets:StartAutomationExecution' :: StartAutomationExecution -> Maybe [Target]
$sel:maxErrors:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
$sel:targetMaps:StartAutomationExecution' :: StartAutomationExecution -> Maybe [HashMap Text [Text]]
$sel:mode:StartAutomationExecution' :: StartAutomationExecution -> Maybe ExecutionMode
$sel:clientToken:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
$sel:targetLocations:StartAutomationExecution' :: StartAutomationExecution -> Maybe (NonEmpty TargetLocation)
$sel:targetParameterName:StartAutomationExecution' :: StartAutomationExecution -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TargetParameterName" 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
targetParameterName,
(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
"ClientToken" 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
clientToken,
(Text
"Mode" Text -> ExecutionMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ExecutionMode -> Pair) -> Maybe ExecutionMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExecutionMode
mode,
(Text
"TargetMaps" 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]]
targetMaps,
(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
"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
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(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
"DocumentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
documentName)
]
)
instance Core.ToPath StartAutomationExecution where
toPath :: StartAutomationExecution -> ByteString
toPath = ByteString -> StartAutomationExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartAutomationExecution where
toQuery :: StartAutomationExecution -> QueryString
toQuery = QueryString -> StartAutomationExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartAutomationExecutionResponse = StartAutomationExecutionResponse'
{
StartAutomationExecutionResponse -> Maybe Text
automationExecutionId :: Prelude.Maybe Prelude.Text,
StartAutomationExecutionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool
(StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool)
-> (StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool)
-> Eq StartAutomationExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool
$c/= :: StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool
== :: StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool
$c== :: StartAutomationExecutionResponse
-> StartAutomationExecutionResponse -> Bool
Prelude.Eq, ReadPrec [StartAutomationExecutionResponse]
ReadPrec StartAutomationExecutionResponse
Int -> ReadS StartAutomationExecutionResponse
ReadS [StartAutomationExecutionResponse]
(Int -> ReadS StartAutomationExecutionResponse)
-> ReadS [StartAutomationExecutionResponse]
-> ReadPrec StartAutomationExecutionResponse
-> ReadPrec [StartAutomationExecutionResponse]
-> Read StartAutomationExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartAutomationExecutionResponse]
$creadListPrec :: ReadPrec [StartAutomationExecutionResponse]
readPrec :: ReadPrec StartAutomationExecutionResponse
$creadPrec :: ReadPrec StartAutomationExecutionResponse
readList :: ReadS [StartAutomationExecutionResponse]
$creadList :: ReadS [StartAutomationExecutionResponse]
readsPrec :: Int -> ReadS StartAutomationExecutionResponse
$creadsPrec :: Int -> ReadS StartAutomationExecutionResponse
Prelude.Read, Int -> StartAutomationExecutionResponse -> ShowS
[StartAutomationExecutionResponse] -> ShowS
StartAutomationExecutionResponse -> String
(Int -> StartAutomationExecutionResponse -> ShowS)
-> (StartAutomationExecutionResponse -> String)
-> ([StartAutomationExecutionResponse] -> ShowS)
-> Show StartAutomationExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartAutomationExecutionResponse] -> ShowS
$cshowList :: [StartAutomationExecutionResponse] -> ShowS
show :: StartAutomationExecutionResponse -> String
$cshow :: StartAutomationExecutionResponse -> String
showsPrec :: Int -> StartAutomationExecutionResponse -> ShowS
$cshowsPrec :: Int -> StartAutomationExecutionResponse -> ShowS
Prelude.Show, (forall x.
StartAutomationExecutionResponse
-> Rep StartAutomationExecutionResponse x)
-> (forall x.
Rep StartAutomationExecutionResponse x
-> StartAutomationExecutionResponse)
-> Generic StartAutomationExecutionResponse
forall x.
Rep StartAutomationExecutionResponse x
-> StartAutomationExecutionResponse
forall x.
StartAutomationExecutionResponse
-> Rep StartAutomationExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartAutomationExecutionResponse x
-> StartAutomationExecutionResponse
$cfrom :: forall x.
StartAutomationExecutionResponse
-> Rep StartAutomationExecutionResponse x
Prelude.Generic)
newStartAutomationExecutionResponse ::
Prelude.Int ->
StartAutomationExecutionResponse
newStartAutomationExecutionResponse :: Int -> StartAutomationExecutionResponse
newStartAutomationExecutionResponse Int
pHttpStatus_ =
StartAutomationExecutionResponse' :: Maybe Text -> Int -> StartAutomationExecutionResponse
StartAutomationExecutionResponse'
{ $sel:automationExecutionId:StartAutomationExecutionResponse' :: Maybe Text
automationExecutionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartAutomationExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startAutomationExecutionResponse_automationExecutionId :: Lens.Lens' StartAutomationExecutionResponse (Prelude.Maybe Prelude.Text)
startAutomationExecutionResponse_automationExecutionId :: (Maybe Text -> f (Maybe Text))
-> StartAutomationExecutionResponse
-> f StartAutomationExecutionResponse
startAutomationExecutionResponse_automationExecutionId = (StartAutomationExecutionResponse -> Maybe Text)
-> (StartAutomationExecutionResponse
-> Maybe Text -> StartAutomationExecutionResponse)
-> Lens
StartAutomationExecutionResponse
StartAutomationExecutionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecutionResponse' {Maybe Text
automationExecutionId :: Maybe Text
$sel:automationExecutionId:StartAutomationExecutionResponse' :: StartAutomationExecutionResponse -> Maybe Text
automationExecutionId} -> Maybe Text
automationExecutionId) (\s :: StartAutomationExecutionResponse
s@StartAutomationExecutionResponse' {} Maybe Text
a -> StartAutomationExecutionResponse
s {$sel:automationExecutionId:StartAutomationExecutionResponse' :: Maybe Text
automationExecutionId = Maybe Text
a} :: StartAutomationExecutionResponse)
startAutomationExecutionResponse_httpStatus :: Lens.Lens' StartAutomationExecutionResponse Prelude.Int
startAutomationExecutionResponse_httpStatus :: (Int -> f Int)
-> StartAutomationExecutionResponse
-> f StartAutomationExecutionResponse
startAutomationExecutionResponse_httpStatus = (StartAutomationExecutionResponse -> Int)
-> (StartAutomationExecutionResponse
-> Int -> StartAutomationExecutionResponse)
-> Lens
StartAutomationExecutionResponse
StartAutomationExecutionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartAutomationExecutionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartAutomationExecutionResponse' :: StartAutomationExecutionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartAutomationExecutionResponse
s@StartAutomationExecutionResponse' {} Int
a -> StartAutomationExecutionResponse
s {$sel:httpStatus:StartAutomationExecutionResponse' :: Int
httpStatus = Int
a} :: StartAutomationExecutionResponse)
instance
Prelude.NFData
StartAutomationExecutionResponse