Skip to content

get_game_session_log_url async

get_game_session_log_url(
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    game_session_id: Optional[ArnStringModel] = None,
) -> GetGameSessionLogUrlOutput

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.

See the Amazon Web Services Service Limits page for maximum log file sizes. Log files that exceed this limit are not saved.

All APIs by task

Parameters:

  • game_session_id (Optional[ArnStringModel], default: None ) –

    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: For Home Region game session - arn:aws:gamelift:::gamesession//. For Remote Location game session - arn:aws:gamelift:::gamesession///.

Raises:

  • 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 resource was not found. The resource was either not created yet or deleted.

  • UnauthorizedException –

    The client failed authentication. Clients should not retry such requests.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_gamelift/_services/async_game_lift.py
async def get_game_session_log_url(
    self,
    *,
    config_overrides: Optional[AsyncGameLiftClientConfig] = None,
    game_session_id: Optional[
        "capo_gamelift.types.arn_string_model.ArnStringModel"
    ] = None,
) -> (
    "capo_gamelift.types.get_game_session_log_url_output.GetGameSessionLogUrlOutput"
):
    """<p> <b>This API works with the following fleet types:</b> EC2</p> <p>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.</p> <note> <p>See the <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_gamelift">Amazon Web Services Service Limits</a> page for maximum log file sizes. Log files that exceed this limit are not saved.</p> </note> <p> <a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a> </p>

    Args:
        game_session_id: <p>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: For Home Region game session - <code>arn:aws:gamelift:<home_region>::gamesession/<fleet ID>/<ID string></code>. For Remote Location game session - <code>arn:aws:gamelift:<home_region>::gamesession/<fleet ID>/<location>/<ID string></code>.</p>

    Raises:
        capo_gamelift.errors.internal_service_exception.InternalServiceException: <p>The service encountered an unrecoverable internal failure while processing the request. Clients can retry such requests immediately or after a waiting period.</p>
        capo_gamelift.errors.invalid_request_exception.InvalidRequestException: <p>One or more parameter values in the request are invalid. Correct the invalid parameter values before retrying.</p>
        capo_gamelift.errors.not_found_exception.NotFoundException: <p>The requested resource was not found. The resource was either not created yet or deleted.</p>
        capo_gamelift.errors.unauthorized_exception.UnauthorizedException: <p>The client failed authentication. Clients should not retry such requests.</p>
        capo_gamelift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_gamelift.types.get_game_session_log_url_input.GetGameSessionLogUrlInput]",
    ) -> AsyncOperationResponse[
        "capo_gamelift.types.get_game_session_log_url_output.GetGameSessionLogUrlOutput"
    ]:
        import capo_gamelift._operations.game_lift.get_game_session_log_url

        (
            output,
            http_response,
        ) = await capo_gamelift._operations.game_lift.get_game_session_log_url.async_get_game_session_log_url(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetGameSessionLogUrl")
    )
    input_: capo_gamelift.types.get_game_session_log_url_input.GetGameSessionLogUrlInput = {}
    if game_session_id is not None:
        input_["game_session_id"] = game_session_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output