terminateSession method
Terminates the specified session. After you terminate a session, it enters
the TERMINATING state and then the TERMINATED
state. You can still access the Spark History Server for a terminated
session through the GetResourceDashboard operation.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter applicationId :
The ID of the application that the session belongs to.
Parameter sessionId :
The ID of the session to terminate.
Implementation
Future<TerminateSessionResponse> terminateSession({
required String applicationId,
required String sessionId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/applications/${Uri.encodeComponent(applicationId)}/sessions/${Uri.encodeComponent(sessionId)}',
exceptionFnMap: _exceptionFns,
);
return TerminateSessionResponse.fromJson(response);
}