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