Difference between revisions of "Aws secretsmanager get-secret-value"
Jump to navigation
Jump to search
(→Relate) |
|||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/get-secret-value.html | https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/get-secret-value.html | ||
− | + | ||
+ | * <code>[[aws secretsmanager]] get-secret-value --secret-id <value></code> | ||
+ | * <code>[[aws secretsmanager]] get-secret-value --secret-id test/pass | [[jq -r]] '.SecretString' | jq -r '.password'</code> | ||
+ | |||
+ | { | ||
+ | "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", | ||
+ | "Name": "MyTestDatabaseSecret", | ||
+ | "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE", | ||
+ | "SecretString": "{\n \"username\":\"david\",\n \"password\":\"BnQw&XDWgaEeT9XGTT29\"\n}\n", | ||
+ | "VersionStages": [ | ||
+ | "AWSPREVIOUS" | ||
+ | ], | ||
+ | "CreatedDate": 1523477145.713 | ||
+ | } | ||
+ | |||
+ | |||
+ | == Related == | ||
+ | * <code>[[aws secretsmanager list-secrets]] | grep [[ARN]]</code> | ||
+ | * [[GetSecretValue]] | ||
== See also == | == See also == |
Latest revision as of 09:26, 17 June 2024
https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/get-secret-value.html
aws secretsmanager get-secret-value --secret-id <value>
aws secretsmanager get-secret-value --secret-id test/pass | jq -r '.SecretString' | jq -r '.password'
{ "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", "Name": "MyTestDatabaseSecret", "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE", "SecretString": "{\n \"username\":\"david\",\n \"password\":\"BnQw&XDWgaEeT9XGTT29\"\n}\n", "VersionStages": [ "AWSPREVIOUS" ], "CreatedDate": 1523477145.713 }
Related[edit]
See also[edit]
Advertising: