create_group {aws.iam} | R Documentation |
Manage IAM User Groups
Description
Retrieve, create, update, and delete IAM user groups
Usage
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, ...)
Arguments
group |
A character string containing a group name or an object of class “iam_group”. |
path |
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 |
name |
A character string specifying the new name for the group. |
n |
An integer specifying the number of responses to return. |
marker |
A character string specifying a marker (from a previous response) to use in paginating results |
user |
A character string specifying a user name. |
Value
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.
See Also
Examples
## 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")
## End(Not run)