Class: AWSCDK::EC2::EnableVpnGatewayOptions
- Inherits:
-
VpnGatewayProps
- Object
- VpnGatewayProps
- AWSCDK::EC2::EnableVpnGatewayOptions
- Defined in:
- ec2/enable_vpn_gateway_options.rb
Overview
Options for the Vpc.enableVpnGateway() method.
Instance Attribute Summary collapse
-
#amazon_side_asn ⇒ Numeric?
readonly
Explicitly specify an Asn or let aws pick an Asn for you.
-
#type ⇒ String
readonly
Default type ipsec.1.
-
#vpn_route_propagation ⇒ Array<AWSCDK::EC2::SubnetSelection>?
readonly
Provide an array of subnets where the route propagation should be added.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, amazon_side_asn: nil, vpn_route_propagation: nil) ⇒ EnableVpnGatewayOptions
constructor
A new instance of EnableVpnGatewayOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, amazon_side_asn: nil, vpn_route_propagation: nil) ⇒ EnableVpnGatewayOptions
Returns a new instance of EnableVpnGatewayOptions.
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_asn ⇒ Numeric? (readonly)
Note:
Default: 65000
Explicitly specify an Asn or let aws pick an Asn for you.
27 28 29 |
# File 'ec2/enable_vpn_gateway_options.rb', line 27 def amazon_side_asn @amazon_side_asn end |
#type ⇒ String (readonly)
Default type ipsec.1.
22 23 24 |
# File 'ec2/enable_vpn_gateway_options.rb', line 22 def type @type end |
#vpn_route_propagation ⇒ Array<AWSCDK::EC2::SubnetSelection>? (readonly)
Note:
Default: noPropagation
Provide an array of subnets where the route propagation should be added.
32 33 34 |
# File 'ec2/enable_vpn_gateway_options.rb', line 32 def vpn_route_propagation @vpn_route_propagation end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |