{-# 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.CancelUpdateStack
(
CancelUpdateStack (..),
newCancelUpdateStack,
cancelUpdateStack_clientRequestToken,
cancelUpdateStack_stackName,
CancelUpdateStackResponse (..),
newCancelUpdateStackResponse,
)
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 CancelUpdateStack = CancelUpdateStack'
{
CancelUpdateStack -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
CancelUpdateStack -> Text
stackName :: Prelude.Text
}
deriving (CancelUpdateStack -> CancelUpdateStack -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelUpdateStack -> CancelUpdateStack -> Bool
$c/= :: CancelUpdateStack -> CancelUpdateStack -> Bool
== :: CancelUpdateStack -> CancelUpdateStack -> Bool
$c== :: CancelUpdateStack -> CancelUpdateStack -> Bool
Prelude.Eq, ReadPrec [CancelUpdateStack]
ReadPrec CancelUpdateStack
Int -> ReadS CancelUpdateStack
ReadS [CancelUpdateStack]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelUpdateStack]
$creadListPrec :: ReadPrec [CancelUpdateStack]
readPrec :: ReadPrec CancelUpdateStack
$creadPrec :: ReadPrec CancelUpdateStack
readList :: ReadS [CancelUpdateStack]
$creadList :: ReadS [CancelUpdateStack]
readsPrec :: Int -> ReadS CancelUpdateStack
$creadsPrec :: Int -> ReadS CancelUpdateStack
Prelude.Read, Int -> CancelUpdateStack -> ShowS
[CancelUpdateStack] -> ShowS
CancelUpdateStack -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelUpdateStack] -> ShowS
$cshowList :: [CancelUpdateStack] -> ShowS
show :: CancelUpdateStack -> String
$cshow :: CancelUpdateStack -> String
showsPrec :: Int -> CancelUpdateStack -> ShowS
$cshowsPrec :: Int -> CancelUpdateStack -> ShowS
Prelude.Show, forall x. Rep CancelUpdateStack x -> CancelUpdateStack
forall x. CancelUpdateStack -> Rep CancelUpdateStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CancelUpdateStack x -> CancelUpdateStack
$cfrom :: forall x. CancelUpdateStack -> Rep CancelUpdateStack x
Prelude.Generic)
newCancelUpdateStack ::
Prelude.Text ->
CancelUpdateStack
newCancelUpdateStack :: Text -> CancelUpdateStack
newCancelUpdateStack Text
pStackName_ =
CancelUpdateStack'
{ $sel:clientRequestToken:CancelUpdateStack' :: Maybe Text
clientRequestToken =
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:CancelUpdateStack' :: Text
stackName = Text
pStackName_
}
cancelUpdateStack_clientRequestToken :: Lens.Lens' CancelUpdateStack (Prelude.Maybe Prelude.Text)
cancelUpdateStack_clientRequestToken :: Lens' CancelUpdateStack (Maybe Text)
cancelUpdateStack_clientRequestToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelUpdateStack' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:CancelUpdateStack' :: CancelUpdateStack -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: CancelUpdateStack
s@CancelUpdateStack' {} Maybe Text
a -> CancelUpdateStack
s {$sel:clientRequestToken:CancelUpdateStack' :: Maybe Text
clientRequestToken = Maybe Text
a} :: CancelUpdateStack)
cancelUpdateStack_stackName :: Lens.Lens' CancelUpdateStack Prelude.Text
cancelUpdateStack_stackName :: Lens' CancelUpdateStack Text
cancelUpdateStack_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelUpdateStack' {Text
stackName :: Text
$sel:stackName:CancelUpdateStack' :: CancelUpdateStack -> Text
stackName} -> Text
stackName) (\s :: CancelUpdateStack
s@CancelUpdateStack' {} Text
a -> CancelUpdateStack
s {$sel:stackName:CancelUpdateStack' :: Text
stackName = Text
a} :: CancelUpdateStack)
instance Core.AWSRequest CancelUpdateStack where
type
AWSResponse CancelUpdateStack =
CancelUpdateStackResponse
request :: (Service -> Service)
-> CancelUpdateStack -> Request CancelUpdateStack
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 CancelUpdateStack
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelUpdateStack)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull CancelUpdateStackResponse
CancelUpdateStackResponse'
instance Prelude.Hashable CancelUpdateStack where
hashWithSalt :: Int -> CancelUpdateStack -> Int
hashWithSalt Int
_salt CancelUpdateStack' {Maybe Text
Text
stackName :: Text
clientRequestToken :: Maybe Text
$sel:stackName:CancelUpdateStack' :: CancelUpdateStack -> Text
$sel:clientRequestToken:CancelUpdateStack' :: CancelUpdateStack -> 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` Text
stackName
instance Prelude.NFData CancelUpdateStack where
rnf :: CancelUpdateStack -> ()
rnf CancelUpdateStack' {Maybe Text
Text
stackName :: Text
clientRequestToken :: Maybe Text
$sel:stackName:CancelUpdateStack' :: CancelUpdateStack -> Text
$sel:clientRequestToken:CancelUpdateStack' :: CancelUpdateStack -> 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 Text
stackName
instance Data.ToHeaders CancelUpdateStack where
toHeaders :: CancelUpdateStack -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CancelUpdateStack where
toPath :: CancelUpdateStack -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CancelUpdateStack where
toQuery :: CancelUpdateStack -> QueryString
toQuery CancelUpdateStack' {Maybe Text
Text
stackName :: Text
clientRequestToken :: Maybe Text
$sel:stackName:CancelUpdateStack' :: CancelUpdateStack -> Text
$sel:clientRequestToken:CancelUpdateStack' :: CancelUpdateStack -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CancelUpdateStack" :: 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
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName
]
data CancelUpdateStackResponse = CancelUpdateStackResponse'
{
}
deriving (CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
$c/= :: CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
== :: CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
$c== :: CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
Prelude.Eq, ReadPrec [CancelUpdateStackResponse]
ReadPrec CancelUpdateStackResponse
Int -> ReadS CancelUpdateStackResponse
ReadS [CancelUpdateStackResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelUpdateStackResponse]
$creadListPrec :: ReadPrec [CancelUpdateStackResponse]
readPrec :: ReadPrec CancelUpdateStackResponse
$creadPrec :: ReadPrec CancelUpdateStackResponse
readList :: ReadS [CancelUpdateStackResponse]
$creadList :: ReadS [CancelUpdateStackResponse]
readsPrec :: Int -> ReadS CancelUpdateStackResponse
$creadsPrec :: Int -> ReadS CancelUpdateStackResponse
Prelude.Read, Int -> CancelUpdateStackResponse -> ShowS
[CancelUpdateStackResponse] -> ShowS
CancelUpdateStackResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelUpdateStackResponse] -> ShowS
$cshowList :: [CancelUpdateStackResponse] -> ShowS
show :: CancelUpdateStackResponse -> String
$cshow :: CancelUpdateStackResponse -> String
showsPrec :: Int -> CancelUpdateStackResponse -> ShowS
$cshowsPrec :: Int -> CancelUpdateStackResponse -> ShowS
Prelude.Show, forall x.
Rep CancelUpdateStackResponse x -> CancelUpdateStackResponse
forall x.
CancelUpdateStackResponse -> Rep CancelUpdateStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelUpdateStackResponse x -> CancelUpdateStackResponse
$cfrom :: forall x.
CancelUpdateStackResponse -> Rep CancelUpdateStackResponse x
Prelude.Generic)
newCancelUpdateStackResponse ::
CancelUpdateStackResponse
newCancelUpdateStackResponse :: CancelUpdateStackResponse
newCancelUpdateStackResponse =
CancelUpdateStackResponse
CancelUpdateStackResponse'
instance Prelude.NFData CancelUpdateStackResponse where
rnf :: CancelUpdateStackResponse -> ()
rnf CancelUpdateStackResponse
_ = ()