{-# 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.DescribeSecret
-- 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)
--
-- Retrieves the details of a secret. It does not include the encrypted
-- fields. Secrets Manager only returns fields populated with a value in
-- the response.
--
-- __Minimum permissions__
--
-- To run this command, you must have the following permissions:
--
-- -   secretsmanager:DescribeSecret
--
-- __Related operations__
--
-- -   To create a secret, use CreateSecret.
--
-- -   To modify a secret, use UpdateSecret.
--
-- -   To retrieve the encrypted secret information in a version of the
--     secret, use GetSecretValue.
--
-- -   To list all of the secrets in the Amazon Web Services account, use
--     ListSecrets.
module Amazonka.SecretsManager.DescribeSecret
  ( -- * Creating a Request
    DescribeSecret (..),
    newDescribeSecret,

    -- * Request Lenses
    describeSecret_secretId,

    -- * Destructuring the Response
    DescribeSecretResponse (..),
    newDescribeSecretResponse,

    -- * Response Lenses
    describeSecretResponse_lastChangedDate,
    describeSecretResponse_primaryRegion,
    describeSecretResponse_arn,
    describeSecretResponse_rotationRules,
    describeSecretResponse_deletedDate,
    describeSecretResponse_rotationEnabled,
    describeSecretResponse_createdDate,
    describeSecretResponse_kmsKeyId,
    describeSecretResponse_name,
    describeSecretResponse_versionIdsToStages,
    describeSecretResponse_replicationStatus,
    describeSecretResponse_owningService,
    describeSecretResponse_lastRotatedDate,
    describeSecretResponse_lastAccessedDate,
    describeSecretResponse_description,
    describeSecretResponse_rotationLambdaARN,
    describeSecretResponse_tags,
    describeSecretResponse_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:/ 'newDescribeSecret' smart constructor.
data DescribeSecret = DescribeSecret'
  { -- | The identifier of the secret whose details you want to retrieve. 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.
    DescribeSecret -> Text
secretId :: Prelude.Text
  }
  deriving (DescribeSecret -> DescribeSecret -> Bool
(DescribeSecret -> DescribeSecret -> Bool)
-> (DescribeSecret -> DescribeSecret -> Bool) -> Eq DescribeSecret
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSecret -> DescribeSecret -> Bool
$c/= :: DescribeSecret -> DescribeSecret -> Bool
== :: DescribeSecret -> DescribeSecret -> Bool
$c== :: DescribeSecret -> DescribeSecret -> Bool
Prelude.Eq, ReadPrec [DescribeSecret]
ReadPrec DescribeSecret
Int -> ReadS DescribeSecret
ReadS [DescribeSecret]
(Int -> ReadS DescribeSecret)
-> ReadS [DescribeSecret]
-> ReadPrec DescribeSecret
-> ReadPrec [DescribeSecret]
-> Read DescribeSecret
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSecret]
$creadListPrec :: ReadPrec [DescribeSecret]
readPrec :: ReadPrec DescribeSecret
$creadPrec :: ReadPrec DescribeSecret
readList :: ReadS [DescribeSecret]
$creadList :: ReadS [DescribeSecret]
readsPrec :: Int -> ReadS DescribeSecret
$creadsPrec :: Int -> ReadS DescribeSecret
Prelude.Read, Int -> DescribeSecret -> ShowS
[DescribeSecret] -> ShowS
DescribeSecret -> String
(Int -> DescribeSecret -> ShowS)
-> (DescribeSecret -> String)
-> ([DescribeSecret] -> ShowS)
-> Show DescribeSecret
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSecret] -> ShowS
$cshowList :: [DescribeSecret] -> ShowS
show :: DescribeSecret -> String
$cshow :: DescribeSecret -> String
showsPrec :: Int -> DescribeSecret -> ShowS
$cshowsPrec :: Int -> DescribeSecret -> ShowS
Prelude.Show, (forall x. DescribeSecret -> Rep DescribeSecret x)
-> (forall x. Rep DescribeSecret x -> DescribeSecret)
-> Generic DescribeSecret
forall x. Rep DescribeSecret x -> DescribeSecret
forall x. DescribeSecret -> Rep DescribeSecret x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSecret x -> DescribeSecret
$cfrom :: forall x. DescribeSecret -> Rep DescribeSecret x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSecret' 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', 'describeSecret_secretId' - The identifier of the secret whose details you want to retrieve. 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.
newDescribeSecret ::
  -- | 'secretId'
  Prelude.Text ->
  DescribeSecret
newDescribeSecret :: Text -> DescribeSecret
newDescribeSecret Text
pSecretId_ =
  DescribeSecret' :: Text -> DescribeSecret
DescribeSecret' {$sel:secretId:DescribeSecret' :: Text
secretId = Text
pSecretId_}

-- | The identifier of the secret whose details you want to retrieve. 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.
describeSecret_secretId :: Lens.Lens' DescribeSecret Prelude.Text
describeSecret_secretId :: (Text -> f Text) -> DescribeSecret -> f DescribeSecret
describeSecret_secretId = (DescribeSecret -> Text)
-> (DescribeSecret -> Text -> DescribeSecret)
-> Lens DescribeSecret DescribeSecret Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecret' {Text
secretId :: Text
$sel:secretId:DescribeSecret' :: DescribeSecret -> Text
secretId} -> Text
secretId) (\s :: DescribeSecret
s@DescribeSecret' {} Text
a -> DescribeSecret
s {$sel:secretId:DescribeSecret' :: Text
secretId = Text
a} :: DescribeSecret)

instance Core.AWSRequest DescribeSecret where
  type
    AWSResponse DescribeSecret =
      DescribeSecretResponse
  request :: DescribeSecret -> Request DescribeSecret
request = Service -> DescribeSecret -> Request DescribeSecret
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeSecret
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeSecret)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeSecret))
-> Logger
-> Service
-> Proxy DescribeSecret
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeSecret)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe RotationRulesType
-> Maybe POSIX
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text (NonEmpty Text))
-> Maybe [ReplicationStatusType]
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Int
-> DescribeSecretResponse
DescribeSecretResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe RotationRulesType
 -> Maybe POSIX
 -> Maybe Bool
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text (NonEmpty Text))
 -> Maybe [ReplicationStatusType]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Tag]
 -> Int
 -> DescribeSecretResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe RotationRulesType
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastChangedDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe RotationRulesType
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe RotationRulesType
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
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
"PrimaryRegion")
            Either
  String
  (Maybe Text
   -> Maybe RotationRulesType
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RotationRulesType
      -> Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
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 RotationRulesType
   -> Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe RotationRulesType)
-> Either
     String
     (Maybe POSIX
      -> Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RotationRulesType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RotationRules")
            Either
  String
  (Maybe POSIX
   -> Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Bool
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DeletedDate")
            Either
  String
  (Maybe Bool
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RotationEnabled")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedDate")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
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
"KmsKeyId")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text (NonEmpty Text))
      -> Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
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
  (Maybe (HashMap Text (NonEmpty Text))
   -> Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe (HashMap Text (NonEmpty Text)))
-> Either
     String
     (Maybe [ReplicationStatusType]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text (NonEmpty Text))))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"VersionIdsToStages"
                            Either String (Maybe (Maybe (HashMap Text (NonEmpty Text))))
-> Maybe (HashMap Text (NonEmpty Text))
-> Either String (Maybe (HashMap Text (NonEmpty Text)))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text (NonEmpty Text))
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe [ReplicationStatusType]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe [ReplicationStatusType])
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ReplicationStatusType]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReplicationStatus"
                            Either String (Maybe (Maybe [ReplicationStatusType]))
-> Maybe [ReplicationStatusType]
-> Either String (Maybe [ReplicationStatusType])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ReplicationStatusType]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
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
"OwningService")
            Either
  String
  (Maybe POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Tag]
      -> Int
      -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastRotatedDate")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Tag]
   -> Int
   -> DescribeSecretResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Maybe [Tag] -> Int -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastAccessedDate")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Maybe [Tag] -> Int -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe [Tag] -> Int -> DescribeSecretResponse)
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
"Description")
            Either
  String (Maybe Text -> Maybe [Tag] -> Int -> DescribeSecretResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Tag] -> Int -> DescribeSecretResponse)
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
"RotationLambdaARN")
            Either String (Maybe [Tag] -> Int -> DescribeSecretResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> DescribeSecretResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeSecretResponse)
-> Either String Int -> Either String DescribeSecretResponse
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 DescribeSecret

instance Prelude.NFData DescribeSecret

instance Core.ToHeaders DescribeSecret where
  toHeaders :: DescribeSecret -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeSecret -> 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.DescribeSecret" ::
                          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 DescribeSecret where
  toJSON :: DescribeSecret -> Value
toJSON DescribeSecret' {Text
secretId :: Text
$sel:secretId:DescribeSecret' :: DescribeSecret -> 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 DescribeSecret where
  toPath :: DescribeSecret -> ByteString
toPath = ByteString -> DescribeSecret -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeSecretResponse' smart constructor.
data DescribeSecretResponse = DescribeSecretResponse'
  { -- | The last date and time that this secret was modified in any way.
    DescribeSecretResponse -> Maybe POSIX
lastChangedDate :: Prelude.Maybe Core.POSIX,
    -- | Specifies the primary region for secret replication.
    DescribeSecretResponse -> Maybe Text
primaryRegion :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the secret.
    DescribeSecretResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | A structure with the rotation configuration for this secret. This field
    -- is only populated if rotation is configured.
    DescribeSecretResponse -> Maybe RotationRulesType
rotationRules :: Prelude.Maybe RotationRulesType,
    -- | This value exists if the secret is scheduled for deletion. Some time
    -- after the specified date and time, Secrets Manager deletes the secret
    -- and all of its versions.
    --
    -- If a secret is scheduled for deletion, then its details, including the
    -- encrypted secret information, is not accessible. To cancel a scheduled
    -- deletion and restore access, use RestoreSecret.
    DescribeSecretResponse -> Maybe POSIX
deletedDate :: Prelude.Maybe Core.POSIX,
    -- | Specifies whether automatic rotation is enabled for this secret.
    --
    -- To enable rotation, use RotateSecret with @AutomaticallyRotateAfterDays@
    -- set to a value greater than 0. To disable rotation, use
    -- CancelRotateSecret.
    DescribeSecretResponse -> Maybe Bool
rotationEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The date you created the secret.
    DescribeSecretResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The ARN or alias of the Amazon Web Services KMS customer master key
    -- (CMK) that\'s used to encrypt the @SecretString@ or @SecretBinary@
    -- fields in each version of the secret. If you don\'t provide a key, then
    -- Secrets Manager defaults to encrypting the secret fields with the
    -- default Amazon Web Services KMS CMK (the one named @awssecretsmanager@)
    -- for this account.
    DescribeSecretResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The user-provided friendly name of the secret.
    DescribeSecretResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A list of all of the currently assigned @VersionStage@ staging labels
    -- and the @VersionId@ that each is attached to. Staging labels are used to
    -- keep track of the different versions during the rotation process.
    --
    -- A version that does not have any staging labels attached is considered
    -- deprecated and subject to deletion. Such versions are not included in
    -- this list.
    DescribeSecretResponse -> Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text)),
    -- | Describes a list of replication status objects as @InProgress@, @Failed@
    -- or @InSync@.@P@
    DescribeSecretResponse -> Maybe [ReplicationStatusType]
replicationStatus :: Prelude.Maybe [ReplicationStatusType],
    -- | Returns the name of the service that created this secret.
    DescribeSecretResponse -> Maybe Text
owningService :: Prelude.Maybe Prelude.Text,
    -- | The last date and time that the rotation process for this secret was
    -- invoked.
    --
    -- The most recent date and time that the Secrets Manager rotation process
    -- successfully completed. If the secret doesn\'t rotate, Secrets Manager
    -- returns a null value.
    DescribeSecretResponse -> Maybe POSIX
lastRotatedDate :: Prelude.Maybe Core.POSIX,
    -- | The last date that this secret was accessed. This value is truncated to
    -- midnight of the date and therefore shows only the date, not the time.
    DescribeSecretResponse -> Maybe POSIX
lastAccessedDate :: Prelude.Maybe Core.POSIX,
    -- | The user-provided description of the secret.
    DescribeSecretResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ARN of a Lambda function that\'s invoked by Secrets Manager to
    -- rotate the secret either automatically per the schedule or manually by a
    -- call to @RotateSecret@.
    DescribeSecretResponse -> Maybe Text
rotationLambdaARN :: Prelude.Maybe Prelude.Text,
    -- | The list of user-defined tags that are associated with the secret. To
    -- add tags to a secret, use TagResource. To remove tags, use
    -- UntagResource.
    DescribeSecretResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    DescribeSecretResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeSecretResponse -> DescribeSecretResponse -> Bool
(DescribeSecretResponse -> DescribeSecretResponse -> Bool)
-> (DescribeSecretResponse -> DescribeSecretResponse -> Bool)
-> Eq DescribeSecretResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeSecretResponse -> DescribeSecretResponse -> Bool
$c/= :: DescribeSecretResponse -> DescribeSecretResponse -> Bool
== :: DescribeSecretResponse -> DescribeSecretResponse -> Bool
$c== :: DescribeSecretResponse -> DescribeSecretResponse -> Bool
Prelude.Eq, ReadPrec [DescribeSecretResponse]
ReadPrec DescribeSecretResponse
Int -> ReadS DescribeSecretResponse
ReadS [DescribeSecretResponse]
(Int -> ReadS DescribeSecretResponse)
-> ReadS [DescribeSecretResponse]
-> ReadPrec DescribeSecretResponse
-> ReadPrec [DescribeSecretResponse]
-> Read DescribeSecretResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeSecretResponse]
$creadListPrec :: ReadPrec [DescribeSecretResponse]
readPrec :: ReadPrec DescribeSecretResponse
$creadPrec :: ReadPrec DescribeSecretResponse
readList :: ReadS [DescribeSecretResponse]
$creadList :: ReadS [DescribeSecretResponse]
readsPrec :: Int -> ReadS DescribeSecretResponse
$creadsPrec :: Int -> ReadS DescribeSecretResponse
Prelude.Read, Int -> DescribeSecretResponse -> ShowS
[DescribeSecretResponse] -> ShowS
DescribeSecretResponse -> String
(Int -> DescribeSecretResponse -> ShowS)
-> (DescribeSecretResponse -> String)
-> ([DescribeSecretResponse] -> ShowS)
-> Show DescribeSecretResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeSecretResponse] -> ShowS
$cshowList :: [DescribeSecretResponse] -> ShowS
show :: DescribeSecretResponse -> String
$cshow :: DescribeSecretResponse -> String
showsPrec :: Int -> DescribeSecretResponse -> ShowS
$cshowsPrec :: Int -> DescribeSecretResponse -> ShowS
Prelude.Show, (forall x. DescribeSecretResponse -> Rep DescribeSecretResponse x)
-> (forall x.
    Rep DescribeSecretResponse x -> DescribeSecretResponse)
-> Generic DescribeSecretResponse
forall x. Rep DescribeSecretResponse x -> DescribeSecretResponse
forall x. DescribeSecretResponse -> Rep DescribeSecretResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeSecretResponse x -> DescribeSecretResponse
$cfrom :: forall x. DescribeSecretResponse -> Rep DescribeSecretResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeSecretResponse' 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:
--
-- 'lastChangedDate', 'describeSecretResponse_lastChangedDate' - The last date and time that this secret was modified in any way.
--
-- 'primaryRegion', 'describeSecretResponse_primaryRegion' - Specifies the primary region for secret replication.
--
-- 'arn', 'describeSecretResponse_arn' - The ARN of the secret.
--
-- 'rotationRules', 'describeSecretResponse_rotationRules' - A structure with the rotation configuration for this secret. This field
-- is only populated if rotation is configured.
--
-- 'deletedDate', 'describeSecretResponse_deletedDate' - This value exists if the secret is scheduled for deletion. Some time
-- after the specified date and time, Secrets Manager deletes the secret
-- and all of its versions.
--
-- If a secret is scheduled for deletion, then its details, including the
-- encrypted secret information, is not accessible. To cancel a scheduled
-- deletion and restore access, use RestoreSecret.
--
-- 'rotationEnabled', 'describeSecretResponse_rotationEnabled' - Specifies whether automatic rotation is enabled for this secret.
--
-- To enable rotation, use RotateSecret with @AutomaticallyRotateAfterDays@
-- set to a value greater than 0. To disable rotation, use
-- CancelRotateSecret.
--
-- 'createdDate', 'describeSecretResponse_createdDate' - The date you created the secret.
--
-- 'kmsKeyId', 'describeSecretResponse_kmsKeyId' - The ARN or alias of the Amazon Web Services KMS customer master key
-- (CMK) that\'s used to encrypt the @SecretString@ or @SecretBinary@
-- fields in each version of the secret. If you don\'t provide a key, then
-- Secrets Manager defaults to encrypting the secret fields with the
-- default Amazon Web Services KMS CMK (the one named @awssecretsmanager@)
-- for this account.
--
-- 'name', 'describeSecretResponse_name' - The user-provided friendly name of the secret.
--
-- 'versionIdsToStages', 'describeSecretResponse_versionIdsToStages' - A list of all of the currently assigned @VersionStage@ staging labels
-- and the @VersionId@ that each is attached to. Staging labels are used to
-- keep track of the different versions during the rotation process.
--
-- A version that does not have any staging labels attached is considered
-- deprecated and subject to deletion. Such versions are not included in
-- this list.
--
-- 'replicationStatus', 'describeSecretResponse_replicationStatus' - Describes a list of replication status objects as @InProgress@, @Failed@
-- or @InSync@.@P@
--
-- 'owningService', 'describeSecretResponse_owningService' - Returns the name of the service that created this secret.
--
-- 'lastRotatedDate', 'describeSecretResponse_lastRotatedDate' - The last date and time that the rotation process for this secret was
-- invoked.
--
-- The most recent date and time that the Secrets Manager rotation process
-- successfully completed. If the secret doesn\'t rotate, Secrets Manager
-- returns a null value.
--
-- 'lastAccessedDate', 'describeSecretResponse_lastAccessedDate' - The last date that this secret was accessed. This value is truncated to
-- midnight of the date and therefore shows only the date, not the time.
--
-- 'description', 'describeSecretResponse_description' - The user-provided description of the secret.
--
-- 'rotationLambdaARN', 'describeSecretResponse_rotationLambdaARN' - The ARN of a Lambda function that\'s invoked by Secrets Manager to
-- rotate the secret either automatically per the schedule or manually by a
-- call to @RotateSecret@.
--
-- 'tags', 'describeSecretResponse_tags' - The list of user-defined tags that are associated with the secret. To
-- add tags to a secret, use TagResource. To remove tags, use
-- UntagResource.
--
-- 'httpStatus', 'describeSecretResponse_httpStatus' - The response's http status code.
newDescribeSecretResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeSecretResponse
newDescribeSecretResponse :: Int -> DescribeSecretResponse
newDescribeSecretResponse Int
pHttpStatus_ =
  DescribeSecretResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe RotationRulesType
-> Maybe POSIX
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text (NonEmpty Text))
-> Maybe [ReplicationStatusType]
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Int
-> DescribeSecretResponse
DescribeSecretResponse'
    { $sel:lastChangedDate:DescribeSecretResponse' :: Maybe POSIX
lastChangedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:primaryRegion:DescribeSecretResponse' :: Maybe Text
primaryRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeSecretResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rotationRules:DescribeSecretResponse' :: Maybe RotationRulesType
rotationRules = Maybe RotationRulesType
forall a. Maybe a
Prelude.Nothing,
      $sel:deletedDate:DescribeSecretResponse' :: Maybe POSIX
deletedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:rotationEnabled:DescribeSecretResponse' :: Maybe Bool
rotationEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:DescribeSecretResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:DescribeSecretResponse' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeSecretResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionIdsToStages:DescribeSecretResponse' :: Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages = Maybe (HashMap Text (NonEmpty Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:replicationStatus:DescribeSecretResponse' :: Maybe [ReplicationStatusType]
replicationStatus = Maybe [ReplicationStatusType]
forall a. Maybe a
Prelude.Nothing,
      $sel:owningService:DescribeSecretResponse' :: Maybe Text
owningService = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastRotatedDate:DescribeSecretResponse' :: Maybe POSIX
lastRotatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAccessedDate:DescribeSecretResponse' :: Maybe POSIX
lastAccessedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeSecretResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:rotationLambdaARN:DescribeSecretResponse' :: Maybe Text
rotationLambdaARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:DescribeSecretResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeSecretResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The last date and time that this secret was modified in any way.
describeSecretResponse_lastChangedDate :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.UTCTime)
describeSecretResponse_lastChangedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_lastChangedDate = (DescribeSecretResponse -> Maybe POSIX)
-> (DescribeSecretResponse
    -> Maybe POSIX -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe POSIX
lastChangedDate :: Maybe POSIX
$sel:lastChangedDate:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe POSIX
lastChangedDate} -> Maybe POSIX
lastChangedDate) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe POSIX
a -> DescribeSecretResponse
s {$sel:lastChangedDate:DescribeSecretResponse' :: Maybe POSIX
lastChangedDate = Maybe POSIX
a} :: DescribeSecretResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies the primary region for secret replication.
describeSecretResponse_primaryRegion :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_primaryRegion :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_primaryRegion = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
primaryRegion :: Maybe Text
$sel:primaryRegion:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
primaryRegion} -> Maybe Text
primaryRegion) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:primaryRegion:DescribeSecretResponse' :: Maybe Text
primaryRegion = Maybe Text
a} :: DescribeSecretResponse)

-- | The ARN of the secret.
describeSecretResponse_arn :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_arn = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:arn:DescribeSecretResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeSecretResponse)

-- | A structure with the rotation configuration for this secret. This field
-- is only populated if rotation is configured.
describeSecretResponse_rotationRules :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe RotationRulesType)
describeSecretResponse_rotationRules :: (Maybe RotationRulesType -> f (Maybe RotationRulesType))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_rotationRules = (DescribeSecretResponse -> Maybe RotationRulesType)
-> (DescribeSecretResponse
    -> Maybe RotationRulesType -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe RotationRulesType)
     (Maybe RotationRulesType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe RotationRulesType
rotationRules :: Maybe RotationRulesType
$sel:rotationRules:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe RotationRulesType
rotationRules} -> Maybe RotationRulesType
rotationRules) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe RotationRulesType
a -> DescribeSecretResponse
s {$sel:rotationRules:DescribeSecretResponse' :: Maybe RotationRulesType
rotationRules = Maybe RotationRulesType
a} :: DescribeSecretResponse)

-- | This value exists if the secret is scheduled for deletion. Some time
-- after the specified date and time, Secrets Manager deletes the secret
-- and all of its versions.
--
-- If a secret is scheduled for deletion, then its details, including the
-- encrypted secret information, is not accessible. To cancel a scheduled
-- deletion and restore access, use RestoreSecret.
describeSecretResponse_deletedDate :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.UTCTime)
describeSecretResponse_deletedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_deletedDate = (DescribeSecretResponse -> Maybe POSIX)
-> (DescribeSecretResponse
    -> Maybe POSIX -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe POSIX
deletedDate :: Maybe POSIX
$sel:deletedDate:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe POSIX
deletedDate} -> Maybe POSIX
deletedDate) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe POSIX
a -> DescribeSecretResponse
s {$sel:deletedDate:DescribeSecretResponse' :: Maybe POSIX
deletedDate = Maybe POSIX
a} :: DescribeSecretResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies whether automatic rotation is enabled for this secret.
--
-- To enable rotation, use RotateSecret with @AutomaticallyRotateAfterDays@
-- set to a value greater than 0. To disable rotation, use
-- CancelRotateSecret.
describeSecretResponse_rotationEnabled :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Bool)
describeSecretResponse_rotationEnabled :: (Maybe Bool -> f (Maybe Bool))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_rotationEnabled = (DescribeSecretResponse -> Maybe Bool)
-> (DescribeSecretResponse -> Maybe Bool -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Bool
rotationEnabled :: Maybe Bool
$sel:rotationEnabled:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Bool
rotationEnabled} -> Maybe Bool
rotationEnabled) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Bool
a -> DescribeSecretResponse
s {$sel:rotationEnabled:DescribeSecretResponse' :: Maybe Bool
rotationEnabled = Maybe Bool
a} :: DescribeSecretResponse)

-- | The date you created the secret.
describeSecretResponse_createdDate :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.UTCTime)
describeSecretResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_createdDate = (DescribeSecretResponse -> Maybe POSIX)
-> (DescribeSecretResponse
    -> Maybe POSIX -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe POSIX
a -> DescribeSecretResponse
s {$sel:createdDate:DescribeSecretResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: DescribeSecretResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The ARN or alias of the Amazon Web Services KMS customer master key
-- (CMK) that\'s used to encrypt the @SecretString@ or @SecretBinary@
-- fields in each version of the secret. If you don\'t provide a key, then
-- Secrets Manager defaults to encrypting the secret fields with the
-- default Amazon Web Services KMS CMK (the one named @awssecretsmanager@)
-- for this account.
describeSecretResponse_kmsKeyId :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_kmsKeyId = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:kmsKeyId:DescribeSecretResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: DescribeSecretResponse)

-- | The user-provided friendly name of the secret.
describeSecretResponse_name :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_name = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:name:DescribeSecretResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeSecretResponse)

-- | A list of all of the currently assigned @VersionStage@ staging labels
-- and the @VersionId@ that each is attached to. Staging labels are used to
-- keep track of the different versions during the rotation process.
--
-- A version that does not have any staging labels attached is considered
-- deprecated and subject to deletion. Such versions are not included in
-- this list.
describeSecretResponse_versionIdsToStages :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.NonEmpty Prelude.Text)))
describeSecretResponse_versionIdsToStages :: (Maybe (HashMap Text (NonEmpty Text))
 -> f (Maybe (HashMap Text (NonEmpty Text))))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_versionIdsToStages = (DescribeSecretResponse -> Maybe (HashMap Text (NonEmpty Text)))
-> (DescribeSecretResponse
    -> Maybe (HashMap Text (NonEmpty Text)) -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe (HashMap Text (NonEmpty Text)))
     (Maybe (HashMap Text (NonEmpty Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages :: Maybe (HashMap Text (NonEmpty Text))
$sel:versionIdsToStages:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages} -> Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe (HashMap Text (NonEmpty Text))
a -> DescribeSecretResponse
s {$sel:versionIdsToStages:DescribeSecretResponse' :: Maybe (HashMap Text (NonEmpty Text))
versionIdsToStages = Maybe (HashMap Text (NonEmpty Text))
a} :: DescribeSecretResponse) ((Maybe (HashMap Text (NonEmpty Text))
  -> f (Maybe (HashMap Text (NonEmpty Text))))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe (HashMap Text (NonEmpty Text))
     -> f (Maybe (HashMap Text (NonEmpty Text))))
    -> Maybe (HashMap Text (NonEmpty Text))
    -> f (Maybe (HashMap Text (NonEmpty Text))))
-> (Maybe (HashMap Text (NonEmpty Text))
    -> f (Maybe (HashMap Text (NonEmpty Text))))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
-> Iso
     (Maybe (HashMap Text (NonEmpty Text)))
     (Maybe (HashMap Text (NonEmpty Text)))
     (Maybe (HashMap Text (NonEmpty Text)))
     (Maybe (HashMap Text (NonEmpty 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
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
  (HashMap Text (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Describes a list of replication status objects as @InProgress@, @Failed@
-- or @InSync@.@P@
describeSecretResponse_replicationStatus :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe [ReplicationStatusType])
describeSecretResponse_replicationStatus :: (Maybe [ReplicationStatusType]
 -> f (Maybe [ReplicationStatusType]))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_replicationStatus = (DescribeSecretResponse -> Maybe [ReplicationStatusType])
-> (DescribeSecretResponse
    -> Maybe [ReplicationStatusType] -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe [ReplicationStatusType])
     (Maybe [ReplicationStatusType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe [ReplicationStatusType]
replicationStatus :: Maybe [ReplicationStatusType]
$sel:replicationStatus:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe [ReplicationStatusType]
replicationStatus} -> Maybe [ReplicationStatusType]
replicationStatus) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe [ReplicationStatusType]
a -> DescribeSecretResponse
s {$sel:replicationStatus:DescribeSecretResponse' :: Maybe [ReplicationStatusType]
replicationStatus = Maybe [ReplicationStatusType]
a} :: DescribeSecretResponse) ((Maybe [ReplicationStatusType]
  -> f (Maybe [ReplicationStatusType]))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe [ReplicationStatusType]
     -> f (Maybe [ReplicationStatusType]))
    -> Maybe [ReplicationStatusType]
    -> f (Maybe [ReplicationStatusType]))
-> (Maybe [ReplicationStatusType]
    -> f (Maybe [ReplicationStatusType]))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReplicationStatusType]
  [ReplicationStatusType]
  [ReplicationStatusType]
  [ReplicationStatusType]
-> Iso
     (Maybe [ReplicationStatusType])
     (Maybe [ReplicationStatusType])
     (Maybe [ReplicationStatusType])
     (Maybe [ReplicationStatusType])
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
  [ReplicationStatusType]
  [ReplicationStatusType]
  [ReplicationStatusType]
  [ReplicationStatusType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns the name of the service that created this secret.
describeSecretResponse_owningService :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_owningService :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_owningService = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
owningService :: Maybe Text
$sel:owningService:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
owningService} -> Maybe Text
owningService) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:owningService:DescribeSecretResponse' :: Maybe Text
owningService = Maybe Text
a} :: DescribeSecretResponse)

-- | The last date and time that the rotation process for this secret was
-- invoked.
--
-- The most recent date and time that the Secrets Manager rotation process
-- successfully completed. If the secret doesn\'t rotate, Secrets Manager
-- returns a null value.
describeSecretResponse_lastRotatedDate :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.UTCTime)
describeSecretResponse_lastRotatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_lastRotatedDate = (DescribeSecretResponse -> Maybe POSIX)
-> (DescribeSecretResponse
    -> Maybe POSIX -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe POSIX
lastRotatedDate :: Maybe POSIX
$sel:lastRotatedDate:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe POSIX
lastRotatedDate} -> Maybe POSIX
lastRotatedDate) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe POSIX
a -> DescribeSecretResponse
s {$sel:lastRotatedDate:DescribeSecretResponse' :: Maybe POSIX
lastRotatedDate = Maybe POSIX
a} :: DescribeSecretResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The last date that this secret was accessed. This value is truncated to
-- midnight of the date and therefore shows only the date, not the time.
describeSecretResponse_lastAccessedDate :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.UTCTime)
describeSecretResponse_lastAccessedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_lastAccessedDate = (DescribeSecretResponse -> Maybe POSIX)
-> (DescribeSecretResponse
    -> Maybe POSIX -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe POSIX
lastAccessedDate :: Maybe POSIX
$sel:lastAccessedDate:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe POSIX
lastAccessedDate} -> Maybe POSIX
lastAccessedDate) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe POSIX
a -> DescribeSecretResponse
s {$sel:lastAccessedDate:DescribeSecretResponse' :: Maybe POSIX
lastAccessedDate = Maybe POSIX
a} :: DescribeSecretResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The user-provided description of the secret.
describeSecretResponse_description :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_description = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:description:DescribeSecretResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeSecretResponse)

-- | The ARN of a Lambda function that\'s invoked by Secrets Manager to
-- rotate the secret either automatically per the schedule or manually by a
-- call to @RotateSecret@.
describeSecretResponse_rotationLambdaARN :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe Prelude.Text)
describeSecretResponse_rotationLambdaARN :: (Maybe Text -> f (Maybe Text))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_rotationLambdaARN = (DescribeSecretResponse -> Maybe Text)
-> (DescribeSecretResponse -> Maybe Text -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe Text
rotationLambdaARN :: Maybe Text
$sel:rotationLambdaARN:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe Text
rotationLambdaARN} -> Maybe Text
rotationLambdaARN) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe Text
a -> DescribeSecretResponse
s {$sel:rotationLambdaARN:DescribeSecretResponse' :: Maybe Text
rotationLambdaARN = Maybe Text
a} :: DescribeSecretResponse)

-- | The list of user-defined tags that are associated with the secret. To
-- add tags to a secret, use TagResource. To remove tags, use
-- UntagResource.
describeSecretResponse_tags :: Lens.Lens' DescribeSecretResponse (Prelude.Maybe [Tag])
describeSecretResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeSecretResponse -> f DescribeSecretResponse
describeSecretResponse_tags = (DescribeSecretResponse -> Maybe [Tag])
-> (DescribeSecretResponse
    -> Maybe [Tag] -> DescribeSecretResponse)
-> Lens
     DescribeSecretResponse
     DescribeSecretResponse
     (Maybe [Tag])
     (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeSecretResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:DescribeSecretResponse' :: DescribeSecretResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: DescribeSecretResponse
s@DescribeSecretResponse' {} Maybe [Tag]
a -> DescribeSecretResponse
s {$sel:tags:DescribeSecretResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: DescribeSecretResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> DescribeSecretResponse -> f DescribeSecretResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> DescribeSecretResponse
-> f DescribeSecretResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeSecretResponse