Class: Convection::Model::Template::Resource::IAMPolicy

Inherits:
Convection::Model::Template::Resource show all
Extended by:
Forwardable
Defined in:
lib/convection/model/template/resource/aws_iam_policy.rb

Overview

AWS::IAM::Policy

Instance Attribute Summary collapse

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

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

Instance Method Summary collapse

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

#as_attribute, attach_method, #deletion_policy, #depends_on, 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

#initialize(*args) ⇒ IAMPolicy

Returns a new instance of IAMPolicy



35
36
37
38
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 35

def initialize(*args)
  super
  @document = Model::Mixin::Policy.new(:template => @template)
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document



31
32
33
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 31

def document
  @document
end

Instance Method Details

#groupObject #group(value) ⇒ Object

Overloads:

  • #groupObject

    Returns the value of the 'Groups' CloudFormation property.

  • #group(value) ⇒ Object

    Sets the 'Groups' CloudFormation property.

    Parameters:

    • value

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



15
16
17
18
19
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 15

property :group, 'Groups', :type => :list,
:transform => (proc do |resource|
  depends_on(resource)
  resource
end)

#renderObject



40
41
42
43
44
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 40

def render
  super.tap do |r|
    document.render(r['Properties'])
  end
end

#roleObject #role(value) ⇒ Object

Overloads:

  • #roleObject

    Returns the value of the 'Roles' CloudFormation property.

  • #role(value) ⇒ Object

    Sets the 'Roles' CloudFormation property.

    Parameters:

    • value

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



20
21
22
23
24
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 20

property :role, 'Roles', :type => :list,
:transform => (proc do |resource|
  depends_on(resource)
  resource
end)

#userObject #user(value) ⇒ Object

Overloads:

  • #userObject

    Returns the value of the 'Users' CloudFormation property.

  • #user(value) ⇒ Object

    Sets the 'Users' CloudFormation property.

    Parameters:

    • value

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



25
26
27
28
29
# File 'lib/convection/model/template/resource/aws_iam_policy.rb', line 25

property :user, 'Users', :type => :list,
:transform => (proc do |resource|
  depends_on(resource)
  resource
end)