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 TaskNotFoundException. May throw InvalidRequestException. May throw PipelineNotFoundException. May throw PipelineDeletedException.
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 {
ArgumentError.checkNotNull(expression, 'expression');
_s.validateStringLength(
'expression',
expression,
0,
20971520,
isRequired: true,
);
ArgumentError.checkNotNull(objectId, 'objectId');
_s.validateStringLength(
'objectId',
objectId,
1,
1024,
isRequired: true,
);
ArgumentError.checkNotNull(pipelineId, 'pipelineId');
_s.validateStringLength(
'pipelineId',
pipelineId,
1,
1024,
isRequired: true,
);
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);
}