View source: R/secrets_manager.R
aws_secrets_get | R Documentation |
Get a secret
aws_secrets_get(id, ...)
id |
(character) The name or ARN of the secret. required |
... |
further named parameters passed on to |
(list) with fields:
ARN
Name
VersionId
SecretBinary
SecretString
VersionStages
CreatedDate
try({
# Create a secret
secret <- random_string("secret-", size = 16)
aws_secrets_create(
name = secret,
secret = '{"username":"jane","password":"cat"}',
description = "A string"
)
aws_secrets_get(secret)
# Does exist
aws_secrets_get(id = "MyTestDatabaseSecret")
# Does not exist
try(aws_secrets_get(id = "DoesntExist"))
# Cleanup
aws_secrets_delete(secret, ForceDeleteWithoutRecovery = TRUE)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.