listSessions method
Retrieve a list of sessions.
May throw AccessDeniedException.
May throw InternalServiceException.
May throw InvalidInputException.
May throw OperationTimeoutException.
Parameter maxResults :
The maximum number of results.
Parameter nextToken :
The token for the next set of results, or null if there are no more
result.
Parameter requestOrigin :
The origin of the request.
Parameter tags :
Tags belonging to the session.
Implementation
Future<ListSessionsResponse> listSessions({
int? maxResults,
String? nextToken,
String? requestOrigin,
Map<String, String>? tags,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.ListSessions'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (requestOrigin != null) 'RequestOrigin': requestOrigin,
if (tags != null) 'Tags': tags,
},
);
return ListSessionsResponse.fromJson(jsonResponse.body);
}