Skip to contents

Rotate a secret

Usage

aws_secrets_rotate(id, lambda_arn = NULL, rules = NULL, immediately = TRUE)

Arguments

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: TRUE

Value

(list) with fields:

  • ARN

  • Name

  • VersionId

Details

Note that we autogenerate a random UUID to pass to the ClientRequestToken parameter of the paws function used internally

Examples

if (FALSE) { # \dontrun{
aws_secrets_rotate(id = "MyTestDatabaseSecret")
aws_secrets_rotate(id = "MyTestDatabaseSecret", rules = list(
  Duration = "2h",
  ScheduleExpression = "cron(0 16 1,15 * ? *)"
))
} # }