aws_policy_statement: Create a policy statement

aws_policy_statementR Documentation

Create a policy statement

Description

Create a policy statement

Usage

aws_policy_statement(action, resource, effect = "Allow", ...)

Arguments

action

(character) an action. required. see Actions below.

resource

(character) the object or objects the statement covers; see link below for more information

effect

(character) valid values: "Allow" (default), "Deny". length==1

...

Additional named arguments. See link in Details for options, and examples below

Details

https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements.html #nolint

Value

a named list

Examples

aws_policy_statement("iam:GetUser", "*")
aws_policy_statement("iam:GetUser", "*", Sid = "MyStatementId")
aws_policy_statement("iam:GetUser", "*",
  Condition = list(
    StringEqualsIgnoreCase = list("aws:username" = "johndoe")
  )
)
aws_policy_statement("iam:GetUser", "*",
  Principal = list(Service = "s3.amazonaws.com")
)

sixtyfour documentation built on April 3, 2025, 8:22 p.m.