VirtualRouterProps

class aws_cdk.aws_appmesh.VirtualRouterProps(*, listeners=None, virtual_router_name=None, mesh)

Bases: aws_cdk.aws_appmesh.VirtualRouterBaseProps

The properties used when creating a new VirtualRouter.

Parameters
  • listeners (Optional[Sequence[VirtualRouterListener]]) – Listener specification for the VirtualRouter. Default: - A listener on HTTP port 8080

  • virtual_router_name (Optional[str]) – The name of the VirtualRouter. Default: - A name is automatically determined

  • mesh (IMesh) – The Mesh which the VirtualRouter belongs to.

ExampleMetadata

infused

Example:

# infra_stack: cdk.Stack
# app_stack: cdk.Stack


mesh = appmesh.Mesh(infra_stack, "AppMesh",
    mesh_name="myAwsMesh",
    egress_filter=appmesh.MeshFilterType.ALLOW_ALL
)

# the VirtualRouter will belong to 'appStack',
# even though the Mesh belongs to 'infraStack'
router = appmesh.VirtualRouter(app_stack, "router",
    mesh=mesh,  # notice that mesh is a required property when creating a router with the 'new' statement
    listeners=[appmesh.VirtualRouterListener.http(8081)]
)

Attributes

listeners

Listener specification for the VirtualRouter.

Default
  • A listener on HTTP port 8080

Return type

Optional[List[VirtualRouterListener]]

mesh

The Mesh which the VirtualRouter belongs to.

Return type

IMesh

virtual_router_name

The name of the VirtualRouter.

Default
  • A name is automatically determined

Return type

Optional[str]