invokeAsync method

  1. @Deprecated('Deprecated')
Future<InvokeAsyncResponse> invokeAsync({
  1. required String functionName,
  2. required Uint8List invokeArgs,
})
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.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

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);
}