getTestGridSession method
A session is an instance of a browser created through a
RemoteWebDriver with the URL from
CreateTestGridUrlResult$url. You can use the following to look up
sessions:
- The session ARN (GetTestGridSessionRequest$sessionArn).
- The project ARN and a session ID (GetTestGridSessionRequest$projectArn and GetTestGridSessionRequest$sessionId).
May throw NotFoundException. May throw ArgumentException. May throw InternalServiceException.
Parameter projectArn :
The ARN for the project that this session belongs to. See
CreateTestGridProject and ListTestGridProjects.
Parameter sessionArn :
An ARN that uniquely identifies a TestGridSession.
Parameter sessionId :
An ID associated with this session.
Implementation
Future<GetTestGridSessionResult> getTestGridSession({
  String? projectArn,
  String? sessionArn,
  String? sessionId,
}) async {
  _s.validateStringLength(
    'projectArn',
    projectArn,
    32,
    1011,
  );
  _s.validateStringLength(
    'sessionArn',
    sessionArn,
    32,
    1011,
  );
  _s.validateStringLength(
    'sessionId',
    sessionId,
    1,
    128,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DeviceFarm_20150623.GetTestGridSession'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (projectArn != null) 'projectArn': projectArn,
      if (sessionArn != null) 'sessionArn': sessionArn,
      if (sessionId != null) 'sessionId': sessionId,
    },
  );
  return GetTestGridSessionResult.fromJson(jsonResponse.body);
}