VpnConnectionProps

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

Bases: VpnConnectionOptions

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

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

  • 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[Union[VpnTunnelOption, Dict[str, Any]]]]) – 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.

ExampleMetadata:

fixture=_generated

Example:

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

# secret_value: cdk.SecretValue
# vpc: ec2.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",
        pre_shared_key_secret=secret_value,
        tunnel_inside_cidr="tunnelInsideCidr"
    )]
)

Attributes

asn

The ASN of the customer gateway.

Default:

65000

ip

The ip address of the customer gateway.

static_routes

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

Default:

Dynamic routing (BGP)

tunnel_options

The tunnel options for the VPN connection.

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

Default:

Amazon generated tunnel options

vpc

The VPC to connect to.