Skip to content
v2.278.0

CfnTrafficRoute Struct ​

A traffic route, representing where the traffic is being directed to.

Example ​

ts
// 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';
const cfnTrafficRoute: cdk.CfnTrafficRoute = {
  logicalId: 'logicalId',
  type: 'type',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

cfn_traffic_route = cdk.CfnTrafficRoute(
    logical_id="logicalId",
    type="type"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;

CfnTrafficRoute cfnTrafficRoute = CfnTrafficRoute.builder()
        .logicalId("logicalId")
        .type("type")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;

var cfnTrafficRoute = new CfnTrafficRoute {
    LogicalId = "logicalId",
    Type = "type"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"

cfnTrafficRoute := &CfnTrafficRoute{
	LogicalId: jsii.String("logicalId"),
	Type: jsii.String("type"),
}

Properties ​

logicalIdstringlogical_idstrlogicalIdStringLogicalIdstringLogicalId*string required #
The logical id of the target resource.
typestringtypestrtypeStringTypestringType*string required #
The resource type of the route.

Today, the only allowed value is 'AWS::ElasticLoadBalancingV2::Listener'.