CreateAlias - Amazon GameLift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

CreateAlias

Creates an alias for a fleet. In most situations, you can use an alias ID in place of a fleet ID. An alias provides a level of abstraction for a fleet that is useful when redirecting player traffic from one fleet to another, such as when updating your game build.

Amazon GameLift supports two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias is used to display messaging or link to a URL instead of routing players to an active fleet. For example, you might use a terminal alias when a game version is no longer supported and you want to direct players to an upgrade site.

To create a fleet alias, specify an alias name, routing strategy, and optional description. Each simple alias can point to only one fleet, but a fleet can have multiple aliases. If successful, a new alias record is returned, including an alias ID and an ARN. You can reassign an alias to another fleet by calling UpdateAlias.

Related actions

All APIs by task

Request Syntax

{ "Description": "string", "Name": "string", "RoutingStrategy": { "FleetId": "string", "Message": "string", "Type": "string" }, "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Note

In the following list, the required parameters are described first.

Name

A descriptive label that is associated with an alias. Alias names do not need to be unique.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: .*\S.*

Required: Yes

RoutingStrategy

The routing configuration, including routing type and fleet target, for the alias.

Type: RoutingStrategy object

Required: Yes

Description

A human-readable description of the alias.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

Tags

A list of labels to assign to the new alias resource. Tags are developer-defined key-value pairs. Tagging Amazon resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Resources in the Amazon General Reference.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

Response Syntax

{ "Alias": { "AliasArn": "string", "AliasId": "string", "CreationTime": number, "Description": "string", "LastUpdatedTime": number, "Name": "string", "RoutingStrategy": { "FleetId": "string", "Message": "string", "Type": "string" } } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Alias

The newly created alias resource.

Type: Alias object

Errors

For information about the errors that are common to all actions, see Common Errors.

ConflictException

The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.

HTTP Status Code: 400

InternalServiceException

The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.

HTTP Status Code: 500

InvalidRequestException

One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.

HTTP Status Code: 400

LimitExceededException

The requested operation would cause the resource to exceed the allowed service limit. Resolve the issue before retrying.

HTTP Status Code: 400

TaggingFailedException

The requested tagging operation did not succeed. This may be due to invalid tag format or the maximum tag limit may have been exceeded. Resolve the issue before retrying.

HTTP Status Code: 400

UnauthorizedException

The client failed authentication. Clients should not retry such requests.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: