Skip to main content

alias

Creates, updates, deletes, gets or lists an alias resource.

Overview

Namealias
TypeResource
Idaws.gamelift.alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
alias_arnstringThe Amazon Resource Name (ARN) that is assigned to a Amazon GameLift Servers alias resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. In a GameLift alias ARN, the resource ID matches the alias ID value. (pattern: <code>^arn:.*:alias/alias-\S+$</code>)
alias_idstringA unique identifier for the alias. Alias IDs are unique within a Region. (pattern: <code>^alias-\S+$</code>)
creation_timestring (date-time)A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
descriptionstringA human-readable description of an alias.
last_updated_timestring (date-time)The time that this data object was last modified. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
namestringA descriptive label that is associated with an alias. Alias names do not need to be unique. (pattern: <code>^.\S.$</code>)
routing_strategyobjectThe routing configuration, including routing type and fleet target, for the alias.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_aliasselectregionThis API works with the following fleet types: EC2, Anywhere, Container Retrieves properties for an alias. This operation returns all alias metadata and settings. To get an alias's target fleet ID only, use ResolveAlias. To get alias properties, specify the alias ID. If successful, the requested alias record is returned. Related actions All APIs by task
create_aliasinsertregion, Name, RoutingStrategyThis API works with the following fleet types: EC2, Anywhere, Container 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 Servers 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
update_aliasupdateregion, AliasIdThis API works with the following fleet types: EC2, Anywhere, Container Updates properties for an alias. Specify the unique identifier of the alias to be updated and the new property values. When reassigning an alias to a new fleet, provide an updated routing strategy. If successful, the updated alias record is returned. Related actions All APIs by task
delete_aliasdeleteregionThis API works with the following fleet types: EC2, Anywhere, Container Deletes an alias. This operation removes all record of the alias. Game clients attempting to access a server process using the deleted alias receive an error. To delete an alias, specify the alias ID to be deleted. Related actions All APIs by task
resolve_aliasexecregion, AliasIdThis API works with the following fleet types: EC2, Anywhere, Container Attempts to retrieve a fleet ID that is associated with an alias. Specify a unique alias identifier. If the alias has a SIMPLE routing strategy, Amazon GameLift Servers returns a fleet ID. If the alias has a TERMINAL routing strategy, the result is a TerminalRoutingStrategyException. Related actions All APIs by task

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

This API works with the following fleet types: EC2, Anywhere, Container Retrieves properties for an alias. This operation returns all alias metadata and settings. To get an alias's target fleet ID only, use ResolveAlias. To get alias properties, specify the alias ID. If successful, the requested alias record is returned. Related actions All APIs by task

SELECT
alias_arn,
alias_id,
creation_time,
description,
last_updated_time,
name,
routing_strategy
FROM aws.gamelift.alias
WHERE region = '{{ region }}' -- required
;

INSERT examples

This API works with the following fleet types: EC2, Anywhere, Container 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 Servers 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

INSERT INTO aws.gamelift.alias (
Name,
Description,
RoutingStrategy,
Tags,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Description }}',
'{{ RoutingStrategy }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
alias
;

UPDATE examples

This API works with the following fleet types: EC2, Anywhere, Container Updates properties for an alias. Specify the unique identifier of the alias to be updated and the new property values. When reassigning an alias to a new fleet, provide an updated routing strategy. If successful, the updated alias record is returned. Related actions All APIs by task

UPDATE aws.gamelift.alias
SET
AliasId = '{{ AliasId }}',
Name = '{{ Name }}',
Description = '{{ Description }}',
RoutingStrategy = '{{ RoutingStrategy }}'
WHERE
region = '{{ region }}' --required
AND AliasId = '{{ AliasId }}' --required
RETURNING
alias;

DELETE examples

This API works with the following fleet types: EC2, Anywhere, Container Deletes an alias. This operation removes all record of the alias. Game clients attempting to access a server process using the deleted alias receive an error. To delete an alias, specify the alias ID to be deleted. Related actions All APIs by task

DELETE FROM aws.gamelift.alias
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

This API works with the following fleet types: EC2, Anywhere, Container Attempts to retrieve a fleet ID that is associated with an alias. Specify a unique alias identifier. If the alias has a SIMPLE routing strategy, Amazon GameLift Servers returns a fleet ID. If the alias has a TERMINAL routing strategy, the result is a TerminalRoutingStrategyException. Related actions All APIs by task

EXEC aws.gamelift.alias.resolve_alias
@region='{{ region }}' --required
@@json=
'{
"AliasId": "{{ AliasId }}"
}'
;