Sha256: c1c715bfd5c45be13d76f0440fa24fdb405d81d77ddf8ae306efba39943a2663

Contents?: true

Size: 1.06 KB

Versions: 78

Compression:

Stored size: 1.06 KB

Contents

require 'forwardable'
require_relative '../resource'

module Convection
  module Model
    class Template
      class Resource
        ##
        # AWS::EC2::VpcEndpoint
        ##
        class EC2VPCEndpoint < Resource
          extend Forwardable

          type 'AWS::EC2::VPCEndpoint'
          property :vpc, 'VpcId'
          property :route_tables, 'RouteTableIds', :type => :list
          property :service_name, 'ServiceName'
          attr_reader :document # , 'PolicyDocument'

          def_delegators :@document, :allow, :deny, :id, :version, :statement
          def_delegator :@document, :name, :policy_name

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

          def service(val)
            properties['ServiceName'].set(join('.', 'com.amazonaws', fn_ref('AWS::Region'), val))
          end

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

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
convection-2.3.1 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.3.0 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.29 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.28.pre.beta.2 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.28.pre.beta.1 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.27 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.26 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.25 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.24 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.23 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.22 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.21 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.20 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.19 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.18 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.17 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.16 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.15 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.14 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-2.2.13 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb