getGameSessionLogUrl method

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

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

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

Parameter gameSessionId : A unique identifier for the game session to get logs for.

Implementation

Future<GetGameSessionLogUrlOutput> getGameSessionLogUrl({
  required String gameSessionId,
}) async {
  ArgumentError.checkNotNull(gameSessionId, 'gameSessionId');
  _s.validateStringLength(
    'gameSessionId',
    gameSessionId,
    1,
    256,
    isRequired: true,
  );
  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);
}