# RouteProps

Properties to define new Routes.

Extends: [RouteBaseProps](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.RouteBaseProps.html)
Used as props by: [Route](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.Route.html)

- Source: [`aws-appmesh/lib/route.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-appmesh/lib/route.ts#L58)

## Example

TypeScript:

```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';

declare const mesh: appmesh.Mesh;
declare const routeSpec: appmesh.RouteSpec;
declare const virtualRouter: appmesh.VirtualRouter;
const routeProps: appmesh.RouteProps = {
  mesh: mesh,
  routeSpec: routeSpec,
  virtualRouter: virtualRouter,

  // the properties below are optional
  routeName: 'routeName',
};
```

Python:

```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

# mesh: appmesh.Mesh
# route_spec: appmesh.RouteSpec
# virtual_router: appmesh.VirtualRouter

route_props = appmesh.RouteProps(
    mesh=mesh,
    route_spec=route_spec,
    virtual_router=virtual_router,

    # the properties below are optional
    route_name="routeName"
)
```

Java:

```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.*;

Mesh mesh;
RouteSpec routeSpec;
VirtualRouter virtualRouter;

RouteProps routeProps = RouteProps.builder()
        .mesh(mesh)
        .routeSpec(routeSpec)
        .virtualRouter(virtualRouter)

        // the properties below are optional
        .routeName("routeName")
        .build();
```

C# / .NET:

```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;

Mesh mesh;
RouteSpec routeSpec;
VirtualRouter virtualRouter;

var routeProps = new RouteProps {
    Mesh = mesh,
    RouteSpec = routeSpec,
    VirtualRouter = virtualRouter,

    // the properties below are optional
    RouteName = "routeName"
};
```

Golang:

```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"

var mesh Mesh
var routeSpec RouteSpec
var virtualRouter VirtualRouter

routeProps := &RouteProps{
	Mesh: mesh,
	RouteSpec: routeSpec,
	VirtualRouter: virtualRouter,

	// the properties below are optional
	RouteName: jsii.String("routeName"),
}
```

## Properties

- `mesh`: [IMesh](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.IMesh.html) (required) — The service mesh to define the route in.

- `routeName`: string — The name of the route.

  **Default:** An automatically generated name

- `routeSpec`: [RouteSpec](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.RouteSpec.html) (required) — Protocol specific spec.

- `virtualRouter`: [IVirtualRouter](/cdk/api/v2/docs/aws-cdk-lib.aws_appmesh.IVirtualRouter.html) (required) — The VirtualRouter the Route belongs to.
