alias
Creates, updates, deletes, gets or lists an alias resource.
Overview
| Name | alias |
| Type | Resource |
| Id | aws.gamelift.alias |
Fields
The following fields are returned by SELECT queries:
- describe_alias
| Name | Datatype | Description |
|---|---|---|
alias_arn | string | The 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_id | string | A unique identifier for the alias. Alias IDs are unique within a Region. (pattern: <code>^alias-\S+$</code>) |
creation_time | string (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"). |
description | string | A human-readable description of an alias. |
last_updated_time | string (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"). |
name | string | A descriptive label that is associated with an alias. Alias names do not need to be unique. (pattern: <code>^.\S.$</code>) |
routing_strategy | object | The routing configuration, including routing type and fleet target, for the alias. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_alias | select | region | 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 | |
create_alias | insert | region, Name, RoutingStrategy | 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 | |
update_alias | update | region, AliasId | 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 | |
delete_alias | delete | region | 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 | |
resolve_alias | exec | region, AliasId | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_alias
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
- create_alias
- Manifest
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
;
# Description fields are for documentation purposes
- name: alias
props:
- name: region
value: "{{ region }}"
description: Required parameter for the alias resource.
- name: Name
value: "{{ Name }}"
description: |
A descriptive label that is associated with an alias. Alias names do not need to be unique.
- name: Description
value: "{{ Description }}"
description: |
A human-readable description of the alias.
- name: RoutingStrategy
description: |
The routing configuration, including routing type and fleet target, for the alias.
value:
Type: "{{ Type }}"
FleetId: "{{ FleetId }}"
Message: "{{ Message }}"
- name: Tags
description: |
A list of labels to assign to the new alias resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management and cost allocation. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_alias
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
- delete_alias
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
- resolve_alias
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 }}"
}'
;