{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFormation.ContinueUpdateRollback
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- For a specified stack that\'s in the @UPDATE_ROLLBACK_FAILED@ state,
-- continues rolling it back to the @UPDATE_ROLLBACK_COMPLETE@ state.
-- Depending on the cause of the failure, you can manually
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed fix the error>
-- and continue the rollback. By continuing the rollback, you can return
-- your stack to a working state (the @UPDATE_ROLLBACK_COMPLETE@ state),
-- and then try to update the stack again.
--
-- A stack goes into the @UPDATE_ROLLBACK_FAILED@ state when CloudFormation
-- can\'t roll back all changes after a failed stack update. For example,
-- you might have a stack that\'s rolling back to an old database instance
-- that was deleted outside of CloudFormation. Because CloudFormation
-- doesn\'t know the database was deleted, it assumes that the database
-- instance still exists and attempts to roll back to it, causing the
-- update rollback to fail.
module Amazonka.CloudFormation.ContinueUpdateRollback
  ( -- * Creating a Request
    ContinueUpdateRollback (..),
    newContinueUpdateRollback,

    -- * Request Lenses
    continueUpdateRollback_clientRequestToken,
    continueUpdateRollback_resourcesToSkip,
    continueUpdateRollback_roleARN,
    continueUpdateRollback_stackName,

    -- * Destructuring the Response
    ContinueUpdateRollbackResponse (..),
    newContinueUpdateRollbackResponse,

    -- * Response Lenses
    continueUpdateRollbackResponse_httpStatus,
  )
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

-- | The input for the ContinueUpdateRollback action.
--
-- /See:/ 'newContinueUpdateRollback' smart constructor.
data ContinueUpdateRollback = ContinueUpdateRollback'
  { -- | A unique identifier for this @ContinueUpdateRollback@ request. Specify
    -- this token if you plan to retry requests so that CloudFormationknows
    -- that you\'re not attempting to continue the rollback to a stack with the
    -- same name. You might retry @ContinueUpdateRollback@ requests to ensure
    -- that CloudFormation successfully received them.
    ContinueUpdateRollback -> Maybe Text
clientRequestToken :: Prelude.Maybe Prelude.Text,
    -- | A list of the logical IDs of the resources that CloudFormation skips
    -- during the continue update rollback operation. You can specify only
    -- resources that are in the @UPDATE_FAILED@ state because a rollback
    -- failed. You can\'t specify resources that are in the @UPDATE_FAILED@
    -- state for other reasons, for example, because an update was canceled. To
    -- check why a resource update failed, use the DescribeStackResources
    -- action, and view the resource status reason.
    --
    -- Specify this property to skip rolling back resources that CloudFormation
    -- can\'t successfully roll back. We recommend that you
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed troubleshoot>
    -- resources before skipping them. CloudFormation sets the status of the
    -- specified resources to @UPDATE_COMPLETE@ and continues to roll back the
    -- stack. After the rollback is complete, the state of the skipped
    -- resources will be inconsistent with the state of the resources in the
    -- stack template. Before performing another stack update, you must update
    -- the stack or resources to be consistent with each other. If you don\'t,
    -- subsequent stack updates might fail, and the stack will become
    -- unrecoverable.
    --
    -- Specify the minimum number of resources required to successfully roll
    -- back your stack. For example, a failed resource update might cause
    -- dependent resources to fail. In this case, it might not be necessary to
    -- skip the dependent resources.
    --
    -- To skip resources that are part of nested stacks, use the following
    -- format: @NestedStackName.ResourceLogicalID@. If you want to specify the
    -- logical ID of a stack resource (@Type: AWS::CloudFormation::Stack@) in
    -- the @ResourcesToSkip@ list, then its corresponding embedded stack must
    -- be in one of the following states: @DELETE_IN_PROGRESS@,
    -- @DELETE_COMPLETE@, or @DELETE_FAILED@.
    --
    -- Don\'t confuse a child stack\'s name with its corresponding logical ID
    -- defined in the parent stack. For an example of a continue update
    -- rollback operation with nested stacks, see
    -- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks Using ResourcesToSkip to recover a nested stacks hierarchy>.
    ContinueUpdateRollback -> Maybe [Text]
resourcesToSkip :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of an Identity and Access Management
    -- (IAM) role that CloudFormation assumes to roll back the stack.
    -- CloudFormation uses the role\'s credentials to make calls on your
    -- behalf. CloudFormation always uses this role for all future operations
    -- on the stack. Provided that users have permission to operate on the
    -- stack, CloudFormation uses this role even if the users don\'t have
    -- permission to pass it. Ensure that the role grants least permission.
    --
    -- If you don\'t specify a value, CloudFormation uses the role that was
    -- previously associated with the stack. If no role is available,
    -- CloudFormation uses a temporary session that\'s generated from your user
    -- credentials.
    ContinueUpdateRollback -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
    -- | The name or the unique ID of the stack that you want to continue rolling
    -- back.
    --
    -- Don\'t specify the name of a nested stack (a stack that was created by
    -- using the @AWS::CloudFormation::Stack@ resource). Instead, use this
    -- operation on the parent stack (the stack that contains the
    -- @AWS::CloudFormation::Stack@ resource).
    ContinueUpdateRollback -> Text
stackName :: Prelude.Text
  }
  deriving (ContinueUpdateRollback -> ContinueUpdateRollback -> Bool
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]
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
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. 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)

