Class VpnConnectionProps
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class VpnConnectionProps : IVpnConnectionProps, IVpnConnectionOptions
Syntax (vb)
Public Class VpnConnectionProps Implements IVpnConnectionProps, IVpnConnectionOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
SecretValue secretValue;
Vpc vpc;
var vpnConnectionProps = new VpnConnectionProps {
Ip = "ip",
Vpc = vpc,
// the properties below are optional
Asn = 123,
StaticRoutes = new [] { "staticRoutes" },
TunnelOptions = new [] { new VpnTunnelOption {
PreSharedKey = "preSharedKey",
PreSharedKeySecret = secretValue,
TunnelInsideCidr = "tunnelInsideCidr"
} }
};
Synopsis
Constructors
| VpnConnectionProps() |
Properties
| Asn | The ASN of the customer gateway. |
| Ip | The ip address of the customer gateway. |
| StaticRoutes | The static routes to be routed from the VPN gateway to the customer gateway. |
| TunnelOptions | The tunnel options for the VPN connection. |
| Vpc | The VPC to connect to. |
Constructors
VpnConnectionProps()
public VpnConnectionProps()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
SecretValue secretValue;
Vpc vpc;
var vpnConnectionProps = new VpnConnectionProps {
Ip = "ip",
Vpc = vpc,
// the properties below are optional
Asn = 123,
StaticRoutes = new [] { "staticRoutes" },
TunnelOptions = new [] { new VpnTunnelOption {
PreSharedKey = "preSharedKey",
PreSharedKeySecret = secretValue,
TunnelInsideCidr = "tunnelInsideCidr"
} }
};
Properties
Asn
The ASN of the customer gateway.
public double? Asn { get; set; }
Property Value
Remarks
Default: 65000
Ip
The ip address of the customer gateway.
public string Ip { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated
StaticRoutes
The static routes to be routed from the VPN gateway to the customer gateway.
public string[]? StaticRoutes { get; set; }
Property Value
string[]
Remarks
Default: Dynamic routing (BGP)
TunnelOptions
The tunnel options for the VPN connection.
public IVpnTunnelOption[]? TunnelOptions { get; set; }
Property Value
Remarks
At most two elements (one per tunnel). Duplicates not allowed.
Default: Amazon generated tunnel options
Vpc
The VPC to connect to.
public IVpc Vpc { get; set; }
Property Value
Remarks
ExampleMetadata: fixture=_generated