stopSession method
Stops the session.
May throw AccessDeniedException.
May throw ConcurrentModificationException.
May throw IllegalSessionStateException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter id :
The ID of the session to be stopped.
Parameter requestOrigin :
The origin of the request.
Implementation
Future<StopSessionResponse> stopSession({
required String id,
String? requestOrigin,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.StopSession'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
if (requestOrigin != null) 'RequestOrigin': requestOrigin,
},
);
return StopSessionResponse.fromJson(jsonResponse.body);
}