
Last chance! 50% off unlimited learning
Sale ends in
Retrieve, create, update, and delete IAM access keys
create_key(user, ...)update_key(key, user, status, ...)
delete_key(key, user, ...)
list_keys(user, n, marker, ...)
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
.
A character string specifying an access key or an object of class “iam_key”.
A character string specifying either “Active” or “Inactive” to status the key status to.
An integer specifying the number of responses to return.
A character string specifying a marker (from a previous response) to use in paginating results
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.
# 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)
Run the code above in your browser using DataLab