Class: Fog::AWS::IAM::User

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/aws/models/iam/user.rb

Instance Method Summary collapse

Instance Method Details

#access_keysObject



31
32
33
34
# File 'lib/fog/aws/models/iam/user.rb', line 31

def access_keys
  requires :id
  service.access_keys(:username => id)
end

#destroyObject



20
21
22
23
24
# File 'lib/fog/aws/models/iam/user.rb', line 20

def destroy
  requires :id
  service.delete_user(id)
  true
end

#policiesObject



26
27
28
29
# File 'lib/fog/aws/models/iam/user.rb', line 26

def policies
  requires :id
  service.policies(:username => id)
end

#saveObject



13
14
15
16
17
18
# File 'lib/fog/aws/models/iam/user.rb', line 13

def save
  requires :id
  data = service.create_user(id, path || '/').body['User']
  merge_attributes(data)
  true
end