-- |
-- Create a value of 'ContinueUpdateRollback' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientRequestToken', 'continueUpdateRollback_clientRequestToken' - A unique identifier for this @ContinueUpdateRollback@ request. Specify
-- this token if you plan to retry requests so that CloudFormationknows
-- that you\'re not attempting to continue the rollback to a stack with the
-- same name. You might retry @ContinueUpdateRollback@ requests to ensure
-- that CloudFormation successfully received them.
--
-- 'resourcesToSkip', 'continueUpdateRollback_resourcesToSkip' - A list of the logical IDs of the resources that CloudFormation skips
-- during the continue update rollback operation. You can specify only
-- resources that are in the @UPDATE_FAILED@ state because a rollback
-- failed. You can\'t specify resources that are in the @UPDATE_FAILED@
-- state for other reasons, for example, because an update was canceled. To
-- check why a resource update failed, use the DescribeStackResources
-- action, and view the resource status reason.
--
-- Specify this property to skip rolling back resources that CloudFormation
-- can\'t successfully roll back. We recommend that you
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed troubleshoot>
-- resources before skipping them. CloudFormation sets the status of the
-- specified resources to @UPDATE_COMPLETE@ and continues to roll back the
-- stack. After the rollback is complete, the state of the skipped
-- resources will be inconsistent with the state of the resources in the
-- stack template. Before performing another stack update, you must update
-- the stack or resources to be consistent with each other. If you don\'t,
-- subsequent stack updates might fail, and the stack will become
-- unrecoverable.
--
-- Specify the minimum number of resources required to successfully roll
-- back your stack. For example, a failed resource update might cause
-- dependent resources to fail. In this case, it might not be necessary to
-- skip the dependent resources.
--
-- To skip resources that are part of nested stacks, use the following
-- format: @NestedStackName.ResourceLogicalID@. If you want to specify the
-- logical ID of a stack resource (@Type: AWS::CloudFormation::Stack@) in
-- the @ResourcesToSkip@ list, then its corresponding embedded stack must
-- be in one of the following states: @DELETE_IN_PROGRESS@,
-- @DELETE_COMPLETE@, or @DELETE_FAILED@.
--
-- Don\'t confuse a child stack\'s name with its corresponding logical ID
-- defined in the parent stack. For an example of a continue update
-- rollback operation with nested stacks, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks Using ResourcesToSkip to recover a nested stacks hierarchy>.
--
-- 'roleARN', 'continueUpdateRollback_roleARN' - The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes to roll back the stack.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation always uses this role for all future operations
-- on the stack. Provided that users have permission to operate on the
-- stack, CloudFormation uses this role even if the users don\'t have
-- permission to pass it. Ensure that the role grants least permission.
--
-- If you don\'t specify a value, CloudFormation uses the role that was
-- previously associated with the stack. If no role is available,
-- CloudFormation uses a temporary session that\'s generated from your user
-- credentials.
--
-- 'stackName', 'continueUpdateRollback_stackName' - The name or the unique ID of the stack that you want to continue rolling
-- back.
--
-- Don\'t specify the name of a nested stack (a stack that was created by
-- using the @AWS::CloudFormation::Stack@ resource). Instead, use this
-- operation on the parent stack (the stack that contains the
-- @AWS::CloudFormation::Stack@ resource).
newContinueUpdateRollback ::
  -- | 'stackName'
  Prelude.Text ->
  ContinueUpdateRollback
