# RoutingStrategyProperty

Struct · External

The routing configuration for a fleet alias.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_gamelift as gamelift } from 'aws-cdk-lib';
const routingStrategyProperty: gamelift.CfnAlias.RoutingStrategyProperty = {
  type: 'type',

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

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_gamelift as gamelift

routing_strategy_property = gamelift.CfnAlias.RoutingStrategyProperty(
    type="type",

    # the properties below are optional
    fleet_id="fleetId",
    message="message"
)
```

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

RoutingStrategyProperty routingStrategyProperty = RoutingStrategyProperty.builder()
        .type("type")

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

C#:

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

var routingStrategyProperty = new RoutingStrategyProperty {
    Type = "type",

    // the properties below are optional
    FleetId = "fleetId",
    Message = "message"
};
```

Go:

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

routingStrategyProperty := &RoutingStrategyProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	FleetId: jsii.String("fleetId"),
	Message: jsii.String("message"),
}
```

## Properties

- `fleetId`: string — A unique identifier for a fleet that the alias points to.

  If you specify `SIMPLE` for the `Type` property, you must specify this property.

- `message`: string — The message text to be used with a terminal routing strategy.

  If you specify `TERMINAL` for the `Type` property, you must specify this property.

- `type`: string (required) — A type of routing strategy.

  Possible routing types include the following:

  - *SIMPLE* - The alias resolves to one specific fleet. Use this type when routing to active fleets.
  - *TERMINAL* - The alias does not resolve to a fleet but instead can be used to display a message to the user. A terminal alias throws a `TerminalRoutingStrategyException` with the message that you specified in the `Message` property.
