Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Retrieves the details of a secret. It does not include the encrypted secret value. Secrets Manager only returns fields that have a value in the response.
Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.
Required permissions: secretsmanager:DescribeSecret
. For more
information, see
IAM policy actions for Secrets Manager
and
Authentication and access control in Secrets Manager.
Synopsis
- data DescribeSecret = DescribeSecret' {}
- newDescribeSecret :: Text -> DescribeSecret
- describeSecret_secretId :: Lens' DescribeSecret Text
- data DescribeSecretResponse = DescribeSecretResponse' {
- arn :: Maybe Text
- createdDate :: Maybe POSIX
- deletedDate :: Maybe POSIX
- description :: Maybe Text
- kmsKeyId :: Maybe Text
- lastAccessedDate :: Maybe POSIX
- lastChangedDate :: Maybe POSIX
- lastRotatedDate :: Maybe POSIX
- name :: Maybe Text
- nextRotationDate :: Maybe POSIX
- owningService :: Maybe Text
- primaryRegion :: Maybe Text
- replicationStatus :: Maybe [ReplicationStatusType]
- rotationEnabled :: Maybe Bool
- rotationLambdaARN :: Maybe Text
- rotationRules :: Maybe RotationRulesType
- tags :: Maybe [Tag]
- versionIdsToStages :: Maybe (HashMap Text (NonEmpty Text))
- httpStatus :: Int
- newDescribeSecretResponse :: Int -> DescribeSecretResponse
- describeSecretResponse_arn :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_createdDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_deletedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_description :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_kmsKeyId :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_lastAccessedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_lastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_lastRotatedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_name :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_nextRotationDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_owningService :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_primaryRegion :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_replicationStatus :: Lens' DescribeSecretResponse (Maybe [ReplicationStatusType])
- describeSecretResponse_rotationEnabled :: Lens' DescribeSecretResponse (Maybe Bool)
- describeSecretResponse_rotationLambdaARN :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_rotationRules :: Lens' DescribeSecretResponse (Maybe RotationRulesType)
- describeSecretResponse_tags :: Lens' DescribeSecretResponse (Maybe [Tag])
- describeSecretResponse_versionIdsToStages :: Lens' DescribeSecretResponse (Maybe (HashMap Text (NonEmpty Text)))
- describeSecretResponse_httpStatus :: Lens' DescribeSecretResponse Int
Creating a Request
data DescribeSecret Source #
See: newDescribeSecret
smart constructor.
DescribeSecret' | |
|
Instances
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 ARN or name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Request Lenses
describeSecret_secretId :: Lens' DescribeSecret Text Source #
The ARN or name of the secret.
For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See Finding a secret from a partial ARN.
Destructuring the Response
data DescribeSecretResponse Source #
See: newDescribeSecretResponse
smart constructor.
DescribeSecretResponse' | |
|
Instances
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:
DescribeSecretResponse
, describeSecretResponse_arn
- The ARN of the secret.
DescribeSecretResponse
, describeSecretResponse_createdDate
- The date the secret was created.
DescribeSecretResponse
, describeSecretResponse_deletedDate
- The date the secret is scheduled for deletion. If it is not scheduled
for deletion, this field is omitted. When you delete a secret, Secrets
Manager requires a recovery window of at least 7 days before deleting
the secret. Some time after the deleted date, Secrets Manager deletes
the secret, including all of its versions.
If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use RestoreSecret.
DescribeSecretResponse
, describeSecretResponse_description
- The description of the secret.
DescribeSecretResponse
, describeSecretResponse_kmsKeyId
- The key ID or alias ARN of the KMS key that Secrets Manager uses to
encrypt the secret value. If the secret is encrypted with the Amazon Web
Services managed key aws/secretsmanager
, this field is omitted.
Secrets created using the console use an KMS key ID.
DescribeSecretResponse
, describeSecretResponse_lastAccessedDate
- The date that the secret was last accessed in the Region. This field is
omitted if the secret has never been retrieved in the Region.
DescribeSecretResponse
, describeSecretResponse_lastChangedDate
- The last date and time that this secret was modified in any way.
DescribeSecretResponse
, describeSecretResponse_lastRotatedDate
- The last date and time that Secrets Manager rotated the secret. If the
secret isn't configured for rotation, Secrets Manager returns null.
DescribeSecretResponse
, describeSecretResponse_name
- The name of the secret.
DescribeSecretResponse
, describeSecretResponse_nextRotationDate
- Undocumented member.
DescribeSecretResponse
, describeSecretResponse_owningService
- The ID of the service that created this secret. For more information,
see
Secrets managed by other Amazon Web Services services.
DescribeSecretResponse
, describeSecretResponse_primaryRegion
- The Region the secret is in. If a secret is replicated to other Regions,
the replicas are listed in ReplicationStatus
.
$sel:replicationStatus:DescribeSecretResponse'
, describeSecretResponse_replicationStatus
- A list of the replicas of this secret and their status:
Failed
, which indicates that the replica was not created.InProgress
, which indicates that Secrets Manager is in the process of creating the replica.InSync
, which indicates that the replica was created.
DescribeSecretResponse
, describeSecretResponse_rotationEnabled
- Specifies whether automatic rotation is turned on for this secret.
To turn on rotation, use RotateSecret. To turn off rotation, use CancelRotateSecret.
DescribeSecretResponse
, describeSecretResponse_rotationLambdaARN
- The ARN of the Lambda function that Secrets Manager invokes to rotate
the secret.
DescribeSecretResponse
, describeSecretResponse_rotationRules
- The rotation schedule and Lambda function for this secret. If the secret
previously had rotation turned on, but it is now turned off, this field
shows the previous rotation schedule and rotation function. If the
secret never had rotation turned on, this field is omitted.
DescribeSecretResponse
, describeSecretResponse_tags
- The list of tags attached to the secret. To add tags to a secret, use
TagResource. To remove tags, use UntagResource.
$sel:versionIdsToStages:DescribeSecretResponse'
, describeSecretResponse_versionIdsToStages
- A list of the versions of the secret that have staging labels attached.
Versions that don't have staging labels are considered deprecated and
Secrets Manager can delete them.
Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:
AWSCURRENT
, which indicates the current version of the secret.AWSPENDING
, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.During rotation, Secrets Manager creates an
AWSPENDING
version ID before creating the new secret version. To check if a secret version exists, call GetSecretValue.AWSPREVIOUS
, which indicates the previous current version of the secret. You can use this as the last known good version.
For more information about rotation and staging labels, see How rotation works.
$sel:httpStatus:DescribeSecretResponse'
, describeSecretResponse_httpStatus
- The response's http status code.
Response Lenses
describeSecretResponse_arn :: Lens' DescribeSecretResponse (Maybe Text) Source #
The ARN of the secret.
describeSecretResponse_createdDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The date the secret was created.
describeSecretResponse_deletedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The date the secret is scheduled for deletion. If it is not scheduled for deletion, this field is omitted. When you delete a secret, Secrets Manager requires a recovery window of at least 7 days before deleting the secret. Some time after the deleted date, Secrets Manager deletes the secret, including all of its versions.
If a secret is scheduled for deletion, then its details, including the encrypted secret value, is not accessible. To cancel a scheduled deletion and restore access to the secret, use RestoreSecret.
describeSecretResponse_description :: Lens' DescribeSecretResponse (Maybe Text) Source #
The description of the secret.
describeSecretResponse_kmsKeyId :: Lens' DescribeSecretResponse (Maybe Text) Source #
The key ID or alias ARN of the KMS key that Secrets Manager uses to
encrypt the secret value. If the secret is encrypted with the Amazon Web
Services managed key aws/secretsmanager
, this field is omitted.
Secrets created using the console use an KMS key ID.
describeSecretResponse_lastAccessedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.
describeSecretResponse_lastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The last date and time that this secret was modified in any way.
describeSecretResponse_lastRotatedDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The last date and time that Secrets Manager rotated the secret. If the secret isn't configured for rotation, Secrets Manager returns null.
describeSecretResponse_name :: Lens' DescribeSecretResponse (Maybe Text) Source #
The name of the secret.
describeSecretResponse_nextRotationDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
Undocumented member.
describeSecretResponse_owningService :: Lens' DescribeSecretResponse (Maybe Text) Source #
The ID of the service that created this secret. For more information, see Secrets managed by other Amazon Web Services services.
describeSecretResponse_primaryRegion :: Lens' DescribeSecretResponse (Maybe Text) Source #
The Region the secret is in. If a secret is replicated to other Regions,
the replicas are listed in ReplicationStatus
.
describeSecretResponse_replicationStatus :: Lens' DescribeSecretResponse (Maybe [ReplicationStatusType]) Source #
A list of the replicas of this secret and their status:
Failed
, which indicates that the replica was not created.InProgress
, which indicates that Secrets Manager is in the process of creating the replica.InSync
, which indicates that the replica was created.
describeSecretResponse_rotationEnabled :: Lens' DescribeSecretResponse (Maybe Bool) Source #
Specifies whether automatic rotation is turned on for this secret.
To turn on rotation, use RotateSecret. To turn off rotation, use CancelRotateSecret.
describeSecretResponse_rotationLambdaARN :: Lens' DescribeSecretResponse (Maybe Text) Source #
The ARN of the Lambda function that Secrets Manager invokes to rotate the secret.
describeSecretResponse_rotationRules :: Lens' DescribeSecretResponse (Maybe RotationRulesType) Source #
The rotation schedule and Lambda function for this secret. If the secret previously had rotation turned on, but it is now turned off, this field shows the previous rotation schedule and rotation function. If the secret never had rotation turned on, this field is omitted.
describeSecretResponse_tags :: Lens' DescribeSecretResponse (Maybe [Tag]) Source #
The list of tags attached to the secret. To add tags to a secret, use TagResource. To remove tags, use UntagResource.
describeSecretResponse_versionIdsToStages :: Lens' DescribeSecretResponse (Maybe (HashMap Text (NonEmpty Text))) Source #
A list of the versions of the secret that have staging labels attached. Versions that don't have staging labels are considered deprecated and Secrets Manager can delete them.
Secrets Manager uses staging labels to indicate the status of a secret version during rotation. The three staging labels for rotation are:
AWSCURRENT
, which indicates the current version of the secret.AWSPENDING
, which indicates the version of the secret that contains new secret information that will become the next current version when rotation finishes.During rotation, Secrets Manager creates an
AWSPENDING
version ID before creating the new secret version. To check if a secret version exists, call GetSecretValue.AWSPREVIOUS
, which indicates the previous current version of the secret. You can use this as the last known good version.
For more information about rotation and staging labels, see How rotation works.
describeSecretResponse_httpStatus :: Lens' DescribeSecretResponse Int Source #
The response's http status code.