Sha256: 96e40bbe0e30d55c36461351ec6723b32a636bbcdeb0b2609fc092fa6519316e

Contents?: true

Size: 1.18 KB

Versions: 25

Compression:

Stored size: 1.18 KB

Contents

require_relative '../resource'

module Convection
  module Model
    class Template
      class Resource
        ##
        # AWS::Lambda::Function
        ##
        class Lambda < Resource
          type 'AWS::Lambda::Function'
          property :function_code, 'Code'
          property :function_name, 'FunctionName'
          property :description, 'Description'
          property :handler, 'Handler'
          property :memory_size, 'MemorySize'
          property :runtime, 'Runtime', :equal_to => ['nodejs', 'nodejs4.3', 'java8', 'python2.7']
          property :timeout, 'Timeout'
          property :role, 'Role'
          property :vpc_cfg, 'VpcConfig'

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

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
convection-1.1.3 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.1.2 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.1.1 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.1.0 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.7 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.6 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.5 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.4 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.3 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.2 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.1 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.10 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.9 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.8 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.7 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.6 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.4 lib/convection/model/template/resource/aws_lambda_function.rb
convection-1.0.0.pre.beta.1 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.4.3 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.4.2 lib/convection/model/template/resource/aws_lambda_function.rb