{-# 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.Lens as Lens
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
(CancelUpdateStack -> CancelUpdateStack -> Bool)
-> (CancelUpdateStack -> CancelUpdateStack -> Bool)
-> Eq CancelUpdateStack
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]
(Int -> ReadS CancelUpdateStack)
-> ReadS [CancelUpdateStack]
-> ReadPrec CancelUpdateStack
-> ReadPrec [CancelUpdateStack]
-> Read 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
(Int -> CancelUpdateStack -> ShowS)
-> (CancelUpdateStack -> String)
-> ([CancelUpdateStack] -> ShowS)
-> Show CancelUpdateStack
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. CancelUpdateStack -> Rep CancelUpdateStack x)
-> (forall x. Rep CancelUpdateStack x -> CancelUpdateStack)
-> Generic CancelUpdateStack
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' :: Maybe Text -> Text -> CancelUpdateStack
CancelUpdateStack'
{ $sel:clientRequestToken:CancelUpdateStack' :: Maybe Text
clientRequestToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:CancelUpdateStack' :: Text
stackName = Text
pStackName_
}
cancelUpdateStack_clientRequestToken :: Lens.Lens' CancelUpdateStack (Prelude.Maybe Prelude.Text)
cancelUpdateStack_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> CancelUpdateStack -> f CancelUpdateStack
cancelUpdateStack_clientRequestToken = (CancelUpdateStack -> Maybe Text)
-> (CancelUpdateStack -> Maybe Text -> CancelUpdateStack)
-> Lens
CancelUpdateStack CancelUpdateStack (Maybe Text) (Maybe Text)
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 :: (Text -> f Text) -> CancelUpdateStack -> f CancelUpdateStack
cancelUpdateStack_stackName = (CancelUpdateStack -> Text)
-> (CancelUpdateStack -> Text -> CancelUpdateStack)
-> Lens CancelUpdateStack CancelUpdateStack Text Text
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 :: CancelUpdateStack -> Request CancelUpdateStack
request = Service -> CancelUpdateStack -> Request CancelUpdateStack
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy CancelUpdateStack
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelUpdateStack)))
response =
AWSResponse CancelUpdateStack
-> Logger
-> Service
-> Proxy CancelUpdateStack
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CancelUpdateStack)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse CancelUpdateStack
CancelUpdateStackResponse
CancelUpdateStackResponse'
instance Prelude.Hashable CancelUpdateStack
instance Prelude.NFData CancelUpdateStack
instance Core.ToHeaders CancelUpdateStack where
toHeaders :: CancelUpdateStack -> [Header]
toHeaders = [Header] -> CancelUpdateStack -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath CancelUpdateStack where
toPath :: CancelUpdateStack -> ByteString
toPath = ByteString -> CancelUpdateStack -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.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
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"CancelUpdateStack" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"ClientRequestToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientRequestToken,
ByteString
"StackName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackName
]
data CancelUpdateStackResponse = CancelUpdateStackResponse'
{
}
deriving (CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool
(CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool)
-> (CancelUpdateStackResponse -> CancelUpdateStackResponse -> Bool)
-> Eq CancelUpdateStackResponse
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]
(Int -> ReadS CancelUpdateStackResponse)
-> ReadS [CancelUpdateStackResponse]
-> ReadPrec CancelUpdateStackResponse
-> ReadPrec [CancelUpdateStackResponse]
-> Read 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
(Int -> CancelUpdateStackResponse -> ShowS)
-> (CancelUpdateStackResponse -> String)
-> ([CancelUpdateStackResponse] -> ShowS)
-> Show CancelUpdateStackResponse
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.
CancelUpdateStackResponse -> Rep CancelUpdateStackResponse x)
-> (forall x.
Rep CancelUpdateStackResponse x -> CancelUpdateStackResponse)
-> Generic CancelUpdateStackResponse
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