View source: R/secrets_manager.R
aws_secrets_update | R Documentation |
Update a secret
aws_secrets_update(id, secret, ...)
id |
(character) The name or ARN of the secret. required |
secret |
(character/raw) The text or raw data to encrypt and store in this new version of the secret. AWS recommends for text to use a JSON structure of key/value pairs for your secret value (see examples below). required |
... |
further named parameters passed on to |
Note that we autogenerate a random UUID to pass to the
ClientRequestToken
parameter of the paws
function used internally
(list) with fields:
ARN
Name
VersionId
VersionStages
try({
# Create a secret
secret <- random_string("secret-", size = 16)
aws_secrets_create(
name = secret,
secret = '{"username":"debby","password":"kitty"}',
description = "A string"
)
aws_secrets_get(secret)
# Update the secret
aws_secrets_update(
id = secret,
secret = '{"username":"debby","password":"kitten"}'
)
aws_secrets_get(secret)
# 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.