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.
post/#X-Amz-Target=secretsmanager.DescribeSecret
Headers
X-Amz-Target'secretsmanager.DescribeSecret' required
Request body
Response
Success
Example response
{
"ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
"Description": "My test database secret",
"KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE1-90ab-cdef-fedc-ba987KMSKEY1",
"LastAccessedDate": "1523923200",
"LastChangedDate": 1523477145.729,
"LastRotatedDate": 1525747253.72,
"Name": "MyTestDatabaseSecret",
"NextRotationDate": "1665165599",
"RotationEnabled": true,
"RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestRotationLambda",
"RotationRules": {
"AutomaticallyAfterDays": 14,
"Duration": "2h",
"ScheduleExpression": "cron(0 16 1,15 * ? *)"
},
"Tags": [
{
"Key": "SecondTag",
"Value": "AnotherValue"
},
{
"Key": "FirstTag",
"Value": "SomeValue"
}
],
"VersionIdsToStages": {
"EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
"AWSPREVIOUS"
],
"EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
"AWSCURRENT"
]
}
}