invokeAsync method
Invokes a function asynchronously.
May throw ServiceException. May throw ResourceNotFoundException. May throw InvalidRequestContentException. May throw InvalidRuntimeException. May throw ResourceConflictException.
Parameter functionName
:
The name of the Lambda function.
Name formats
-
Function name -
my-function
. -
Function ARN -
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN -
123456789012:function:my-function
.
Parameter invokeArgs
:
The JSON that you want to provide to your Lambda function as input.
Implementation
@Deprecated('Deprecated')
Future<InvokeAsyncResponse> invokeAsync({
required String functionName,
required Uint8List invokeArgs,
}) async {
ArgumentError.checkNotNull(functionName, 'functionName');
_s.validateStringLength(
'functionName',
functionName,
1,
170,
isRequired: true,
);
ArgumentError.checkNotNull(invokeArgs, 'invokeArgs');
final response = await _protocol.send(
payload: invokeArgs,
method: 'POST',
requestUri:
'/2014-11-13/functions/${Uri.encodeComponent(functionName)}/invoke-async/',
exceptionFnMap: _exceptionFns,
);
return InvokeAsyncResponse.fromJson(response);
}