Lists the secrets that are stored by Secrets Manager in the Amazon Web Services account, not including secrets that are marked for deletion. To see secrets marked for deletion, use the Secrets Manager console.
ListSecrets is eventually consistent, however it might not reflect changes from the last five minutes. To get the latest information for a specific secret, use DescribeSecret.
To list the versions of a secret, use ListSecretVersionIds.
To get the secret value from SecretString or SecretBinary, call GetSecretValue.
For information about finding secrets in the console, see Find secrets in Secrets Manager.
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:ListSecrets. For more information, see IAM policy actions for Secrets Manager and Authentication and access control in Secrets Manager.
Query parameters
Pagination limit
Pagination token
Headers
Request body
Response
Success
Example response
{
"SecretList": [
{
"ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
"Description": "My test database secret",
"LastChangedDate": 1523477145.729,
"Name": "MyTestDatabaseSecret",
"SecretVersionsToStages": {
"EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
"AWSCURRENT"
]
}
},
{
"ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6",
"Description": "Another secret created for a different database",
"LastChangedDate": 1523482025.685,
"Name": "MyTestDatabaseSecret1",
"SecretVersionsToStages": {
"EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
"AWSCURRENT"
]
}
}
]
}