Class: Fog::AWS::IAM::Policy

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



21
22
23
24
25
26
27
# File 'lib/fog/aws/models/iam/policy.rb', line 21

def destroy
  requires :id
  requires :username

  service.delete_user_policy(username, id)
  true
end

#saveObject



11
12
13
14
15
16
17
18
19
# File 'lib/fog/aws/models/iam/policy.rb', line 11

def save
  requires :id
  requires :username
  requires :document

  data = service.put_user_policy(username, id, document).body
  merge_attributes(data)
  true
end

#userObject



29
30
31
32
# File 'lib/fog/aws/models/iam/policy.rb', line 29

def user
  requires :username
  service.users.get(username)
end