{-# 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.SecretsManager.CancelRotateSecret
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Disables automatic scheduled rotation and cancels the rotation of a
-- secret if currently in progress.
--
-- To re-enable scheduled rotation, call RotateSecret with
-- @AutomaticallyRotateAfterDays@ set to a value greater than 0. This
-- immediately rotates your secret and then enables the automatic schedule.
--
-- If you cancel a rotation while in progress, it can leave the
-- @VersionStage@ labels in an unexpected state. Depending on the step of
-- the rotation in progress, you might need to remove the staging label
-- @AWSPENDING@ from the partially created version, specified by the
-- @VersionId@ response value. You should also evaluate the partially
-- rotated new version to see if it should be deleted, which you can do by
-- removing all staging labels from the new version @VersionStage@ field.
--
-- To successfully start a rotation, the staging label @AWSPENDING@ must be
-- in one of the following states:
--
-- -   Not attached to any version at all
--
-- -   Attached to the same version as the staging label @AWSCURRENT@
--
-- If the staging label @AWSPENDING@ attached to a different version than
-- the version with @AWSCURRENT@ then the attempt to rotate fails.
--
-- __Minimum permissions__
--
-- To run this command, you must have the following permissions:
--
-- -   secretsmanager:CancelRotateSecret
--
-- __Related operations__
--
-- -   To configure rotation for a secret or to manually trigger a
--     rotation, use RotateSecret.
--
-- -   To get the rotation configuration details for a secret, use
--     DescribeSecret.
--
-- -   To list all of the currently available secrets, use ListSecrets.
--
-- -   To list all of the versions currently associated with a secret, use
--     ListSecretVersionIds.
module Amazonka.SecretsManager.CancelRotateSecret
  ( -- * Creating a Request
    CancelRotateSecret (..),
    newCancelRotateSecret,

    -- * Request Lenses
    cancelRotateSecret_secretId,

    -- * Destructuring the Response
    CancelRotateSecretResponse (..),
    newCancelRotateSecretResponse,

    -- * Response Lenses
    cancelRotateSecretResponse_versionId,
    cancelRotateSecretResponse_arn,
    cancelRotateSecretResponse_name,
    cancelRotateSecretResponse_httpStatus,
  )
where

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
import Amazonka.SecretsManager.Types

-- | /See:/ 'newCancelRotateSecret' smart constructor.
data CancelRotateSecret = CancelRotateSecret'
  { -- | Specifies the secret to cancel a rotation request. You can specify
    -- either the Amazon Resource Name (ARN) or the friendly name of the
    -- secret.
    --
    -- For an ARN, we recommend that you specify a complete ARN rather than a
    -- partial ARN.
    CancelRotateSecret -> Text
secretId :: Prelude.Text
  }
  deriving (CancelRotateSecret -> CancelRotateSecret -> Bool
(CancelRotateSecret -> CancelRotateSecret -> Bool)
-> (CancelRotateSecret -> CancelRotateSecret -> Bool)
-> Eq CancelRotateSecret
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelRotateSecret -> CancelRotateSecret -> Bool
$c/= :: CancelRotateSecret -> CancelRotateSecret -> Bool
== :: CancelRotateSecret -> CancelRotateSecret -> Bool
$c== :: CancelRotateSecret -> CancelRotateSecret -> Bool
Prelude.Eq, ReadPrec [CancelRotateSecret]
ReadPrec CancelRotateSecret
Int -> ReadS CancelRotateSecret
ReadS [CancelRotateSecret]
(Int -> ReadS CancelRotateSecret)
-> ReadS [CancelRotateSecret]
-> ReadPrec CancelRotateSecret
-> ReadPrec [CancelRotateSecret]
-> Read CancelRotateSecret
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelRotateSecret]
$creadListPrec :: ReadPrec [CancelRotateSecret]
readPrec :: ReadPrec CancelRotateSecret
$creadPrec :: ReadPrec CancelRotateSecret
readList :: ReadS [CancelRotateSecret]
$creadList :: ReadS [CancelRotateSecret]
readsPrec :: Int -> ReadS CancelRotateSecret
$creadsPrec :: Int -> ReadS CancelRotateSecret
Prelude.Read, Int -> CancelRotateSecret -> ShowS
[CancelRotateSecret] -> ShowS
CancelRotateSecret -> String
(Int -> CancelRotateSecret -> ShowS)
-> (CancelRotateSecret -> String)
-> ([CancelRotateSecret] -> ShowS)
-> Show CancelRotateSecret
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelRotateSecret] -> ShowS
$cshowList :: [CancelRotateSecret] -> ShowS
show :: CancelRotateSecret -> String
$cshow :: CancelRotateSecret -> String
showsPrec :: Int -> CancelRotateSecret -> ShowS
$cshowsPrec :: Int -> CancelRotateSecret -> ShowS
Prelude.Show, (forall x. CancelRotateSecret -> Rep CancelRotateSecret x)
-> (forall x. Rep CancelRotateSecret x -> CancelRotateSecret)
-> Generic CancelRotateSecret
forall x. Rep CancelRotateSecret x -> CancelRotateSecret
forall x. CancelRotateSecret -> Rep CancelRotateSecret x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CancelRotateSecret x -> CancelRotateSecret
$cfrom :: forall x. CancelRotateSecret -> Rep CancelRotateSecret x
Prelude.Generic)

-- |
-- Create a value of 'CancelRotateSecret' 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:
--
-- 'secretId', 'cancelRotateSecret_secretId' - Specifies the secret to cancel a rotation request. You can specify
-- either the Amazon Resource Name (ARN) or the friendly name of the
-- secret.
--
-- For an ARN, we recommend that you specify a complete ARN rather than a
-- partial ARN.
newCancelRotateSecret ::
  -- | 'secretId'
  Prelude.Text ->
  CancelRotateSecret
newCancelRotateSecret :: Text -> CancelRotateSecret
newCancelRotateSecret Text
pSecretId_ =
  CancelRotateSecret' :: Text -> CancelRotateSecret
CancelRotateSecret' {$sel:secretId:CancelRotateSecret' :: Text
secretId = Text
pSecretId_}

-- | Specifies the secret to cancel a rotation request. You can specify
-- either the Amazon Resource Name (ARN) or the friendly name of the
-- secret.
--
-- For an ARN, we recommend that you specify a complete ARN rather than a
-- partial ARN.
cancelRotateSecret_secretId :: Lens.Lens' CancelRotateSecret Prelude.Text
cancelRotateSecret_secretId :: (Text -> f Text) -> CancelRotateSecret -> f CancelRotateSecret
cancelRotateSecret_secretId = (CancelRotateSecret -> Text)
-> (CancelRotateSecret -> Text -> CancelRotateSecret)
-> Lens CancelRotateSecret CancelRotateSecret Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelRotateSecret' {Text
secretId :: Text
$sel:secretId:CancelRotateSecret' :: CancelRotateSecret -> Text
secretId} -> Text
secretId) (\s :: CancelRotateSecret
s@CancelRotateSecret' {} Text
a -> CancelRotateSecret
s {$sel:secretId:CancelRotateSecret' :: Text
secretId = Text
a} :: CancelRotateSecret)

instance Core.AWSRequest CancelRotateSecret where
  type
    AWSResponse CancelRotateSecret =
      CancelRotateSecretResponse
  request :: CancelRotateSecret -> Request CancelRotateSecret
request = Service -> CancelRotateSecret -> Request CancelRotateSecret
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CancelRotateSecret
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CancelRotateSecret)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CancelRotateSecret))
-> Logger
-> Service
-> Proxy CancelRotateSecret
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CancelRotateSecret)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CancelRotateSecretResponse
CancelRotateSecretResponse'
            (Maybe Text
 -> Maybe Text -> Maybe Text -> Int -> CancelRotateSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe Text -> Int -> CancelRotateSecretResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VersionId")
            Either
  String
  (Maybe Text -> Maybe Text -> Int -> CancelRotateSecretResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CancelRotateSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ARN")
            Either String (Maybe Text -> Int -> CancelRotateSecretResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CancelRotateSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either String (Int -> CancelRotateSecretResponse)
-> Either String Int -> Either String CancelRotateSecretResponse
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 CancelRotateSecret

instance Prelude.NFData CancelRotateSecret

instance Core.ToHeaders CancelRotateSecret where
  toHeaders :: CancelRotateSecret -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CancelRotateSecret -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"secretsmanager.CancelRotateSecret" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CancelRotateSecret where
  toJSON :: CancelRotateSecret -> Value
toJSON CancelRotateSecret' {Text
secretId :: Text
$sel:secretId:CancelRotateSecret' :: CancelRotateSecret -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SecretId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
secretId)]
      )

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

instance Core.ToQuery CancelRotateSecret where
  toQuery :: CancelRotateSecret -> QueryString
toQuery = QueryString -> CancelRotateSecret -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCancelRotateSecretResponse' smart constructor.
data CancelRotateSecretResponse = CancelRotateSecretResponse'
  { -- | The unique identifier of the version of the secret created during the
    -- rotation. This version might not be complete, and should be evaluated
    -- for possible deletion. At the very least, you should remove the
    -- @VersionStage@ value @AWSPENDING@ to enable this version to be deleted.
    -- Failing to clean up a cancelled rotation can block you from successfully
    -- starting future rotations.
    CancelRotateSecretResponse -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the secret for which rotation was canceled.
    CancelRotateSecretResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The friendly name of the secret for which rotation was canceled.
    CancelRotateSecretResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CancelRotateSecretResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool
(CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool)
-> (CancelRotateSecretResponse
    -> CancelRotateSecretResponse -> Bool)
-> Eq CancelRotateSecretResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool
$c/= :: CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool
== :: CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool
$c== :: CancelRotateSecretResponse -> CancelRotateSecretResponse -> Bool
Prelude.Eq, ReadPrec [CancelRotateSecretResponse]
ReadPrec CancelRotateSecretResponse
Int -> ReadS CancelRotateSecretResponse
ReadS [CancelRotateSecretResponse]
(Int -> ReadS CancelRotateSecretResponse)
-> ReadS [CancelRotateSecretResponse]
-> ReadPrec CancelRotateSecretResponse
-> ReadPrec [CancelRotateSecretResponse]
-> Read CancelRotateSecretResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelRotateSecretResponse]
$creadListPrec :: ReadPrec [CancelRotateSecretResponse]
readPrec :: ReadPrec CancelRotateSecretResponse
$creadPrec :: ReadPrec CancelRotateSecretResponse
readList :: ReadS [CancelRotateSecretResponse]
$creadList :: ReadS [CancelRotateSecretResponse]
readsPrec :: Int -> ReadS CancelRotateSecretResponse
$creadsPrec :: Int -> ReadS CancelRotateSecretResponse
Prelude.Read, Int -> CancelRotateSecretResponse -> ShowS
[CancelRotateSecretResponse] -> ShowS
CancelRotateSecretResponse -> String
(Int -> CancelRotateSecretResponse -> ShowS)
-> (CancelRotateSecretResponse -> String)
-> ([CancelRotateSecretResponse] -> ShowS)
-> Show CancelRotateSecretResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelRotateSecretResponse] -> ShowS
$cshowList :: [CancelRotateSecretResponse] -> ShowS
show :: CancelRotateSecretResponse -> String
$cshow :: CancelRotateSecretResponse -> String
showsPrec :: Int -> CancelRotateSecretResponse -> ShowS
$cshowsPrec :: Int -> CancelRotateSecretResponse -> ShowS
Prelude.Show, (forall x.
 CancelRotateSecretResponse -> Rep CancelRotateSecretResponse x)
-> (forall x.
    Rep CancelRotateSecretResponse x -> CancelRotateSecretResponse)
-> Generic CancelRotateSecretResponse
forall x.
Rep CancelRotateSecretResponse x -> CancelRotateSecretResponse
forall x.
CancelRotateSecretResponse -> Rep CancelRotateSecretResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CancelRotateSecretResponse x -> CancelRotateSecretResponse
$cfrom :: forall x.
CancelRotateSecretResponse -> Rep CancelRotateSecretResponse x
Prelude.Generic)

-- |
-- Create a value of 'CancelRotateSecretResponse' 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:
--
-- 'versionId', 'cancelRotateSecretResponse_versionId' - The unique identifier of the version of the secret created during the
-- rotation. This version might not be complete, and should be evaluated
-- for possible deletion. At the very least, you should remove the
-- @VersionStage@ value @AWSPENDING@ to enable this version to be deleted.
-- Failing to clean up a cancelled rotation can block you from successfully
-- starting future rotations.
--
-- 'arn', 'cancelRotateSecretResponse_arn' - The ARN of the secret for which rotation was canceled.
--
-- 'name', 'cancelRotateSecretResponse_name' - The friendly name of the secret for which rotation was canceled.
--
-- 'httpStatus', 'cancelRotateSecretResponse_httpStatus' - The response's http status code.
newCancelRotateSecretResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CancelRotateSecretResponse
newCancelRotateSecretResponse :: Int -> CancelRotateSecretResponse
newCancelRotateSecretResponse Int
pHttpStatus_ =
  CancelRotateSecretResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CancelRotateSecretResponse
CancelRotateSecretResponse'
    { $sel:versionId:CancelRotateSecretResponse' :: Maybe Text
versionId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CancelRotateSecretResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CancelRotateSecretResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CancelRotateSecretResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique identifier of the version of the secret created during the
-- rotation. This version might not be complete, and should be evaluated
-- for possible deletion. At the very least, you should remove the
-- @VersionStage@ value @AWSPENDING@ to enable this version to be deleted.
-- Failing to clean up a cancelled rotation can block you from successfully
-- starting future rotations.
cancelRotateSecretResponse_versionId :: Lens.Lens' CancelRotateSecretResponse (Prelude.Maybe Prelude.Text)
cancelRotateSecretResponse_versionId :: (Maybe Text -> f (Maybe Text))
-> CancelRotateSecretResponse -> f CancelRotateSecretResponse
cancelRotateSecretResponse_versionId = (CancelRotateSecretResponse -> Maybe Text)
-> (CancelRotateSecretResponse
    -> Maybe Text -> CancelRotateSecretResponse)
-> Lens
     CancelRotateSecretResponse
     CancelRotateSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelRotateSecretResponse' {Maybe Text
versionId :: Maybe Text
$sel:versionId:CancelRotateSecretResponse' :: CancelRotateSecretResponse -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: CancelRotateSecretResponse
s@CancelRotateSecretResponse' {} Maybe Text
a -> CancelRotateSecretResponse
s {$sel:versionId:CancelRotateSecretResponse' :: Maybe Text
versionId = Maybe Text
a} :: CancelRotateSecretResponse)

-- | The ARN of the secret for which rotation was canceled.
cancelRotateSecretResponse_arn :: Lens.Lens' CancelRotateSecretResponse (Prelude.Maybe Prelude.Text)
cancelRotateSecretResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CancelRotateSecretResponse -> f CancelRotateSecretResponse
cancelRotateSecretResponse_arn = (CancelRotateSecretResponse -> Maybe Text)
-> (CancelRotateSecretResponse
    -> Maybe Text -> CancelRotateSecretResponse)
-> Lens
     CancelRotateSecretResponse
     CancelRotateSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelRotateSecretResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CancelRotateSecretResponse' :: CancelRotateSecretResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CancelRotateSecretResponse
s@CancelRotateSecretResponse' {} Maybe Text
a -> CancelRotateSecretResponse
s {$sel:arn:CancelRotateSecretResponse' :: Maybe Text
arn = Maybe Text
a} :: CancelRotateSecretResponse)

-- | The friendly name of the secret for which rotation was canceled.
cancelRotateSecretResponse_name :: Lens.Lens' CancelRotateSecretResponse (Prelude.Maybe Prelude.Text)
cancelRotateSecretResponse_name :: (Maybe Text -> f (Maybe Text))
-> CancelRotateSecretResponse -> f CancelRotateSecretResponse
cancelRotateSecretResponse_name = (CancelRotateSecretResponse -> Maybe Text)
-> (CancelRotateSecretResponse
    -> Maybe Text -> CancelRotateSecretResponse)
-> Lens
     CancelRotateSecretResponse
     CancelRotateSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelRotateSecretResponse' {Maybe Text
name :: Maybe Text
$sel:name:CancelRotateSecretResponse' :: CancelRotateSecretResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CancelRotateSecretResponse
s@CancelRotateSecretResponse' {} Maybe Text
a -> CancelRotateSecretResponse
s {$sel:name:CancelRotateSecretResponse' :: Maybe Text
name = Maybe Text
a} :: CancelRotateSecretResponse)

-- | The response's http status code.
cancelRotateSecretResponse_httpStatus :: Lens.Lens' CancelRotateSecretResponse Prelude.Int
cancelRotateSecretResponse_httpStatus :: (Int -> f Int)
-> CancelRotateSecretResponse -> f CancelRotateSecretResponse
cancelRotateSecretResponse_httpStatus = (CancelRotateSecretResponse -> Int)
-> (CancelRotateSecretResponse
    -> Int -> CancelRotateSecretResponse)
-> Lens
     CancelRotateSecretResponse CancelRotateSecretResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelRotateSecretResponse' {Int
httpStatus :: Int
$sel:httpStatus:CancelRotateSecretResponse' :: CancelRotateSecretResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CancelRotateSecretResponse
s@CancelRotateSecretResponse' {} Int
a -> CancelRotateSecretResponse
s {$sel:httpStatus:CancelRotateSecretResponse' :: Int
httpStatus = Int
a} :: CancelRotateSecretResponse)

instance Prelude.NFData CancelRotateSecretResponse