Skip to contents

Delete a policy version

Usage

aws_policy_delete_version(name, version_id)

Arguments

name

(character) a policy name. required. within the function we lookup the policy arn which is what's passed to the AWS API

version_id

(character) The policy version to delete. required. Allows (via regex) a string of characters that consists of the lowercase letter 'v' followed by one or two digits, and optionally followed by a period '.' and a string of letters and digits.

Value

invisibly returns nothing

Examples

if (FALSE) { # interactive()
doc <- aws_policy_document_create(
  region = "us-east-2",
  account_id = "1234567890",
  resource_id = "*",
  user = "jane_doe",
  action = "rds-db:connect"
)
aws_policy_create("RdsAllow456", document = doc)
aws_policy_delete_version("RdsAllow456", "v1")
}