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 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
Server SDK reference guides (for version 5.x)
This is an asynchronous operation using the standard naming convention for .NET 4.7.2 or higher.
Namespace: Amazon.GameLift
Assembly: AWSSDK.GameLift.dll
Version: 3.x.y.z
public abstract Task<GetComputeAuthTokenResponse> GetComputeAuthTokenAsync( GetComputeAuthTokenRequest request, CancellationToken cancellationToken )
Container for the necessary parameters to execute the GetComputeAuthToken service method.
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
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. |
UnsupportedRegionException | The requested operation is not supported in the Region specified. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.7.2 and newer