Class: AWSCDK::EC2::VpnConnectionProps
- Inherits:
-
VpnConnectionOptions
- Object
- VpnConnectionOptions
- AWSCDK::EC2::VpnConnectionProps
- Defined in:
- ec2/vpn_connection_props.rb
Instance Attribute Summary collapse
-
#asn ⇒ Numeric?
readonly
The ASN of the customer gateway.
-
#ip ⇒ String
readonly
The ip address of the customer gateway.
-
#static_routes ⇒ Array<String>?
readonly
The static routes to be routed from the VPN gateway to the customer gateway.
-
#tunnel_options ⇒ Array<AWSCDK::EC2::VpnTunnelOption>?
readonly
The tunnel options for the VPN connection.
-
#vpc ⇒ AWSCDK::EC2::IVPC
readonly
The VPC to connect to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil, vpc:) ⇒ VpnConnectionProps
constructor
A new instance of VpnConnectionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil, vpc:) ⇒ VpnConnectionProps
Returns a new instance of VpnConnectionProps.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'ec2/vpn_connection_props.rb', line 11 def initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil, vpc:) @ip = ip Jsii::Type.check_type(@ip, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ip") @asn = asn Jsii::Type.check_type(@asn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "asn") unless @asn.nil? @static_routes = static_routes Jsii::Type.check_type(@static_routes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "staticRoutes") unless @static_routes.nil? @tunnel_options = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::EC2::VpnTunnelOption.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tunnel_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuVnBuVHVubmVsT3B0aW9uIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "tunnelOptions") unless @tunnel_options.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") end |
Instance Attribute Details
#asn ⇒ Numeric? (readonly)
Note:
Default: 65000
The ASN of the customer gateway.
32 33 34 |
# File 'ec2/vpn_connection_props.rb', line 32 def asn @asn end |
#ip ⇒ String (readonly)
The ip address of the customer gateway.
27 28 29 |
# File 'ec2/vpn_connection_props.rb', line 27 def ip @ip end |
#static_routes ⇒ Array<String>? (readonly)
Note:
Default: Dynamic routing (BGP)
The static routes to be routed from the VPN gateway to the customer gateway.
37 38 39 |
# File 'ec2/vpn_connection_props.rb', line 37 def static_routes @static_routes end |
#tunnel_options ⇒ Array<AWSCDK::EC2::VpnTunnelOption>? (readonly)
Note:
Default: Amazon generated tunnel options
The tunnel options for the VPN connection.
At most two elements (one per tunnel). Duplicates not allowed.
45 46 47 |
# File 'ec2/vpn_connection_props.rb', line 45 def @tunnel_options end |
#vpc ⇒ AWSCDK::EC2::IVPC (readonly)
The VPC to connect to.
49 50 51 |
# File 'ec2/vpn_connection_props.rb', line 49 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'ec2/vpn_connection_props.rb', line 51 def self.jsii_properties { :ip => "ip", :asn => "asn", :static_routes => "staticRoutes", :tunnel_options => "tunnelOptions", :vpc => "vpc", } end |
Instance Method Details
#to_jsii ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'ec2/vpn_connection_props.rb', line 61 def to_jsii result = {} result.merge!(super) result.merge!({ "ip" => @ip, "asn" => @asn, "staticRoutes" => @static_routes, "tunnelOptions" => @tunnel_options, "vpc" => @vpc, }) result.compact end |