VpnConnectionOptions

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

Bases: object

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

ExampleMetadata:

fixture=with-vpc infused

Example:

# Across all tunnels in the account/region
all_data_out = ec2.VpnConnection.metric_all_tunnel_data_out()

# For a specific vpn connection
vpn_connection = vpc.add_vpn_connection("Dynamic",
    ip="1.2.3.4"
)
state = vpn_connection.metric_tunnel_state()

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