Class: Convection::Model::Template::Resource::IAMRole

Inherits:
Convection::Model::Template::Resource show all
Includes:
DSL::Template::Resource::IAMRole
Defined in:
lib/convection/model/template/resource/aws_iam_role.rb

Overview

AWS::IAM::Role

Instance Attribute Summary collapse

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods included from DSL::Template::Resource::IAMRole

#allow_instance_termination, #assume_role_policy, #policy, #trust_cloudtrail, #trust_ec2_instances, #trust_emr, #trust_flow_logs, #trust_service, #with_instance_profile

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, #initialize, properties, #property, property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Template::Resource

attach_resource

Methods included from DSL::Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from DSL::IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select

Constructor Details

This class inherits a constructor from Convection::Model::Template::Resource

Instance Attribute Details

#instance_profileObject (readonly)

Returns the value of attribute instance_profile



105
106
107
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 105

def instance_profile
  @instance_profile
end

#trust_relationshipObject

Returns the value of attribute trust_relationship



104
105
106
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 104

def trust_relationship
  @trust_relationship
end

Instance Method Details

#managed_policy_arnObject #managed_policy_arn(value) ⇒ Object Also known as: managed_policy

Overloads:

  • #managed_policy_arnObject

    Returns the value of the 'ManagedPolicyArns' CloudFormation property.

  • #managed_policy_arn(value) ⇒ Object

    Sets the 'ManagedPolicyArns' CloudFormation property.

    Parameters:

    • value

      the value to set the 'ManagedPolicyArns' CloudFormation property to.



101
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 101

property :managed_policy_arn, 'ManagedPolicyArns', :type => :list

#pathObject #path(value) ⇒ Object

Overloads:

  • #pathObject

    Returns the value of the 'Path' CloudFormation property.

  • #path(value) ⇒ Object

    Sets the 'Path' CloudFormation property.

    Parameters:

    • value

      the value to set the 'Path' CloudFormation property to.



99
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 99

property :path, 'Path'

#policiesObject #policies(value) ⇒ Object

Overloads:

  • #policiesObject

    Returns the value of the 'Policies' CloudFormation property.

  • #policies(value) ⇒ Object

    Sets the 'Policies' CloudFormation property.

    Parameters:

    • value

      the value to set the 'Policies' CloudFormation property to.



100
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 100

property :policies, 'Policies', :type => :list

#renderObject



107
108
109
110
111
# File 'lib/convection/model/template/resource/aws_iam_role.rb', line 107

def render
  super.tap do |r|
    r['Properties']['AssumeRolePolicyDocument'] = trust_relationship.document unless trust_relationship.nil?
  end
end