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-1.1.3 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.1.2 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.1.1 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.1.0 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.7 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.6 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.5 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.4 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.3 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.2 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.1 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.10 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.9 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.8 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.7 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.6 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.4 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-1.0.0.pre.beta.1 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-0.4.3 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb
convection-0.4.2 lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb