Linux command
aws-secretsmanager 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create a new secret
aws secretsmanager create-secret --name [secret-name] --secret-string "[secret-value]"
Get the value
aws secretsmanager get-secret-value --secret-id [secret-name]
List all secrets
aws secretsmanager list-secrets
Update a secret
aws secretsmanager put-secret-value --secret-id [secret-name] --secret-string "[new-value]"
Delete a secret
aws secretsmanager delete-secret --secret-id [secret-name] --recovery-window-in-days [7]
Delete a secret immediately
aws secretsmanager delete-secret --secret-id [secret-name] --force-delete-without-recovery
Rotate a secret
aws secretsmanager rotate-secret --secret-id [secret-name]
Generate a random password
aws secretsmanager get-random-password --password-length [32]
说明
aws secretsmanager is the AWS CLI interface for Amazon Secrets Manager, a service for securely storing, managing, and retrieving secrets such as database credentials, API keys, and other sensitive information. Secrets Manager enables automatic rotation of secrets, fine-grained access control through IAM policies, and audit logging via CloudTrail. It supports replication across regions for disaster recovery.
FAQ
What is the aws-secretsmanager command used for?
aws secretsmanager is the AWS CLI interface for Amazon Secrets Manager, a service for securely storing, managing, and retrieving secrets such as database credentials, API keys, and other sensitive information. Secrets Manager enables automatic rotation of secrets, fine-grained access control through IAM policies, and audit logging via CloudTrail. It supports replication across regions for disaster recovery.
How do I run a basic aws-secretsmanager example?
Run `aws secretsmanager create-secret --name [secret-name] --secret-string "[secret-value]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more aws-secretsmanager examples?
This page includes 8 examples for aws-secretsmanager, plus related commands for nearby Linux tasks.