# CfnAliasProps

Properties for defining a `CfnAlias`.

Used as props by: [CfnAlias](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnAlias.html)

- Source: Generated at build time
- Type last changed: v2.189.0 · 9 Apr 2025

## 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 cfnAliasProps: gamelift.CfnAliasProps = {
  name: 'name',
  routingStrategy: {
    type: 'type',

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

  // the properties below are optional
  description: 'description',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# 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

cfn_alias_props = gamelift.CfnAliasProps(
    name="name",
    routing_strategy=gamelift.CfnAlias.RoutingStrategyProperty(
        type="type",

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

    # the properties below are optional
    description="description",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

CfnAliasProps cfnAliasProps = CfnAliasProps.builder()
        .name("name")
        .routingStrategy(RoutingStrategyProperty.builder()
                .type("type")

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

        // the properties below are optional
        .description("description")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.GameLift;

var cfnAliasProps = new CfnAliasProps {
    Name = "name",
    RoutingStrategy = new RoutingStrategyProperty {
        Type = "type",

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

    // the properties below are optional
    Description = "description",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

cfnAliasProps := &CfnAliasProps{
	Name: jsii.String("name"),
	RoutingStrategy: &RoutingStrategyProperty{
		Type: jsii.String("type"),

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

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `description`: string — A human-readable description of the alias.

- `name`: string (required) — A descriptive label that is associated with an alias.

  Alias names do not need to be unique.

- `routingStrategy`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlias.RoutingStrategyProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_gamelift.CfnAlias.RoutingStrategyProperty.html) (required) — The routing configuration, including routing type and fleet target, for the alias.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
