Skip to contents

Create a user, magically

Usage

six_user_create(
  username,
  path = NULL,
  permission_boundary = NULL,
  tags = NULL,
  copy_to_cb = TRUE
)

Arguments

username

(character) A user name. required

path

(character) The path for the user name. optional. If it is not included, it defaults to a slash (/).

permission_boundary

(character) The ARN of the managed policy that is used to set the permissions boundary for the user. optional

tags

(list) A list of tags that you want to attach to the new user. optional

copy_to_cb

(logical) Copy to clipboard. Default: FALSE. See section "Clipboard" below for more details.

Value

NULL invisibly. A draft email is copied to your clipboard

Details

See aws_user_create() for more details. This function creates a user, adds policies so the user can access their own account, and grants them an access key. Add more policies using aws_polic* functions

What is magical

  • Adds a UserInfo policy to your account if doesn't exist yet

  • Attaches UserInfo policy to the user created

  • Grants an access key, copying an email template to your clipboard

Examples

if (FALSE) { # interactive() && aws_has_creds()
name <- random_user()
six_user_create(name)

# cleanup
six_user_delete(name)
}