Class: AWSCDK::EC2::VpnConnectionOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::VpnConnectionOptions
- Defined in:
- ec2/vpn_connection_options.rb
Direct Known Subclasses
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil) ⇒ VpnConnectionOptions
constructor
A new instance of VpnConnectionOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil) ⇒ VpnConnectionOptions
Returns a new instance of VpnConnectionOptions.
10 11 12 13 14 15 16 17 18 19 |
# File 'ec2/vpn_connection_options.rb', line 10 def initialize(ip:, asn: nil, static_routes: nil, tunnel_options: nil) @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? end |
Instance Attribute Details
#asn ⇒ Numeric? (readonly)
Note:
Default: 65000
The ASN of the customer gateway.
29 30 31 |
# File 'ec2/vpn_connection_options.rb', line 29 def asn @asn end |
#ip ⇒ String (readonly)
The ip address of the customer gateway.
24 25 26 |
# File 'ec2/vpn_connection_options.rb', line 24 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.
34 35 36 |
# File 'ec2/vpn_connection_options.rb', line 34 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.
42 43 44 |
# File 'ec2/vpn_connection_options.rb', line 42 def @tunnel_options end |
Class Method Details
.jsii_properties ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'ec2/vpn_connection_options.rb', line 44 def self.jsii_properties { :ip => "ip", :asn => "asn", :static_routes => "staticRoutes", :tunnel_options => "tunnelOptions", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'ec2/vpn_connection_options.rb', line 53 def to_jsii result = {} result.merge!({ "ip" => @ip, "asn" => @asn, "staticRoutes" => @static_routes, "tunnelOptions" => @tunnel_options, }) result.compact end |