listStreamSessions method
Gets a summary of current and previous streams for a specified channel in your account, in the AWS region where the API request is processed.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter channelArn :
Channel ARN used to filter the list.
Parameter maxResults :
Maximum number of streams to return. Default: 100.
Parameter nextToken :
The first stream to retrieve. This is used for pagination; see the
nextToken response field.
Implementation
Future<ListStreamSessionsResponse> listStreamSessions({
required String channelArn,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $payload = <String, dynamic>{
'channelArn': channelArn,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/ListStreamSessions',
exceptionFnMap: _exceptionFns,
);
return ListStreamSessionsResponse.fromJson(response);
}