updateStream method

Future<UpdateStreamResponse> updateStream({
  1. required String streamId,
  2. String? description,
  3. List<StreamFile>? files,
  4. String? roleArn,
})

Updates an existing stream. The stream version will be incremented by one.

Requires permission to access the UpdateStream action.

May throw InternalFailureException. May throw InvalidRequestException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException.

Parameter streamId : The stream ID.

Parameter description : The description of the stream.

Parameter files : The files associated with the stream.

Parameter roleArn : An IAM role that allows the IoT service principal assumes to access your S3 files.

Implementation

Future<UpdateStreamResponse> updateStream({
  required String streamId,
  String? description,
  List<StreamFile>? files,
  String? roleArn,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (files != null) 'files': files,
    if (roleArn != null) 'roleArn': roleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/streams/${Uri.encodeComponent(streamId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateStreamResponse.fromJson(response);
}