VpnConnectionProps

class aws_cdk.aws_ec2.VpnConnectionProps(*, asn=None, ip, static_routes=None, tunnel_options=None, vpc)

Bases: aws_cdk.aws_ec2.VpnConnectionOptions

Parameters
  • asn (Union[int, float, None]) – The ASN of the customer gateway. Default: 65000

  • ip (str) – The ip address of the customer gateway.

  • static_routes (Optional[Sequence[str]]) – The static routes to be routed from the VPN gateway to the customer gateway. Default: Dynamic routing (BGP)

  • tunnel_options (Optional[Sequence[VpnTunnelOption]]) – The tunnel options for the VPN connection. At most two elements (one per tunnel). Duplicates not allowed. Default: Amazon generated tunnel options

  • vpc (IVpc) – The VPC to connect to.

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2

# vpc is of type Vpc

vpn_connection_props = ec2.VpnConnectionProps(
    ip="ip",
    vpc=vpc,

    # the properties below are optional
    asn=123,
    static_routes=["staticRoutes"],
    tunnel_options=[ec2.VpnTunnelOption(
        pre_shared_key="preSharedKey",
        tunnel_inside_cidr="tunnelInsideCidr"
    )]
)

Attributes

asn

The ASN of the customer gateway.

Default

65000

Return type

Union[int, float, None]

ip

The ip address of the customer gateway.

Return type

str

static_routes

The static routes to be routed from the VPN gateway to the customer gateway.

Default

Dynamic routing (BGP)

Return type

Optional[List[str]]

tunnel_options

The tunnel options for the VPN connection.

At most two elements (one per tunnel). Duplicates not allowed.

Default

Amazon generated tunnel options

Return type

Optional[List[VpnTunnelOption]]

vpc

The VPC to connect to.

Return type

IVpc