updatePipeline method
Updates a pipeline.
May throw ResourceNotFound.
Parameter pipelineName
:
The name of the pipeline to update.
Parameter pipelineDefinition
:
The JSON pipeline definition.
Parameter pipelineDescription
:
The description of the pipeline.
Parameter pipelineDisplayName
:
The display name of the pipeline.
Parameter roleArn
:
The Amazon Resource Name (ARN) that the pipeline uses to execute.
Implementation
Future<UpdatePipelineResponse> updatePipeline({
required String pipelineName,
String? pipelineDefinition,
String? pipelineDescription,
String? pipelineDisplayName,
String? roleArn,
}) async {
ArgumentError.checkNotNull(pipelineName, 'pipelineName');
_s.validateStringLength(
'pipelineName',
pipelineName,
1,
256,
isRequired: true,
);
_s.validateStringLength(
'pipelineDefinition',
pipelineDefinition,
1,
1048576,
);
_s.validateStringLength(
'pipelineDescription',
pipelineDescription,
0,
3072,
);
_s.validateStringLength(
'pipelineDisplayName',
pipelineDisplayName,
1,
256,
);
_s.validateStringLength(
'roleArn',
roleArn,
20,
2048,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdatePipeline'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PipelineName': pipelineName,
if (pipelineDefinition != null)
'PipelineDefinition': pipelineDefinition,
if (pipelineDescription != null)
'PipelineDescription': pipelineDescription,
if (pipelineDisplayName != null)
'PipelineDisplayName': pipelineDisplayName,
if (roleArn != null) 'RoleArn': roleArn,
},
);
return UpdatePipelineResponse.fromJson(jsonResponse.body);
}