compute_auth_tokens
Creates, updates, deletes, gets or lists a compute_auth_tokens resource.
Overview
| Name | compute_auth_tokens |
| Type | Resource |
| Id | aws.gamelift.compute_auth_tokens |
Fields
The following fields are returned by SELECT queries:
- get_compute_auth_token
| Name | Datatype | Description |
|---|---|---|
auth_token | string | A valid temporary authentication token. (pattern: <code>^[a-zA-Z0-9-]+$</code>) |
compute_arn | string | The Amazon Resource Name (ARN) that is assigned to an Amazon GameLift Servers compute resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::compute/compute-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. (pattern: <code>^arn:.*:compute/[a-zA-Z0-9-]+(/[a-zA-Z0-9-]+)?$</code>) |
compute_name | string | The name of the compute resource that the authentication token is issued to. (pattern: <code>^([a-zA-Z0-9-]+(/[a-zA-Z0-9-]+)?|arn:.*:compute/[a-zA-Z0-9-]+(/[a-zA-Z0-9-]+)?)$</code>) |
expiration_timestamp | string (date-time) | The amount of time until the authentication token is no longer valid. |
fleet_arn | string | The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift Servers fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912. (pattern: <code>^arn:.*:[a-z]*fleet/[a-z]*fleet-[a-zA-Z0-9-]+$</code>) |
fleet_id | string | A unique identifier for the fleet that the compute is registered to. (pattern: <code>^[a-z]fleet-[a-zA-Z0-9-]+$|^arn:.:[a-z]*fleet/[a-z]*fleet-[a-zA-Z0-9-]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_compute_auth_token | select | region | This API works with the following fleet types: EC2, Anywhere, Container Requests an authentication token from Amazon GameLift Servers for a compute resource in an Amazon GameLift Servers fleet. Game servers that are running on the compute use this token to communicate with the Amazon GameLift Servers service, such as when calling the Amazon GameLift Servers server SDK action InitSDK(). Authentication tokens are valid for a limited time span, so you need to request a fresh token before the current token expires. Request options For managed EC2 fleets (compute type EC2), auth token retrieval and refresh is handled automatically. All game servers that are running on all fleet instances have access to a valid auth token. For Anywhere fleets (compute type ANYWHERE), if you're using the Amazon GameLift Servers Agent, auth token retrieval and refresh is handled automatically for any compute where the Agent is running. If you're not using the Agent, create a mechanism to retrieve and refresh auth tokens for computes that are running game server processes. Learn more Create an Anywhere fleet Test your integration Server SDK reference guides (for version 5.x) |
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
- get_compute_auth_token
This API works with the following fleet types: EC2, Anywhere, Container Requests an authentication token from Amazon GameLift Servers for a compute resource in an Amazon GameLift Servers fleet. Game servers that are running on the compute use this token to communicate with the Amazon GameLift Servers service, such as when calling the Amazon GameLift Servers server SDK action InitSDK(). Authentication tokens are valid for a limited time span, so you need to request a fresh token before the current token expires. Request options For managed EC2 fleets (compute type EC2), auth token retrieval and refresh is handled automatically. All game servers that are running on all fleet instances have access to a valid auth token. For Anywhere fleets (compute type ANYWHERE), if you're using the Amazon GameLift Servers Agent, auth token retrieval and refresh is handled automatically for any compute where the Agent is running. If you're not using the Agent, create a mechanism to retrieve and refresh auth tokens for computes that are running game server processes. Learn more Create an Anywhere fleet Test your integration Server SDK reference guides (for version 5.x)
SELECT
auth_token,
compute_arn,
compute_name,
expiration_timestamp,
fleet_arn,
fleet_id
FROM aws.gamelift.compute_auth_tokens
WHERE region = '{{ region }}' -- required
;