Module Smaws_Client_GameLift.TerminateGameSession

This API works with the following fleet types: EC2, Anywhere, Container

Ends a game session that's currently in progress. Use this action to terminate any game session that isn't in ERROR status. Terminating a game session is the most efficient way to free up a server process when it's hosting a game session that's in a bad state or not ending properly. You can use this action to terminate a game session that's being hosted on any type of Amazon GameLift Servers fleet compute, including computes for managed EC2, managed container, and Anywhere fleets. The game server must be integrated with Amazon GameLift Servers server SDK 5.x or greater.

Request options

Request termination for a single game session. Provide the game session ID and the termination mode. There are two potential methods for terminating a game session:

Results

If successful, game session termination is initiated. During this activity, the game session status is changed to TERMINATING. When completed, the server process that was hosting the game session has been stopped and replaced with a new server process that's ready to host a new game session. The old game session's status is changed to TERMINATED with a status reason that indicates the termination method used.

Learn more

Add Amazon GameLift Servers to your game server

Amazon GameLift Servers server SDK 5 reference guide for OnProcessTerminate() (C++) (C#) (Unreal) (Go)

val error_to_string : [ Smaws_Lib.Protocols.AwsJson.error | `InternalServiceException of Types.internal_service_exception | `InvalidGameSessionStatusException of Types.invalid_game_session_status_exception | `InvalidRequestException of Types.invalid_request_exception | `NotFoundException of Types.not_found_exception | `NotReadyException of Types.not_ready_exception | `UnauthorizedException of Types.unauthorized_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.terminate_game_session_input -> (Types.terminate_game_session_output, [> Smaws_Lib.Protocols.AwsJson.error | `InternalServiceException of Types.internal_service_exception | `InvalidGameSessionStatusException of Types.invalid_game_session_status_exception | `InvalidRequestException of Types.invalid_request_exception | `NotFoundException of Types.not_found_exception | `NotReadyException of Types.not_ready_exception | `UnauthorizedException of Types.unauthorized_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.terminate_game_session_input -> (Types.terminate_game_session_output Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsJson.error | `InternalServiceException of Types.internal_service_exception | `InvalidGameSessionStatusException of Types.invalid_game_session_status_exception | `InvalidRequestException of Types.invalid_request_exception | `NotFoundException of Types.not_found_exception | `NotReadyException of Types.not_ready_exception | `UnauthorizedException of Types.unauthorized_exception ] * Smaws_Lib.Response.metadata) Stdlib.result