{-# 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.DescribeStackSetOperation
(
DescribeStackSetOperation (..),
newDescribeStackSetOperation,
describeStackSetOperation_callAs,
describeStackSetOperation_stackSetName,
describeStackSetOperation_operationId,
DescribeStackSetOperationResponse (..),
newDescribeStackSetOperationResponse,
describeStackSetOperationResponse_stackSetOperation,
describeStackSetOperationResponse_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 DescribeStackSetOperation = DescribeStackSetOperation'
{
DescribeStackSetOperation -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
DescribeStackSetOperation -> Text
stackSetName :: Prelude.Text,
DescribeStackSetOperation -> Text
operationId :: Prelude.Text
}
deriving (DescribeStackSetOperation -> DescribeStackSetOperation -> Bool
(DescribeStackSetOperation -> DescribeStackSetOperation -> Bool)
-> (DescribeStackSetOperation -> DescribeStackSetOperation -> Bool)
-> Eq DescribeStackSetOperation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStackSetOperation -> DescribeStackSetOperation -> Bool
$c/= :: DescribeStackSetOperation -> DescribeStackSetOperation -> Bool
== :: DescribeStackSetOperation -> DescribeStackSetOperation -> Bool
$c== :: DescribeStackSetOperation -> DescribeStackSetOperation -> Bool
Prelude.Eq, ReadPrec [DescribeStackSetOperation]
ReadPrec DescribeStackSetOperation
Int -> ReadS DescribeStackSetOperation
ReadS [DescribeStackSetOperation]
(Int -> ReadS DescribeStackSetOperation)
-> ReadS [DescribeStackSetOperation]
-> ReadPrec DescribeStackSetOperation
-> ReadPrec [DescribeStackSetOperation]
-> Read DescribeStackSetOperation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStackSetOperation]
$creadListPrec :: ReadPrec [DescribeStackSetOperation]
readPrec :: ReadPrec DescribeStackSetOperation
$creadPrec :: ReadPrec DescribeStackSetOperation
readList :: ReadS [DescribeStackSetOperation]
$creadList :: ReadS [DescribeStackSetOperation]
readsPrec :: Int -> ReadS DescribeStackSetOperation
$creadsPrec :: Int -> ReadS DescribeStackSetOperation
Prelude.Read, Int -> DescribeStackSetOperation -> ShowS
[DescribeStackSetOperation] -> ShowS
DescribeStackSetOperation -> String
(Int -> DescribeStackSetOperation -> ShowS)
-> (DescribeStackSetOperation -> String)
-> ([DescribeStackSetOperation] -> ShowS)
-> Show DescribeStackSetOperation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStackSetOperation] -> ShowS
$cshowList :: [DescribeStackSetOperation] -> ShowS
show :: DescribeStackSetOperation -> String
$cshow :: DescribeStackSetOperation -> String
showsPrec :: Int -> DescribeStackSetOperation -> ShowS
$cshowsPrec :: Int -> DescribeStackSetOperation -> ShowS
Prelude.Show, (forall x.
DescribeStackSetOperation -> Rep DescribeStackSetOperation x)
-> (forall x.
Rep DescribeStackSetOperation x -> DescribeStackSetOperation)
-> Generic DescribeStackSetOperation
forall x.
Rep DescribeStackSetOperation x -> DescribeStackSetOperation
forall x.
DescribeStackSetOperation -> Rep DescribeStackSetOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStackSetOperation x -> DescribeStackSetOperation
$cfrom :: forall x.
DescribeStackSetOperation -> Rep DescribeStackSetOperation x
Prelude.Generic)
newDescribeStackSetOperation ::
Prelude.Text ->
Prelude.Text ->
DescribeStackSetOperation
newDescribeStackSetOperation :: Text -> Text -> DescribeStackSetOperation
newDescribeStackSetOperation
Text
pStackSetName_
Text
pOperationId_ =
DescribeStackSetOperation' :: Maybe CallAs -> Text -> Text -> DescribeStackSetOperation
DescribeStackSetOperation'
{ $sel:callAs:DescribeStackSetOperation' :: Maybe CallAs
callAs =
Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:DescribeStackSetOperation' :: Text
stackSetName = Text
pStackSetName_,
$sel:operationId:DescribeStackSetOperation' :: Text
operationId = Text
pOperationId_
}
describeStackSetOperation_callAs :: Lens.Lens' DescribeStackSetOperation (Prelude.Maybe CallAs)
describeStackSetOperation_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> DescribeStackSetOperation -> f DescribeStackSetOperation
describeStackSetOperation_callAs = (DescribeStackSetOperation -> Maybe CallAs)
-> (DescribeStackSetOperation
-> Maybe CallAs -> DescribeStackSetOperation)
-> Lens
DescribeStackSetOperation
DescribeStackSetOperation
(Maybe CallAs)
(Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackSetOperation' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:DescribeStackSetOperation' :: DescribeStackSetOperation -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: DescribeStackSetOperation
s@DescribeStackSetOperation' {} Maybe CallAs
a -> DescribeStackSetOperation
s {$sel:callAs:DescribeStackSetOperation' :: Maybe CallAs
callAs = Maybe CallAs
a} :: DescribeStackSetOperation)
describeStackSetOperation_stackSetName :: Lens.Lens' DescribeStackSetOperation Prelude.Text
describeStackSetOperation_stackSetName :: (Text -> f Text)
-> DescribeStackSetOperation -> f DescribeStackSetOperation
describeStackSetOperation_stackSetName = (DescribeStackSetOperation -> Text)
-> (DescribeStackSetOperation -> Text -> DescribeStackSetOperation)
-> Lens
DescribeStackSetOperation DescribeStackSetOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackSetOperation' {Text
stackSetName :: Text
$sel:stackSetName:DescribeStackSetOperation' :: DescribeStackSetOperation -> Text
stackSetName} -> Text
stackSetName) (\s :: DescribeStackSetOperation
s@DescribeStackSetOperation' {} Text
a -> DescribeStackSetOperation
s {$sel:stackSetName:DescribeStackSetOperation' :: Text
stackSetName = Text
a} :: DescribeStackSetOperation)
describeStackSetOperation_operationId :: Lens.Lens' DescribeStackSetOperation Prelude.Text
describeStackSetOperation_operationId :: (Text -> f Text)
-> DescribeStackSetOperation -> f DescribeStackSetOperation
describeStackSetOperation_operationId = (DescribeStackSetOperation -> Text)
-> (DescribeStackSetOperation -> Text -> DescribeStackSetOperation)
-> Lens
DescribeStackSetOperation DescribeStackSetOperation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackSetOperation' {Text
operationId :: Text
$sel:operationId:DescribeStackSetOperation' :: DescribeStackSetOperation -> Text
operationId} -> Text
operationId) (\s :: DescribeStackSetOperation
s@DescribeStackSetOperation' {} Text
a -> DescribeStackSetOperation
s {$sel:operationId:DescribeStackSetOperation' :: Text
operationId = Text
a} :: DescribeStackSetOperation)
instance Core.AWSRequest DescribeStackSetOperation where
type
AWSResponse DescribeStackSetOperation =
DescribeStackSetOperationResponse
request :: DescribeStackSetOperation -> Request DescribeStackSetOperation
request = Service
-> DescribeStackSetOperation -> Request DescribeStackSetOperation
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeStackSetOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeStackSetOperation)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeStackSetOperation))
-> Logger
-> Service
-> Proxy DescribeStackSetOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeStackSetOperation)))
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
"DescribeStackSetOperationResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe StackSetOperation -> Int -> DescribeStackSetOperationResponse
DescribeStackSetOperationResponse'
(Maybe StackSetOperation
-> Int -> DescribeStackSetOperationResponse)
-> Either String (Maybe StackSetOperation)
-> Either String (Int -> DescribeStackSetOperationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe StackSetOperation)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StackSetOperation")
Either String (Int -> DescribeStackSetOperationResponse)
-> Either String Int
-> Either String DescribeStackSetOperationResponse
forall (f :: * -> *) a b. Applicative f => 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 DescribeStackSetOperation
instance Prelude.NFData DescribeStackSetOperation
instance Core.ToHeaders DescribeStackSetOperation where
toHeaders :: DescribeStackSetOperation -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeStackSetOperation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeStackSetOperation where
toPath :: DescribeStackSetOperation -> ByteString
toPath = ByteString -> DescribeStackSetOperation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeStackSetOperation where
toQuery :: DescribeStackSetOperation -> QueryString
toQuery DescribeStackSetOperation' {Maybe CallAs
Text
operationId :: Text
stackSetName :: Text
callAs :: Maybe CallAs
$sel:operationId:DescribeStackSetOperation' :: DescribeStackSetOperation -> Text
$sel:stackSetName:DescribeStackSetOperation' :: DescribeStackSetOperation -> Text
$sel:callAs:DescribeStackSetOperation' :: DescribeStackSetOperation -> 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
"DescribeStackSetOperation" :: 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,
ByteString
"OperationId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
operationId
]
data DescribeStackSetOperationResponse = DescribeStackSetOperationResponse'
{
DescribeStackSetOperationResponse -> Maybe StackSetOperation
stackSetOperation :: Prelude.Maybe StackSetOperation,
DescribeStackSetOperationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool
(DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool)
-> (DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool)
-> Eq DescribeStackSetOperationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool
$c/= :: DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool
== :: DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool
$c== :: DescribeStackSetOperationResponse
-> DescribeStackSetOperationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeStackSetOperationResponse]
ReadPrec DescribeStackSetOperationResponse
Int -> ReadS DescribeStackSetOperationResponse
ReadS [DescribeStackSetOperationResponse]
(Int -> ReadS DescribeStackSetOperationResponse)
-> ReadS [DescribeStackSetOperationResponse]
-> ReadPrec DescribeStackSetOperationResponse
-> ReadPrec [DescribeStackSetOperationResponse]
-> Read DescribeStackSetOperationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeStackSetOperationResponse]
$creadListPrec :: ReadPrec [DescribeStackSetOperationResponse]
readPrec :: ReadPrec DescribeStackSetOperationResponse
$creadPrec :: ReadPrec DescribeStackSetOperationResponse
readList :: ReadS [DescribeStackSetOperationResponse]
$creadList :: ReadS [DescribeStackSetOperationResponse]
readsPrec :: Int -> ReadS DescribeStackSetOperationResponse
$creadsPrec :: Int -> ReadS DescribeStackSetOperationResponse
Prelude.Read, Int -> DescribeStackSetOperationResponse -> ShowS
[DescribeStackSetOperationResponse] -> ShowS
DescribeStackSetOperationResponse -> String
(Int -> DescribeStackSetOperationResponse -> ShowS)
-> (DescribeStackSetOperationResponse -> String)
-> ([DescribeStackSetOperationResponse] -> ShowS)
-> Show DescribeStackSetOperationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeStackSetOperationResponse] -> ShowS
$cshowList :: [DescribeStackSetOperationResponse] -> ShowS
show :: DescribeStackSetOperationResponse -> String
$cshow :: DescribeStackSetOperationResponse -> String
showsPrec :: Int -> DescribeStackSetOperationResponse -> ShowS
$cshowsPrec :: Int -> DescribeStackSetOperationResponse -> ShowS
Prelude.Show, (forall x.
DescribeStackSetOperationResponse
-> Rep DescribeStackSetOperationResponse x)
-> (forall x.
Rep DescribeStackSetOperationResponse x
-> DescribeStackSetOperationResponse)
-> Generic DescribeStackSetOperationResponse
forall x.
Rep DescribeStackSetOperationResponse x
-> DescribeStackSetOperationResponse
forall x.
DescribeStackSetOperationResponse
-> Rep DescribeStackSetOperationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeStackSetOperationResponse x
-> DescribeStackSetOperationResponse
$cfrom :: forall x.
DescribeStackSetOperationResponse
-> Rep DescribeStackSetOperationResponse x
Prelude.Generic)
newDescribeStackSetOperationResponse ::
Prelude.Int ->
DescribeStackSetOperationResponse
newDescribeStackSetOperationResponse :: Int -> DescribeStackSetOperationResponse
newDescribeStackSetOperationResponse Int
pHttpStatus_ =
DescribeStackSetOperationResponse' :: Maybe StackSetOperation -> Int -> DescribeStackSetOperationResponse
DescribeStackSetOperationResponse'
{ $sel:stackSetOperation:DescribeStackSetOperationResponse' :: Maybe StackSetOperation
stackSetOperation =
Maybe StackSetOperation
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeStackSetOperationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeStackSetOperationResponse_stackSetOperation :: Lens.Lens' DescribeStackSetOperationResponse (Prelude.Maybe StackSetOperation)
describeStackSetOperationResponse_stackSetOperation :: (Maybe StackSetOperation -> f (Maybe StackSetOperation))
-> DescribeStackSetOperationResponse
-> f DescribeStackSetOperationResponse
describeStackSetOperationResponse_stackSetOperation = (DescribeStackSetOperationResponse -> Maybe StackSetOperation)
-> (DescribeStackSetOperationResponse
-> Maybe StackSetOperation -> DescribeStackSetOperationResponse)
-> Lens
DescribeStackSetOperationResponse
DescribeStackSetOperationResponse
(Maybe StackSetOperation)
(Maybe StackSetOperation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackSetOperationResponse' {Maybe StackSetOperation
stackSetOperation :: Maybe StackSetOperation
$sel:stackSetOperation:DescribeStackSetOperationResponse' :: DescribeStackSetOperationResponse -> Maybe StackSetOperation
stackSetOperation} -> Maybe StackSetOperation
stackSetOperation) (\s :: DescribeStackSetOperationResponse
s@DescribeStackSetOperationResponse' {} Maybe StackSetOperation
a -> DescribeStackSetOperationResponse
s {$sel:stackSetOperation:DescribeStackSetOperationResponse' :: Maybe StackSetOperation
stackSetOperation = Maybe StackSetOperation
a} :: DescribeStackSetOperationResponse)
describeStackSetOperationResponse_httpStatus :: Lens.Lens' DescribeStackSetOperationResponse Prelude.Int
describeStackSetOperationResponse_httpStatus :: (Int -> f Int)
-> DescribeStackSetOperationResponse
-> f DescribeStackSetOperationResponse
describeStackSetOperationResponse_httpStatus = (DescribeStackSetOperationResponse -> Int)
-> (DescribeStackSetOperationResponse
-> Int -> DescribeStackSetOperationResponse)
-> Lens
DescribeStackSetOperationResponse
DescribeStackSetOperationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeStackSetOperationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeStackSetOperationResponse' :: DescribeStackSetOperationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeStackSetOperationResponse
s@DescribeStackSetOperationResponse' {} Int
a -> DescribeStackSetOperationResponse
s {$sel:httpStatus:DescribeStackSetOperationResponse' :: Int
httpStatus = Int
a} :: DescribeStackSetOperationResponse)
instance
Prelude.NFData
DescribeStackSetOperationResponse