{-# 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.DeleteStackSet
(
DeleteStackSet (..),
newDeleteStackSet,
deleteStackSet_callAs,
deleteStackSet_stackSetName,
DeleteStackSetResponse (..),
newDeleteStackSetResponse,
deleteStackSetResponse_httpStatus,
)
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 DeleteStackSet = DeleteStackSet'
{
DeleteStackSet -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
DeleteStackSet -> Text
stackSetName :: Prelude.Text
}
deriving (DeleteStackSet -> DeleteStackSet -> Bool
(DeleteStackSet -> DeleteStackSet -> Bool)
-> (DeleteStackSet -> DeleteStackSet -> Bool) -> Eq DeleteStackSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStackSet -> DeleteStackSet -> Bool
$c/= :: DeleteStackSet -> DeleteStackSet -> Bool
== :: DeleteStackSet -> DeleteStackSet -> Bool
$c== :: DeleteStackSet -> DeleteStackSet -> Bool
Prelude.Eq, ReadPrec [DeleteStackSet]
ReadPrec DeleteStackSet
Int -> ReadS DeleteStackSet
ReadS [DeleteStackSet]
(Int -> ReadS DeleteStackSet)
-> ReadS [DeleteStackSet]
-> ReadPrec DeleteStackSet
-> ReadPrec [DeleteStackSet]
-> Read DeleteStackSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStackSet]
$creadListPrec :: ReadPrec [DeleteStackSet]
readPrec :: ReadPrec DeleteStackSet
$creadPrec :: ReadPrec DeleteStackSet
readList :: ReadS [DeleteStackSet]
$creadList :: ReadS [DeleteStackSet]
readsPrec :: Int -> ReadS DeleteStackSet
$creadsPrec :: Int -> ReadS DeleteStackSet
Prelude.Read, Int -> DeleteStackSet -> ShowS
[DeleteStackSet] -> ShowS
DeleteStackSet -> String
(Int -> DeleteStackSet -> ShowS)
-> (DeleteStackSet -> String)
-> ([DeleteStackSet] -> ShowS)
-> Show DeleteStackSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStackSet] -> ShowS
$cshowList :: [DeleteStackSet] -> ShowS
show :: DeleteStackSet -> String
$cshow :: DeleteStackSet -> String
showsPrec :: Int -> DeleteStackSet -> ShowS
$cshowsPrec :: Int -> DeleteStackSet -> ShowS
Prelude.Show, (forall x. DeleteStackSet -> Rep DeleteStackSet x)
-> (forall x. Rep DeleteStackSet x -> DeleteStackSet)
-> Generic DeleteStackSet
forall x. Rep DeleteStackSet x -> DeleteStackSet
forall x. DeleteStackSet -> Rep DeleteStackSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteStackSet x -> DeleteStackSet
$cfrom :: forall x. DeleteStackSet -> Rep DeleteStackSet x
Prelude.Generic)
newDeleteStackSet ::
Prelude.Text ->
DeleteStackSet
newDeleteStackSet :: Text -> DeleteStackSet
newDeleteStackSet Text
pStackSetName_ =
DeleteStackSet' :: Maybe CallAs -> Text -> DeleteStackSet
DeleteStackSet'
{ $sel:callAs:DeleteStackSet' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:DeleteStackSet' :: Text
stackSetName = Text
pStackSetName_
}
deleteStackSet_callAs :: Lens.Lens' DeleteStackSet (Prelude.Maybe CallAs)
deleteStackSet_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> DeleteStackSet -> f DeleteStackSet
deleteStackSet_callAs = (DeleteStackSet -> Maybe CallAs)
-> (DeleteStackSet -> Maybe CallAs -> DeleteStackSet)
-> Lens DeleteStackSet DeleteStackSet (Maybe CallAs) (Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStackSet' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:DeleteStackSet' :: DeleteStackSet -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: DeleteStackSet
s@DeleteStackSet' {} Maybe CallAs
a -> DeleteStackSet
s {$sel:callAs:DeleteStackSet' :: Maybe CallAs
callAs = Maybe CallAs
a} :: DeleteStackSet)
deleteStackSet_stackSetName :: Lens.Lens' DeleteStackSet Prelude.Text
deleteStackSet_stackSetName :: (Text -> f Text) -> DeleteStackSet -> f DeleteStackSet
deleteStackSet_stackSetName = (DeleteStackSet -> Text)
-> (DeleteStackSet -> Text -> DeleteStackSet)
-> Lens DeleteStackSet DeleteStackSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStackSet' {Text
stackSetName :: Text
$sel:stackSetName:DeleteStackSet' :: DeleteStackSet -> Text
stackSetName} -> Text
stackSetName) (\s :: DeleteStackSet
s@DeleteStackSet' {} Text
a -> DeleteStackSet
s {$sel:stackSetName:DeleteStackSet' :: Text
stackSetName = Text
a} :: DeleteStackSet)
instance Core.AWSRequest DeleteStackSet where
type
AWSResponse DeleteStackSet =
DeleteStackSetResponse
request :: DeleteStackSet -> Request DeleteStackSet
request = Service -> DeleteStackSet -> Request DeleteStackSet
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteStackSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteStackSet)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeleteStackSet))
-> Logger
-> Service
-> Proxy DeleteStackSet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteStackSet)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeleteStackSetResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeleteStackSetResponse
DeleteStackSetResponse'
(Int -> DeleteStackSetResponse)
-> Either String Int -> Either String DeleteStackSetResponse
forall (f :: * -> *) a b. Functor 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 DeleteStackSet
instance Prelude.NFData DeleteStackSet
instance Core.ToHeaders DeleteStackSet where
toHeaders :: DeleteStackSet -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteStackSet -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteStackSet where
toPath :: DeleteStackSet -> ByteString
toPath = ByteString -> DeleteStackSet -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteStackSet where
toQuery :: DeleteStackSet -> QueryString
toQuery DeleteStackSet' {Maybe CallAs
Text
stackSetName :: Text
callAs :: Maybe CallAs
$sel:stackSetName:DeleteStackSet' :: DeleteStackSet -> Text
$sel:callAs:DeleteStackSet' :: DeleteStackSet -> Maybe CallAs
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteStackSet" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"CallAs" ByteString -> Maybe CallAs -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe CallAs
callAs,
ByteString
"StackSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackSetName
]
data DeleteStackSetResponse = DeleteStackSetResponse'
{
DeleteStackSetResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteStackSetResponse -> DeleteStackSetResponse -> Bool
(DeleteStackSetResponse -> DeleteStackSetResponse -> Bool)
-> (DeleteStackSetResponse -> DeleteStackSetResponse -> Bool)
-> Eq DeleteStackSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteStackSetResponse -> DeleteStackSetResponse -> Bool
$c/= :: DeleteStackSetResponse -> DeleteStackSetResponse -> Bool
== :: DeleteStackSetResponse -> DeleteStackSetResponse -> Bool
$c== :: DeleteStackSetResponse -> DeleteStackSetResponse -> Bool
Prelude.Eq, ReadPrec [DeleteStackSetResponse]
ReadPrec DeleteStackSetResponse
Int -> ReadS DeleteStackSetResponse
ReadS [DeleteStackSetResponse]
(Int -> ReadS DeleteStackSetResponse)
-> ReadS [DeleteStackSetResponse]
-> ReadPrec DeleteStackSetResponse
-> ReadPrec [DeleteStackSetResponse]
-> Read DeleteStackSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteStackSetResponse]
$creadListPrec :: ReadPrec [DeleteStackSetResponse]
readPrec :: ReadPrec DeleteStackSetResponse
$creadPrec :: ReadPrec DeleteStackSetResponse
readList :: ReadS [DeleteStackSetResponse]
$creadList :: ReadS [DeleteStackSetResponse]
readsPrec :: Int -> ReadS DeleteStackSetResponse
$creadsPrec :: Int -> ReadS DeleteStackSetResponse
Prelude.Read, Int -> DeleteStackSetResponse -> ShowS
[DeleteStackSetResponse] -> ShowS
DeleteStackSetResponse -> String
(Int -> DeleteStackSetResponse -> ShowS)
-> (DeleteStackSetResponse -> String)
-> ([DeleteStackSetResponse] -> ShowS)
-> Show DeleteStackSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteStackSetResponse] -> ShowS
$cshowList :: [DeleteStackSetResponse] -> ShowS
show :: DeleteStackSetResponse -> String
$cshow :: DeleteStackSetResponse -> String
showsPrec :: Int -> DeleteStackSetResponse -> ShowS
$cshowsPrec :: Int -> DeleteStackSetResponse -> ShowS
Prelude.Show, (forall x. DeleteStackSetResponse -> Rep DeleteStackSetResponse x)
-> (forall x.
Rep DeleteStackSetResponse x -> DeleteStackSetResponse)
-> Generic DeleteStackSetResponse
forall x. Rep DeleteStackSetResponse x -> DeleteStackSetResponse
forall x. DeleteStackSetResponse -> Rep DeleteStackSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteStackSetResponse x -> DeleteStackSetResponse
$cfrom :: forall x. DeleteStackSetResponse -> Rep DeleteStackSetResponse x
Prelude.Generic)
newDeleteStackSetResponse ::
Prelude.Int ->
DeleteStackSetResponse
newDeleteStackSetResponse :: Int -> DeleteStackSetResponse
newDeleteStackSetResponse Int
pHttpStatus_ =
DeleteStackSetResponse' :: Int -> DeleteStackSetResponse
DeleteStackSetResponse' {$sel:httpStatus:DeleteStackSetResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteStackSetResponse_httpStatus :: Lens.Lens' DeleteStackSetResponse Prelude.Int
deleteStackSetResponse_httpStatus :: (Int -> f Int)
-> DeleteStackSetResponse -> f DeleteStackSetResponse
deleteStackSetResponse_httpStatus = (DeleteStackSetResponse -> Int)
-> (DeleteStackSetResponse -> Int -> DeleteStackSetResponse)
-> Lens DeleteStackSetResponse DeleteStackSetResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteStackSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteStackSetResponse' :: DeleteStackSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteStackSetResponse
s@DeleteStackSetResponse' {} Int
a -> DeleteStackSetResponse
s {$sel:httpStatus:DeleteStackSetResponse' :: Int
httpStatus = Int
a} :: DeleteStackSetResponse)
instance Prelude.NFData DeleteStackSetResponse