Copyright | (c) 2013-2018 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) |
Safe Haskell | None |
Language | Haskell2010 |
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
.
- describeSecret :: Text -> DescribeSecret
- data DescribeSecret
- dSecretId :: Lens' DescribeSecret Text
- describeSecretResponse :: Int -> DescribeSecretResponse
- data DescribeSecretResponse
- drsLastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- drsARN :: Lens' DescribeSecretResponse (Maybe Text)
- drsRotationRules :: Lens' DescribeSecretResponse (Maybe RotationRulesType)
- drsDeletedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- drsRotationEnabled :: Lens' DescribeSecretResponse (Maybe Bool)
- drsKMSKeyId :: Lens' DescribeSecretResponse (Maybe Text)
- drsName :: Lens' DescribeSecretResponse (Maybe Text)
- drsVersionIdsToStages :: Lens' DescribeSecretResponse (HashMap Text (NonEmpty Text))
- drsLastRotatedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- drsLastAccessedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- drsDescription :: Lens' DescribeSecretResponse (Maybe Text)
- drsRotationLambdaARN :: Lens' DescribeSecretResponse (Maybe Text)
- drsTags :: Lens' DescribeSecretResponse [Tag]
- drsResponseStatus :: Lens' DescribeSecretResponse Int
Creating a Request
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.
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, useRestoreSecret
.drsRotationEnabled
- Specifies whether automatic rotation is enabled for this secret. To enable rotation, useRotateSecret
withAutomaticallyRotateAfterDays
set to a value greater than 0. To disable rotation, useCancelRotateSecret
.drsKMSKeyId
- The ARN or alias of the AWS KMS customer master key (CMK) that's used to encrypt theSecretString
orSecretBinary
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 namedawssecretsmanager
) for this account.drsName
- The user-provided friendly name of the secret.drsVersionIdsToStages
- A list of all of the currently assignedVersionStage
staging labels and theSecretVersionId
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 toRotateSecret
.drsTags
- The list of user-defined tags that are associated with the secret. To add tags to a secret, useTagResource
. To remove tags, useUntagResource
.drsResponseStatus
- -- | The response status code.
data DescribeSecretResponse Source #
See: describeSecretResponse
smart constructor.
Response Lenses
drsLastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The last date and time that this secret was modified in any way.
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.