class Fog::AWS::IAM::Roles

Public Class Methods

new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/aws/models/iam/roles.rb, line 9
def initialize(attributes = {})
  super
end

Public Instance Methods

all() click to toggle source
# File lib/fog/aws/models/iam/roles.rb, line 13
def all
  data = service.list_roles.body['Roles']
  load(data)
end
get(identity) click to toggle source
# File lib/fog/aws/models/iam/roles.rb, line 18
def get(identity)
  role = nil
  begin
    role = service.roles.new( service.get_role( identity ).data[:body]["Role"] )
  rescue Excon::Errors::NotFound, Fog::AWS::IAM::NotFound # ignore not found error
  end
  role
end
new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/aws/models/iam/roles.rb, line 27
def new(attributes = {})
  if not attributes.key?(:assume_role_policy_document)
    attributes[:assume_role_policy_document] = Fog::AWS::IAM::EC2_ASSUME_ROLE_POLICY.to_s
  end
  super
end