Route

class aws_cdk.aws_appmesh.Route(scope, id, *, mesh, virtual_router, route_targets, prefix=None, route_name=None, route_type=None)

Bases: aws_cdk.core.Resource

Route represents a new or existing route attached to a VirtualRouter and Mesh.

see :see: https://docs.aws.amazon.com/app-mesh/latest/userguide/routes.html stability :stability: experimental

__init__(scope, id, *, mesh, virtual_router, route_targets, prefix=None, route_name=None, route_type=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • mesh (IMesh) – The service mesh to define the route in.

  • virtual_router (IVirtualRouter) – The virtual router in which to define the route.

  • route_targets (List[WeightedTargetProps]) – Array of weighted route targets.

  • prefix (Optional[str]) – The path prefix to match for the route. Default: “/” if http otherwise none

  • route_name (Optional[str]) – The name of the route. Default: - An automatically generated name

  • route_type (Optional[RouteType]) – Weather the route is HTTP based. Default: - HTTP if prefix is given, TCP otherwise

stability :stability: experimental

Return type

None

Methods

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

node

Construct tree node which offers APIs for interacting with the construct tree.

Return type

ConstructNode

route_arn

The Amazon Resource Name (ARN) for the route.

stability :stability: experimental

Return type

str

route_name

The name of the route.

stability :stability: experimental

Return type

str

stack

The stack in which this resource is defined.

Return type

Stack

virtual_router

The virtual router this route is a part of.

stability :stability: experimental

Return type

IVirtualRouter

Static Methods

classmethod from_route_arn(scope, id, route_arn)

Import an existing route given an ARN.

Parameters
  • scope (Construct) –

  • id (str) –

  • route_arn (str) –

stability :stability: experimental

Return type

IRoute

classmethod from_route_name(scope, id, mesh_name, virtual_router_name, route_name)

Import an existing route given its name.

Parameters
  • scope (Construct) –

  • id (str) –

  • mesh_name (str) –

  • virtual_router_name (str) –

  • route_name (str) –

stability :stability: experimental

Return type

IRoute

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool