Experimental
@aws-cdk/aws-ec2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
RouteTargetProps Struct
The type of endpoint or gateway being targeted by the route.
| Stability | Experimental |
|---|---|
| Source | lib/route.ts |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2_alpha from '@aws-cdk/aws-ec2-alpha';
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
declare const routeTarget: ec2_alpha.IRouteTarget;
declare const vpcEndpoint: ec2.VpcEndpoint;
const routeTargetProps: ec2_alpha.RouteTargetProps = {
endpoint: vpcEndpoint,
gateway: routeTarget,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2_alpha as ec2_alpha
from aws_cdk import aws_ec2 as ec2
# route_target: ec2_alpha.IRouteTarget
# vpc_endpoint: ec2.VpcEndpoint
route_target_props = ec2_alpha.RouteTargetProps(
endpoint=vpc_endpoint,
gateway=route_target
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.alpha.*;
import software.amazon.awscdk.services.ec2.*;
IRouteTarget routeTarget;
VpcEndpoint vpcEndpoint;
RouteTargetProps routeTargetProps = RouteTargetProps.builder()
.endpoint(vpcEndpoint)
.gateway(routeTarget)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.ec2.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ec2.Alpha;
using Amazon.CDK.AWS.EC2;
IRouteTarget routeTarget;
VpcEndpoint vpcEndpoint;
var routeTargetProps = new RouteTargetProps {
Endpoint = vpcEndpoint,
Gateway = routeTarget
};
go
// Install: go get github.com/aws/aws-cdk-go/awsec2alpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import ec2_alpha "github.com/aws/aws-cdk-go/awsec2alpha"
import "github.com/aws/aws-cdk-go/awscdk"
var routeTarget IRouteTarget
var vpcEndpoint VpcEndpoint
routeTargetProps := &RouteTargetProps{
Endpoint: vpcEndpoint,
Gateway: routeTarget,
}
Properties
endpointoptionalIVpcEndpointendpointoptionalIVpcEndpointendpointoptionalIVpcEndpointEndpointoptionalIVpcEndpointEndpointoptionalIVpcEndpoint #The endpoint route target.
Default: target is not set to an endpoint, in this case a gateway is needed.
This is used for targets such as VPC endpoints.
gatewayoptionalIRouteTargetgatewayoptionalIRouteTargetgatewayoptionalIRouteTargetGatewayoptionalIRouteTargetGatewayoptionalIRouteTarget #The gateway route target.
Default: target is not set to a gateway, in this case an endpoint is needed.
This is used for targets such as egress-only internet gateway or VPC peering connection.