updatePipeline method

Future<UpdatePipelineResponse> updatePipeline({
  1. required String pipelineName,
  2. required String workspaceName,
  3. List<ComputeNode>? computations,
  4. String? description,
  5. Map<String, String>? environmentVariables,
})

Updates an existing pipeline in the specified workspace. Only the fields provided in the request are updated; fields not included in the request are preserved unchanged. You can update the pipeline description, environment variables, and the list of compute nodes independently.

May throw AccessDeniedException. May throw ConflictingOperationException. May throw InternalFailureException. May throw InvalidRequestException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter pipelineName : The name of the pipeline to update.

Parameter workspaceName : The name of the workspace.

Parameter computations : Updated list of compute nodes forming the pipeline DAG.

Parameter description : A new description for the pipeline.

Parameter environmentVariables : Updated environment variables shared across all compute nodes.

Implementation

Future<UpdatePipelineResponse> updatePipeline({
  required String pipelineName,
  required String workspaceName,
  List<ComputeNode>? computations,
  String? description,
  Map<String, String>? environmentVariables,
}) async {
  final $payload = <String, dynamic>{
    if (computations != null) 'computations': computations,
    if (description != null) 'description': description,
    if (environmentVariables != null)
      'environmentVariables': environmentVariables,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/workspaces/${Uri.encodeComponent(workspaceName)}/pipelines/${Uri.encodeComponent(pipelineName)}',
    hostPrefix: 'api.',
    exceptionFnMap: _exceptionFns,
  );
  return UpdatePipelineResponse.fromJson(response);
}