TcpRouteSpecOptions Struct
Properties specific for a TCP Based Routes.
| Source | aws-appmesh/lib/route-spec.ts |
|---|
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';
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
declare const virtualNode: appmesh.VirtualNode;
const tcpRouteSpecOptions: appmesh.TcpRouteSpecOptions = {
weightedTargets: [{
virtualNode: virtualNode,
// the properties below are optional
port: 123,
weight: 123,
}],
// the properties below are optional
priority: 123,
timeout: {
idle: cdk.Duration.minutes(30),
},
};
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
from aws_cdk import aws_appmesh as appmesh
# virtual_node: appmesh.VirtualNode
tcp_route_spec_options = appmesh.TcpRouteSpecOptions(
weighted_targets=[appmesh.WeightedTarget(
virtual_node=virtual_node,
# the properties below are optional
port=123,
weight=123
)],
# the properties below are optional
priority=123,
timeout=appmesh.TcpTimeout(
idle=cdk.Duration.minutes(30)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.appmesh.*;
VirtualNode virtualNode;
TcpRouteSpecOptions tcpRouteSpecOptions = TcpRouteSpecOptions.builder()
.weightedTargets(List.of(WeightedTarget.builder()
.virtualNode(virtualNode)
// the properties below are optional
.port(123)
.weight(123)
.build()))
// the properties below are optional
.priority(123)
.timeout(TcpTimeout.builder()
.idle(Duration.minutes(30))
.build())
.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;
using Amazon.CDK.AWS.AppMesh;
VirtualNode virtualNode;
var tcpRouteSpecOptions = new TcpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget {
VirtualNode = virtualNode,
// the properties below are optional
Port = 123,
Weight = 123
} },
// the properties below are optional
Priority = 123,
Timeout = new TcpTimeout {
Idle = Duration.Minutes(30)
}
};
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"
import "github.com/aws/aws-cdk-go/awscdk"
var virtualNode VirtualNode
tcpRouteSpecOptions := &TcpRouteSpecOptions{
WeightedTargets: []WeightedTarget{
&WeightedTarget{
VirtualNode: virtualNode,
// the properties below are optional
Port: jsii.Number(123),
Weight: jsii.Number(123),
},
},
// the properties below are optional
Priority: jsii.Number(123),
Timeout: &TcpTimeout{
Idle: cdk.Duration_Minutes(jsii.Number(30)),
},
}
Properties
priorityoptionalnumberpriorityoptionalint | floatpriorityoptionalNumberPriorityoptionaldoublePriorityoptional*float64 #The priority for the route.
Default: no particular priority
When a Virtual Router has multiple routes, route match is performed in the order of specified value, where 0 is the highest priority, and first matched route is selected.
timeoutoptionalTcpTimeouttimeoutoptionalTcpTimeouttimeoutoptionalTcpTimeoutTimeoutoptionalTcpTimeoutTimeoutoptionalTcpTimeout = None #An object that represents a tcp timeout.
weightedTargetsWeightedTarget[]weighted_targetstyping.List[WeightedTarget]weightedTargetsList<WeightedTarget>WeightedTargetsWeightedTarget[]WeightedTargets*[]WeightedTarget required #List of targets that traffic is routed to when a request matches the route.