{-# 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.ContinueUpdateRollback
(
ContinueUpdateRollback (..),
newContinueUpdateRollback,
continueUpdateRollback_resourcesToSkip,
continueUpdateRollback_clientRequestToken,
continueUpdateRollback_roleARN,
continueUpdateRollback_stackName,
ContinueUpdateRollbackResponse (..),
newContinueUpdateRollbackResponse,
continueUpdateRollbackResponse_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 ContinueUpdateRollback = ContinueUpdateRollback'
{
ContinueUpdateRollback -> Maybe [Text]
resourcesToSkip :: Prelude.Maybe [Prelude.Text],
ContinueUpdateRollback -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
ContinueUpdateRollback -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
ContinueUpdateRollback -> Text
stackName :: Prelude.Text
}
deriving (ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
(ContinueUpdateRollback -> ContinueUpdateRollback -> Bool)
-> (ContinueUpdateRollback -> ContinueUpdateRollback -> Bool)
-> Eq ContinueUpdateRollback
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
$c/= :: ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
== :: ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
$c== :: ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
Prelude.Eq, ReadPrec [ContinueUpdateRollback]
ReadPrec ContinueUpdateRollback
Int -> ReadS ContinueUpdateRollback
ReadS [ContinueUpdateRollback]
(Int -> ReadS ContinueUpdateRollback)
-> ReadS [ContinueUpdateRollback]
-> ReadPrec ContinueUpdateRollback
-> ReadPrec [ContinueUpdateRollback]
-> Read ContinueUpdateRollback
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContinueUpdateRollback]
$creadListPrec :: ReadPrec [ContinueUpdateRollback]
readPrec :: ReadPrec ContinueUpdateRollback
$creadPrec :: ReadPrec ContinueUpdateRollback
readList :: ReadS [ContinueUpdateRollback]
$creadList :: ReadS [ContinueUpdateRollback]
readsPrec :: Int -> ReadS ContinueUpdateRollback
$creadsPrec :: Int -> ReadS ContinueUpdateRollback
Prelude.Read, Int -> ContinueUpdateRollback -> ShowS
[ContinueUpdateRollback] -> ShowS
ContinueUpdateRollback -> String
(Int -> ContinueUpdateRollback -> ShowS)
-> (ContinueUpdateRollback -> String)
-> ([ContinueUpdateRollback] -> ShowS)
-> Show ContinueUpdateRollback
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContinueUpdateRollback] -> ShowS
$cshowList :: [ContinueUpdateRollback] -> ShowS
show :: ContinueUpdateRollback -> String
$cshow :: ContinueUpdateRollback -> String
showsPrec :: Int -> ContinueUpdateRollback -> ShowS
$cshowsPrec :: Int -> ContinueUpdateRollback -> ShowS
Prelude.Show, (forall x. ContinueUpdateRollback -> Rep ContinueUpdateRollback x)
-> (forall x.
Rep ContinueUpdateRollback x -> ContinueUpdateRollback)
-> Generic ContinueUpdateRollback
forall x. Rep ContinueUpdateRollback x -> ContinueUpdateRollback
forall x. ContinueUpdateRollback -> Rep ContinueUpdateRollback x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContinueUpdateRollback x -> ContinueUpdateRollback
$cfrom :: forall x. ContinueUpdateRollback -> Rep ContinueUpdateRollback x
Prelude.Generic)
newContinueUpdateRollback ::
Prelude.Text ->
ContinueUpdateRollback
newContinueUpdateRollback :: Text -> ContinueUpdateRollback
newContinueUpdateRollback Text
pStackName_ =
ContinueUpdateRollback' :: Maybe [Text]
-> Maybe Text -> Maybe Text -> Text -> ContinueUpdateRollback
ContinueUpdateRollback'
{ $sel:resourcesToSkip:ContinueUpdateRollback' :: Maybe [Text]
resourcesToSkip =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:clientRequestToken:ContinueUpdateRollback' :: Maybe Text
clientRequestToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:ContinueUpdateRollback' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:stackName:ContinueUpdateRollback' :: Text
stackName = Text
pStackName_
}
continueUpdateRollback_resourcesToSkip :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe [Prelude.Text])
continueUpdateRollback_resourcesToSkip :: (Maybe [Text] -> f (Maybe [Text]))
-> ContinueUpdateRollback -> f ContinueUpdateRollback
continueUpdateRollback_resourcesToSkip = (ContinueUpdateRollback -> Maybe [Text])
-> (ContinueUpdateRollback
-> Maybe [Text] -> ContinueUpdateRollback)
-> Lens
ContinueUpdateRollback
ContinueUpdateRollback
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueUpdateRollback' {Maybe [Text]
resourcesToSkip :: Maybe [Text]
$sel:resourcesToSkip:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe [Text]
resourcesToSkip} -> Maybe [Text]
resourcesToSkip) (\s :: ContinueUpdateRollback
s@ContinueUpdateRollback' {} Maybe [Text]
a -> ContinueUpdateRollback
s {$sel:resourcesToSkip:ContinueUpdateRollback' :: Maybe [Text]
resourcesToSkip = Maybe [Text]
a} :: ContinueUpdateRollback) ((Maybe [Text] -> f (Maybe [Text]))
-> ContinueUpdateRollback -> f ContinueUpdateRollback)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ContinueUpdateRollback
-> f ContinueUpdateRollback
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
continueUpdateRollback_clientRequestToken :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe Prelude.Text)
continueUpdateRollback_clientRequestToken :: (Maybe Text -> f (Maybe Text))
-> ContinueUpdateRollback -> f ContinueUpdateRollback
continueUpdateRollback_clientRequestToken = (ContinueUpdateRollback -> Maybe Text)
-> (ContinueUpdateRollback -> Maybe Text -> ContinueUpdateRollback)
-> Lens
ContinueUpdateRollback
ContinueUpdateRollback
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueUpdateRollback' {Maybe Text
clientRequestToken :: Maybe Text
$sel:clientRequestToken:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
clientRequestToken} -> Maybe Text
clientRequestToken) (\s :: ContinueUpdateRollback
s@ContinueUpdateRollback' {} Maybe Text
a -> ContinueUpdateRollback
s {$sel:clientRequestToken:ContinueUpdateRollback' :: Maybe Text
clientRequestToken = Maybe Text
a} :: ContinueUpdateRollback)
continueUpdateRollback_roleARN :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe Prelude.Text)
continueUpdateRollback_roleARN :: (Maybe Text -> f (Maybe Text))
-> ContinueUpdateRollback -> f ContinueUpdateRollback
continueUpdateRollback_roleARN = (ContinueUpdateRollback -> Maybe Text)
-> (ContinueUpdateRollback -> Maybe Text -> ContinueUpdateRollback)
-> Lens
ContinueUpdateRollback
ContinueUpdateRollback
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueUpdateRollback' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: ContinueUpdateRollback
s@ContinueUpdateRollback' {} Maybe Text
a -> ContinueUpdateRollback
s {$sel:roleARN:ContinueUpdateRollback' :: Maybe Text
roleARN = Maybe Text
a} :: ContinueUpdateRollback)
continueUpdateRollback_stackName :: Lens.Lens' ContinueUpdateRollback Prelude.Text
continueUpdateRollback_stackName :: (Text -> f Text)
-> ContinueUpdateRollback -> f ContinueUpdateRollback
continueUpdateRollback_stackName = (ContinueUpdateRollback -> Text)
-> (ContinueUpdateRollback -> Text -> ContinueUpdateRollback)
-> Lens ContinueUpdateRollback ContinueUpdateRollback Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueUpdateRollback' {Text
stackName :: Text
$sel:stackName:ContinueUpdateRollback' :: ContinueUpdateRollback -> Text
stackName} -> Text
stackName) (\s :: ContinueUpdateRollback
s@ContinueUpdateRollback' {} Text
a -> ContinueUpdateRollback
s {$sel:stackName:ContinueUpdateRollback' :: Text
stackName = Text
a} :: ContinueUpdateRollback)
instance Core.AWSRequest ContinueUpdateRollback where
type
AWSResponse ContinueUpdateRollback =
ContinueUpdateRollbackResponse
request :: ContinueUpdateRollback -> Request ContinueUpdateRollback
request = Service -> ContinueUpdateRollback -> Request ContinueUpdateRollback
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy ContinueUpdateRollback
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ContinueUpdateRollback)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse ContinueUpdateRollback))
-> Logger
-> Service
-> Proxy ContinueUpdateRollback
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ContinueUpdateRollback)))
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
"ContinueUpdateRollbackResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> ContinueUpdateRollbackResponse
ContinueUpdateRollbackResponse'
(Int -> ContinueUpdateRollbackResponse)
-> Either String Int
-> Either String ContinueUpdateRollbackResponse
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 ContinueUpdateRollback
instance Prelude.NFData ContinueUpdateRollback
instance Core.ToHeaders ContinueUpdateRollback where
toHeaders :: ContinueUpdateRollback -> ResponseHeaders
toHeaders = ResponseHeaders -> ContinueUpdateRollback -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath ContinueUpdateRollback where
toPath :: ContinueUpdateRollback -> ByteString
toPath = ByteString -> ContinueUpdateRollback -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ContinueUpdateRollback where
toQuery :: ContinueUpdateRollback -> QueryString
toQuery ContinueUpdateRollback' {Maybe [Text]
Maybe Text
Text
stackName :: Text
roleARN :: Maybe Text
clientRequestToken :: Maybe Text
resourcesToSkip :: Maybe [Text]
$sel:stackName:ContinueUpdateRollback' :: ContinueUpdateRollback -> Text
$sel:roleARN:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
$sel:clientRequestToken:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
$sel:resourcesToSkip:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ContinueUpdateRollback" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"ResourcesToSkip"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourcesToSkip
),
ByteString
"ClientRequestToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clientRequestToken,
ByteString
"RoleARN" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
roleARN,
ByteString
"StackName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
stackName
]
data ContinueUpdateRollbackResponse = ContinueUpdateRollbackResponse'
{
ContinueUpdateRollbackResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
(ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool)
-> (ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool)
-> Eq ContinueUpdateRollbackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
$c/= :: ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
== :: ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
$c== :: ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
Prelude.Eq, ReadPrec [ContinueUpdateRollbackResponse]
ReadPrec ContinueUpdateRollbackResponse
Int -> ReadS ContinueUpdateRollbackResponse
ReadS [ContinueUpdateRollbackResponse]
(Int -> ReadS ContinueUpdateRollbackResponse)
-> ReadS [ContinueUpdateRollbackResponse]
-> ReadPrec ContinueUpdateRollbackResponse
-> ReadPrec [ContinueUpdateRollbackResponse]
-> Read ContinueUpdateRollbackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContinueUpdateRollbackResponse]
$creadListPrec :: ReadPrec [ContinueUpdateRollbackResponse]
readPrec :: ReadPrec ContinueUpdateRollbackResponse
$creadPrec :: ReadPrec ContinueUpdateRollbackResponse
readList :: ReadS [ContinueUpdateRollbackResponse]
$creadList :: ReadS [ContinueUpdateRollbackResponse]
readsPrec :: Int -> ReadS ContinueUpdateRollbackResponse
$creadsPrec :: Int -> ReadS ContinueUpdateRollbackResponse
Prelude.Read, Int -> ContinueUpdateRollbackResponse -> ShowS
[ContinueUpdateRollbackResponse] -> ShowS
ContinueUpdateRollbackResponse -> String
(Int -> ContinueUpdateRollbackResponse -> ShowS)
-> (ContinueUpdateRollbackResponse -> String)
-> ([ContinueUpdateRollbackResponse] -> ShowS)
-> Show ContinueUpdateRollbackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContinueUpdateRollbackResponse] -> ShowS
$cshowList :: [ContinueUpdateRollbackResponse] -> ShowS
show :: ContinueUpdateRollbackResponse -> String
$cshow :: ContinueUpdateRollbackResponse -> String
showsPrec :: Int -> ContinueUpdateRollbackResponse -> ShowS
$cshowsPrec :: Int -> ContinueUpdateRollbackResponse -> ShowS
Prelude.Show, (forall x.
ContinueUpdateRollbackResponse
-> Rep ContinueUpdateRollbackResponse x)
-> (forall x.
Rep ContinueUpdateRollbackResponse x
-> ContinueUpdateRollbackResponse)
-> Generic ContinueUpdateRollbackResponse
forall x.
Rep ContinueUpdateRollbackResponse x
-> ContinueUpdateRollbackResponse
forall x.
ContinueUpdateRollbackResponse
-> Rep ContinueUpdateRollbackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContinueUpdateRollbackResponse x
-> ContinueUpdateRollbackResponse
$cfrom :: forall x.
ContinueUpdateRollbackResponse
-> Rep ContinueUpdateRollbackResponse x
Prelude.Generic)
newContinueUpdateRollbackResponse ::
Prelude.Int ->
ContinueUpdateRollbackResponse
newContinueUpdateRollbackResponse :: Int -> ContinueUpdateRollbackResponse
newContinueUpdateRollbackResponse Int
pHttpStatus_ =
ContinueUpdateRollbackResponse' :: Int -> ContinueUpdateRollbackResponse
ContinueUpdateRollbackResponse'
{ $sel:httpStatus:ContinueUpdateRollbackResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
continueUpdateRollbackResponse_httpStatus :: Lens.Lens' ContinueUpdateRollbackResponse Prelude.Int
continueUpdateRollbackResponse_httpStatus :: (Int -> f Int)
-> ContinueUpdateRollbackResponse
-> f ContinueUpdateRollbackResponse
continueUpdateRollbackResponse_httpStatus = (ContinueUpdateRollbackResponse -> Int)
-> (ContinueUpdateRollbackResponse
-> Int -> ContinueUpdateRollbackResponse)
-> Lens
ContinueUpdateRollbackResponse
ContinueUpdateRollbackResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContinueUpdateRollbackResponse' {Int
httpStatus :: Int
$sel:httpStatus:ContinueUpdateRollbackResponse' :: ContinueUpdateRollbackResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ContinueUpdateRollbackResponse
s@ContinueUpdateRollbackResponse' {} Int
a -> ContinueUpdateRollbackResponse
s {$sel:httpStatus:ContinueUpdateRollbackResponse' :: Int
httpStatus = Int
a} :: ContinueUpdateRollbackResponse)
instance
Prelude.NFData
ContinueUpdateRollbackResponse