startPipelineExecution method
Starts a pipeline execution.
May throw ResourceNotFound. May throw ResourceLimitExceeded.
Parameter pipelineName
:
The name of the pipeline.
Parameter clientRequestToken
:
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the operation. An idempotent operation completes no more
than one time.
Parameter pipelineExecutionDescription
:
The description of the pipeline execution.
Parameter pipelineExecutionDisplayName
:
The display name of the pipeline execution.
Parameter pipelineParameters
:
Contains a list of pipeline parameters. This list can be empty.
Implementation
Future<StartPipelineExecutionResponse> startPipelineExecution({
required String pipelineName,
String? clientRequestToken,
String? pipelineExecutionDescription,
String? pipelineExecutionDisplayName,
List<Parameter>? pipelineParameters,
}) async {
ArgumentError.checkNotNull(pipelineName, 'pipelineName');
_s.validateStringLength(
'pipelineName',
pipelineName,
1,
256,
isRequired: true,
);
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
32,
128,
);
_s.validateStringLength(
'pipelineExecutionDescription',
pipelineExecutionDescription,
0,
3072,
);
_s.validateStringLength(
'pipelineExecutionDisplayName',
pipelineExecutionDisplayName,
1,
82,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.StartPipelineExecution'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PipelineName': pipelineName,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
if (pipelineExecutionDescription != null)
'PipelineExecutionDescription': pipelineExecutionDescription,
if (pipelineExecutionDisplayName != null)
'PipelineExecutionDisplayName': pipelineExecutionDisplayName,
if (pipelineParameters != null)
'PipelineParameters': pipelineParameters,
},
);
return StartPipelineExecutionResponse.fromJson(jsonResponse.body);
}