Class: CfIamInstanceProfile

Inherits:
Object
  • Object
show all
Includes:
CfBase
Defined in:
lib/cf_factory/iam/cf_iam_instance_profile.rb

Instance Method Summary collapse

Methods included from CfBase

#generate, #generate_ref, #get_deletion_policy, #get_name, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes, #set_tags

Constructor Details

#initialize(name, path, roles) ⇒ CfIamInstanceProfile

Returns a new instance of CfIamInstanceProfile.



8
9
10
11
12
# File 'lib/cf_factory/iam/cf_iam_instance_profile.rb', line 8

def initialize(name, path, roles)
  @name = name 
  @path = path
  @roles = roles
end

Instance Method Details

#get_cf_attributesObject



18
19
20
# File 'lib/cf_factory/iam/cf_iam_instance_profile.rb', line 18

def get_cf_attributes
  {}
end

#get_cf_propertiesObject



22
23
24
25
26
27
28
# File 'lib/cf_factory/iam/cf_iam_instance_profile.rb', line 22

def get_cf_properties
  result = {
    "Path" => @path,
    "Roles" => "["+@roles.collect() {|r| CfHelper.generate_ref(r)}.join(",")+"]"
  }
  result
end

#get_cf_typeObject



14
15
16
# File 'lib/cf_factory/iam/cf_iam_instance_profile.rb', line 14

def get_cf_type
  "AWS::IAM::InstanceProfile"
end