public class AWSLambdaClient extends AmazonWebServiceClient implements AWSLambda
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 AWS Lambda exceptions.
|
client, clientConfiguration, endpoint, endpointPrefix, 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.
|
addRequestHandler, addRequestHandler, configSigner, configSigner, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getEndpoint, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setConfiguration, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withTimeOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion, shutdown
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)
If AWS session credentials are passed in, then those credentials will be used to authenticate requests. Otherwise, if AWS long-term credentials are passed in, then session management will be handled automatically by the SDK. Callers are encouraged to use long-term credentials and let the SDK handle starting and renewing sessions.
Automatically managed sessions will be shared among all clients that use
the same credentials and service endpoint. To opt out of this behavior,
explicitly provide an instance of AWSCredentialsProvider
that
returns AWSSessionCredentials
.
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)
If AWS session credentials are passed in, then those credentials will be used to authenticate requests. Otherwise, if AWS long-term credentials are passed in, then session management will be handled automatically by the SDK. Callers are encouraged to use long-term credentials and let the SDK handle starting and renewing sessions.
Automatically managed sessions will be shared among all clients that use
the same credentials and service endpoint. To opt out of this behavior,
explicitly provide an instance of AWSCredentialsProvider
that
returns AWSSessionCredentials
.
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)
If AWS session credentials are passed in, then those credentials will be used to authenticate requests. Otherwise, if AWS long-term credentials are passed in, then session management will be handled automatically by the SDK. Callers are encouraged to use long-term credentials and let the SDK handle starting and renewing sessions.
Automatically managed sessions will be shared among all clients that use
the same credentials and service endpoint. To opt out of this behavior,
explicitly provide an instance of AWSCredentialsProvider
that
returns AWSSessionCredentials
.
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)
If AWS session credentials are passed in, then those credentials will be used to authenticate requests. Otherwise, if AWS long-term credentials are passed in, then session management will be handled automatically by the SDK. Callers are encouraged to use long-term credentials and let the SDK handle starting and renewing sessions.
Automatically managed sessions will be shared among all clients that use
the same credentials and service endpoint. To opt out of this behavior,
explicitly provide an instance of AWSCredentialsProvider
that
returns AWSSessionCredentials
.
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) throws AmazonServiceException, AmazonClientException
Invokes a specific Lambda function. For an example, see Create the Lambda Function and Test It Manually.
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. Invocations occur at least once in response to an event and
functions must be idempotent to handle this. 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
- ServiceException
ResourceNotFoundException
InvalidRequestContentException
RequestTooLargeException
UnsupportedMediaTypeException
TooManyRequestsException
InvalidParameterValueException
EC2UnexpectedException
SubnetIPAddressLimitReachedException
ENILimitReachedException
EC2ThrottledException
EC2AccessDeniedException
InvalidSubnetIDException
InvalidSecurityGroupIDException
InvalidZipFileException
KMSDisabledException
KMSInvalidStateException
KMSAccessDeniedException
KMSNotFoundException
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 AWS
Lambda indicating either a problem with the data in the
request, or a server side issue.@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 © 2017. All rights reserved.