getGameSessionLogUrl method

Future<GetGameSessionLogUrlOutput> getGameSessionLogUrl({
  1. required String gameSessionId,
})

This API works with the following fleet types: EC2

Retrieves the location of stored game session logs for a specified game session on Amazon GameLift Servers managed fleets. When a game session is terminated, Amazon GameLift Servers automatically stores the logs in Amazon S3 and retains them for 14 days. Use this URL to download the logs. All APIs by task

May throw InternalServiceException. May throw InvalidRequestException. May throw NotFoundException. May throw UnauthorizedException.

Parameter gameSessionId : An identifier for the game session that is unique across all regions to get logs for. The value is always a full ARN in the following format: arn:aws:gamelift:.

Implementation

Future<GetGameSessionLogUrlOutput> getGameSessionLogUrl({
  required String gameSessionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'GameLift.GetGameSessionLogUrl'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'GameSessionId': gameSessionId,
    },
  );

  return GetGameSessionLogUrlOutput.fromJson(jsonResponse.body);
}