Sha256: ab2c64a1e99634aff0b2554f4974b114ef76439b8d5a01094eb01c1bfd75e738

Contents?: true

Size: 1.13 KB

Versions: 19

Compression:

Stored size: 1.13 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 :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

19 entries across 19 versions & 1 rubygems

Version Path
convection-0.3.0 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.34.pre.beta.1 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.33 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.32 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.31 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.30 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.29 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.28 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.27 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.26 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.25 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.24 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.23 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.22 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.21 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.20 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.19 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.18 lib/convection/model/template/resource/aws_lambda_function.rb
convection-0.2.17 lib/convection/model/template/resource/aws_lambda_function.rb