View source: R/secrets_manager.R
aws_secrets_rotate | R Documentation |
Rotate a secret
aws_secrets_rotate(id, lambda_arn = NULL, rules = NULL, immediately = TRUE)
id |
(character) The name or ARN of the secret. required |
lambda_arn |
(character) The ARN of the Lambda rotation function. Only supply for secrets that use a Lambda rotation function to rotate |
rules |
(list) asdfadf |
immediately |
(logical) whether to rotate the secret immediately or not.
default: |
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
https://www.paws-r-sdk.com/docs/secretsmanager_rotate_secret/
try({
# Create a secret
secret <- random_string("secret-", size = 16)
aws_secrets_create(
name = secret,
secret = '{"username":"billy","password":"willy"}',
description = "A string"
)
# Rotate
try(aws_secrets_rotate(id = 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.