This function simply constructs a string, then checks that the ARN is valid using get_policy
See also
Other policies:
aws_policies()
,
aws_policy()
,
aws_policy_attach()
,
aws_policy_create()
,
aws_policy_delete()
,
aws_policy_delete_version()
,
aws_policy_detach()
,
aws_policy_exists()
,
aws_policy_list_entities()
,
aws_policy_list_versions()
Examples
if (FALSE) { # \dontrun{
as_policy_arn("ReadOnlyAccess")
as_policy_arn("arn:aws:iam::aws:policy/ReadOnlyAccess")
as_policy_arn("AmazonRDSDataFullAccess")
# as_policy_arn("Blarp")
# as_policy_arn(letters)
# as_policy_arn(5)
as_policy_arn("MyTestPolicy", local = TRUE)
# returns an arn - and if given an arn returns self
as_policy_arn("MyTestPolicy", local = TRUE) %>%
as_policy_arn()
# path = Job function
as_policy_arn("Billing", path = "job-function")
# path = Service role
as_policy_arn("AWSCostAndUsageReportAutomationPolicy",
path = "service-role"
)
} # }