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

Inherits:
Convection::Model::Template::Resource show all
Includes:
Mixin::Taggable
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 included from Mixin::Taggable

#immutable_metadata, #render_tags, #tag, #tags

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

#_terraform_module_dir_to_flag, #_terraform_module_flag_to_dir, attach_resource, attach_resource_collection, resource_collection_dsl_methods, resource_dsl_methods

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_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select

Constructor Details

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

Instance Method Details

#code(&block) ⇒ Object

Add code block



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

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

#concurrencyObject #concurrency(value) ⇒ Object

Overloads:

  • #concurrencyObject

    Returns the value of the ‘ReservedConcurrentExecutions’ CloudFormation property.

  • #concurrency(value) ⇒ Object

    Sets the ‘ReservedConcurrentExecutions’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘ReservedConcurrentExecutions’ CloudFormation property to.



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

property :concurrency, 'ReservedConcurrentExecutions'

#dead_letter_cfgObject #dead_letter_cfg(value) ⇒ Object

Overloads:

  • #dead_letter_cfgObject

    Returns the value of the ‘DeadLetterConfig’ CloudFormation property.

  • #dead_letter_cfg(value) ⇒ Object

    Sets the ‘DeadLetterConfig’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘DeadLetterConfig’ CloudFormation property to.



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

property :dead_letter_cfg, 'DeadLetterConfig'

#dead_letter_config(&block) ⇒ Object



49
50
51
52
53
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 49

def dead_letter_config(&block)
  dead_letter_cfg = ResourceProperty::LambdaFunctionDeadLetterConfig.new(self)
  dead_letter_cfg.instance_exec(&block) if block
  properties['DeadLetterConfig'].set(dead_letter_cfg)
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.



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

property :description, 'Description'

#env(value) ⇒ Object

psuedo-property definitions. We add the expected name as a nested DSL for these below.



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

property :env, 'Environment'

#environment(&block) ⇒ Object



36
37
38
39
40
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 36

def environment(&block)
  env = ResourceProperty::LambdaEnvironment.new(self)
  env.instance_exec(&block) if block
  properties['Environment'].set(env)
end

#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.



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

property :function_code, 'Code'

#function_nameObject #function_name(value) ⇒ Object

Overloads:

  • #function_nameObject

    Returns the value of the ‘FunctionName’ CloudFormation property.

  • #function_name(value) ⇒ Object

    Sets the ‘FunctionName’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘FunctionName’ CloudFormation property to.



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

property :function_name, 'FunctionName'

#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.



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

property :handler, 'Handler'

#kms_key_arnObject #kms_key_arn(value) ⇒ Object

Overloads:

  • #kms_key_arnObject

    Returns the value of the ‘KmsKeyArn’ CloudFormation property.

  • #kms_key_arn(value) ⇒ Object

    Sets the ‘KmsKeyArn’ CloudFormation property.

    Parameters:

    • value

      the value to set the ‘KmsKeyArn’ CloudFormation property to.



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

property :kms_key_arn, 'KmsKeyArn'

#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.



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

property :memory_size, 'MemorySize'

#render(*args) ⇒ Object



55
56
57
58
59
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 55

def render(*args)
  super.tap do |resource|
    render_tags(resource)
  end
end

#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.



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

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.



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

property :runtime, 'Runtime'

#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.



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

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.



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

property :vpc_cfg, 'VpcConfig'

#vpc_config(&block) ⇒ Object

Add vpc_config block



43
44
45
46
47
# File 'lib/convection/model/template/resource/aws_lambda_function.rb', line 43

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