Class: AWSCDK::EC2::ClientVpnRouteProps

Inherits:
ClientVpnRouteOptions
  • Object
show all
Defined in:
ec2/client_vpn_route_props.rb

Overview

Properties for a ClientVpnRoute.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cidr:, target:, description: nil, client_vpn_endpoint: nil) ⇒ ClientVpnRouteProps

Returns a new instance of ClientVpnRouteProps.

Parameters:

  • cidr (String)

    The IPv4 address range, in CIDR notation, of the route destination.

  • target (AWSCDK::EC2::ClientVpnRouteTarget)

    The target for the route.

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

    A brief description of the authorization rule.

  • client_vpn_endpoint (AWSCDK::EC2::IClientVpnEndpoint, nil) (defaults to: nil)

    The client VPN endpoint to which to add the route.



11
12
13
14
15
16
17
18
19
20
# File 'ec2/client_vpn_route_props.rb', line 11

def initialize(cidr:, target:, description: nil, client_vpn_endpoint: nil)
  @cidr = cidr
  Jsii::Type.check_type(@cidr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cidr")
  @target = target
  Jsii::Type.check_type(@target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNsaWVudFZwblJvdXRlVGFyZ2V0In0=")), "target")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @client_vpn_endpoint = client_vpn_endpoint
  Jsii::Type.check_type(@client_vpn_endpoint, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklDbGllbnRWcG5FbmRwb2ludCJ9")), "clientVpnEndpoint") unless @client_vpn_endpoint.nil?
end

Instance Attribute Details

#cidrString (readonly)

The IPv4 address range, in CIDR notation, of the route destination.

For example:

  • To add a route for Internet access, enter 0.0.0.0/0
  • To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range
  • To add a route for an on-premises network, enter the AWS Site-to-Site VPN connection's IPv4 CIDR range
  • To add a route for the local network, enter the client CIDR range

Returns:

  • (String)


33
34
35
# File 'ec2/client_vpn_route_props.rb', line 33

def cidr
  @cidr
end

#client_vpn_endpointAWSCDK::EC2::IClientVpnEndpoint? (readonly)

Note:

Default: clientVpnEndpoint is required

The client VPN endpoint to which to add the route.



47
48
49
# File 'ec2/client_vpn_route_props.rb', line 47

def client_vpn_endpoint
  @client_vpn_endpoint
end

#descriptionString? (readonly)

Note:

Default: - no description

A brief description of the authorization rule.

Returns:

  • (String, nil)


42
43
44
# File 'ec2/client_vpn_route_props.rb', line 42

def description
  @description
end

#targetAWSCDK::EC2::ClientVpnRouteTarget (readonly)

The target for the route.



37
38
39
# File 'ec2/client_vpn_route_props.rb', line 37

def target
  @target
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
56
# File 'ec2/client_vpn_route_props.rb', line 49

def self.jsii_properties
  {
    :cidr => "cidr",
    :target => "target",
    :description => "description",
    :client_vpn_endpoint => "clientVpnEndpoint",
  }
end

Instance Method Details

#to_jsiiObject



58
59
60
61
62
63
64
65
66
67
68
# File 'ec2/client_vpn_route_props.rb', line 58

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "cidr" => @cidr,
    "target" => @target,
    "description" => @description,
    "clientVpnEndpoint" => @client_vpn_endpoint,
  })
  result.compact
end