// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`TerminateGameSession`](crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`game_session_id(impl Into<String>)`](crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder::game_session_id) / [`set_game_session_id(Option<String>)`](crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder::set_game_session_id):<br>required: **true**<br><p>An identifier for the game session that is unique across all regions to be terminated. 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></id> </fleet> </home_region></code>. For Remote Location game session - <code>arn:aws:gamelift:<home_region> ::gamesession/ <fleet id> / <location> / <id string></id> </location> </fleet> </home_region></code>.</p><br>
/// - [`termination_mode(TerminationMode)`](crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder::termination_mode) / [`set_termination_mode(Option<TerminationMode>)`](crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder::set_termination_mode):<br>required: **true**<br><p>The method to use to terminate the game session. Available methods include:</p> <ul> <li> <p><code>TRIGGER_ON_PROCESS_TERMINATE</code> – Prompts the Amazon GameLift Servers service to send an <code>OnProcessTerminate()</code> callback to the server process and initiate the normal game session shutdown sequence. The <code>OnProcessTerminate</code> method, which is implemented in the game server code, must include a call to the server SDK action <code>ProcessEnding()</code>, which is how the server process signals to Amazon GameLift Servers that a game session is ending. If the server process doesn't call <code>ProcessEnding()</code>, the game session termination won't conclude successfully.</p></li> <li> <p><code>FORCE_TERMINATE</code> – Prompts the Amazon GameLift Servers service to stop the server process immediately. Amazon GameLift Servers takes action (depending on the type of fleet) to shut down the server process without the normal game session shutdown sequence.</p><note> <p>This method is not available for game sessions that are running on Anywhere fleets unless the fleet is deployed with the Amazon GameLift Servers Agent. In this scenario, a force terminate request results in an invalid or bad request exception.</p> </note></li> </ul><br>
/// - On success, responds with [`TerminateGameSessionOutput`](crate::operation::terminate_game_session::TerminateGameSessionOutput) with field(s):
/// - [`game_session(Option<GameSession>)`](crate::operation::terminate_game_session::TerminateGameSessionOutput::game_session): <p>Properties describing a game session.</p> <p>A game session in ACTIVE status can host players. When a game session ends, its status is set to <code>TERMINATED</code>.</p> <p>Amazon GameLift Servers retains a game session resource for 30 days after the game session ends. You can reuse idempotency token values after this time. Game session logs are retained for 14 days.</p> <p><a href="https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets">All APIs by task</a></p>
/// - On failure, responds with [`SdkError<TerminateGameSessionError>`](crate::operation::terminate_game_session::TerminateGameSessionError)
pub fn terminate_game_session(&self) -> crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder {
crate::operation::terminate_game_session::builders::TerminateGameSessionFluentBuilder::new(self.handle.clone())
}
}