Last chance! 50% off unlimited learning
Sale ends in
Retrieve, create, update, and delete IAM user groups
create_group(group, path, ...)update_group(group, name, path, ...)
delete_group(group, ...)
get_group_users(group, n, marker, ...)
list_groups(user, n, marker, path, ...)
add_user(user, group, ...)
remove_user(user, group, ...)
A character string containing a group name or an object of class “iam_group”.
A character string specifying a path prefix in which to locate user(s), role(s), etc. See Reference Identifiers on the AWS Documentation for more information.
Additional arguments passed to iamHTTP
.
A character string specifying the new name for the group.
An integer specifying the number of responses to return.
A character string specifying a marker (from a previous response) to use in paginating results
A character string specifying a user name.
create_group
and get_group
return objects of class “iam_group”. update_group
and delete_group
, add_user
, and remove_user
return a logical TRUE
(if successful) or an error. list_groups
returns a list of IAM group objects. get_group_users
returns a list of objects of class “iam_user”, with a “iam_group” attribute.
# NOT RUN {
list_groups()
# create group
(g <- create_group("example"))
# rename
update_group(g, "example2")
list_groups()
# create example user
u <- create_user("example-user")
# add user to group
add_user(u, "example2")
get_group_users("example2")
# cleanup
remove_user(u, "example2")
delete_user(u)
delete_group("example2")
# }
Run the code above in your browser using DataLab