Class: AWSCDK::EC2::VpnTunnelOption

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/vpn_tunnel_option.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pre_shared_key: nil, pre_shared_key_secret: nil, tunnel_inside_cidr: nil) ⇒ VpnTunnelOption

Returns a new instance of VpnTunnelOption.

Parameters:

  • pre_shared_key (String, nil) (defaults to: nil)

    The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

  • pre_shared_key_secret (AWSCDK::SecretValue, nil) (defaults to: nil)

    The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

  • tunnel_inside_cidr (String, nil) (defaults to: nil)

    The range of inside IP addresses for the tunnel.



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

def initialize(pre_shared_key: nil, pre_shared_key_secret: nil, tunnel_inside_cidr: nil)
  @pre_shared_key = pre_shared_key
  Jsii::Type.check_type(@pre_shared_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "preSharedKey") unless @pre_shared_key.nil?
  @pre_shared_key_secret = pre_shared_key_secret
  Jsii::Type.check_type(@pre_shared_key_secret, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TZWNyZXRWYWx1ZSJ9")), "preSharedKeySecret") unless @pre_shared_key_secret.nil?
  @tunnel_inside_cidr = tunnel_inside_cidr
  Jsii::Type.check_type(@tunnel_inside_cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tunnelInsideCidr") unless @tunnel_inside_cidr.nil?
end

Instance Attribute Details

#pre_shared_keyString? (readonly)

Deprecated.

Use preSharedKeySecret instead

Note:

Default: an Amazon generated pre-shared key

The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

Allowed characters are alphanumeric characters period . and underscores _. Must be between 8 and 64 characters in length and cannot start with zero (0).

Returns:

  • (String, nil)


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

def pre_shared_key
  @pre_shared_key
end

#pre_shared_key_secretAWSCDK::SecretValue? (readonly)

Note:

Default: an Amazon generated pre-shared key

The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

Allowed characters are alphanumeric characters period . and underscores _. Must be between 8 and 64 characters in length and cannot start with zero (0).

Returns:



36
37
38
# File 'ec2/vpn_tunnel_option.rb', line 36

def pre_shared_key_secret
  @pre_shared_key_secret
end

#tunnel_inside_cidrString? (readonly)

Note:

Default: an Amazon generated inside IP CIDR

The range of inside IP addresses for the tunnel.

Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway. A size /30 CIDR block from the 169.254.0.0/16 range.

Returns:

  • (String, nil)


45
46
47
# File 'ec2/vpn_tunnel_option.rb', line 45

def tunnel_inside_cidr
  @tunnel_inside_cidr
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
# File 'ec2/vpn_tunnel_option.rb', line 47

def self.jsii_properties
  {
    :pre_shared_key => "preSharedKey",
    :pre_shared_key_secret => "preSharedKeySecret",
    :tunnel_inside_cidr => "tunnelInsideCidr",
  }
end

Instance Method Details

#to_jsiiObject



55
56
57
58
59
60
61
62
63
# File 'ec2/vpn_tunnel_option.rb', line 55

def to_jsii
  result = {}
  result.merge!({
    "preSharedKey" => @pre_shared_key,
    "preSharedKeySecret" => @pre_shared_key_secret,
    "tunnelInsideCidr" => @tunnel_inside_cidr,
  })
  result.compact
end