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) |
Safe Haskell | None |
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
- data DescribeSecret = DescribeSecret' {}
- newDescribeSecret :: Text -> DescribeSecret
- describeSecret_secretId :: Lens' DescribeSecret Text
- data DescribeSecretResponse = DescribeSecretResponse' {
- lastChangedDate :: Maybe POSIX
- primaryRegion :: Maybe Text
- arn :: Maybe Text
- rotationRules :: Maybe RotationRulesType
- deletedDate :: Maybe POSIX
- rotationEnabled :: Maybe Bool
- createdDate :: Maybe POSIX
- kmsKeyId :: Maybe Text
- name :: Maybe Text
- versionIdsToStages :: Maybe (HashMap Text (NonEmpty Text))
- replicationStatus :: Maybe [ReplicationStatusType]
- owningService :: Maybe Text
- lastRotatedDate :: Maybe POSIX
- lastAccessedDate :: Maybe POSIX
- description :: Maybe Text
- rotationLambdaARN :: Maybe Text
- tags :: Maybe [Tag]
- httpStatus :: Int
- newDescribeSecretResponse :: Int -> DescribeSecretResponse
- describeSecretResponse_lastChangedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_primaryRegion :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_arn :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_rotationRules :: Lens' DescribeSecretResponse (Maybe RotationRulesType)
- describeSecretResponse_deletedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_rotationEnabled :: Lens' DescribeSecretResponse (Maybe Bool)
- describeSecretResponse_createdDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_kmsKeyId :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_name :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_versionIdsToStages :: Lens' DescribeSecretResponse (Maybe (HashMap Text (NonEmpty Text)))
- describeSecretResponse_replicationStatus :: Lens' DescribeSecretResponse (Maybe [ReplicationStatusType])
- describeSecretResponse_owningService :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_lastRotatedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_lastAccessedDate :: Lens' DescribeSecretResponse (Maybe UTCTime)
- describeSecretResponse_description :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_rotationLambdaARN :: Lens' DescribeSecretResponse (Maybe Text)
- describeSecretResponse_tags :: Lens' DescribeSecretResponse (Maybe [Tag])
- describeSecretResponse_httpStatus :: Lens' DescribeSecretResponse Int
Creating a Request
data DescribeSecret Source #
See: newDescribeSecret
smart constructor.
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 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.
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:
$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_arn :: Lens' DescribeSecretResponse (Maybe Text) Source #
The ARN of the secret.
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_createdDate :: Lens' DescribeSecretResponse (Maybe UTCTime) Source #
The date you created the secret.
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.
describeSecretResponse_httpStatus :: Lens' DescribeSecretResponse Int Source #
The response's http status code.