Create a policy
Arguments
- name
(character) a policy name. required
- document
(character) the policy document you want to use as the content for the new policy. required.
- path
(character) the path for the policy. if not given default is "/". optional
- description
(character) a friendly description of the policy. optional. cannot be changed after assigning it
(character) a vector of tags that you want to attach to the new IAM policy. Each tag consists of a key name and an associated value. optional
See also
Other policies:
as_policy_arn()
,
aws_policies()
,
aws_policy()
,
aws_policy_attach()
,
aws_policy_delete()
,
aws_policy_delete_version()
,
aws_policy_detach()
,
aws_policy_exists()
,
aws_policy_list_entities()
,
aws_policy_list_versions()
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("RdsAllow123", document = doc)
# cleanup
aws_policy_delete("RdsAllow123")
}