Class: Convection::Model::Template::Resource::EC2VPCEndpoint

Inherits:
Convection::Model::Template::Resource show all
Extended by:
Forwardable
Defined in:
lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb

Overview

AWS::EC2::VpcEndpoint

Instance Attribute Summary collapse

Attributes inherited from Convection::Model::Template::Resource

#exist, #name, #parent, #properties, #resource_attributes, #template

Instance Method Summary collapse

Methods inherited from Convection::Model::Template::Resource

#as_attribute, attach_method, #deletion_policy, #depends_on, properties, #property, property, #reference, type, #type, #with_output

Methods included from Mixin::Conditional

#condition, #render_condition

Methods included from DSL::Template::Resource

attach_resource

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_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select

Constructor Details

#initialize(*args) ⇒ EC2VPCEndpoint

Returns a new instance of EC2VPCEndpoint



23
24
25
26
# File 'lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb', line 23

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

Instance Attribute Details

#documentObject (readonly)

, 'PolicyDocument'



18
19
20
# File 'lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb', line 18

def document
  @document
end

Instance Method Details

#renderObject



32
33
34
35
36
# File 'lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb', line 32

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

#route_tablesObject #route_tables(value) ⇒ Object

Overloads:

  • #route_tablesObject

    Returns the value of the 'RouteTableIds' CloudFormation property.

  • #route_tables(value) ⇒ Object

    Sets the 'RouteTableIds' CloudFormation property.

    Parameters:

    • value

      the value to set the 'RouteTableIds' CloudFormation property to.



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

property :route_tables, 'RouteTableIds', :type => :list

#service(val) ⇒ Object



28
29
30
# File 'lib/convection/model/template/resource/aws_ec2_vpc_endpoint.rb', line 28

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

#service_nameObject #service_name(value) ⇒ Object

Overloads:

  • #service_nameObject

    Returns the value of the 'ServiceName' CloudFormation property.

  • #service_name(value) ⇒ Object

    Sets the 'ServiceName' CloudFormation property.

    Parameters:

    • value

      the value to set the 'ServiceName' CloudFormation property to.



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

property :service_name, 'ServiceName'

#vpcObject #vpc(value) ⇒ Object

Overloads:

  • #vpcObject

    Returns the value of the 'VpcId' CloudFormation property.

  • #vpc(value) ⇒ Object

    Sets the 'VpcId' CloudFormation property.

    Parameters:

    • value

      the value to set the 'VpcId' CloudFormation property to.



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

property :vpc, 'VpcId'