aws.secretsmanager.list_secrets
Example SQL Queries
SELECT * FROMaws.secretsmanager.list_secrets;Description
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.
All Secrets Manager operations are eventually consistent. ListSecrets might not reflect changes from the last five minutes. You can get more recent information for a specific secret by calling DescribeSecret.
To list the versions of a secret, use ListSecretVersionIds.
To retrieve the values for the secrets, call BatchGetSecretValue or 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.
Table Definition
| Column Name | Column Data Type |
|---|---|
| filters Input Column The filters to apply to the list of secrets. | STRUCT( |
Show child fields
| |
| include_planned_deletion Input Column Specifies whether to include secrets scheduled for deletion. By default, secrets scheduled for deletion aren't included. | BOOLEAN |
| sort_order Input Column Secrets are listed by CreatedDate. | VARCHAR |
| _aws_profile Input Column The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role. | STRUCT( |
Show child fields
| |
| _aws_region Input Column The AWS region to use. | VARCHAR |
| arn The Amazon Resource Name (ARN) of the secret. | VARCHAR |
| created_date The date and time when a secret was created. | TIMESTAMP_S |
| deleted_date The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the RecoveryWindowInDays parameter of the DeleteSecret operation. | TIMESTAMP_S |
| description The user-provided description of the secret. | VARCHAR |
| kms_key_id The 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. | VARCHAR |
| last_accessed_date 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. | TIMESTAMP_S |
| last_changed_date The last date and time that this secret was modified in any way. | TIMESTAMP_S |
| last_rotated_date The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated. | TIMESTAMP_S |
| name The friendly name of the secret. | VARCHAR |
| next_rotation_date The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null. | TIMESTAMP_S |
| owning_service Returns the name of the service that created the secret. | VARCHAR |
| primary_region The Region where Secrets Manager originated the secret. | VARCHAR |
| rotation_enabled Indicates whether automatic, scheduled rotation is enabled for this secret. | BOOLEAN |
| rotation_lambda_arn The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to RotateSecret . | VARCHAR |
| rotation_rules A structure that defines the rotation configuration for the secret. | STRUCT( |
Show child fields
| |
| secret_versions_to_stages A list of all of the currently assigned SecretVersionStage staging labels and the SecretVersionId attached to each one. Staging labels are used to keep track of the different versions during the rotation process. A version that does not have any SecretVersionStage is considered deprecated and subject to deletion. Such versions are not included in this list. | MAP(VARCHAR, VARCHAR[]) |
| tags The list of user-defined tags associated with the secret. To add tags to a secret, use TagResource . To remove tags, use UntagResource . | STRUCT( |
Show child fields
| |