class AWS::IAM::User
@attr_reader [String] arn
@attr_reader [DateTime] create_date
@attr_reader [String] id
@attr [String] path
@attr [String] user_name
groups and delete all of its signing certificates. Once this is done:
In order to delete a user you must first remove it from all of its
== Deleting Users
console (web interface). See {LoginProfile} for more information.
A login profile is required for an IAM user to use the AWS Management
== Login Profile
end
puts developer.name
iam.users.each(:path_prefix => ‘/developers’).each do |developer|
enumerate users by their path prefixes:
Paths are a useful tool for organizing/tagging users. You can later
user = iam.users.create(‘newuser’, :path => ‘/developers/ruby/’)
end with a forward slash (/).
When you create a user you can assign a path. Paths must begin and
== User Path
user.name = ‘newname’
user = iam.users[‘johndoe’]
the user’s ARN).
You can only edit a user’s name and path (both of which will modify
== Renaming a User
user = iam.users.create(‘johndoe’)
iam = AWS::IAM.new
== Creating A User
given policies that affect that they can do.
can be organized (optionally) into groups. Users (and groups) can be
Represents an IAM User. Each AWS account can have many users. Users
def access_keys
-
(AccessKeyCollection)
- Returns a collection that represents all
def access_keys AccessKeyCollection.new(:user => self) end
def delete
-
(nil)
-
def delete client.delete_user(resource_options) nil end
def delete!
def delete! groups.clear access_keys.clear policies.clear mfa_devices.clear signing_certificates.clear login_profile.delete if login_profile.exists? delete end
def groups
-
(UserGroupCollection)
-
def groups UserGroupCollection.new(self) end
def initialize name, options = {}
-
options
(Hash
) -- -
name
(String
) -- The IAM user name for this user.
def initialize name, options = {} options[:name] = name super(options) end
def login_profile
-
(LoginProfile)
- Returns the login profile for this
def login_profile LoginProfile.new(self) end
def mfa_devices
-
(MFADeviceCollection)
- Returns a collection that represents
def mfa_devices MFADeviceCollection.new(self) end
def policies
-
(PolicyCollection)
- Returns a collection that represents
def policies UserPolicyCollection.new(self) end
def resource_identifiers
def resource_identifiers [[:user_name, name]] end
def signing_certificates
-
(SigningCertificateCollection)
- Returns a collection that
def signing_certificates SigningCertificateCollection.new(:user => self, :config => config) end