updatePipeline method

Future<void> updatePipeline({
  1. required List<PipelineActivity> pipelineActivities,
  2. required String pipelineName,
})

Updates the settings of a pipeline. You must specify both a channel and a datastore activity and, optionally, as many as 23 additional activities in the pipelineActivities array.

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

Parameter pipelineActivities : A list of PipelineActivity objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.

The list can be 2-25 PipelineActivity objects and must contain both a channel and a datastore activity. Each entry in the list must contain only one activity. For example:

pipelineActivities = { "channel": { ... } }, { "lambda": { ... } }, ...

Parameter pipelineName : The name of the pipeline to update.

Implementation

Future<void> updatePipeline({
  required List<PipelineActivity> pipelineActivities,
  required String pipelineName,
}) async {
  ArgumentError.checkNotNull(pipelineActivities, 'pipelineActivities');
  ArgumentError.checkNotNull(pipelineName, 'pipelineName');
  _s.validateStringLength(
    'pipelineName',
    pipelineName,
    1,
    128,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'pipelineActivities': pipelineActivities,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/pipelines/${Uri.encodeComponent(pipelineName)}',
    exceptionFnMap: _exceptionFns,
  );
}