AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Requests an authentication token from Amazon GameLift for a compute resource in an
Amazon GameLift Anywhere fleet or container fleet. Game servers that are running on
the compute use this token to communicate with the Amazon GameLift service, such as
when calling the Amazon GameLift 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.
Use this operation based on the fleet compute type:
For EC2
fleets, 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
and CONTAINER
fleets, if you're using the Amazon GameLift
Agent, auth token retrieval and refresh is handled automatically for any container
or Anywhere 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
Server SDK reference guides (for version 5.x)
For .NET Core this operation is only available in asynchronous form. Please refer to GetComputeAuthTokenAsync.
Namespace: Amazon.GameLift
Assembly: AWSSDK.GameLift.dll
Version: 3.x.y.z
public abstract GetComputeAuthTokenResponse GetComputeAuthToken( GetComputeAuthTokenRequest request )
Container for the necessary parameters to execute the GetComputeAuthToken service method.
Exception | Condition |
---|---|
InternalServiceException | The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period. |
InvalidRequestException | One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying. |
NotFoundException | The requested resources was not found. The resource was either not created yet or deleted. |
UnauthorizedException | The client failed authentication. Clients should not retry such requests. |
.NET Framework:
Supported in: 4.5 and newer, 3.5