getStreamSession method

Future<GetStreamSessionResponse> getStreamSession({
  1. required String channelArn,
  2. String? streamId,
})

Gets metadata on a specified stream.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter channelArn : ARN of the channel resource

Parameter streamId : Unique identifier for a live or previously live stream in the specified channel. If no streamId is provided, this returns the most recent stream session for the channel, if it exists.

Implementation

Future<GetStreamSessionResponse> getStreamSession({
  required String channelArn,
  String? streamId,
}) async {
  final $payload = <String, dynamic>{
    'channelArn': channelArn,
    if (streamId != null) 'streamId': streamId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/GetStreamSession',
    exceptionFnMap: _exceptionFns,
  );
  return GetStreamSessionResponse.fromJson(response);
}