Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License").
    * You may not use this file except in compliance with the License.
    * A copy of the License is located at
    * 
    *  http://aws.amazon.com/apache2.0
    * 
   * or in the "license" file accompanying this file. This file is distributed
   * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
   * express or implied. See the License for the specific language governing
   * permissions and limitations under the License.
   */
  package com.amazonaws.services.lambda;
  
  
  
Asynchronous client for accessing AWSLambda. All asynchronous calls made using this client are non-blocking. Callers could either process the result and handle the exceptions in the worker thread by providing a callback handler when making the call, or use the returned Future object to check the result of the call in the calling thread. AWS Lambda

S

Overview

This is the AWS Lambda API Reference . The AWS Lambda Developer Guide provides additional information. For the service overview, go to What is AWS Lambda , and for information about how the service works, go to AWS LambdaL How it Works in the AWS Lambda Developer Guide .

  
  public class AWSLambdaAsyncClient extends AWSLambdaClient
          implements AWSLambdaAsync {

    
Executor service for executing asynchronous requests.
  
      private ExecutorService executorService;
  
      private static final int DEFAULT_THREAD_POOL_SIZE = 50;

    
Constructs a new asynchronous client to invoke service methods on AWSLambda. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

  
      public AWSLambdaAsyncClient() {
          this(new DefaultAWSCredentialsProviderChain());
      }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
clientConfiguration The client configuration options controlling how this client connects to AWSLambda (ex: proxy settings, retry counts, etc.).
See also:
com.amazonaws.auth.DefaultAWSCredentialsProviderChain
 
     public AWSLambdaAsyncClient(ClientConfiguration clientConfiguration) {
         this(new DefaultAWSCredentialsProviderChain(), clientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
 
     public AWSLambdaAsyncClient(AWSCredentials awsCredentials) {
         this(awsCredentials, Executors.newFixedThreadPool());
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
executorService The executor service by which all asynchronous requests will be executed.
 
     public AWSLambdaAsyncClient(AWSCredentials awsCredentialsExecutorService executorService) {
         super(awsCredentials);
         this. = executorService;
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
executorService The executor service by which all asynchronous requests will be executed.
 
     public AWSLambdaAsyncClient(AWSCredentials awsCredentials,
                 ClientConfiguration clientConfigurationExecutorService executorService) {
         super(awsCredentialsclientConfiguration);
         this. = executorService;
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials provider. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
 
     public AWSLambdaAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
         this(awsCredentialsProvider, Executors.newFixedThreadPool());
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials provider and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
executorService The executor service by which all asynchronous requests will be executed.
 
     public AWSLambdaAsyncClient(AWSCredentialsProvider awsCredentialsProviderExecutorService executorService) {
         this(awsCredentialsProvidernew ClientConfiguration(), executorService);
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials provider and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
 
     public AWSLambdaAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                 ClientConfiguration clientConfiguration) {
         this(awsCredentialsProviderclientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
     }

    
Constructs a new asynchronous client to invoke service methods on AWSLambda using the specified AWS account credentials provider, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
executorService The executor service by which all asynchronous requests will be executed.
 
     public AWSLambdaAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                 ClientConfiguration clientConfigurationExecutorService executorService) {
         super(awsCredentialsProviderclientConfiguration);
         this. = executorService;
     }

    
Returns the executor service used by this async client to execute requests.

Returns:
The executor service used by this async client to execute requests.
 
     public ExecutorService getExecutorService() {
         return ;
     }

    
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should call getExecutorService().shutdown() followed by getExecutorService().awaitTermination() prior to calling this method.
 
     @Override
     public void shutdown() {
         super.shutdown();
         .shutdownNow();
     }
            
    

Deletes the specified Lambda function code and configuration.

When you delete a function the associated access policy is also deleted. You will need to delete the event source mappings explicitly.

This operation requires permission for the lambda:DeleteFunction action.

Parameters:
deleteFunctionRequest Container for the necessary parameters to execute the DeleteFunction operation on AWSLambda.
Returns:
A Java Future object containing the response from the DeleteFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoiddeleteFunctionAsync(final DeleteFunctionRequest deleteFunctionRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
                 deleteFunction(deleteFunctionRequest);
                 return null;
         }
     });
     }

    

Deletes the specified Lambda function code and configuration.

When you delete a function the associated access policy is also deleted. You will need to delete the event source mappings explicitly.

This operation requires permission for the lambda:DeleteFunction action.

Parameters:
deleteFunctionRequest Container for the necessary parameters to execute the DeleteFunction operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DeleteFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoiddeleteFunctionAsync(
             final DeleteFunctionRequest deleteFunctionRequest,
             final AsyncHandler<DeleteFunctionRequestVoidasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
               try {
                 deleteFunction(deleteFunctionRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(deleteFunctionRequestnull);
                  return null;
         }
     });
     }
    
    

Adds a permission to the access policy associated with the specified AWS Lambda function. In a "push event" model, the access policy attached to the Lambda function grants Amazon S3 or a user application permission for the Lambda lambda:Invoke action. For information about the push model, see AWS Lambda: How it Works . Each Lambda function has one access policy associated with it. You can use the AddPermission API to add a permission to the policy. You have one access policy but it can have multiple permission statements.

This operation requires permission for the lambda:AddPermission action.

Parameters:
addPermissionRequest Container for the necessary parameters to execute the AddPermission operation on AWSLambda.
Returns:
A Java Future object containing the response from the AddPermission service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<AddPermissionResultaddPermissionAsync(final AddPermissionRequest addPermissionRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<AddPermissionResult>() {
             public AddPermissionResult call() throws Exception {
                 return addPermission(addPermissionRequest);
         }
     });
     }

    

Adds a permission to the access policy associated with the specified AWS Lambda function. In a "push event" model, the access policy attached to the Lambda function grants Amazon S3 or a user application permission for the Lambda lambda:Invoke action. For information about the push model, see AWS Lambda: How it Works . Each Lambda function has one access policy associated with it. You can use the AddPermission API to add a permission to the policy. You have one access policy but it can have multiple permission statements.

This operation requires permission for the lambda:AddPermission action.

Parameters:
addPermissionRequest Container for the necessary parameters to execute the AddPermission operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the AddPermission service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final AddPermissionRequest addPermissionRequest,
             final AsyncHandler<AddPermissionRequestAddPermissionResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<AddPermissionResult>() {
             public AddPermissionResult call() throws Exception {
               AddPermissionResult result;
                 try {
                 result = addPermission(addPermissionRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(addPermissionRequestresult);
                  return result;
         }
     });
     }
    
    

Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.

This operation requires permission for the lambda:ListFunctions action.

Parameters:
listFunctionsRequest Container for the necessary parameters to execute the ListFunctions operation on AWSLambda.
Returns:
A Java Future object containing the response from the ListFunctions service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<ListFunctionsResultlistFunctionsAsync(final ListFunctionsRequest listFunctionsRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<ListFunctionsResult>() {
             public ListFunctionsResult call() throws Exception {
                 return listFunctions(listFunctionsRequest);
         }
     });
     }

    

Returns a list of your Lambda functions. For each function, the response includes the function configuration information. You must use GetFunction to retrieve the code for your function.

This operation requires permission for the lambda:ListFunctions action.

Parameters:
listFunctionsRequest Container for the necessary parameters to execute the ListFunctions operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the ListFunctions service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final ListFunctionsRequest listFunctionsRequest,
             final AsyncHandler<ListFunctionsRequestListFunctionsResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<ListFunctionsResult>() {
             public ListFunctionsResult call() throws Exception {
               ListFunctionsResult result;
                 try {
                 result = listFunctions(listFunctionsRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(listFunctionsRequestresult);
                  return result;
         }
     });
     }
    
    

You can remove individual permissions from an access policy associated with a Lambda function by providing a Statement ID.

Note that removal of a permission will cause an active event source to lose permission to the function.

You need permission for the lambda:RemovePermission action.

Parameters:
removePermissionRequest Container for the necessary parameters to execute the RemovePermission operation on AWSLambda.
Returns:
A Java Future object containing the response from the RemovePermission service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoidremovePermissionAsync(final RemovePermissionRequest removePermissionRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
                 removePermission(removePermissionRequest);
                 return null;
         }
     });
     }

    

You can remove individual permissions from an access policy associated with a Lambda function by providing a Statement ID.

Note that removal of a permission will cause an active event source to lose permission to the function.

You need permission for the lambda:RemovePermission action.

Parameters:
removePermissionRequest Container for the necessary parameters to execute the RemovePermission operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the RemovePermission service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<VoidremovePermissionAsync(
             final RemovePermissionRequest removePermissionRequest,
             final AsyncHandler<RemovePermissionRequestVoidasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<Void>() {
             public Void call() throws Exception {
               try {
                 removePermission(removePermissionRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(removePermissionRequestnull);
                  return null;
         }
     });
     }
    
    

Creates a new Lambda function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the operation will fail. Note that the function name is case-sensitive.

This operation requires permission for the lambda:CreateFunction action.

Parameters:
createFunctionRequest Container for the necessary parameters to execute the CreateFunction operation on AWSLambda.
Returns:
A Java Future object containing the response from the CreateFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<CreateFunctionResultcreateFunctionAsync(final CreateFunctionRequest createFunctionRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<CreateFunctionResult>() {
             public CreateFunctionResult call() throws Exception {
                 return createFunction(createFunctionRequest);
         }
     });
     }

    

Creates a new Lambda function. The function metadata is created from the request parameters, and the code for the function is provided by a .zip file in the request body. If the function name already exists, the operation will fail. Note that the function name is case-sensitive.

This operation requires permission for the lambda:CreateFunction action.

Parameters:
createFunctionRequest Container for the necessary parameters to execute the CreateFunction operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the CreateFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final CreateFunctionRequest createFunctionRequest,
             final AsyncHandler<CreateFunctionRequestCreateFunctionResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<CreateFunctionResult>() {
             public CreateFunctionResult call() throws Exception {
               CreateFunctionResult result;
                 try {
                 result = createFunction(createFunctionRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(createFunctionRequestresult);
                  return result;
         }
     });
     }
    
    

You can update an event source mapping. This is useful if you want to change the parameters of the existing mapping without losing your position in the stream. You can change which function will receive the stream records, but to change the stream itself, you must create a new mapping.

This operation requires permission for the lambda:UpdateEventSourceMapping action.

Parameters:
updateEventSourceMappingRequest Container for the necessary parameters to execute the UpdateEventSourceMapping operation on AWSLambda.
Returns:
A Java Future object containing the response from the UpdateEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     public Future<UpdateEventSourceMappingResultupdateEventSourceMappingAsync(final UpdateEventSourceMappingRequest updateEventSourceMappingRequest
             throws AmazonServiceExceptionAmazonClientException {
             public UpdateEventSourceMappingResult call() throws Exception {
                 return updateEventSourceMapping(updateEventSourceMappingRequest);
         }
     });
     }

    

You can update an event source mapping. This is useful if you want to change the parameters of the existing mapping without losing your position in the stream. You can change which function will receive the stream records, but to change the stream itself, you must create a new mapping.

This operation requires permission for the lambda:UpdateEventSourceMapping action.

Parameters:
updateEventSourceMappingRequest Container for the necessary parameters to execute the UpdateEventSourceMapping operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the UpdateEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final UpdateEventSourceMappingRequest updateEventSourceMappingRequest,
             final AsyncHandler<UpdateEventSourceMappingRequestUpdateEventSourceMappingResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
             public UpdateEventSourceMappingResult call() throws Exception {
               UpdateEventSourceMappingResult result;
                 try {
                 result = updateEventSourceMapping(updateEventSourceMappingRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(updateEventSourceMappingRequestresult);
                  return result;
         }
     });
     }
    
    

IMPORTANT:This API is deprecated. We recommend you use Invoke API (see Invoke).

Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch logs console.

This operation requires permission for the lambda:InvokeFunction action.

Parameters:
invokeAsyncRequest Container for the necessary parameters to execute the InvokeAsync operation on AWSLambda.
Returns:
A Java Future object containing the response from the InvokeAsync service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
     @Deprecated
     public Future<InvokeAsyncResultinvokeAsyncAsync(final InvokeAsyncRequest invokeAsyncRequest
             throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<InvokeAsyncResult>() {
             public InvokeAsyncResult call() throws Exception {
                 return invokeAsync(invokeAsyncRequest);
         }
     });
     }

    

IMPORTANT:This API is deprecated. We recommend you use Invoke API (see Invoke).

Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes the specified function asynchronously. To see the logs generated by the Lambda function execution, see the CloudWatch logs console.

This operation requires permission for the lambda:InvokeFunction action.

Parameters:
invokeAsyncRequest Container for the necessary parameters to execute the InvokeAsync operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the InvokeAsync service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final InvokeAsyncRequest invokeAsyncRequest,
             final AsyncHandler<InvokeAsyncRequestInvokeAsyncResultasyncHandler)
                     throws AmazonServiceExceptionAmazonClientException {
         return .submit(new Callable<InvokeAsyncResult>() {
             public InvokeAsyncResult call() throws Exception {
               InvokeAsyncResult result;
                 try {
                 result = invokeAsync(invokeAsyncRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
               asyncHandler.onSuccess(invokeAsyncRequestresult);
                  return result;
         }
     });
     }
    
    

Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.

This operation requires permission for the lambda:UpdateFunctionConfiguration action.

Parameters:
updateFunctionConfigurationRequest Container for the necessary parameters to execute the UpdateFunctionConfiguration operation on AWSLambda.
Returns:
A Java Future object containing the response from the UpdateFunctionConfiguration service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             throws AmazonServiceExceptionAmazonClientException {
             public UpdateFunctionConfigurationResult call() throws Exception {
                 return updateFunctionConfiguration(updateFunctionConfigurationRequest);
         }
     });
     }

    

Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code.

This operation requires permission for the lambda:UpdateFunctionConfiguration action.

Parameters:
updateFunctionConfigurationRequest Container for the necessary parameters to execute the UpdateFunctionConfiguration operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the UpdateFunctionConfiguration service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
 
             final UpdateFunctionConfigurationRequest updateFunctionConfigurationRequest,
                     throws AmazonServiceExceptionAmazonClientException {
             public UpdateFunctionConfigurationResult call() throws Exception {
               UpdateFunctionConfigurationResult result;
                 try {
                 result = updateFunctionConfiguration(updateFunctionConfigurationRequest);
               } catch (Exception ex) {
                   asyncHandler.onError(ex);
             throw ex;
               }
              asyncHandler.onSuccess(updateFunctionConfigurationRequestresult);
                 return result;
        }
    });
    }
    
    

Invokes a specified Lambda function.

This operation requires permission for the lambda:InvokeFunction action.

Parameters:
invokeRequest Container for the necessary parameters to execute the Invoke operation on AWSLambda.
Returns:
A Java Future object containing the response from the Invoke service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
    public Future<InvokeResultinvokeAsync(final InvokeRequest invokeRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<InvokeResult>() {
            public InvokeResult call() throws Exception {
                return invoke(invokeRequest);
        }
    });
    }

    

Invokes a specified Lambda function.

This operation requires permission for the lambda:InvokeFunction action.

Parameters:
invokeRequest Container for the necessary parameters to execute the Invoke operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the Invoke service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final InvokeRequest invokeRequest,
            final AsyncHandler<InvokeRequestInvokeResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<InvokeResult>() {
            public InvokeResult call() throws Exception {
              InvokeResult result;
                try {
                result = invoke(invokeRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(invokeRequestresult);
                 return result;
        }
    });
    }
    
    

Returns the access policy, containing a list of permissions granted via the AddPermission API, associated with the specified bucket.

You need permission for the lambda:GetPolicy action.

Parameters:
getPolicyRequest Container for the necessary parameters to execute the GetPolicy operation on AWSLambda.
Returns:
A Java Future object containing the response from the GetPolicy service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
    public Future<GetPolicyResultgetPolicyAsync(final GetPolicyRequest getPolicyRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<GetPolicyResult>() {
            public GetPolicyResult call() throws Exception {
                return getPolicy(getPolicyRequest);
        }
    });
    }

    

Returns the access policy, containing a list of permissions granted via the AddPermission API, associated with the specified bucket.

You need permission for the lambda:GetPolicy action.

Parameters:
getPolicyRequest Container for the necessary parameters to execute the GetPolicy operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetPolicy service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final GetPolicyRequest getPolicyRequest,
            final AsyncHandler<GetPolicyRequestGetPolicyResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<GetPolicyResult>() {
            public GetPolicyResult call() throws Exception {
              GetPolicyResult result;
                try {
                result = getPolicy(getPolicyRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(getPolicyRequestresult);
                 return result;
        }
    });
    }
    
    

Returns a list of event source mappings you created using the CreateEventSourceMapping (see CreateEventSourceMapping), where you identify a stream as an event source. This list does not include Amazon S3 event sources.

For each mapping, the API returns configuration information. You can optionally specify filters to retrieve specific event source mappings.

This operation requires permission for the lambda:ListEventSourceMappings action.

Parameters:
listEventSourceMappingsRequest Container for the necessary parameters to execute the ListEventSourceMappings operation on AWSLambda.
Returns:
A Java Future object containing the response from the ListEventSourceMappings service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public ListEventSourceMappingsResult call() throws Exception {
                return listEventSourceMappings(listEventSourceMappingsRequest);
        }
    });
    }

    

Returns a list of event source mappings you created using the CreateEventSourceMapping (see CreateEventSourceMapping), where you identify a stream as an event source. This list does not include Amazon S3 event sources.

For each mapping, the API returns configuration information. You can optionally specify filters to retrieve specific event source mappings.

This operation requires permission for the lambda:ListEventSourceMappings action.

Parameters:
listEventSourceMappingsRequest Container for the necessary parameters to execute the ListEventSourceMappings operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the ListEventSourceMappings service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final ListEventSourceMappingsRequest listEventSourceMappingsRequest,
            final AsyncHandler<ListEventSourceMappingsRequestListEventSourceMappingsResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
            public ListEventSourceMappingsResult call() throws Exception {
              ListEventSourceMappingsResult result;
                try {
                result = listEventSourceMappings(listEventSourceMappingsRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(listEventSourceMappingsRequestresult);
                 return result;
        }
    });
    }
    
    

Returns configuration information for the specified event source mapping (see CreateEventSourceMapping).

This operation requires permission for the lambda:GetEventSourceMapping action.

Parameters:
getEventSourceMappingRequest Container for the necessary parameters to execute the GetEventSourceMapping operation on AWSLambda.
Returns:
A Java Future object containing the response from the GetEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
    public Future<GetEventSourceMappingResultgetEventSourceMappingAsync(final GetEventSourceMappingRequest getEventSourceMappingRequest
            throws AmazonServiceExceptionAmazonClientException {
            public GetEventSourceMappingResult call() throws Exception {
                return getEventSourceMapping(getEventSourceMappingRequest);
        }
    });
    }

    

Returns configuration information for the specified event source mapping (see CreateEventSourceMapping).

This operation requires permission for the lambda:GetEventSourceMapping action.

Parameters:
getEventSourceMappingRequest Container for the necessary parameters to execute the GetEventSourceMapping operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final GetEventSourceMappingRequest getEventSourceMappingRequest,
            final AsyncHandler<GetEventSourceMappingRequestGetEventSourceMappingResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
            public GetEventSourceMappingResult call() throws Exception {
              GetEventSourceMappingResult result;
                try {
                result = getEventSourceMapping(getEventSourceMappingRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(getEventSourceMappingRequestresult);
                 return result;
        }
    });
    }
    
    

Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using CreateFunction.

This operation requires permission for the lambda:GetFunctionConfiguration operation.

Parameters:
getFunctionConfigurationRequest Container for the necessary parameters to execute the GetFunctionConfiguration operation on AWSLambda.
Returns:
A Java Future object containing the response from the GetFunctionConfiguration service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public GetFunctionConfigurationResult call() throws Exception {
                return getFunctionConfiguration(getFunctionConfigurationRequest);
        }
    });
    }

    

Returns the configuration information of the Lambda function. This the same information you provided as parameters when uploading the function by using CreateFunction.

This operation requires permission for the lambda:GetFunctionConfiguration operation.

Parameters:
getFunctionConfigurationRequest Container for the necessary parameters to execute the GetFunctionConfiguration operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetFunctionConfiguration service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final GetFunctionConfigurationRequest getFunctionConfigurationRequest,
                    throws AmazonServiceExceptionAmazonClientException {
            public GetFunctionConfigurationResult call() throws Exception {
              GetFunctionConfigurationResult result;
                try {
                result = getFunctionConfiguration(getFunctionConfigurationRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(getFunctionConfigurationRequestresult);
                 return result;
        }
    });
    }
    
    

Removes an event source mapping. This means AWS Lambda will no longer invoke the function for events in the associated source.

This operation requires permission for the lambda:DeleteEventSourceMapping action.

Parameters:
deleteEventSourceMappingRequest Container for the necessary parameters to execute the DeleteEventSourceMapping operation on AWSLambda.
Returns:
A Java Future object containing the response from the DeleteEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public DeleteEventSourceMappingResult call() throws Exception {
                return deleteEventSourceMapping(deleteEventSourceMappingRequest);
        }
    });
    }

    

Removes an event source mapping. This means AWS Lambda will no longer invoke the function for events in the associated source.

This operation requires permission for the lambda:DeleteEventSourceMapping action.

Parameters:
deleteEventSourceMappingRequest Container for the necessary parameters to execute the DeleteEventSourceMapping operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DeleteEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final DeleteEventSourceMappingRequest deleteEventSourceMappingRequest,
                    throws AmazonServiceExceptionAmazonClientException {
            public DeleteEventSourceMappingResult call() throws Exception {
              DeleteEventSourceMappingResult result;
                try {
                result = deleteEventSourceMapping(deleteEventSourceMappingRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(deleteEventSourceMappingRequestresult);
                 return result;
        }
    });
    }
    
    

Identifies a stream as an event source for a Lambda function. It can be either an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified function when records are posted to the stream.

This is the pull model, where AWS Lambda invokes the function. For more information, go to AWS Lambda: How it Works in the AWS Lambda Developer Guide .

This association between an Amazon Kinesis stream and a Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which Lambda function to invoke) for the event source mapping in the request body.

Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated with multiple AWS Lambda function. A given Lambda function can be associated with multiple AWS event sources.

This operation requires permission for the lambda:CreateEventSourceMapping action.

Parameters:
createEventSourceMappingRequest Container for the necessary parameters to execute the CreateEventSourceMapping operation on AWSLambda.
Returns:
A Java Future object containing the response from the CreateEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public CreateEventSourceMappingResult call() throws Exception {
                return createEventSourceMapping(createEventSourceMappingRequest);
        }
    });
    }

    

Identifies a stream as an event source for a Lambda function. It can be either an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified function when records are posted to the stream.

