getSession method

Future<GetSessionResponse> getSession({
  1. required String sessionId,
})

Gets the full details of a previously created session, including the session status and configuration.

May throw InternalServerException. May throw InvalidRequestException. May throw ResourceNotFoundException.

Parameter sessionId : The session ID.

Implementation

Future<GetSessionResponse> getSession({
  required String sessionId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonAthena.GetSession'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SessionId': sessionId,
    },
  );

  return GetSessionResponse.fromJson(jsonResponse.body);
}