createMediaStreamPipeline method

Future<CreateMediaStreamPipelineResponse> createMediaStreamPipeline({
  1. required List<MediaStreamSink> sinks,
  2. required List<MediaStreamSource> sources,
  3. String? clientRequestToken,
  4. List<Tag>? tags,
})

Creates a streaming media pipeline.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ResourceLimitExceededException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter sinks : The data sink for the media pipeline.

Parameter sources : The data sources for the media pipeline.

Parameter clientRequestToken : The token assigned to the client making the request.

Parameter tags : The tags assigned to the media pipeline.

Implementation

Future<CreateMediaStreamPipelineResponse> createMediaStreamPipeline({
  required List<MediaStreamSink> sinks,
  required List<MediaStreamSource> sources,
  String? clientRequestToken,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'Sinks': sinks,
    'Sources': sources,
    'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/sdk-media-stream-pipelines',
    exceptionFnMap: _exceptionFns,
  );
  return CreateMediaStreamPipelineResponse.fromJson(response);
}