public class AWSLambdaClient extends AmazonWebServiceClient implements AWSLambda
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 Lambda: How it Works in the AWS Lambda Developer Guide .
Modifier and Type | Field and Description |
---|---|
protected List<com.amazonaws.transform.JsonErrorUnmarshaller> |
jsonErrorUnmarshallers
List of exception unmarshallers for all AWSLambda exceptions.
|
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
Constructor and Description |
---|
AWSLambdaClient()
Deprecated.
|
AWSLambdaClient(AWSCredentials awsCredentials)
Constructs a new client to invoke service methods on
AWSLambda using the specified AWS account credentials.
|
AWSLambdaClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSLambda using the specified AWS account credentials
and client configuration options.
|
AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new client to invoke service methods on
AWSLambda using the specified AWS account credentials provider.
|
AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
Constructs a new client to invoke service methods on
AWSLambda using the specified AWS account credentials
provider and client configuration options.
|
AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
HttpClient httpClient)
Constructs a new client to invoke service methods on
AWSLambda using the specified AWS account credentials
provider, client configuration options and request metric collector.
|
AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
Deprecated.
|
AWSLambdaClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Deprecated.
ResponseMetadata cache can hold up to 50 requests and
responses in memory and will cause memory issue. This method
now always returns null.
|
InvokeResult |
invoke(InvokeRequest invokeRequest)
Invokes a specific Lambda function.
|
void |
setEndpoint(String endpoint)
Overrides the default endpoint for this client ("https://lambda.us-east-1.amazonaws.com/").
|
void |
setEndpoint(String endpoint,
String serviceName,
String regionId) |
addRequestHandler, addRequestHandler, configSigner, configSigner, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setConfiguration, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffset
protected List<com.amazonaws.transform.JsonErrorUnmarshaller> jsonErrorUnmarshallers
@Deprecated public AWSLambdaClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AWSLambdaClient(ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this
client connects to AWSLambda
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
public AWSLambdaClient(AWSCredentials awsCredentials)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.public AWSLambdaClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use
when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AWSLambda
(ex: proxy settings, retry counts, etc.).public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AWSLambda
(ex: proxy settings, retry counts, etc.).@Deprecated public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AWSLambda
(ex: proxy settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, HttpClient httpClient)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials
to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this
client connects to AWSLambda
(ex: proxy settings, retry counts, etc.).httpClient
- A http clientpublic InvokeResult invoke(InvokeRequest invokeRequest)
Invokes a specific Lambda function.
If you are using the versioning feature, you can invoke the specific
function version by providing function version or alias name that is
pointing to the function version using the Qualifier
parameter in the request. If you don't provide the
Qualifier
parameter, the $LATEST
version of
the Lambda function is invoked. For information about the versioning
feature, see
AWS Lambda Function Versioning and Aliases
.
This operation requires permission for the
lambda:InvokeFunction
action.
invoke
in interface AWSLambda
invokeRequest
- Container for the necessary parameters to execute
the Invoke service method on AWSLambda.InvalidParameterValueException
EC2AccessDeniedException
ENILimitReachedException
InvalidSecurityGroupIDException
ServiceException
TooManyRequestsException
EC2ThrottledException
SubnetIPAddressLimitReachedException
RequestTooLargeException
UnsupportedMediaTypeException
EC2UnexpectedException
InvalidSubnetIDException
ResourceNotFoundException
InvalidRequestContentException
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.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 void setEndpoint(String endpoint)
AWSLambda
Callers can pass in just the endpoint (ex: "lambda.us-east-1.amazonaws.com/") or a full
URL, including the protocol (ex: "https://lambda.us-east-1.amazonaws.com/"). If the
protocol is not specified here, the default protocol from this client's
ClientConfiguration
will be used, which by default is HTTPS.
For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available endpoints for all AWS services, see: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912
This method is not threadsafe. An endpoint should be configured when the client is created and before any service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit or retrying.
setEndpoint
in interface AWSLambda
setEndpoint
in class AmazonWebServiceClient
endpoint
- The endpoint (ex: "lambda.us-east-1.amazonaws.com/") or a full URL,
including the protocol (ex: "https://lambda.us-east-1.amazonaws.com/") of
the region specific AWS endpoint this client will communicate
with.public void setEndpoint(String endpoint, String serviceName, String regionId) throws IllegalArgumentException
setEndpoint
in class AmazonWebServiceClient
IllegalArgumentException
@Deprecated public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AWSLambda
request
- The originally executed requestCopyright © 2016. All rights reserved.