Skip to content
v2.278.0

VirtualRouterSpecProperty Struct ​

An object that represents the specification of a virtual router.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appmesh as appmesh } from 'aws-cdk-lib';
const virtualRouterSpecProperty: appmesh.CfnVirtualRouter.VirtualRouterSpecProperty = {
  listeners: [{
    portMapping: {
      port: 123,
      protocol: 'protocol',
    },
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appmesh as appmesh

virtual_router_spec_property = appmesh.CfnVirtualRouter.VirtualRouterSpecProperty(
    listeners=[appmesh.CfnVirtualRouter.VirtualRouterListenerProperty(
        port_mapping=appmesh.CfnVirtualRouter.PortMappingProperty(
            port=123,
            protocol="protocol"
        )
    )]
)
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.appmesh.*;

VirtualRouterSpecProperty virtualRouterSpecProperty = VirtualRouterSpecProperty.builder()
        .listeners(List.of(VirtualRouterListenerProperty.builder()
                .portMapping(PortMappingProperty.builder()
                        .port(123)
                        .protocol("protocol")
                        .build())
                .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.AWS.AppMesh;

var virtualRouterSpecProperty = new VirtualRouterSpecProperty {
    Listeners = new [] { new VirtualRouterListenerProperty {
        PortMapping = new PortMappingProperty {
            Port = 123,
            Protocol = "protocol"
        }
    } }
};
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 "github.com/aws/aws-cdk-go/awscdk"

virtualRouterSpecProperty := &VirtualRouterSpecProperty{
	Listeners: []interface{}{
		&VirtualRouterListenerProperty{
			PortMapping: &PortMappingProperty{
				Port: jsii.Number(123),
				Protocol: jsii.String("protocol"),
			},
		},
	},
}

Properties ​

listenersIResolvable | IResolvable | CfnVirtualRouter.VirtualRouterListenerProperty[]listenerstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, VirtualRouterListenerProperty]]]listenersIResolvableListenersIResolvableListenersinterface{} required #
The listeners that the virtual router is expected to receive inbound traffic from.