Class: AWS::IAM::Resource

Inherits:
Core::Resource show all
Defined in:
lib/aws/iam/resource.rb

Instance Attribute Summary

Attributes included from Core::Model

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Core::Resource

attribute_providers, attribute_providers_for, attributes, #attributes_from_response, define_attribute_type, #eql?, #initialize, #inspect, new_from

Methods included from Core::Cacheable

included, #retrieve_attribute

Methods included from Core::Model

#client, #config_prefix, #initialize, #inspect

Constructor Details

This class inherits a constructor from AWS::Core::Resource

Class Method Details

.prefix_update_attributes(prefix = 'new_') ⇒ Object



58
59
60
# File 'lib/aws/iam/resource.rb', line 58

def prefix_update_attributes prefix = 'new_'
  @update_prefix = prefix 
end

.update_prefixObject



63
64
65
# File 'lib/aws/iam/resource.rb', line 63

def update_prefix
  @update_prefix
end

Instance Method Details

#exists?Boolean

Returns True if the resource exists.

Returns:

  • (Boolean)

    True if the resource exists.



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

def exists?
  get_resource
rescue Errors::NoSuchEntity => e
  false
else
  true
end