updateFlowMediaStream method

Future<UpdateFlowMediaStreamResponse> updateFlowMediaStream({
  1. required String flowArn,
  2. required String mediaStreamName,
  3. MediaStreamAttributesRequest? attributes,
  4. int? clockRate,
  5. String? description,
  6. MediaStreamType? mediaStreamType,
  7. String? videoFormat,
})

Updates an existing media stream.

May throw BadRequestException. May throw ForbiddenException. May throw InternalServerErrorException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.

Parameter flowArn : The Amazon Resource Name (ARN) of the flow that is associated with the media stream that you updated.

Parameter mediaStreamName : The media stream that you updated.

Parameter attributes : The attributes that you want to assign to the media stream.

Parameter clockRate : The sample rate for the stream. This value in measured in kHz.

Parameter description : A description that can help you quickly identify what your media stream is used for.

Parameter mediaStreamType : The type of media stream.

Parameter videoFormat : The resolution of the video.

Implementation

Future<UpdateFlowMediaStreamResponse> updateFlowMediaStream({
  required String flowArn,
  required String mediaStreamName,
  MediaStreamAttributesRequest? attributes,
  int? clockRate,
  String? description,
  MediaStreamType? mediaStreamType,
  String? videoFormat,
}) async {
  final $payload = <String, dynamic>{
    if (attributes != null) 'attributes': attributes,
    if (clockRate != null) 'clockRate': clockRate,
    if (description != null) 'description': description,
    if (mediaStreamType != null) 'mediaStreamType': mediaStreamType.value,
    if (videoFormat != null) 'videoFormat': videoFormat,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v1/flows/${Uri.encodeComponent(flowArn)}/mediaStreams/${Uri.encodeComponent(mediaStreamName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateFlowMediaStreamResponse.fromJson(response);
}