newContinueUpdateRollback :: Text -> ContinueUpdateRollback
newContinueUpdateRollback Text
pStackName_ =
  ContinueUpdateRollback'
    { $sel:clientRequestToken:ContinueUpdateRollback' :: Maybe Text
clientRequestToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:resourcesToSkip:ContinueUpdateRollback' :: Maybe [Text]
resourcesToSkip = forall a. Maybe a
Prelude.Nothing,
      $sel:roleARN:ContinueUpdateRollback' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
      $sel:stackName:ContinueUpdateRollback' :: Text
stackName = Text
pStackName_
    }

-- | A unique identifier for this @ContinueUpdateRollback@ request. Specify
-- this token if you plan to retry requests so that CloudFormationknows
-- that you\'re not attempting to continue the rollback to a stack with the
-- same name. You might retry @ContinueUpdateRollback@ requests to ensure
-- that CloudFormation successfully received them.
continueUpdateRollback_clientRequestToken :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe Prelude.Text)
continueUpdateRollback_clientRequestToken :: Lens' ContinueUpdateRollback (Maybe Text)
continueUpdateRollback_clientRequestToken = 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)

-- | A list of the logical IDs of the resources that CloudFormation skips
-- during the continue update rollback operation. You can specify only
-- resources that are in the @UPDATE_FAILED@ state because a rollback
-- failed. You can\'t specify resources that are in the @UPDATE_FAILED@
-- state for other reasons, for example, because an update was canceled. To
-- check why a resource update failed, use the DescribeStackResources
-- action, and view the resource status reason.
--
-- Specify this property to skip rolling back resources that CloudFormation
-- can\'t successfully roll back. We recommend that you
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-update-rollback-failed troubleshoot>
-- resources before skipping them. CloudFormation sets the status of the
-- specified resources to @UPDATE_COMPLETE@ and continues to roll back the
-- stack. After the rollback is complete, the state of the skipped
-- resources will be inconsistent with the state of the resources in the
-- stack template. Before performing another stack update, you must update
-- the stack or resources to be consistent with each other. If you don\'t,
-- subsequent stack updates might fail, and the stack will become
-- unrecoverable.
--
-- Specify the minimum number of resources required to successfully roll
-- back your stack. For example, a failed resource update might cause
-- dependent resources to fail. In this case, it might not be necessary to
-- skip the dependent resources.
--
-- To skip resources that are part of nested stacks, use the following
-- format: @NestedStackName.ResourceLogicalID@. If you want to specify the
-- logical ID of a stack resource (@Type: AWS::CloudFormation::Stack@) in
-- the @ResourcesToSkip@ list, then its corresponding embedded stack must
-- be in one of the following states: @DELETE_IN_PROGRESS@,
-- @DELETE_COMPLETE@, or @DELETE_FAILED@.
--
-- Don\'t confuse a child stack\'s name with its corresponding logical ID
-- defined in the parent stack. For an example of a continue update
-- rollback operation with nested stacks, see
-- <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html#nested-stacks Using ResourcesToSkip to recover a nested stacks hierarchy>.
continueUpdateRollback_resourcesToSkip :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe [Prelude.Text])
continueUpdateRollback_resourcesToSkip :: Lens' ContinueUpdateRollback (Maybe [Text])
continueUpdateRollback_resourcesToSkip = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of an Identity and Access Management
-- (IAM) role that CloudFormation assumes to roll back the stack.
-- CloudFormation uses the role\'s credentials to make calls on your
-- behalf. CloudFormation always uses this role for all future operations
-- on the stack. Provided that users have permission to operate on the
-- stack, CloudFormation uses this role even if the users don\'t have
-- permission to pass it. Ensure that the role grants least permission.
--
-- If you don\'t specify a value, CloudFormation uses the role that was
-- previously associated with the stack. If no role is available,
-- CloudFormation uses a temporary session that\'s generated from your user
-- credentials.
continueUpdateRollback_roleARN :: Lens.Lens' ContinueUpdateRollback (Prelude.Maybe Prelude.Text)
continueUpdateRollback_roleARN :: Lens' ContinueUpdateRollback (Maybe Text)
continueUpdateRollback_roleARN = 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)

