{-# 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.DetectStackResourceDrift
(
DetectStackResourceDrift (..),
newDetectStackResourceDrift,
detectStackResourceDrift_stackName,
detectStackResourceDrift_logicalResourceId,
DetectStackResourceDriftResponse (..),
newDetectStackResourceDriftResponse,
detectStackResourceDriftResponse_httpStatus,
detectStackResourceDriftResponse_stackResourceDrift,
)
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 DetectStackResourceDrift = DetectStackResourceDrift'
{
DetectStackResourceDrift -> Text
stackName :: Prelude.Text,
DetectStackResourceDrift -> Text
logicalResourceId :: Prelude.Text
}
deriving (DetectStackResourceDrift -> DetectStackResourceDrift -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackResourceDrift -> DetectStackResourceDrift -> Bool
$c/= :: DetectStackResourceDrift -> DetectStackResourceDrift -> Bool
== :: DetectStackResourceDrift -> DetectStackResourceDrift -> Bool
$c== :: DetectStackResourceDrift -> DetectStackResourceDrift -> Bool
Prelude.Eq, ReadPrec [DetectStackResourceDrift]
ReadPrec DetectStackResourceDrift
Int -> ReadS DetectStackResourceDrift
ReadS [DetectStackResourceDrift]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackResourceDrift]
$creadListPrec :: ReadPrec [DetectStackResourceDrift]
readPrec :: ReadPrec DetectStackResourceDrift
$creadPrec :: ReadPrec DetectStackResourceDrift
readList :: ReadS [DetectStackResourceDrift]
$creadList :: ReadS [DetectStackResourceDrift]
readsPrec :: Int -> ReadS DetectStackResourceDrift
$creadsPrec :: Int -> ReadS DetectStackResourceDrift
Prelude.Read, Int -> DetectStackResourceDrift -> ShowS
[DetectStackResourceDrift] -> ShowS
DetectStackResourceDrift -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackResourceDrift] -> ShowS
$cshowList :: [DetectStackResourceDrift] -> ShowS
show :: DetectStackResourceDrift -> String
$cshow :: DetectStackResourceDrift -> String
showsPrec :: Int -> DetectStackResourceDrift -> ShowS
$cshowsPrec :: Int -> DetectStackResourceDrift -> ShowS
Prelude.Show, forall x.
Rep DetectStackResourceDrift x -> DetectStackResourceDrift
forall x.
DetectStackResourceDrift -> Rep DetectStackResourceDrift x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectStackResourceDrift x -> DetectStackResourceDrift
$cfrom :: forall x.
DetectStackResourceDrift -> Rep DetectStackResourceDrift x
Prelude.Generic)
newDetectStackResourceDrift ::
Prelude.Text ->
Prelude.Text ->
DetectStackResourceDrift
newDetectStackResourceDrift :: Text -> Text -> DetectStackResourceDrift
newDetectStackResourceDrift
Text
pStackName_
Text
pLogicalResourceId_ =
DetectStackResourceDrift'
{ $sel:stackName:DetectStackResourceDrift' :: Text
stackName = Text
pStackName_,
$sel:logicalResourceId:DetectStackResourceDrift' :: Text
logicalResourceId = Text
pLogicalResourceId_
}
detectStackResourceDrift_stackName :: Lens.Lens' DetectStackResourceDrift Prelude.Text
detectStackResourceDrift_stackName :: Lens' DetectStackResourceDrift Text
detectStackResourceDrift_stackName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackResourceDrift' {Text
stackName :: Text
$sel:stackName:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
stackName} -> Text
stackName) (\s :: DetectStackResourceDrift
s@DetectStackResourceDrift' {} Text
a -> DetectStackResourceDrift
s {$sel:stackName:DetectStackResourceDrift' :: Text
stackName = Text
a} :: DetectStackResourceDrift)
detectStackResourceDrift_logicalResourceId :: Lens.Lens' DetectStackResourceDrift Prelude.Text
detectStackResourceDrift_logicalResourceId :: Lens' DetectStackResourceDrift Text
detectStackResourceDrift_logicalResourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackResourceDrift' {Text
logicalResourceId :: Text
$sel:logicalResourceId:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
logicalResourceId} -> Text
logicalResourceId) (\s :: DetectStackResourceDrift
s@DetectStackResourceDrift' {} Text
a -> DetectStackResourceDrift
s {$sel:logicalResourceId:DetectStackResourceDrift' :: Text
logicalResourceId = Text
a} :: DetectStackResourceDrift)
instance Core.AWSRequest DetectStackResourceDrift where
type
AWSResponse DetectStackResourceDrift =
DetectStackResourceDriftResponse
request :: (Service -> Service)
-> DetectStackResourceDrift -> Request DetectStackResourceDrift
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 DetectStackResourceDrift
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DetectStackResourceDrift)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DetectStackResourceDriftResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> StackResourceDrift -> DetectStackResourceDriftResponse
DetectStackResourceDriftResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"StackResourceDrift")
)
instance Prelude.Hashable DetectStackResourceDrift where
hashWithSalt :: Int -> DetectStackResourceDrift -> Int
hashWithSalt Int
_salt DetectStackResourceDrift' {Text
logicalResourceId :: Text
stackName :: Text
$sel:logicalResourceId:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
$sel:stackName:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logicalResourceId
instance Prelude.NFData DetectStackResourceDrift where
rnf :: DetectStackResourceDrift -> ()
rnf DetectStackResourceDrift' {Text
logicalResourceId :: Text
stackName :: Text
$sel:logicalResourceId:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
$sel:stackName:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
stackName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
logicalResourceId
instance Data.ToHeaders DetectStackResourceDrift where
toHeaders :: DetectStackResourceDrift -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DetectStackResourceDrift where
toPath :: DetectStackResourceDrift -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DetectStackResourceDrift where
toQuery :: DetectStackResourceDrift -> QueryString
toQuery DetectStackResourceDrift' {Text
logicalResourceId :: Text
stackName :: Text
$sel:logicalResourceId:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
$sel:stackName:DetectStackResourceDrift' :: DetectStackResourceDrift -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DetectStackResourceDrift" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName,
ByteString
"LogicalResourceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
logicalResourceId
]
data DetectStackResourceDriftResponse = DetectStackResourceDriftResponse'
{
DetectStackResourceDriftResponse -> Int
httpStatus :: Prelude.Int,
DetectStackResourceDriftResponse -> StackResourceDrift
stackResourceDrift :: StackResourceDrift
}
deriving (DetectStackResourceDriftResponse
-> DetectStackResourceDriftResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DetectStackResourceDriftResponse
-> DetectStackResourceDriftResponse -> Bool
$c/= :: DetectStackResourceDriftResponse
-> DetectStackResourceDriftResponse -> Bool
== :: DetectStackResourceDriftResponse
-> DetectStackResourceDriftResponse -> Bool
$c== :: DetectStackResourceDriftResponse
-> DetectStackResourceDriftResponse -> Bool
Prelude.Eq, ReadPrec [DetectStackResourceDriftResponse]
ReadPrec DetectStackResourceDriftResponse
Int -> ReadS DetectStackResourceDriftResponse
ReadS [DetectStackResourceDriftResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DetectStackResourceDriftResponse]
$creadListPrec :: ReadPrec [DetectStackResourceDriftResponse]
readPrec :: ReadPrec DetectStackResourceDriftResponse
$creadPrec :: ReadPrec DetectStackResourceDriftResponse
readList :: ReadS [DetectStackResourceDriftResponse]
$creadList :: ReadS [DetectStackResourceDriftResponse]
readsPrec :: Int -> ReadS DetectStackResourceDriftResponse
$creadsPrec :: Int -> ReadS DetectStackResourceDriftResponse
Prelude.Read, Int -> DetectStackResourceDriftResponse -> ShowS
[DetectStackResourceDriftResponse] -> ShowS
DetectStackResourceDriftResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DetectStackResourceDriftResponse] -> ShowS
$cshowList :: [DetectStackResourceDriftResponse] -> ShowS
show :: DetectStackResourceDriftResponse -> String
$cshow :: DetectStackResourceDriftResponse -> String
showsPrec :: Int -> DetectStackResourceDriftResponse -> ShowS
$cshowsPrec :: Int -> DetectStackResourceDriftResponse -> ShowS
Prelude.Show, forall x.
Rep DetectStackResourceDriftResponse x
-> DetectStackResourceDriftResponse
forall x.
DetectStackResourceDriftResponse
-> Rep DetectStackResourceDriftResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DetectStackResourceDriftResponse x
-> DetectStackResourceDriftResponse
$cfrom :: forall x.
DetectStackResourceDriftResponse
-> Rep DetectStackResourceDriftResponse x
Prelude.Generic)
newDetectStackResourceDriftResponse ::
Prelude.Int ->
StackResourceDrift ->
DetectStackResourceDriftResponse
newDetectStackResourceDriftResponse :: Int -> StackResourceDrift -> DetectStackResourceDriftResponse
newDetectStackResourceDriftResponse
Int
pHttpStatus_
StackResourceDrift
pStackResourceDrift_ =
DetectStackResourceDriftResponse'
{ $sel:httpStatus:DetectStackResourceDriftResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:stackResourceDrift:DetectStackResourceDriftResponse' :: StackResourceDrift
stackResourceDrift = StackResourceDrift
pStackResourceDrift_
}
detectStackResourceDriftResponse_httpStatus :: Lens.Lens' DetectStackResourceDriftResponse Prelude.Int
detectStackResourceDriftResponse_httpStatus :: Lens' DetectStackResourceDriftResponse Int
detectStackResourceDriftResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackResourceDriftResponse' {Int
httpStatus :: Int
$sel:httpStatus:DetectStackResourceDriftResponse' :: DetectStackResourceDriftResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DetectStackResourceDriftResponse
s@DetectStackResourceDriftResponse' {} Int
a -> DetectStackResourceDriftResponse
s {$sel:httpStatus:DetectStackResourceDriftResponse' :: Int
httpStatus = Int
a} :: DetectStackResourceDriftResponse)
detectStackResourceDriftResponse_stackResourceDrift :: Lens.Lens' DetectStackResourceDriftResponse StackResourceDrift
detectStackResourceDriftResponse_stackResourceDrift :: Lens' DetectStackResourceDriftResponse StackResourceDrift
detectStackResourceDriftResponse_stackResourceDrift = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DetectStackResourceDriftResponse' {StackResourceDrift
stackResourceDrift :: StackResourceDrift
$sel:stackResourceDrift:DetectStackResourceDriftResponse' :: DetectStackResourceDriftResponse -> StackResourceDrift
stackResourceDrift} -> StackResourceDrift
stackResourceDrift) (\s :: DetectStackResourceDriftResponse
s@DetectStackResourceDriftResponse' {} StackResourceDrift
a -> DetectStackResourceDriftResponse
s {$sel:stackResourceDrift:DetectStackResourceDriftResponse' :: StackResourceDrift
stackResourceDrift = StackResourceDrift
a} :: DetectStackResourceDriftResponse)
instance
Prelude.NFData
DetectStackResourceDriftResponse
where
rnf :: DetectStackResourceDriftResponse -> ()
rnf DetectStackResourceDriftResponse' {Int
StackResourceDrift
stackResourceDrift :: StackResourceDrift
httpStatus :: Int
$sel:stackResourceDrift:DetectStackResourceDriftResponse' :: DetectStackResourceDriftResponse -> StackResourceDrift
$sel:httpStatus:DetectStackResourceDriftResponse' :: DetectStackResourceDriftResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf StackResourceDrift
stackResourceDrift