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

Amazonka.SecretsManager.DescribeSecret

Description

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.
Synopsis

Creating a Request

data DescribeSecret Source #

See: newDescribeSecret smart constructor.

Constructors

DescribeSecret' 

Fields

  • secretId :: Text

    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.

Instances

Instances details
Eq DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Read DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Show DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Generic DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Associated Types

type Rep DescribeSecret :: Type -> Type #

NFData DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Methods

rnf :: DescribeSecret -> () #

Hashable DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

ToJSON DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

AWSRequest DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Associated Types

type AWSResponse DescribeSecret #

ToHeaders DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

ToPath DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

ToQuery DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

type Rep DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

type Rep DescribeSecret = D1 ('MetaData "DescribeSecret" "Amazonka.SecretsManager.DescribeSecret" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "DescribeSecret'" 'PrefixI 'True) (S1 ('MetaSel ('Just "secretId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))
type AWSResponse DescribeSecret Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

newDescribeSecret Source #

Create a value of DescribeSecret with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:secretId:DescribeSecret', 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.

Request Lenses

describeSecret_secretId :: 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.

For an ARN, we recommend that you specify a complete ARN rather than a partial ARN.

Destructuring the Response

data DescribeSecretResponse Source #

See: newDescribeSecretResponse smart constructor.

Constructors

DescribeSecretResponse' 

Fields

  • lastChangedDate :: Maybe POSIX

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

  • primaryRegion :: Maybe Text

    Specifies the primary region for secret replication.

  • arn :: Maybe Text

    The ARN of the secret.

  • rotationRules :: Maybe RotationRulesType

    A structure with the rotation configuration for this secret. This field is only populated if rotation is configured.

  • deletedDate :: Maybe POSIX

    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 :: Maybe Bool

    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 :: Maybe POSIX

    The date you created the secret.

  • kmsKeyId :: Maybe Text

    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 :: Maybe Text

    The user-provided friendly name of the secret.

  • versionIdsToStages :: Maybe (HashMap Text (NonEmpty 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.

  • replicationStatus :: Maybe [ReplicationStatusType]

    Describes a list of replication status objects as InProgress, Failed or InSync.P

  • owningService :: Maybe Text

    Returns the name of the service that created this secret.

  • lastRotatedDate :: Maybe POSIX

    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 :: Maybe 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.

  • description :: Maybe Text

    The user-provided description of the secret.

  • rotationLambdaARN :: Maybe 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.

  • tags :: Maybe [Tag]

    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 :: Int

    The response's http status code.

Instances

Instances details
Eq DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Read DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Show DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Generic DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Associated Types

type Rep DescribeSecretResponse :: Type -> Type #

NFData DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

Methods

rnf :: DescribeSecretResponse -> () #

type Rep DescribeSecretResponse Source # 
Instance details

Defined in Amazonka.SecretsManager.DescribeSecret

type Rep DescribeSecretResponse = D1 ('MetaData "DescribeSecretResponse" "Amazonka.SecretsManager.DescribeSecret" "libZSservicesZSamazonka-secretsmanagerZSamazonka-secretsmanager" 'False) (C1 ('MetaCons "DescribeSecretResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "lastChangedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "primaryRegion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "arn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "rotationRules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RotationRulesType)))) :*: ((S1 ('MetaSel ('Just "deletedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "rotationEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "createdDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: (S1 ('MetaSel ('Just "kmsKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))) :*: (((S1 ('MetaSel ('Just "versionIdsToStages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text (NonEmpty Text)))) :*: S1 ('MetaSel ('Just "replicationStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ReplicationStatusType]))) :*: (S1 ('MetaSel ('Just "owningService") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "lastRotatedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)))) :*: ((S1 ('MetaSel ('Just "lastAccessedDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "rotationLambdaARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))))

newDescribeSecretResponse Source #

Create a value of DescribeSecretResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:lastChangedDate:DescribeSecretResponse', describeSecretResponse_lastChangedDate - The last date and time that this secret was modified in any way.

$sel:primaryRegion:DescribeSecretResponse', describeSecretResponse_primaryRegion - Specifies the primary region for secret replication.

$sel:arn:DescribeSecretResponse', describeSecretResponse_arn - The ARN of the secret.

$sel:rotationRules:DescribeSecretResponse', describeSecretResponse_rotationRules - A structure with the rotation configuration for this secret. This field is only populated if rotation is configured.

$sel:deletedDate:DescribeSecretResponse', 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.

$sel:rotationEnabled:DescribeSecretResponse', 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.

$sel:createdDate:DescribeSecretResponse', describeSecretResponse_createdDate - The date you created the secret.

$sel:kmsKeyId:DescribeSecretResponse', 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.

$sel:name:DescribeSecretResponse', describeSecretResponse_name - The user-provided friendly name of the secret.

$sel:versionIdsToStages:DescribeSecretResponse', 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.

$sel:replicationStatus:DescribeSecretResponse', describeSecretResponse_replicationStatus - Describes a list of replication status objects as InProgress, Failed or InSync.P

$sel:owningService:DescribeSecretResponse', describeSecretResponse_owningService - Returns the name of the service that created this secret.

$sel:lastRotatedDate:DescribeSecretResponse', 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.

$sel:lastAccessedDate:DescribeSecretResponse', 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.

$sel:description:DescribeSecretResponse', describeSecretResponse_description - The user-provided description of the secret.

$sel:rotationLambdaARN:DescribeSecretResponse', 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.

$sel:tags:DescribeSecretResponse', 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.

$sel:httpStatus:DescribeSecretResponse', describeSecretResponse_httpStatus - The response's http status code.

Response Lenses

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

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

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

Specifies the primary region for secret replication.

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

A structure with the rotation configuration for this secret. This field is only populated if rotation is configured.

describeSecretResponse_deletedDate :: 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.

describeSecretResponse_rotationEnabled :: 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.

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

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_name :: Lens' DescribeSecretResponse (Maybe Text) Source #

The user-provided friendly name of the secret.

describeSecretResponse_versionIdsToStages :: Lens' DescribeSecretResponse (Maybe (HashMap Text (NonEmpty Text))) Source #

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_replicationStatus :: Lens' DescribeSecretResponse (Maybe [ReplicationStatusType]) Source #

Describes a list of replication status objects as InProgress, Failed or InSync.P

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

Returns the name of the service that created this secret.

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

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_lastAccessedDate :: 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.

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

The user-provided description of the secret.

describeSecretResponse_rotationLambdaARN :: 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.

describeSecretResponse_tags :: Lens' DescribeSecretResponse (Maybe [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.