interface VpnConnectionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.VpnConnectionProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#VpnConnectionProps |
Java | software.amazon.awscdk.services.ec2.VpnConnectionProps |
Python | aws_cdk.aws_ec2.VpnConnectionProps |
TypeScript (source) | aws-cdk-lib » aws_ec2 » VpnConnectionProps |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
declare const secretValue: cdk.SecretValue;
declare const vpc: ec2.Vpc;
const vpnConnectionProps: ec2.VpnConnectionProps = {
ip: 'ip',
vpc: vpc,
// the properties below are optional
asn: 123,
staticRoutes: ['staticRoutes'],
tunnelOptions: [{
preSharedKey: 'preSharedKey',
preSharedKeySecret: secretValue,
tunnelInsideCidr: 'tunnelInsideCidr',
}],
};
Properties
Name | Type | Description |
---|---|---|
ip | string | The ip address of the customer gateway. |
vpc | IVpc | The VPC to connect to. |
asn? | number | The ASN of the customer gateway. |
static | string[] | The static routes to be routed from the VPN gateway to the customer gateway. |
tunnel | Vpn [] | The tunnel options for the VPN connection. |
ip
Type:
string
The ip address of the customer gateway.
vpc
Type:
IVpc
The VPC to connect to.
asn?
Type:
number
(optional, default: 65000)
The ASN of the customer gateway.
staticRoutes?
Type:
string[]
(optional, default: Dynamic routing (BGP))
The static routes to be routed from the VPN gateway to the customer gateway.
tunnelOptions?
Type:
Vpn
[]
(optional, default: Amazon generated tunnel options)
The tunnel options for the VPN connection.
At most two elements (one per tunnel). Duplicates not allowed.