Class: AWSCDK::EC2::EnableVpnGatewayOptions

Inherits:
VpnGatewayProps
  • Object
show all
Defined in:
ec2/enable_vpn_gateway_options.rb

Overview

Options for the Vpc.enableVpnGateway() method.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, amazon_side_asn: nil, vpn_route_propagation: nil) ⇒ EnableVpnGatewayOptions

Returns a new instance of EnableVpnGatewayOptions.

Parameters:

  • type (String)

    Default type ipsec.1.

  • amazon_side_asn (Numeric, nil) (defaults to: nil)

    Explicitly specify an Asn or let aws pick an Asn for you.

  • vpn_route_propagation (Array<AWSCDK::EC2::SubnetSelection>, nil) (defaults to: nil)

    Provide an array of subnets where the route propagation should be added.



10
11
12
13
14
15
16
17
# File 'ec2/enable_vpn_gateway_options.rb', line 10

def initialize(type:, amazon_side_asn: nil, vpn_route_propagation: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @amazon_side_asn = amazon_side_asn
  Jsii::Type.check_type(@amazon_side_asn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "amazonSideAsn") unless @amazon_side_asn.nil?
  @vpn_route_propagation = vpn_route_propagation.is_a?(Array) ? vpn_route_propagation.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : vpn_route_propagation
  Jsii::Type.check_type(@vpn_route_propagation, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuU3VibmV0U2VsZWN0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "vpnRoutePropagation") unless @vpn_route_propagation.nil?
end

Instance Attribute Details

#amazon_side_asnNumeric? (readonly)

Note:

Default: 65000

Explicitly specify an Asn or let aws pick an Asn for you.

Returns:

  • (Numeric, nil)


27
28
29
# File 'ec2/enable_vpn_gateway_options.rb', line 27

def amazon_side_asn
  @amazon_side_asn
end

#typeString (readonly)

Default type ipsec.1.

Returns:

  • (String)


22
23
24
# File 'ec2/enable_vpn_gateway_options.rb', line 22

def type
  @type
end

#vpn_route_propagationArray<AWSCDK::EC2::SubnetSelection>? (readonly)

Note:

Default: noPropagation

Provide an array of subnets where the route propagation should be added.

Returns:



32
33
34
# File 'ec2/enable_vpn_gateway_options.rb', line 32

def vpn_route_propagation
  @vpn_route_propagation
end

Class Method Details

.jsii_propertiesObject



34
35
36
37
38
39
40
# File 'ec2/enable_vpn_gateway_options.rb', line 34

def self.jsii_properties
  {
    :type => "type",
    :amazon_side_asn => "amazonSideAsn",
    :vpn_route_propagation => "vpnRoutePropagation",
  }
end

Instance Method Details

#to_jsiiObject



42
43
44
45
46
47
48
49
50
51
# File 'ec2/enable_vpn_gateway_options.rb', line 42

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "type" => @type,
    "amazonSideAsn" => @amazon_side_asn,
    "vpnRoutePropagation" => @vpn_route_propagation,
  })
  result.compact
end