{-# 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.CloudFormation.ExecuteChangeSet
(
ExecuteChangeSet (..),
newExecuteChangeSet,
executeChangeSet_clientRequestToken,
executeChangeSet_disableRollback,
executeChangeSet_stackName,
executeChangeSet_changeSetName,
ExecuteChangeSetResponse (..),
newExecuteChangeSetResponse,
executeChangeSetResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ExecuteChangeSet = ExecuteChangeSet'
{
ExecuteChangeSet -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
ExecuteChangeSet -> Maybe Bool
disableRollback :: Prelude.Maybe Prelude.Bool,
ExecuteChangeSet -> Maybe Text
stackName :: Prelude.Maybe Prelude.Text,
ExecuteChangeSet -> Text
changeSetName :: Prelude.Text
}
deriving (ExecuteChangeSet -> ExecuteChangeSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteChangeSet -> ExecuteChangeSet -> Bool
$c/= :: ExecuteChangeSet -> ExecuteChangeSet -> Bool
== :: ExecuteChangeSet -> ExecuteChangeSet -> Bool
$c== :: ExecuteChangeSet -> ExecuteChangeSet -> Bool
Prelude.Eq, ReadPrec [ExecuteChangeSet]
ReadPrec ExecuteChangeSet
Int -> ReadS ExecuteChangeSet
ReadS [ExecuteChangeSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteChangeSet]
$creadListPrec :: ReadPrec [ExecuteChangeSet]
readPrec :: ReadPrec ExecuteChangeSet
$creadPrec :: ReadPrec ExecuteChangeSet
readList :: ReadS [ExecuteChangeSet]
$creadList :: ReadS [ExecuteChangeSet]
readsPrec :: Int -> ReadS ExecuteChangeSet
$creadsPrec :: Int -> ReadS ExecuteChangeSet
Prelude.Read, Int -> ExecuteChangeSet -> ShowS
[ExecuteChangeSet] -> ShowS
ExecuteChangeSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteChangeSet] -> ShowS
$cshowList :: [ExecuteChangeSet] -> ShowS
show :: ExecuteChangeSet -> String
$cshow :: ExecuteChangeSet -> String
showsPrec :: Int -> ExecuteChangeSet -> ShowS
$cshowsPrec :: Int -> ExecuteChangeSet -> ShowS
Prelude.Show, forall x. Rep ExecuteChangeSet x -> ExecuteChangeSet
forall x. ExecuteChangeSet -> Rep ExecuteChangeSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExecuteChangeSet x -> ExecuteChangeSet
$cfrom :: forall x. ExecuteChangeSet -> Rep ExecuteChangeSet x
Prelude.Generic)
newExecuteChangeSet ::
Prelude.Text ->
ExecuteChangeSet
newExecuteChangeSet :: Text -> ExecuteChangeSet
newExecuteChangeSet Text
pChangeSetName_ =
ExecuteChangeSet'
{ $sel:clientRequestToken:ExecuteChangeSet' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:disableRollback:ExecuteChangeSet' :: Maybe Bool
disableRollback = forall a. Maybe a
Prelude.Nothing,
$sel:stackName:ExecuteChangeSet' :: Maybe Text
stackName = forall a. Maybe a
Prelude.Nothing,
$sel:changeSetName:ExecuteChangeSet' :: Text
changeSetName = Text
pChangeSetName_
}
executeChangeSet_clientRequestToken :: Lens.Lens' ExecuteChangeSet (Prelude.Maybe Prelude.Text)
executeChangeSet_clientRequestToken :: Lens' ExecuteChangeSet (Maybe Text)
executeChangeSet_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteChangeSet' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: ExecuteChangeSet
s@ExecuteChangeSet' {} Maybe Text
a -> ExecuteChangeSet
s {$sel:clientRequestToken:ExecuteChangeSet' :: Maybe Text
clientRequestToken = Maybe Text
a} :: ExecuteChangeSet)
executeChangeSet_disableRollback :: Lens.Lens' ExecuteChangeSet (Prelude.Maybe Prelude.Bool)
executeChangeSet_disableRollback :: Lens' ExecuteChangeSet (Maybe Bool)
executeChangeSet_disableRollback = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteChangeSet' {Maybe Bool
disableRollback :: Maybe Bool
$sel:disableRollback:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Bool
disableRollback} -> Maybe Bool
disableRollback) (\s :: ExecuteChangeSet
s@ExecuteChangeSet' {} Maybe Bool
a -> ExecuteChangeSet
s {$sel:disableRollback:ExecuteChangeSet' :: Maybe Bool
disableRollback = Maybe Bool
a} :: ExecuteChangeSet)
executeChangeSet_stackName :: Lens.Lens' ExecuteChangeSet (Prelude.Maybe Prelude.Text)
executeChangeSet_stackName :: Lens' ExecuteChangeSet (Maybe Text)
executeChangeSet_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteChangeSet' {Maybe Text
stackName :: Maybe Text
$sel:stackName:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
stackName} -> Maybe Text
stackName) (\s :: ExecuteChangeSet
s@ExecuteChangeSet' {} Maybe Text
a -> ExecuteChangeSet
s {$sel:stackName:ExecuteChangeSet' :: Maybe Text
stackName = Maybe Text
a} :: ExecuteChangeSet)
executeChangeSet_changeSetName :: Lens.Lens' ExecuteChangeSet Prelude.Text
executeChangeSet_changeSetName :: Lens' ExecuteChangeSet Text
executeChangeSet_changeSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteChangeSet' {Text
changeSetName :: Text
$sel:changeSetName:ExecuteChangeSet' :: ExecuteChangeSet -> Text
changeSetName} -> Text
changeSetName) (\s :: ExecuteChangeSet
s@ExecuteChangeSet' {} Text
a -> ExecuteChangeSet
s {$sel:changeSetName:ExecuteChangeSet' :: Text
changeSetName = Text
a} :: ExecuteChangeSet)
instance Core.AWSRequest ExecuteChangeSet where
type
AWSResponse ExecuteChangeSet =
ExecuteChangeSetResponse
request :: (Service -> Service)
-> ExecuteChangeSet -> Request ExecuteChangeSet
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ExecuteChangeSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ExecuteChangeSet)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"ExecuteChangeSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> ExecuteChangeSetResponse
ExecuteChangeSetResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ExecuteChangeSet where
hashWithSalt :: Int -> ExecuteChangeSet -> Int
hashWithSalt Int
_salt ExecuteChangeSet' {Maybe Bool
Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:changeSetName:ExecuteChangeSet' :: ExecuteChangeSet -> Text
$sel:stackName:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
$sel:disableRollback:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Bool
$sel:clientRequestToken:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
disableRollback
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
changeSetName
instance Prelude.NFData ExecuteChangeSet where
rnf :: ExecuteChangeSet -> ()
rnf ExecuteChangeSet' {Maybe Bool
Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:changeSetName:ExecuteChangeSet' :: ExecuteChangeSet -> Text
$sel:stackName:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
$sel:disableRollback:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Bool
$sel:clientRequestToken:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
disableRollback
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
changeSetName
instance Data.ToHeaders ExecuteChangeSet where
toHeaders :: ExecuteChangeSet -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath ExecuteChangeSet where
toPath :: ExecuteChangeSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery ExecuteChangeSet where
toQuery :: ExecuteChangeSet -> QueryString
toQuery ExecuteChangeSet' {Maybe Bool
Maybe Text
Text
changeSetName :: Text
stackName :: Maybe Text
disableRollback :: Maybe Bool
clientRequestToken :: Maybe Text
$sel:changeSetName:ExecuteChangeSet' :: ExecuteChangeSet -> Text
$sel:stackName:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
$sel:disableRollback:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Bool
$sel:clientRequestToken:ExecuteChangeSet' :: ExecuteChangeSet -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ExecuteChangeSet" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"ClientRequestToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientRequestToken,
ByteString
"DisableRollback" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
disableRollback,
ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
stackName,
ByteString
"ChangeSetName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
changeSetName
]
data ExecuteChangeSetResponse = ExecuteChangeSetResponse'
{
ExecuteChangeSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ExecuteChangeSetResponse -> ExecuteChangeSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExecuteChangeSetResponse -> ExecuteChangeSetResponse -> Bool
$c/= :: ExecuteChangeSetResponse -> ExecuteChangeSetResponse -> Bool
== :: ExecuteChangeSetResponse -> ExecuteChangeSetResponse -> Bool
$c== :: ExecuteChangeSetResponse -> ExecuteChangeSetResponse -> Bool
Prelude.Eq, ReadPrec [ExecuteChangeSetResponse]
ReadPrec ExecuteChangeSetResponse
Int -> ReadS ExecuteChangeSetResponse
ReadS [ExecuteChangeSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExecuteChangeSetResponse]
$creadListPrec :: ReadPrec [ExecuteChangeSetResponse]
readPrec :: ReadPrec ExecuteChangeSetResponse
$creadPrec :: ReadPrec ExecuteChangeSetResponse
readList :: ReadS [ExecuteChangeSetResponse]
$creadList :: ReadS [ExecuteChangeSetResponse]
readsPrec :: Int -> ReadS ExecuteChangeSetResponse
$creadsPrec :: Int -> ReadS ExecuteChangeSetResponse
Prelude.Read, Int -> ExecuteChangeSetResponse -> ShowS
[ExecuteChangeSetResponse] -> ShowS
ExecuteChangeSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExecuteChangeSetResponse] -> ShowS
$cshowList :: [ExecuteChangeSetResponse] -> ShowS
show :: ExecuteChangeSetResponse -> String
$cshow :: ExecuteChangeSetResponse -> String
showsPrec :: Int -> ExecuteChangeSetResponse -> ShowS
$cshowsPrec :: Int -> ExecuteChangeSetResponse -> ShowS
Prelude.Show, forall x.
Rep ExecuteChangeSetResponse x -> ExecuteChangeSetResponse
forall x.
ExecuteChangeSetResponse -> Rep ExecuteChangeSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExecuteChangeSetResponse x -> ExecuteChangeSetResponse
$cfrom :: forall x.
ExecuteChangeSetResponse -> Rep ExecuteChangeSetResponse x
Prelude.Generic)
newExecuteChangeSetResponse ::
Prelude.Int ->
ExecuteChangeSetResponse
newExecuteChangeSetResponse :: Int -> ExecuteChangeSetResponse
newExecuteChangeSetResponse Int
pHttpStatus_ =
ExecuteChangeSetResponse'
{ $sel:httpStatus:ExecuteChangeSetResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
executeChangeSetResponse_httpStatus :: Lens.Lens' ExecuteChangeSetResponse Prelude.Int
executeChangeSetResponse_httpStatus :: Lens' ExecuteChangeSetResponse Int
executeChangeSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExecuteChangeSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:ExecuteChangeSetResponse' :: ExecuteChangeSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ExecuteChangeSetResponse
s@ExecuteChangeSetResponse' {} Int
a -> ExecuteChangeSetResponse
s {$sel:httpStatus:ExecuteChangeSetResponse' :: Int
httpStatus = Int
a} :: ExecuteChangeSetResponse)
instance Prelude.NFData ExecuteChangeSetResponse where
rnf :: ExecuteChangeSetResponse -> ()
rnf ExecuteChangeSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:ExecuteChangeSetResponse' :: ExecuteChangeSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus