amazonka-secretsmanager-1.6.0: Amazon Secrets Manager SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SecretsManager.DescribeSecret

Contents

Description

Retrieves the details of a secret. It does not include the encrypted fields. Only those fields that are populated with a value are returned 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 AWS account, use ListSecrets .

Synopsis

Creating a Request

describeSecret Source #

Creates a value of DescribeSecret with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • dSecretId - 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.

data DescribeSecret Source #

See: describeSecret smart constructor.

Instances

Eq DescribeSecret Source # 
Data DescribeSecret Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DescribeSecret -> c DescribeSecret #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DescribeSecret #

toConstr :: DescribeSecret -> Constr #

dataTypeOf :: DescribeSecret -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DescribeSecret) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DescribeSecret) #

gmapT :: (forall b. Data b => b -> b) -> DescribeSecret -> DescribeSecret #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DescribeSecret -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DescribeSecret -> r #

gmapQ :: (forall d. Data d => d -> u) -> DescribeSecret -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DescribeSecret -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DescribeSecret -> m DescribeSecret #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DescribeSecret -> m DescribeSecret #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DescribeSecret -> m DescribeSecret #

Read DescribeSecret Source # 
Show DescribeSecret Source # 
Generic DescribeSecret Source # 

Associated Types

type Rep DescribeSecret :: * -> * #

Hashable DescribeSecret Source # 
ToJSON DescribeSecret Source # 
NFData DescribeSecret Source # 

Methods

rnf :: DescribeSecret -> () #

AWSRequest DescribeSecret Source # 
ToHeaders DescribeSecret Source # 
ToPath DescribeSecret Source # 
ToQuery DescribeSecret Source # 
type Rep DescribeSecret Source # 
type Rep DescribeSecret = D1 * (MetaData "DescribeSecret" "Network.AWS.SecretsManager.DescribeSecret" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" True) (C1 * (MetaCons "DescribeSecret'" PrefixI True) (S1 * (MetaSel (Just Symbol "_dSecretId") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Text)))
type Rs DescribeSecret Source # 

Request Lenses

dSecretId :: Lens' DescribeSecret Text Source #

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.

Destructuring the Response

describeSecretResponse Source #

Creates a value of DescribeSecretResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • drsLastChangedDate - The last date and time that this secret was modified in any way.
  • drsARN - The ARN of the secret.
  • drsRotationRules - A structure that contains the rotation configuration for this secret.
  • drsDeletedDate - 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 .
  • drsRotationEnabled - 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 .
  • drsKMSKeyId - The ARN or alias of the AWS 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 KMS CMK (the one named awssecretsmanager ) for this account.
  • drsName - The user-provided friendly name of the secret.
  • drsVersionIdsToStages - A list of all of the currently assigned VersionStage staging labels and the SecretVersionId that each is attached to. Staging labels are used to keep track of the different versions during the rotation process.
  • drsLastRotatedDate - The last date and time that the Secrets Manager rotation process for this secret was invoked.
  • drsLastAccessedDate - 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.
  • drsDescription - The user-provided description of the secret.
  • drsRotationLambdaARN - 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 .
  • drsTags - 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 .
  • drsResponseStatus - -- | The response status code.

data DescribeSecretResponse Source #

See: describeSecretResponse smart constructor.

Instances

Eq DescribeSecretResponse Source # 
Data DescribeSecretResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DescribeSecretResponse -> c DescribeSecretResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DescribeSecretResponse #

toConstr :: DescribeSecretResponse -> Constr #

dataTypeOf :: DescribeSecretResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DescribeSecretResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DescribeSecretResponse) #

gmapT :: (forall b. Data b => b -> b) -> DescribeSecretResponse -> DescribeSecretResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DescribeSecretResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DescribeSecretResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DescribeSecretResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DescribeSecretResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DescribeSecretResponse -> m DescribeSecretResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DescribeSecretResponse -> m DescribeSecretResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DescribeSecretResponse -> m DescribeSecretResponse #

Read DescribeSecretResponse Source # 
Show DescribeSecretResponse Source # 
Generic DescribeSecretResponse Source # 
NFData DescribeSecretResponse Source # 

Methods

rnf :: DescribeSecretResponse -> () #

type Rep DescribeSecretResponse Source # 
type Rep DescribeSecretResponse = D1 * (MetaData "DescribeSecretResponse" "Network.AWS.SecretsManager.DescribeSecret" "amazonka-secretsmanager-1.6.0-K7nD2j5oEj0GsgMw0kPUxD" False) (C1 * (MetaCons "DescribeSecretResponse'" PrefixI True) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_drsLastChangedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) ((:*:) * (S1 * (MetaSel (Just Symbol "_drsARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_drsRotationRules") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe RotationRulesType))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_drsDeletedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) (S1 * (MetaSel (Just Symbol "_drsRotationEnabled") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_drsKMSKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_drsName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_drsVersionIdsToStages") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe (Map Text (List1 Text))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_drsLastRotatedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))) (S1 * (MetaSel (Just Symbol "_drsLastAccessedDate") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe POSIX))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_drsDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_drsRotationLambdaARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_drsTags") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Tag]))) (S1 * (MetaSel (Just Symbol "_drsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)))))))

Response Lenses

drsLastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #

The last date and time that this secret was modified in any way.

drsARN :: Lens' DescribeSecretResponse (Maybe Text) Source #

The ARN of the secret.

drsRotationRules :: Lens' DescribeSecretResponse (Maybe RotationRulesType) Source #

A structure that contains the rotation configuration for this secret.

drsDeletedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #

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 .

drsRotationEnabled :: Lens' DescribeSecretResponse (Maybe Bool) Source #

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 .

drsKMSKeyId :: Lens' DescribeSecretResponse (Maybe Text) Source #

The ARN or alias of the AWS 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 KMS CMK (the one named awssecretsmanager ) for this account.

drsName :: Lens' DescribeSecretResponse (Maybe Text) Source #

The user-provided friendly name of the secret.

drsVersionIdsToStages :: Lens' DescribeSecretResponse (HashMap Text (NonEmpty Text)) Source #

A list of all of the currently assigned VersionStage staging labels and the SecretVersionId that each is attached to. Staging labels are used to keep track of the different versions during the rotation process.

drsLastRotatedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #

The last date and time that the Secrets Manager rotation process for this secret was invoked.

drsLastAccessedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #

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.

drsDescription :: Lens' DescribeSecretResponse (Maybe Text) Source #

The user-provided description of the secret.

drsRotationLambdaARN :: Lens' DescribeSecretResponse (Maybe Text) Source #

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 .

drsTags :: Lens' DescribeSecretResponse [Tag] Source #

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 .

drsResponseStatus :: Lens' DescribeSecretResponse Int Source #

  • - | The response status code.