This is the pull model, where AWS Lambda invokes the function. For more information, go to AWS Lambda: How it Works in the AWS Lambda Developer Guide .

This association between an Amazon Kinesis stream and a Lambda function is called the event source mapping. You provide the configuration information (for example, which stream to read from and which Lambda function to invoke) for the event source mapping in the request body.

Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated with multiple AWS Lambda function. A given Lambda function can be associated with multiple AWS event sources.

This operation requires permission for the lambda:CreateEventSourceMapping action.

Parameters:
createEventSourceMappingRequest Container for the necessary parameters to execute the CreateEventSourceMapping operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the CreateEventSourceMapping service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final CreateEventSourceMappingRequest createEventSourceMappingRequest,
                    throws AmazonServiceExceptionAmazonClientException {
            public CreateEventSourceMappingResult call() throws Exception {
              CreateEventSourceMappingResult result;
                try {
                result = createEventSourceMapping(createEventSourceMappingRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(createEventSourceMappingRequestresult);
                 return result;
        }
    });
    }
    
    

Updates the code for the specified Lambda function. This operation must only be used on an existing Lambda function and cannot be used to update the function configuration.

This operation requires permission for the lambda:UpdateFunctionCode action.

Parameters:
updateFunctionCodeRequest Container for the necessary parameters to execute the UpdateFunctionCode operation on AWSLambda.
Returns:
A Java Future object containing the response from the UpdateFunctionCode service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
    public Future<UpdateFunctionCodeResultupdateFunctionCodeAsync(final UpdateFunctionCodeRequest updateFunctionCodeRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<UpdateFunctionCodeResult>() {
            public UpdateFunctionCodeResult call() throws Exception {
                return updateFunctionCode(updateFunctionCodeRequest);
        }
    });
    }

    

Updates the code for the specified Lambda function. This operation must only be used on an existing Lambda function and cannot be used to update the function configuration.

This operation requires permission for the lambda:UpdateFunctionCode action.

Parameters:
updateFunctionCodeRequest Container for the necessary parameters to execute the UpdateFunctionCode operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the UpdateFunctionCode service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final UpdateFunctionCodeRequest updateFunctionCodeRequest,
            final AsyncHandler<UpdateFunctionCodeRequestUpdateFunctionCodeResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<UpdateFunctionCodeResult>() {
            public UpdateFunctionCodeResult call() throws Exception {
              UpdateFunctionCodeResult result;
                try {
                result = updateFunctionCode(updateFunctionCodeRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(updateFunctionCodeRequestresult);
                 return result;
        }
    });
    }
    
    

Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with CreateFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.

This operation requires permission for the lambda:GetFunction action.

Parameters:
getFunctionRequest Container for the necessary parameters to execute the GetFunction operation on AWSLambda.
Returns:
A Java Future object containing the response from the GetFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
    public Future<GetFunctionResultgetFunctionAsync(final GetFunctionRequest getFunctionRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<GetFunctionResult>() {
            public GetFunctionResult call() throws Exception {
                return getFunction(getFunctionRequest);
        }
    });
    }

    

Returns the configuration information of the Lambda function and a presigned URL link to the .zip file you uploaded with CreateFunction so you can download the .zip file. Note that the URL is valid for up to 10 minutes. The configuration information is the same information you provided as parameters when uploading the function.

This operation requires permission for the lambda:GetFunction action.

Parameters:
getFunctionRequest Container for the necessary parameters to execute the GetFunction operation on AWSLambda.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the GetFunction service method, as returned by AWSLambda.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AWSLambda indicating either a problem with the data in the request, or a server side issue.
            final GetFunctionRequest getFunctionRequest,
            final AsyncHandler<GetFunctionRequestGetFunctionResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<GetFunctionResult>() {
            public GetFunctionResult call() throws Exception {
              GetFunctionResult result;
                try {
                result = getFunction(getFunctionRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(getFunctionRequestresult);
                 return result;
        }
    });
    }
    
}
        
New to GrepCode? Check out our FAQ X