-- | The name or the unique ID of the stack that you want to continue rolling
-- back.
--
-- Don\'t specify the name of a nested stack (a stack that was created by
-- using the @AWS::CloudFormation::Stack@ resource). Instead, use this
-- operation on the parent stack (the stack that contains the
-- @AWS::CloudFormation::Stack@ resource).
continueUpdateRollback_stackName :: Lens.Lens' ContinueUpdateRollback Prelude.Text
continueUpdateRollback_stackName :: Lens' ContinueUpdateRollback Text
continueUpdateRollback_stackName = 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 :: (Service -> Service)
-> ContinueUpdateRollback -> Request ContinueUpdateRollback
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 ContinueUpdateRollback
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ContinueUpdateRollback)))
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
"ContinueUpdateRollbackResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> ContinueUpdateRollbackResponse
ContinueUpdateRollbackResponse'
            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))
      )

instance Prelude.Hashable ContinueUpdateRollback where
  hashWithSalt :: Int -> ContinueUpdateRollback -> Int
hashWithSalt Int
_salt ContinueUpdateRollback' {Maybe [Text]
Maybe Text
Text
stackName :: Text
roleARN :: Maybe Text
resourcesToSkip :: Maybe [Text]
clientRequestToken :: Maybe Text
$sel:stackName:ContinueUpdateRollback' :: ContinueUpdateRollback -> Text
$sel:roleARN:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
$sel:resourcesToSkip:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe [Text]
$sel:clientRequestToken:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientRequestToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
resourcesToSkip
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stackName

instance Prelude.NFData ContinueUpdateRollback where
  rnf :: ContinueUpdateRollback -> ()
rnf ContinueUpdateRollback' {Maybe [Text]
Maybe Text
Text
stackName :: Text
roleARN :: Maybe Text
resourcesToSkip :: Maybe [Text]
clientRequestToken :: Maybe Text
$sel:stackName:ContinueUpdateRollback' :: ContinueUpdateRollback -> Text
$sel:roleARN:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
$sel:resourcesToSkip:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe [Text]
$sel:clientRequestToken:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientRequestToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
resourcesToSkip
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
stackName

instance Data.ToHeaders ContinueUpdateRollback where
  toHeaders :: ContinueUpdateRollback -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath ContinueUpdateRollback where
  toPath :: ContinueUpdateRollback -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery ContinueUpdateRollback where
  toQuery :: ContinueUpdateRollback -> QueryString
toQuery ContinueUpdateRollback' {Maybe [Text]
Maybe Text
Text
stackName :: Text
roleARN :: Maybe Text
resourcesToSkip :: Maybe [Text]
clientRequestToken :: Maybe Text
$sel:stackName:ContinueUpdateRollback' :: ContinueUpdateRollback -> Text
$sel:roleARN:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
$sel:resourcesToSkip:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe [Text]
$sel:clientRequestToken:ContinueUpdateRollback' :: ContinueUpdateRollback -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"ContinueUpdateRollback" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
        ByteString
"ClientRequestToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientRequestToken,
        ByteString
"ResourcesToSkip"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourcesToSkip
            ),
        ByteString
"RoleARN" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
roleARN,
        ByteString
"StackName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
stackName
      ]

-- | The output for a ContinueUpdateRollback operation.
--
-- /See:/ 'newContinueUpdateRollbackResponse' smart constructor.
data ContinueUpdateRollbackResponse = ContinueUpdateRollbackResponse'
  { -- | The response's http status code.
    ContinueUpdateRollbackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ContinueUpdateRollbackResponse
-> ContinueUpdateRollbackResponse -> Bool
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]
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
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.
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)

-- |
-- Create a value of 'ContinueUpdateRollbackResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'continueUpdateRollbackResponse_httpStatus' - The response's http status code.
newContinueUpdateRollbackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ContinueUpdateRollbackResponse
newContinueUpdateRollbackResponse :: Int -> ContinueUpdateRollbackResponse
newContinueUpdateRollbackResponse Int
pHttpStatus_ =
  ContinueUpdateRollbackResponse'
    { $sel:httpStatus:ContinueUpdateRollbackResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

-- | The response's http status code.
continueUpdateRollbackResponse_httpStatus :: Lens.Lens' ContinueUpdateRollbackResponse Prelude.Int
continueUpdateRollbackResponse_httpStatus :: Lens' ContinueUpdateRollbackResponse Int
continueUpdateRollbackResponse_httpStatus = 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
  where
  rnf :: ContinueUpdateRollbackResponse -> ()
rnf ContinueUpdateRollbackResponse' {Int
httpStatus :: Int
$sel:httpStatus:ContinueUpdateRollbackResponse' :: ContinueUpdateRollbackResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus