class ClientVpnRouteTarget
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.ClientVpnRouteTarget |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#ClientVpnRouteTarget |
Java | software.amazon.awscdk.services.ec2.ClientVpnRouteTarget |
Python | aws_cdk.aws_ec2.ClientVpnRouteTarget |
TypeScript (source) | aws-cdk-lib » aws_ec2 » ClientVpnRouteTarget |
Target for a client VPN route.
Example
const endpoint = vpc.addClientVpnEndpoint('Endpoint', {
cidr: '10.100.0.0/16',
serverCertificateArn: 'arn:aws:acm:us-east-1:123456789012:certificate/server-certificate-id',
userBasedAuthentication: ec2.ClientVpnUserBasedAuthentication.federated(samlProvider),
});
// Client-to-client access
endpoint.addRoute('Route', {
cidr: '10.100.0.0/16',
target: ec2.ClientVpnRouteTarget.local(),
});
Initializer
new ClientVpnRouteTarget()
Properties
Name | Type | Description |
---|---|---|
subnet | string | The subnet ID. |
subnetId
Type:
string
The subnet ID.
Methods
Name | Description |
---|---|
static local() | Local network. |
static subnet(subnet) | Subnet. |
static local()
public static local(): ClientVpnRouteTarget
Returns
Local network.
static subnet(subnet)
public static subnet(subnet: ISubnet): ClientVpnRouteTarget
Parameters
- subnet
ISubnet
Returns
Subnet.
The specified subnet must be an existing target network of the client VPN endpoint.