class AWS::IAM::Resource

@private

Protected Class Methods

prefix_update_attributes(prefix = 'new_') click to toggle source

@private

# File lib/aws/iam/resource.rb, line 58
def prefix_update_attributes prefix = 'new_'
  @update_prefix = prefix 
end
update_prefix() click to toggle source

@private

# File lib/aws/iam/resource.rb, line 63
def update_prefix
  @update_prefix
end

Public Instance Methods

exists?() click to toggle source

@return [Boolean] True if the resource exists.

# File lib/aws/iam/resource.rb, line 21
def exists?
  get_resource
rescue Errors::NoSuchEntity => e
  false
else
  true
end

Protected Instance Methods

get_resource(attribute = nil) click to toggle source

@private

# File lib/aws/iam/resource.rb, line 39
def get_resource attribute = nil
  client.send(get_resource_client_method, resource_options)
end
get_resource_client_method() click to toggle source

@private

# File lib/aws/iam/resource.rb, line 45
def get_resource_client_method
  "get_#{ruby_name}"
end
update_resource(attr, value) click to toggle source

@private

# File lib/aws/iam/resource.rb, line 31
def update_resource attr, value
  options = { :"#{self.class.update_prefix}#{attr.set_as}" => value }
  client_method = update_resource_client_method
  client.send(client_method, options.merge(resource_options))
end
update_resource_client_method() click to toggle source

@private

# File lib/aws/iam/resource.rb, line 51
def update_resource_client_method
  "update_#{ruby_name}"
end