All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.lambda.AWSLambdaAsync Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Lambda module holds the client classes that are used for communicating with AWS Lambda Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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;

import java.util.concurrent.Future;

import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.handlers.AsyncHandler;
import com.amazonaws.services.lambda.model.*;

/**
 * Interface for accessing AWSLambda asynchronously.
 * Each asynchronous method will return a Java Future object, and users are also allowed
 * to provide a callback handler.
 * AWS Lambda 

* 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 interface AWSLambdaAsync extends AWSLambda { /** *

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

*

* This operation requires permission for the * lambda:GetEventSource action. *

* * @param getEventSourceRequest Container for the necessary parameters to * execute the GetEventSource operation on AWSLambda. * * @return A Java Future object containing the response from the * GetEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getEventSourceAsync(GetEventSourceRequest getEventSourceRequest) throws AmazonServiceException, AmazonClientException; /** *

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

*

* This operation requires permission for the * lambda:GetEventSource action. *

* * @param getEventSourceRequest Container for the necessary parameters to * execute the GetEventSource operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * GetEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getEventSourceAsync(GetEventSourceRequest getEventSourceRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* Deletes the specified Lambda function code and configuration. *

*

* This operation requires permission for the * lambda:DeleteFunction action. *

* * @param deleteFunctionRequest Container for the necessary parameters to * execute the DeleteFunction operation on AWSLambda. * * @return A Java Future object containing the response from the * DeleteFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 deleteFunctionAsync(DeleteFunctionRequest deleteFunctionRequest) throws AmazonServiceException, AmazonClientException; /** *

* Deletes the specified Lambda function code and configuration. *

*

* This operation requires permission for the * lambda:DeleteFunction action. *

* * @param deleteFunctionRequest Container for the necessary parameters to * execute the DeleteFunction operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * DeleteFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 deleteFunctionAsync(DeleteFunctionRequest deleteFunctionRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* 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. *

* * @param listFunctionsRequest Container for the necessary parameters to * execute the ListFunctions operation on AWSLambda. * * @return A Java Future object containing the response from the * ListFunctions service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 listFunctionsAsync(ListFunctionsRequest listFunctionsRequest) throws AmazonServiceException, AmazonClientException; /** *

* 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. *

* * @param listFunctionsRequest Container for the necessary parameters to * execute the ListFunctions operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * ListFunctions service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 listFunctionsAsync(ListFunctionsRequest listFunctionsRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* Identifies a stream as an event source for an AWS Lambda function. It * can be either an Amazon Kinesis stream or a 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 an AWS Lambda * function is called the event source mapping. You provide the * configuration information (for example, which stream to read from and * which AWS Lambda function to invoke) for the event source mapping in * the request body. *

*

* Each event source, such as a Kinesis stream, can only be associated * with one AWS Lambda function. If you call AddEventSource for an event * source that is already mapped to another AWS Lambda function, the * existing mapping is updated to call the new function instead of the * old one. *

*

* This operation requires permission for the iam:PassRole * action for the IAM role. It also requires permission for the * lambda:AddEventSource action. *

* * @param addEventSourceRequest Container for the necessary parameters to * execute the AddEventSource operation on AWSLambda. * * @return A Java Future object containing the response from the * AddEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 addEventSourceAsync(AddEventSourceRequest addEventSourceRequest) throws AmazonServiceException, AmazonClientException; /** *

* Identifies a stream as an event source for an AWS Lambda function. It * can be either an Amazon Kinesis stream or a 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 an AWS Lambda * function is called the event source mapping. You provide the * configuration information (for example, which stream to read from and * which AWS Lambda function to invoke) for the event source mapping in * the request body. *

*

* Each event source, such as a Kinesis stream, can only be associated * with one AWS Lambda function. If you call AddEventSource for an event * source that is already mapped to another AWS Lambda function, the * existing mapping is updated to call the new function instead of the * old one. *

*

* This operation requires permission for the iam:PassRole * action for the IAM role. It also requires permission for the * lambda:AddEventSource action. *

* * @param addEventSourceRequest Container for the necessary parameters to * execute the AddEventSource operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * AddEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 addEventSourceAsync(AddEventSourceRequest addEventSourceRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* Creates a new Lambda function or updates an existing 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 existing Lambda function is * updated with the new code and metadata. *

*

* This operation requires permission for the * lambda:UploadFunction action. *

* * @param uploadFunctionRequest Container for the necessary parameters to * execute the UploadFunction operation on AWSLambda. * * @return A Java Future object containing the response from the * UploadFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 uploadFunctionAsync(UploadFunctionRequest uploadFunctionRequest) throws AmazonServiceException, AmazonClientException; /** *

* Creates a new Lambda function or updates an existing 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 existing Lambda function is * updated with the new code and metadata. *

*

* This operation requires permission for the * lambda:UploadFunction action. *

* * @param uploadFunctionRequest Container for the necessary parameters to * execute the UploadFunction operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * UploadFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 uploadFunctionAsync(UploadFunctionRequest uploadFunctionRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

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

*

* This operation requires permission for the * lambda:GetFunctionConfiguration operation. *

* * @param getFunctionConfigurationRequest Container for the necessary * parameters to execute the GetFunctionConfiguration operation on * AWSLambda. * * @return A Java Future object containing the response from the * GetFunctionConfiguration service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getFunctionConfigurationAsync(GetFunctionConfigurationRequest getFunctionConfigurationRequest) throws AmazonServiceException, AmazonClientException; /** *

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

*

* This operation requires permission for the * lambda:GetFunctionConfiguration operation. *

* * @param getFunctionConfigurationRequest Container for the necessary * parameters to execute the GetFunctionConfiguration operation on * AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * GetFunctionConfiguration service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getFunctionConfigurationAsync(GetFunctionConfigurationRequest getFunctionConfigurationRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* 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:InvokeAsync action. *

* * @param invokeAsyncRequest Container for the necessary parameters to * execute the InvokeAsync operation on AWSLambda. * * @return A Java Future object containing the response from the * InvokeAsync service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 invokeAsyncAsync(InvokeAsyncRequest invokeAsyncRequest) throws AmazonServiceException, AmazonClientException; /** *

* 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:InvokeAsync action. *

* * @param invokeAsyncRequest Container for the necessary parameters to * execute the InvokeAsync operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * InvokeAsync service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 invokeAsyncAsync(InvokeAsyncRequest invokeAsyncRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* Returns a list of event source mappings you created using the * AddEventSource (see AddEventSource), where you identify a * stream as 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:ListEventSources action. *

* * @param listEventSourcesRequest Container for the necessary parameters * to execute the ListEventSources operation on AWSLambda. * * @return A Java Future object containing the response from the * ListEventSources service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 listEventSourcesAsync(ListEventSourcesRequest listEventSourcesRequest) throws AmazonServiceException, AmazonClientException; /** *

* Returns a list of event source mappings you created using the * AddEventSource (see AddEventSource), where you identify a * stream as 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:ListEventSources action. *

* * @param listEventSourcesRequest Container for the necessary parameters * to execute the ListEventSources operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * ListEventSources service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 listEventSourcesAsync(ListEventSourcesRequest listEventSourcesRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* Returns the configuration information of the Lambda function and a * presigned URL link to the .zip file you uploaded with UploadFunction * 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. *

* * @param getFunctionRequest Container for the necessary parameters to * execute the GetFunction operation on AWSLambda. * * @return A Java Future object containing the response from the * GetFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getFunctionAsync(GetFunctionRequest getFunctionRequest) throws AmazonServiceException, AmazonClientException; /** *

* Returns the configuration information of the Lambda function and a * presigned URL link to the .zip file you uploaded with UploadFunction * 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. *

* * @param getFunctionRequest Container for the necessary parameters to * execute the GetFunction operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * GetFunction service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 getFunctionAsync(GetFunctionRequest getFunctionRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* 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. *

* * @param updateFunctionConfigurationRequest Container for the necessary * parameters to execute the UpdateFunctionConfiguration operation on * AWSLambda. * * @return A Java Future object containing the response from the * UpdateFunctionConfiguration service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 updateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest updateFunctionConfigurationRequest) throws AmazonServiceException, AmazonClientException; /** *

* 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. *

* * @param updateFunctionConfigurationRequest Container for the necessary * parameters to execute the UpdateFunctionConfiguration operation on * AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * UpdateFunctionConfiguration service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 updateFunctionConfigurationAsync(UpdateFunctionConfigurationRequest updateFunctionConfigurationRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; /** *

* 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:RemoveEventSource action. *

* * @param removeEventSourceRequest Container for the necessary parameters * to execute the RemoveEventSource operation on AWSLambda. * * @return A Java Future object containing the response from the * RemoveEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 removeEventSourceAsync(RemoveEventSourceRequest removeEventSourceRequest) throws AmazonServiceException, AmazonClientException; /** *

* 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:RemoveEventSource action. *

* * @param removeEventSourceRequest Container for the necessary parameters * to execute the RemoveEventSource operation on AWSLambda. * @param 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. * * @return A Java Future object containing the response from the * RemoveEventSource service method, as returned by AWSLambda. * * * @throws 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. * @throws 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 removeEventSourceAsync(RemoveEventSourceRequest removeEventSourceRequest, AsyncHandler asyncHandler) throws AmazonServiceException, AmazonClientException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy