create_key {aws.iam}R Documentation

Manage Access Keys/Credentials

Description

Retrieve, create, update, and delete IAM access keys

Usage

create_key(user, ...)

update_key(key, user, status, ...)

delete_key(key, user, ...)

list_keys(user, n, marker, ...)

Arguments

user

Optionally, a character string specifying a user name or an object of class “iam_user”. This will be retrieved by default from the “UserName” list entry in key, if available; otherwise the user is assumed to be the user whose credentials are being used to execute the request.

...

Additional arguments passed to iamHTTP.

key

A character string specifying an access key or an object of class “iam_key”.

status

A character string specifying either “Active” or “Inactive” to status the key status to.

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

Value

create_user and get_user return objects of class “iam_user”. update_user and delete_user return a logical TRUE (if successful) or an error. list_users returns a list of IAM user objects.

See Also

create_user

Examples

## Not run: 
# list access keys
list_keys()

# create a user key
u <- create_user("example-user")
str(k <- create_key(u))

# toggle key status to inactive
update_key(k, u, "Inactive")
list_keys(u)

# cleanup
delete_key(k)
delete_user(u)

## End(Not run)

[Package aws.iam version 0.1.8 Index]