{-# 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.DetectStackSetDrift
(
DetectStackSetDrift (..),
newDetectStackSetDrift,
detectStackSetDrift_callAs,
detectStackSetDrift_operationPreferences,
detectStackSetDrift_operationId,
detectStackSetDrift_stackSetName,
DetectStackSetDriftResponse (..),
newDetectStackSetDriftResponse,
detectStackSetDriftResponse_operationId,
detectStackSetDriftResponse_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 DetectStackSetDrift = DetectStackSetDrift'
{
DetectStackSetDrift -> Maybe CallAs
callAs :: Prelude.Maybe CallAs,
DetectStackSetDrift -> Maybe StackSetOperationPreferences
operationPreferences :: Prelude.Maybe StackSetOperationPreferences,
DetectStackSetDrift -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
DetectStackSetDrift -> Text
stackSetName :: Prelude.Text
}
deriving (DetectStackSetDrift -> DetectStackSetDrift -> Bool
(DetectStackSetDrift -> DetectStackSetDrift -> Bool)
-> (DetectStackSetDrift -> DetectStackSetDrift -> Bool)
-> Eq DetectStackSetDrift
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
$c/= :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
== :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
$c== :: DetectStackSetDrift -> DetectStackSetDrift -> Bool
Prelude.Eq, ReadPrec [DetectStackSetDrift]
ReadPrec DetectStackSetDrift
Int -> ReadS DetectStackSetDrift
ReadS [DetectStackSetDrift]
(Int -> ReadS DetectStackSetDrift)
-> ReadS [DetectStackSetDrift]
-> ReadPrec DetectStackSetDrift
-> ReadPrec [DetectStackSetDrift]
-> Read DetectStackSetDrift
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackSetDrift]
$creadListPrec :: ReadPrec [DetectStackSetDrift]
readPrec :: ReadPrec DetectStackSetDrift
$creadPrec :: ReadPrec DetectStackSetDrift
readList :: ReadS [DetectStackSetDrift]
$creadList :: ReadS [DetectStackSetDrift]
readsPrec :: Int -> ReadS DetectStackSetDrift
$creadsPrec :: Int -> ReadS DetectStackSetDrift
Prelude.Read, Int -> DetectStackSetDrift -> ShowS
[DetectStackSetDrift] -> ShowS
DetectStackSetDrift -> String
(Int -> DetectStackSetDrift -> ShowS)
-> (DetectStackSetDrift -> String)
-> ([DetectStackSetDrift] -> ShowS)
-> Show DetectStackSetDrift
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackSetDrift] -> ShowS
$cshowList :: [DetectStackSetDrift] -> ShowS
show :: DetectStackSetDrift -> String
$cshow :: DetectStackSetDrift -> String
showsPrec :: Int -> DetectStackSetDrift -> ShowS
$cshowsPrec :: Int -> DetectStackSetDrift -> ShowS
Prelude.Show, (forall x. DetectStackSetDrift -> Rep DetectStackSetDrift x)
-> (forall x. Rep DetectStackSetDrift x -> DetectStackSetDrift)
-> Generic DetectStackSetDrift
forall x. Rep DetectStackSetDrift x -> DetectStackSetDrift
forall x. DetectStackSetDrift -> Rep DetectStackSetDrift x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DetectStackSetDrift x -> DetectStackSetDrift
$cfrom :: forall x. DetectStackSetDrift -> Rep DetectStackSetDrift x
Prelude.Generic)
newDetectStackSetDrift ::
Prelude.Text ->
DetectStackSetDrift
newDetectStackSetDrift :: Text -> DetectStackSetDrift
newDetectStackSetDrift Text
pStackSetName_ =
DetectStackSetDrift' :: Maybe CallAs
-> Maybe StackSetOperationPreferences
-> Maybe Text
-> Text
-> DetectStackSetDrift
DetectStackSetDrift'
{ $sel:callAs:DetectStackSetDrift' :: Maybe CallAs
callAs = Maybe CallAs
forall a. Maybe a
Prelude.Nothing,
$sel:operationPreferences:DetectStackSetDrift' :: Maybe StackSetOperationPreferences
operationPreferences = Maybe StackSetOperationPreferences
forall a. Maybe a
Prelude.Nothing,
$sel:operationId:DetectStackSetDrift' :: Maybe Text
operationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:DetectStackSetDrift' :: Text
stackSetName = Text
pStackSetName_
}
detectStackSetDrift_callAs :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe CallAs)
detectStackSetDrift_callAs :: (Maybe CallAs -> f (Maybe CallAs))
-> DetectStackSetDrift -> f DetectStackSetDrift
detectStackSetDrift_callAs = (DetectStackSetDrift -> Maybe CallAs)
-> (DetectStackSetDrift -> Maybe CallAs -> DetectStackSetDrift)
-> Lens
DetectStackSetDrift
DetectStackSetDrift
(Maybe CallAs)
(Maybe CallAs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe CallAs
callAs :: Maybe CallAs
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe CallAs
callAs} -> Maybe CallAs
callAs) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe CallAs
a -> DetectStackSetDrift
s {$sel:callAs:DetectStackSetDrift' :: Maybe CallAs
callAs = Maybe CallAs
a} :: DetectStackSetDrift)
detectStackSetDrift_operationPreferences :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe StackSetOperationPreferences)
detectStackSetDrift_operationPreferences :: (Maybe StackSetOperationPreferences
-> f (Maybe StackSetOperationPreferences))
-> DetectStackSetDrift -> f DetectStackSetDrift
detectStackSetDrift_operationPreferences = (DetectStackSetDrift -> Maybe StackSetOperationPreferences)
-> (DetectStackSetDrift
-> Maybe StackSetOperationPreferences -> DetectStackSetDrift)
-> Lens
DetectStackSetDrift
DetectStackSetDrift
(Maybe StackSetOperationPreferences)
(Maybe StackSetOperationPreferences)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe StackSetOperationPreferences
operationPreferences :: Maybe StackSetOperationPreferences
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
operationPreferences} -> Maybe StackSetOperationPreferences
operationPreferences) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe StackSetOperationPreferences
a -> DetectStackSetDrift
s {$sel:operationPreferences:DetectStackSetDrift' :: Maybe StackSetOperationPreferences
operationPreferences = Maybe StackSetOperationPreferences
a} :: DetectStackSetDrift)
detectStackSetDrift_operationId :: Lens.Lens' DetectStackSetDrift (Prelude.Maybe Prelude.Text)
detectStackSetDrift_operationId :: (Maybe Text -> f (Maybe Text))
-> DetectStackSetDrift -> f DetectStackSetDrift
detectStackSetDrift_operationId = (DetectStackSetDrift -> Maybe Text)
-> (DetectStackSetDrift -> Maybe Text -> DetectStackSetDrift)
-> Lens
DetectStackSetDrift DetectStackSetDrift (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Maybe Text
operationId :: Maybe Text
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Maybe Text
a -> DetectStackSetDrift
s {$sel:operationId:DetectStackSetDrift' :: Maybe Text
operationId = Maybe Text
a} :: DetectStackSetDrift)
detectStackSetDrift_stackSetName :: Lens.Lens' DetectStackSetDrift Prelude.Text
detectStackSetDrift_stackSetName :: (Text -> f Text) -> DetectStackSetDrift -> f DetectStackSetDrift
detectStackSetDrift_stackSetName = (DetectStackSetDrift -> Text)
-> (DetectStackSetDrift -> Text -> DetectStackSetDrift)
-> Lens DetectStackSetDrift DetectStackSetDrift Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDrift' {Text
stackSetName :: Text
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
stackSetName} -> Text
stackSetName) (\s :: DetectStackSetDrift
s@DetectStackSetDrift' {} Text
a -> DetectStackSetDrift
s {$sel:stackSetName:DetectStackSetDrift' :: Text
stackSetName = Text
a} :: DetectStackSetDrift)
instance Core.AWSRequest DetectStackSetDrift where
type
AWSResponse DetectStackSetDrift =
DetectStackSetDriftResponse
request :: DetectStackSetDrift -> Request DetectStackSetDrift
request = Service -> DetectStackSetDrift -> Request DetectStackSetDrift
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DetectStackSetDrift
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DetectStackSetDrift)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DetectStackSetDrift))
-> Logger
-> Service
-> Proxy DetectStackSetDrift
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DetectStackSetDrift)))
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
"DetectStackSetDriftResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text -> Int -> DetectStackSetDriftResponse
DetectStackSetDriftResponse'
(Maybe Text -> Int -> DetectStackSetDriftResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DetectStackSetDriftResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OperationId")
Either String (Int -> DetectStackSetDriftResponse)
-> Either String Int -> Either String DetectStackSetDriftResponse
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 DetectStackSetDrift
instance Prelude.NFData DetectStackSetDrift
instance Core.ToHeaders DetectStackSetDrift where
toHeaders :: DetectStackSetDrift -> ResponseHeaders
toHeaders = ResponseHeaders -> DetectStackSetDrift -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DetectStackSetDrift where
toPath :: DetectStackSetDrift -> ByteString
toPath = ByteString -> DetectStackSetDrift -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DetectStackSetDrift where
toQuery :: DetectStackSetDrift -> QueryString
toQuery DetectStackSetDrift' {Maybe Text
Maybe CallAs
Maybe StackSetOperationPreferences
Text
stackSetName :: Text
operationId :: Maybe Text
operationPreferences :: Maybe StackSetOperationPreferences
callAs :: Maybe CallAs
$sel:stackSetName:DetectStackSetDrift' :: DetectStackSetDrift -> Text
$sel:operationId:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe Text
$sel:operationPreferences:DetectStackSetDrift' :: DetectStackSetDrift -> Maybe StackSetOperationPreferences
$sel:callAs:DetectStackSetDrift' :: DetectStackSetDrift -> 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
"DetectStackSetDrift" :: 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
"OperationPreferences" ByteString -> Maybe StackSetOperationPreferences -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe StackSetOperationPreferences
operationPreferences,
ByteString
"OperationId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
operationId,
ByteString
"StackSetName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackSetName
]
data DetectStackSetDriftResponse = DetectStackSetDriftResponse'
{
DetectStackSetDriftResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
DetectStackSetDriftResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
(DetectStackSetDriftResponse
-> DetectStackSetDriftResponse -> Bool)
-> (DetectStackSetDriftResponse
-> DetectStackSetDriftResponse -> Bool)
-> Eq DetectStackSetDriftResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
$c/= :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
== :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
$c== :: DetectStackSetDriftResponse -> DetectStackSetDriftResponse -> Bool
Prelude.Eq, ReadPrec [DetectStackSetDriftResponse]
ReadPrec DetectStackSetDriftResponse
Int -> ReadS DetectStackSetDriftResponse
ReadS [DetectStackSetDriftResponse]
(Int -> ReadS DetectStackSetDriftResponse)
-> ReadS [DetectStackSetDriftResponse]
-> ReadPrec DetectStackSetDriftResponse
-> ReadPrec [DetectStackSetDriftResponse]
-> Read DetectStackSetDriftResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackSetDriftResponse]
$creadListPrec :: ReadPrec [DetectStackSetDriftResponse]
readPrec :: ReadPrec DetectStackSetDriftResponse
$creadPrec :: ReadPrec DetectStackSetDriftResponse
readList :: ReadS [DetectStackSetDriftResponse]
$creadList :: ReadS [DetectStackSetDriftResponse]
readsPrec :: Int -> ReadS DetectStackSetDriftResponse
$creadsPrec :: Int -> ReadS DetectStackSetDriftResponse
Prelude.Read, Int -> DetectStackSetDriftResponse -> ShowS
[DetectStackSetDriftResponse] -> ShowS
DetectStackSetDriftResponse -> String
(Int -> DetectStackSetDriftResponse -> ShowS)
-> (DetectStackSetDriftResponse -> String)
-> ([DetectStackSetDriftResponse] -> ShowS)
-> Show DetectStackSetDriftResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackSetDriftResponse] -> ShowS
$cshowList :: [DetectStackSetDriftResponse] -> ShowS
show :: DetectStackSetDriftResponse -> String
$cshow :: DetectStackSetDriftResponse -> String
showsPrec :: Int -> DetectStackSetDriftResponse -> ShowS
$cshowsPrec :: Int -> DetectStackSetDriftResponse -> ShowS
Prelude.Show, (forall x.
DetectStackSetDriftResponse -> Rep DetectStackSetDriftResponse x)
-> (forall x.
Rep DetectStackSetDriftResponse x -> DetectStackSetDriftResponse)
-> Generic DetectStackSetDriftResponse
forall x.
Rep DetectStackSetDriftResponse x -> DetectStackSetDriftResponse
forall x.
DetectStackSetDriftResponse -> Rep DetectStackSetDriftResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectStackSetDriftResponse x -> DetectStackSetDriftResponse
$cfrom :: forall x.
DetectStackSetDriftResponse -> Rep DetectStackSetDriftResponse x
Prelude.Generic)
newDetectStackSetDriftResponse ::
Prelude.Int ->
DetectStackSetDriftResponse
newDetectStackSetDriftResponse :: Int -> DetectStackSetDriftResponse
newDetectStackSetDriftResponse Int
pHttpStatus_ =
DetectStackSetDriftResponse' :: Maybe Text -> Int -> DetectStackSetDriftResponse
DetectStackSetDriftResponse'
{ $sel:operationId:DetectStackSetDriftResponse' :: Maybe Text
operationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DetectStackSetDriftResponse' :: Int
httpStatus = Int
pHttpStatus_
}
detectStackSetDriftResponse_operationId :: Lens.Lens' DetectStackSetDriftResponse (Prelude.Maybe Prelude.Text)
detectStackSetDriftResponse_operationId :: (Maybe Text -> f (Maybe Text))
-> DetectStackSetDriftResponse -> f DetectStackSetDriftResponse
detectStackSetDriftResponse_operationId = (DetectStackSetDriftResponse -> Maybe Text)
-> (DetectStackSetDriftResponse
-> Maybe Text -> DetectStackSetDriftResponse)
-> Lens
DetectStackSetDriftResponse
DetectStackSetDriftResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDriftResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: DetectStackSetDriftResponse
s@DetectStackSetDriftResponse' {} Maybe Text
a -> DetectStackSetDriftResponse
s {$sel:operationId:DetectStackSetDriftResponse' :: Maybe Text
operationId = Maybe Text
a} :: DetectStackSetDriftResponse)
detectStackSetDriftResponse_httpStatus :: Lens.Lens' DetectStackSetDriftResponse Prelude.Int
detectStackSetDriftResponse_httpStatus :: (Int -> f Int)
-> DetectStackSetDriftResponse -> f DetectStackSetDriftResponse
detectStackSetDriftResponse_httpStatus = (DetectStackSetDriftResponse -> Int)
-> (DetectStackSetDriftResponse
-> Int -> DetectStackSetDriftResponse)
-> Lens
DetectStackSetDriftResponse DetectStackSetDriftResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackSetDriftResponse' {Int
httpStatus :: Int
$sel:httpStatus:DetectStackSetDriftResponse' :: DetectStackSetDriftResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DetectStackSetDriftResponse
s@DetectStackSetDriftResponse' {} Int
a -> DetectStackSetDriftResponse
s {$sel:httpStatus:DetectStackSetDriftResponse' :: Int
httpStatus = Int
a} :: DetectStackSetDriftResponse)
instance Prelude.NFData DetectStackSetDriftResponse