evaluateExpression method
Task runners call EvaluateExpression to evaluate a string in
the context of the specified object. For example, a task runner can
evaluate SQL queries stored in Amazon S3.
May throw InternalServiceError.
May throw InvalidRequestException.
May throw PipelineDeletedException.
May throw PipelineNotFoundException.
May throw TaskNotFoundException.
Parameter expression :
The expression to evaluate.
Parameter objectId :
The ID of the object.
Parameter pipelineId :
The ID of the pipeline.
Implementation
Future<EvaluateExpressionOutput> evaluateExpression({
required String expression,
required String objectId,
required String pipelineId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'DataPipeline.EvaluateExpression'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'expression': expression,
'objectId': objectId,
'pipelineId': pipelineId,
},
);
return EvaluateExpressionOutput.fromJson(jsonResponse.body);
}