Class: Convection::Model::Template::Resource::Lambda

Inherits:
Convection::Model::Template::Resource show all
Defined in:
lib/convection/model/template/resource/aws_lambda_function.rb

Overview

AWS::Lambda::Function

Instance Attribute Summary

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, #initialize, properties, property, #property, #reference, #render, 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 Method Details

#code(&block) ⇒ Object

Add code block



22
23
24
25
26
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 22

def code(&block)
  function_code = ResourceProperty::LambdaFunctionCode.new(self)
  function_code.instance_exec(&block) if block
  properties['Code'].set(function_code)
end

#descriptionObject #description(value) ⇒ Object

Overloads:

  • #descriptionObject

    Returns the value of the 'Description' CloudFormation property.

  • #description(value) ⇒ Object

    Sets the 'Description' CloudFormation property.

    Parameters:

    • value

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



13
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 13

property :description, 'Description'

#function_codeObject #function_code(value) ⇒ Object

Overloads:

  • #function_codeObject

    Returns the value of the 'Code' CloudFormation property.

  • #function_code(value) ⇒ Object

    Sets the 'Code' CloudFormation property.

    Parameters:

    • value

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



12
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 12

property :function_code, 'Code'

#handlerObject #handler(value) ⇒ Object

Overloads:

  • #handlerObject

    Returns the value of the 'Handler' CloudFormation property.

  • #handler(value) ⇒ Object

    Sets the 'Handler' CloudFormation property.

    Parameters:

    • value

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



14
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 14

property :handler, 'Handler'

#memory_sizeObject #memory_size(value) ⇒ Object

Overloads:

  • #memory_sizeObject

    Returns the value of the 'MemorySize' CloudFormation property.

  • #memory_size(value) ⇒ Object

    Sets the 'MemorySize' CloudFormation property.

    Parameters:

    • value

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



15
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 15

property :memory_size, 'MemorySize'

#roleObject #role(value) ⇒ Object

Overloads:

  • #roleObject

    Returns the value of the 'Role' CloudFormation property.

  • #role(value) ⇒ Object

    Sets the 'Role' CloudFormation property.

    Parameters:

    • value

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



18
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 18

property :role, 'Role'

#runtimeObject #runtime(value) ⇒ Object

Overloads:

  • #runtimeObject

    Returns the value of the 'Runtime' CloudFormation property.

  • #runtime(value) ⇒ Object

    Sets the 'Runtime' CloudFormation property.

    Parameters:

    • value

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



16
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 16

property :runtime, 'Runtime', :equal_to => ['nodejs', 'nodejs4.3', 'java8', 'python2.7']

#timeoutObject #timeout(value) ⇒ Object

Overloads:

  • #timeoutObject

    Returns the value of the 'Timeout' CloudFormation property.

  • #timeout(value) ⇒ Object

    Sets the 'Timeout' CloudFormation property.

    Parameters:

    • value

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



17
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 17

property :timeout, 'Timeout'

#vpc_cfgObject #vpc_cfg(value) ⇒ Object

Overloads:

  • #vpc_cfgObject

    Returns the value of the 'VpcConfig' CloudFormation property.

  • #vpc_cfg(value) ⇒ Object

    Sets the 'VpcConfig' CloudFormation property.

    Parameters:

    • value

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



19
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 19

property :vpc_cfg, 'VpcConfig'

#vpc_config(&block) ⇒ Object

Add vpc_config block



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

def vpc_config(&block)
  vpc_cfg = ResourceProperty::LambdaVpcConfig.new(self)
  vpc_cfg.instance_exec(&block) if block
  properties['VpcConfig'].set(vpc_cfg)
end