{-# 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.StartChangeRequestExecution
(
StartChangeRequestExecution (..),
newStartChangeRequestExecution,
startChangeRequestExecution_scheduledTime,
startChangeRequestExecution_changeDetails,
startChangeRequestExecution_clientToken,
startChangeRequestExecution_autoApprove,
startChangeRequestExecution_scheduledEndTime,
startChangeRequestExecution_parameters,
startChangeRequestExecution_documentVersion,
startChangeRequestExecution_changeRequestName,
startChangeRequestExecution_tags,
startChangeRequestExecution_documentName,
startChangeRequestExecution_runbooks,
StartChangeRequestExecutionResponse (..),
newStartChangeRequestExecutionResponse,
startChangeRequestExecutionResponse_automationExecutionId,
startChangeRequestExecutionResponse_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 StartChangeRequestExecution = StartChangeRequestExecution'
{
StartChangeRequestExecution -> Maybe POSIX
scheduledTime :: Prelude.Maybe Core.POSIX,
StartChangeRequestExecution -> Maybe Text
changeDetails :: Prelude.Maybe Prelude.Text,
StartChangeRequestExecution -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartChangeRequestExecution -> Maybe Bool
autoApprove :: Prelude.Maybe Prelude.Bool,
StartChangeRequestExecution -> Maybe POSIX
scheduledEndTime :: Prelude.Maybe Core.POSIX,
StartChangeRequestExecution -> Maybe (HashMap Text [Text])
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]),
StartChangeRequestExecution -> Maybe Text
documentVersion :: Prelude.Maybe Prelude.Text,
StartChangeRequestExecution -> Maybe Text
changeRequestName :: Prelude.Maybe Prelude.Text,
StartChangeRequestExecution -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
StartChangeRequestExecution -> Text
documentName :: Prelude.Text,
StartChangeRequestExecution -> NonEmpty Runbook
runbooks :: Prelude.NonEmpty Runbook
}
deriving (StartChangeRequestExecution -> StartChangeRequestExecution -> Bool
(StartChangeRequestExecution
-> StartChangeRequestExecution -> Bool)
-> (StartChangeRequestExecution
-> StartChangeRequestExecution -> Bool)
-> Eq StartChangeRequestExecution
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChangeRequestExecution -> StartChangeRequestExecution -> Bool
$c/= :: StartChangeRequestExecution -> StartChangeRequestExecution -> Bool
== :: StartChangeRequestExecution -> StartChangeRequestExecution -> Bool
$c== :: StartChangeRequestExecution -> StartChangeRequestExecution -> Bool
Prelude.Eq, ReadPrec [StartChangeRequestExecution]
ReadPrec StartChangeRequestExecution
Int -> ReadS StartChangeRequestExecution
ReadS [StartChangeRequestExecution]
(Int -> ReadS StartChangeRequestExecution)
-> ReadS [StartChangeRequestExecution]
-> ReadPrec StartChangeRequestExecution
-> ReadPrec [StartChangeRequestExecution]
-> Read StartChangeRequestExecution
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChangeRequestExecution]
$creadListPrec :: ReadPrec [StartChangeRequestExecution]
readPrec :: ReadPrec StartChangeRequestExecution
$creadPrec :: ReadPrec StartChangeRequestExecution
readList :: ReadS [StartChangeRequestExecution]
$creadList :: ReadS [StartChangeRequestExecution]
readsPrec :: Int -> ReadS StartChangeRequestExecution
$creadsPrec :: Int -> ReadS StartChangeRequestExecution
Prelude.Read, Int -> StartChangeRequestExecution -> ShowS
[StartChangeRequestExecution] -> ShowS
StartChangeRequestExecution -> String
(Int -> StartChangeRequestExecution -> ShowS)
-> (StartChangeRequestExecution -> String)
-> ([StartChangeRequestExecution] -> ShowS)
-> Show StartChangeRequestExecution
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChangeRequestExecution] -> ShowS
$cshowList :: [StartChangeRequestExecution] -> ShowS
show :: StartChangeRequestExecution -> String
$cshow :: StartChangeRequestExecution -> String
showsPrec :: Int -> StartChangeRequestExecution -> ShowS
$cshowsPrec :: Int -> StartChangeRequestExecution -> ShowS
Prelude.Show, (forall x.
StartChangeRequestExecution -> Rep StartChangeRequestExecution x)
-> (forall x.
Rep StartChangeRequestExecution x -> StartChangeRequestExecution)
-> Generic StartChangeRequestExecution
forall x.
Rep StartChangeRequestExecution x -> StartChangeRequestExecution
forall x.
StartChangeRequestExecution -> Rep StartChangeRequestExecution x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartChangeRequestExecution x -> StartChangeRequestExecution
$cfrom :: forall x.
StartChangeRequestExecution -> Rep StartChangeRequestExecution x
Prelude.Generic)
newStartChangeRequestExecution ::
Prelude.Text ->
Prelude.NonEmpty Runbook ->
StartChangeRequestExecution
newStartChangeRequestExecution :: Text -> NonEmpty Runbook -> StartChangeRequestExecution
newStartChangeRequestExecution
Text
pDocumentName_
NonEmpty Runbook
pRunbooks_ =
StartChangeRequestExecution' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe (HashMap Text [Text])
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> NonEmpty Runbook
-> StartChangeRequestExecution
StartChangeRequestExecution'
{ $sel:scheduledTime:StartChangeRequestExecution' :: Maybe POSIX
scheduledTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:changeDetails:StartChangeRequestExecution' :: Maybe Text
changeDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:StartChangeRequestExecution' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoApprove:StartChangeRequestExecution' :: Maybe Bool
autoApprove = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:scheduledEndTime:StartChangeRequestExecution' :: Maybe POSIX
scheduledEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:StartChangeRequestExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:documentVersion:StartChangeRequestExecution' :: Maybe Text
documentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:changeRequestName:StartChangeRequestExecution' :: Maybe Text
changeRequestName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartChangeRequestExecution' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:documentName:StartChangeRequestExecution' :: Text
documentName = Text
pDocumentName_,
$sel:runbooks:StartChangeRequestExecution' :: NonEmpty Runbook
runbooks = Tagged (NonEmpty Runbook) (Identity (NonEmpty Runbook))
-> Tagged (NonEmpty Runbook) (Identity (NonEmpty Runbook))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Runbook) (Identity (NonEmpty Runbook))
-> Tagged (NonEmpty Runbook) (Identity (NonEmpty Runbook)))
-> NonEmpty Runbook -> NonEmpty Runbook
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Runbook
pRunbooks_
}
startChangeRequestExecution_scheduledTime :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.UTCTime)
startChangeRequestExecution_scheduledTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_scheduledTime = (StartChangeRequestExecution -> Maybe POSIX)
-> (StartChangeRequestExecution
-> Maybe POSIX -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe POSIX
scheduledTime :: Maybe POSIX
$sel:scheduledTime:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe POSIX
scheduledTime} -> Maybe POSIX
scheduledTime) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe POSIX
a -> StartChangeRequestExecution
s {$sel:scheduledTime:StartChangeRequestExecution' :: Maybe POSIX
scheduledTime = Maybe POSIX
a} :: StartChangeRequestExecution) ((Maybe POSIX -> f (Maybe POSIX))
-> StartChangeRequestExecution -> f StartChangeRequestExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartChangeRequestExecution
-> f StartChangeRequestExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
startChangeRequestExecution_changeDetails :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.Text)
startChangeRequestExecution_changeDetails :: (Maybe Text -> f (Maybe Text))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_changeDetails = (StartChangeRequestExecution -> Maybe Text)
-> (StartChangeRequestExecution
-> Maybe Text -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe Text
changeDetails :: Maybe Text
$sel:changeDetails:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
changeDetails} -> Maybe Text
changeDetails) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe Text
a -> StartChangeRequestExecution
s {$sel:changeDetails:StartChangeRequestExecution' :: Maybe Text
changeDetails = Maybe Text
a} :: StartChangeRequestExecution)
startChangeRequestExecution_clientToken :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.Text)
startChangeRequestExecution_clientToken :: (Maybe Text -> f (Maybe Text))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_clientToken = (StartChangeRequestExecution -> Maybe Text)
-> (StartChangeRequestExecution
-> Maybe Text -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe Text
a -> StartChangeRequestExecution
s {$sel:clientToken:StartChangeRequestExecution' :: Maybe Text
clientToken = Maybe Text
a} :: StartChangeRequestExecution)
startChangeRequestExecution_autoApprove :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.Bool)
startChangeRequestExecution_autoApprove :: (Maybe Bool -> f (Maybe Bool))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_autoApprove = (StartChangeRequestExecution -> Maybe Bool)
-> (StartChangeRequestExecution
-> Maybe Bool -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe Bool
autoApprove :: Maybe Bool
$sel:autoApprove:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Bool
autoApprove} -> Maybe Bool
autoApprove) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe Bool
a -> StartChangeRequestExecution
s {$sel:autoApprove:StartChangeRequestExecution' :: Maybe Bool
autoApprove = Maybe Bool
a} :: StartChangeRequestExecution)
startChangeRequestExecution_scheduledEndTime :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.UTCTime)
startChangeRequestExecution_scheduledEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_scheduledEndTime = (StartChangeRequestExecution -> Maybe POSIX)
-> (StartChangeRequestExecution
-> Maybe POSIX -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe POSIX
scheduledEndTime :: Maybe POSIX
$sel:scheduledEndTime:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe POSIX
scheduledEndTime} -> Maybe POSIX
scheduledEndTime) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe POSIX
a -> StartChangeRequestExecution
s {$sel:scheduledEndTime:StartChangeRequestExecution' :: Maybe POSIX
scheduledEndTime = Maybe POSIX
a} :: StartChangeRequestExecution) ((Maybe POSIX -> f (Maybe POSIX))
-> StartChangeRequestExecution -> f StartChangeRequestExecution)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartChangeRequestExecution
-> f StartChangeRequestExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
startChangeRequestExecution_parameters :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe (Prelude.HashMap Prelude.Text [Prelude.Text]))
startChangeRequestExecution_parameters :: (Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_parameters = (StartChangeRequestExecution -> Maybe (HashMap Text [Text]))
-> (StartChangeRequestExecution
-> Maybe (HashMap Text [Text]) -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(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 (\StartChangeRequestExecution' {Maybe (HashMap Text [Text])
parameters :: Maybe (HashMap Text [Text])
$sel:parameters:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe (HashMap Text [Text])
parameters} -> Maybe (HashMap Text [Text])
parameters) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe (HashMap Text [Text])
a -> StartChangeRequestExecution
s {$sel:parameters:StartChangeRequestExecution' :: Maybe (HashMap Text [Text])
parameters = Maybe (HashMap Text [Text])
a} :: StartChangeRequestExecution) ((Maybe (HashMap Text [Text]) -> f (Maybe (HashMap Text [Text])))
-> StartChangeRequestExecution -> f StartChangeRequestExecution)
-> ((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])))
-> StartChangeRequestExecution
-> f StartChangeRequestExecution
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
startChangeRequestExecution_documentVersion :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.Text)
startChangeRequestExecution_documentVersion :: (Maybe Text -> f (Maybe Text))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_documentVersion = (StartChangeRequestExecution -> Maybe Text)
-> (StartChangeRequestExecution
-> Maybe Text -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe Text
documentVersion :: Maybe Text
$sel:documentVersion:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
documentVersion} -> Maybe Text
documentVersion) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe Text
a -> StartChangeRequestExecution
s {$sel:documentVersion:StartChangeRequestExecution' :: Maybe Text
documentVersion = Maybe Text
a} :: StartChangeRequestExecution)
startChangeRequestExecution_changeRequestName :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe Prelude.Text)
startChangeRequestExecution_changeRequestName :: (Maybe Text -> f (Maybe Text))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_changeRequestName = (StartChangeRequestExecution -> Maybe Text)
-> (StartChangeRequestExecution
-> Maybe Text -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe Text
changeRequestName :: Maybe Text
$sel:changeRequestName:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
changeRequestName} -> Maybe Text
changeRequestName) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe Text
a -> StartChangeRequestExecution
s {$sel:changeRequestName:StartChangeRequestExecution' :: Maybe Text
changeRequestName = Maybe Text
a} :: StartChangeRequestExecution)
startChangeRequestExecution_tags :: Lens.Lens' StartChangeRequestExecution (Prelude.Maybe [Tag])
startChangeRequestExecution_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_tags = (StartChangeRequestExecution -> Maybe [Tag])
-> (StartChangeRequestExecution
-> Maybe [Tag] -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Maybe [Tag]
a -> StartChangeRequestExecution
s {$sel:tags:StartChangeRequestExecution' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: StartChangeRequestExecution) ((Maybe [Tag] -> f (Maybe [Tag]))
-> StartChangeRequestExecution -> f StartChangeRequestExecution)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> StartChangeRequestExecution
-> f StartChangeRequestExecution
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
startChangeRequestExecution_documentName :: Lens.Lens' StartChangeRequestExecution Prelude.Text
startChangeRequestExecution_documentName :: (Text -> f Text)
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_documentName = (StartChangeRequestExecution -> Text)
-> (StartChangeRequestExecution
-> Text -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution StartChangeRequestExecution Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {Text
documentName :: Text
$sel:documentName:StartChangeRequestExecution' :: StartChangeRequestExecution -> Text
documentName} -> Text
documentName) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} Text
a -> StartChangeRequestExecution
s {$sel:documentName:StartChangeRequestExecution' :: Text
documentName = Text
a} :: StartChangeRequestExecution)
startChangeRequestExecution_runbooks :: Lens.Lens' StartChangeRequestExecution (Prelude.NonEmpty Runbook)
startChangeRequestExecution_runbooks :: (NonEmpty Runbook -> f (NonEmpty Runbook))
-> StartChangeRequestExecution -> f StartChangeRequestExecution
startChangeRequestExecution_runbooks = (StartChangeRequestExecution -> NonEmpty Runbook)
-> (StartChangeRequestExecution
-> NonEmpty Runbook -> StartChangeRequestExecution)
-> Lens
StartChangeRequestExecution
StartChangeRequestExecution
(NonEmpty Runbook)
(NonEmpty Runbook)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecution' {NonEmpty Runbook
runbooks :: NonEmpty Runbook
$sel:runbooks:StartChangeRequestExecution' :: StartChangeRequestExecution -> NonEmpty Runbook
runbooks} -> NonEmpty Runbook
runbooks) (\s :: StartChangeRequestExecution
s@StartChangeRequestExecution' {} NonEmpty Runbook
a -> StartChangeRequestExecution
s {$sel:runbooks:StartChangeRequestExecution' :: NonEmpty Runbook
runbooks = NonEmpty Runbook
a} :: StartChangeRequestExecution) ((NonEmpty Runbook -> f (NonEmpty Runbook))
-> StartChangeRequestExecution -> f StartChangeRequestExecution)
-> ((NonEmpty Runbook -> f (NonEmpty Runbook))
-> NonEmpty Runbook -> f (NonEmpty Runbook))
-> (NonEmpty Runbook -> f (NonEmpty Runbook))
-> StartChangeRequestExecution
-> f StartChangeRequestExecution
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Runbook -> f (NonEmpty Runbook))
-> NonEmpty Runbook -> f (NonEmpty Runbook)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest StartChangeRequestExecution where
type
AWSResponse StartChangeRequestExecution =
StartChangeRequestExecutionResponse
request :: StartChangeRequestExecution -> Request StartChangeRequestExecution
request = Service
-> StartChangeRequestExecution
-> Request StartChangeRequestExecution
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartChangeRequestExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartChangeRequestExecution)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartChangeRequestExecution))
-> Logger
-> Service
-> Proxy StartChangeRequestExecution
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse StartChangeRequestExecution)))
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 -> StartChangeRequestExecutionResponse
StartChangeRequestExecutionResponse'
(Maybe Text -> Int -> StartChangeRequestExecutionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartChangeRequestExecutionResponse)
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 -> StartChangeRequestExecutionResponse)
-> Either String Int
-> Either String StartChangeRequestExecutionResponse
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 StartChangeRequestExecution
instance Prelude.NFData StartChangeRequestExecution
instance Core.ToHeaders StartChangeRequestExecution where
toHeaders :: StartChangeRequestExecution -> ResponseHeaders
toHeaders =
ResponseHeaders -> StartChangeRequestExecution -> 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.StartChangeRequestExecution" ::
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 StartChangeRequestExecution where
toJSON :: StartChangeRequestExecution -> Value
toJSON StartChangeRequestExecution' {Maybe Bool
Maybe [Tag]
Maybe Text
Maybe (HashMap Text [Text])
Maybe POSIX
NonEmpty Runbook
Text
runbooks :: NonEmpty Runbook
documentName :: Text
tags :: Maybe [Tag]
changeRequestName :: Maybe Text
documentVersion :: Maybe Text
parameters :: Maybe (HashMap Text [Text])
scheduledEndTime :: Maybe POSIX
autoApprove :: Maybe Bool
clientToken :: Maybe Text
changeDetails :: Maybe Text
scheduledTime :: Maybe POSIX
$sel:runbooks:StartChangeRequestExecution' :: StartChangeRequestExecution -> NonEmpty Runbook
$sel:documentName:StartChangeRequestExecution' :: StartChangeRequestExecution -> Text
$sel:tags:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe [Tag]
$sel:changeRequestName:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
$sel:documentVersion:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
$sel:parameters:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe (HashMap Text [Text])
$sel:scheduledEndTime:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe POSIX
$sel:autoApprove:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Bool
$sel:clientToken:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
$sel:changeDetails:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe Text
$sel:scheduledTime:StartChangeRequestExecution' :: StartChangeRequestExecution -> Maybe POSIX
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ScheduledTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
scheduledTime,
(Text
"ChangeDetails" 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
changeDetails,
(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
"AutoApprove" 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
autoApprove,
(Text
"ScheduledEndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
scheduledEndTime,
(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
"ChangeRequestName" 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
changeRequestName,
(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,
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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Runbooks" Text -> NonEmpty Runbook -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Runbook
runbooks)
]
)
instance Core.ToPath StartChangeRequestExecution where
toPath :: StartChangeRequestExecution -> ByteString
toPath = ByteString -> StartChangeRequestExecution -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery StartChangeRequestExecution where
toQuery :: StartChangeRequestExecution -> QueryString
toQuery = QueryString -> StartChangeRequestExecution -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartChangeRequestExecutionResponse = StartChangeRequestExecutionResponse'
{
StartChangeRequestExecutionResponse -> Maybe Text
automationExecutionId :: Prelude.Maybe Prelude.Text,
StartChangeRequestExecutionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool
(StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool)
-> (StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool)
-> Eq StartChangeRequestExecutionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool
$c/= :: StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool
== :: StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool
$c== :: StartChangeRequestExecutionResponse
-> StartChangeRequestExecutionResponse -> Bool
Prelude.Eq, ReadPrec [StartChangeRequestExecutionResponse]
ReadPrec StartChangeRequestExecutionResponse
Int -> ReadS StartChangeRequestExecutionResponse
ReadS [StartChangeRequestExecutionResponse]
(Int -> ReadS StartChangeRequestExecutionResponse)
-> ReadS [StartChangeRequestExecutionResponse]
-> ReadPrec StartChangeRequestExecutionResponse
-> ReadPrec [StartChangeRequestExecutionResponse]
-> Read StartChangeRequestExecutionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartChangeRequestExecutionResponse]
$creadListPrec :: ReadPrec [StartChangeRequestExecutionResponse]
readPrec :: ReadPrec StartChangeRequestExecutionResponse
$creadPrec :: ReadPrec StartChangeRequestExecutionResponse
readList :: ReadS [StartChangeRequestExecutionResponse]
$creadList :: ReadS [StartChangeRequestExecutionResponse]
readsPrec :: Int -> ReadS StartChangeRequestExecutionResponse
$creadsPrec :: Int -> ReadS StartChangeRequestExecutionResponse
Prelude.Read, Int -> StartChangeRequestExecutionResponse -> ShowS
[StartChangeRequestExecutionResponse] -> ShowS
StartChangeRequestExecutionResponse -> String
(Int -> StartChangeRequestExecutionResponse -> ShowS)
-> (StartChangeRequestExecutionResponse -> String)
-> ([StartChangeRequestExecutionResponse] -> ShowS)
-> Show StartChangeRequestExecutionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartChangeRequestExecutionResponse] -> ShowS
$cshowList :: [StartChangeRequestExecutionResponse] -> ShowS
show :: StartChangeRequestExecutionResponse -> String
$cshow :: StartChangeRequestExecutionResponse -> String
showsPrec :: Int -> StartChangeRequestExecutionResponse -> ShowS
$cshowsPrec :: Int -> StartChangeRequestExecutionResponse -> ShowS
Prelude.Show, (forall x.
StartChangeRequestExecutionResponse
-> Rep StartChangeRequestExecutionResponse x)
-> (forall x.
Rep StartChangeRequestExecutionResponse x
-> StartChangeRequestExecutionResponse)
-> Generic StartChangeRequestExecutionResponse
forall x.
Rep StartChangeRequestExecutionResponse x
-> StartChangeRequestExecutionResponse
forall x.
StartChangeRequestExecutionResponse
-> Rep StartChangeRequestExecutionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartChangeRequestExecutionResponse x
-> StartChangeRequestExecutionResponse
$cfrom :: forall x.
StartChangeRequestExecutionResponse
-> Rep StartChangeRequestExecutionResponse x
Prelude.Generic)
newStartChangeRequestExecutionResponse ::
Prelude.Int ->
StartChangeRequestExecutionResponse
newStartChangeRequestExecutionResponse :: Int -> StartChangeRequestExecutionResponse
newStartChangeRequestExecutionResponse Int
pHttpStatus_ =
StartChangeRequestExecutionResponse' :: Maybe Text -> Int -> StartChangeRequestExecutionResponse
StartChangeRequestExecutionResponse'
{ $sel:automationExecutionId:StartChangeRequestExecutionResponse' :: Maybe Text
automationExecutionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartChangeRequestExecutionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startChangeRequestExecutionResponse_automationExecutionId :: Lens.Lens' StartChangeRequestExecutionResponse (Prelude.Maybe Prelude.Text)
startChangeRequestExecutionResponse_automationExecutionId :: (Maybe Text -> f (Maybe Text))
-> StartChangeRequestExecutionResponse
-> f StartChangeRequestExecutionResponse
startChangeRequestExecutionResponse_automationExecutionId = (StartChangeRequestExecutionResponse -> Maybe Text)
-> (StartChangeRequestExecutionResponse
-> Maybe Text -> StartChangeRequestExecutionResponse)
-> Lens
StartChangeRequestExecutionResponse
StartChangeRequestExecutionResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecutionResponse' {Maybe Text
automationExecutionId :: Maybe Text
$sel:automationExecutionId:StartChangeRequestExecutionResponse' :: StartChangeRequestExecutionResponse -> Maybe Text
automationExecutionId} -> Maybe Text
automationExecutionId) (\s :: StartChangeRequestExecutionResponse
s@StartChangeRequestExecutionResponse' {} Maybe Text
a -> StartChangeRequestExecutionResponse
s {$sel:automationExecutionId:StartChangeRequestExecutionResponse' :: Maybe Text
automationExecutionId = Maybe Text
a} :: StartChangeRequestExecutionResponse)
startChangeRequestExecutionResponse_httpStatus :: Lens.Lens' StartChangeRequestExecutionResponse Prelude.Int
startChangeRequestExecutionResponse_httpStatus :: (Int -> f Int)
-> StartChangeRequestExecutionResponse
-> f StartChangeRequestExecutionResponse
startChangeRequestExecutionResponse_httpStatus = (StartChangeRequestExecutionResponse -> Int)
-> (StartChangeRequestExecutionResponse
-> Int -> StartChangeRequestExecutionResponse)
-> Lens
StartChangeRequestExecutionResponse
StartChangeRequestExecutionResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartChangeRequestExecutionResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartChangeRequestExecutionResponse' :: StartChangeRequestExecutionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartChangeRequestExecutionResponse
s@StartChangeRequestExecutionResponse' {} Int
a -> StartChangeRequestExecutionResponse
s {$sel:httpStatus:StartChangeRequestExecutionResponse' :: Int
httpStatus = Int
a} :: StartChangeRequestExecutionResponse)
instance
Prelude.NFData
StartChangeRequestExecutionResponse