drainSessionInstance method
Drains the instance hosting the specified streaming session. The instance stops accepting new sessions while existing sessions continue uninterrupted. Once all sessions end, the instance is reclaimed and replaced. This only applies to multi-session fleets.
May throw ConcurrentModificationException.
May throw OperationNotPermittedException.
May throw ResourceNotFoundException.
Parameter sessionId :
The identifier of the streaming session.
Implementation
Future<void> drainSessionInstance({
required String sessionId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'PhotonAdminProxyService.DrainSessionInstance'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'SessionId': sessionId,
},
);
}