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

com.amazonaws.services.lambda.AWSLambdaClient 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.778
Show newest version
/*
 * Copyright 2019-2024 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 org.w3c.dom.*;

import java.net.*;
import java.util.*;

import javax.annotation.Generated;

import org.apache.commons.logging.*;

import com.amazonaws.*;
import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.auth.*;

import com.amazonaws.handlers.*;
import com.amazonaws.http.*;
import com.amazonaws.internal.*;
import com.amazonaws.internal.auth.*;
import com.amazonaws.metrics.*;
import com.amazonaws.regions.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.*;
import com.amazonaws.protocol.json.*;
import com.amazonaws.util.AWSRequestMetrics.Field;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.client.AwsSyncClientParams;
import com.amazonaws.client.builder.AdvancedConfig;

import com.amazonaws.services.lambda.AWSLambdaClientBuilder;
import com.amazonaws.services.lambda.waiters.AWSLambdaWaiters;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.lambda.model.*;

import com.amazonaws.services.lambda.model.transform.*;

/**
 * Client for accessing AWS Lambda. All service calls made using this client are blocking, and will not return until the
 * service call completes.
 * 

* Lambda *

* Overview *

*

* Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on * a high-availability compute infrastructure and performs all of the administration of the compute resources, including * server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring and logging. * With Lambda, you can run code for virtually any type of application or backend service. For more information about * the Lambda service, see What is Lambda in the * Lambda Developer Guide. *

*

* The Lambda API Reference provides information about each of the API methods, including details about the * parameters in each API request and response. *

*

*

* You can use Software Development Kits (SDKs), Integrated Development Environment (IDE) Toolkits, and command line * tools to access the API. For installation instructions, see Tools for Amazon * Web Services. *

*

* For a list of Region-specific endpoints that Lambda supports, see Lambda endpoints and quotas in the * Amazon Web Services General Reference.. *

*

* When making the API calls, you will need to authenticate your request by providing a signature. Lambda supports * signature version 4. For more information, see Signature Version 4 signing process * in the Amazon Web Services General Reference.. *

*

* CA certificates *

*

* Because Amazon Web Services SDKs use the CA certificates from your computer, changes to the certificates on the * Amazon Web Services servers can cause connection failures when you attempt to use an SDK. You can prevent these * failures by keeping your computer's CA certificates and operating system up-to-date. If you encounter this issue in a * corporate environment and do not manage your own computer, you might need to ask an administrator to assist with the * update process. The following list shows minimum operating system and Java versions: *

*
    *
  • *

    * Microsoft Windows versions that have updates from January 2005 or later installed contain at least one of the * required CAs in their trust list. *

    *
  • *
  • *

    * Mac OS X 10.4 with Java for Mac OS X 10.4 Release 5 (February 2007), Mac OS X 10.5 (October 2007), and later versions * contain at least one of the required CAs in their trust list. *

    *
  • *
  • *

    * Red Hat Enterprise Linux 5 (March 2007), 6, and 7 and CentOS 5, 6, and 7 all contain at least one of the required CAs * in their default trusted CA list. *

    *
  • *
  • *

    * Java 1.4.2_12 (May 2006), 5 Update 2 (March 2005), and all later versions, including Java 6 (December 2006), 7, and * 8, contain at least one of the required CAs in their default trusted CA list. *

    *
  • *
*

* When accessing the Lambda management console or Lambda API endpoints, whether through browsers or programmatically, * you will need to ensure your client machines support any of the following CAs: *

*
    *
  • *

    * Amazon Root CA 1 *

    *
  • *
  • *

    * Starfield Services Root Certificate Authority - G2 *

    *
  • *
  • *

    * Starfield Class 2 Certification Authority *

    *
  • *
*

* Root certificates from the first two authorities are available from Amazon trust services, but keeping your computer up-to-date is the * more straightforward solution. To learn more about ACM-provided certificates, see Amazon Web Services Certificate Manager FAQs. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSLambdaClient extends AmazonWebServiceClient implements AWSLambda { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSLambda.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "lambda"; private volatile AWSLambdaWaiters waiters; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotReadyException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ResourceNotReadyExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("KMSAccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.KMSAccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EC2ThrottledException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EC2ThrottledExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidZipFileException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidZipFileExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("KMSDisabledException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.KMSDisabledExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SnapStartNotReadyException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.SnapStartNotReadyExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EFSIOException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EFSIOExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidCodeSignatureException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidCodeSignatureExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidRuntimeException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidRuntimeExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EFSMountFailureException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EFSMountFailureExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SnapStartException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.SnapStartExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EC2UnexpectedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EC2UnexpectedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidSecurityGroupIDException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidSecurityGroupIDExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceConflictException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ResourceConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("KMSNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.KMSNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidSubnetIDException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidSubnetIDExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PreconditionFailedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.PreconditionFailedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("UnsupportedMediaTypeException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.UnsupportedMediaTypeExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterValueException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidParameterValueExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ResourceInUseExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EFSMountConnectivityException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EFSMountConnectivityExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EC2AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EC2AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("PolicyLengthExceededException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.PolicyLengthExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ServiceExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SnapStartTimeoutException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.SnapStartTimeoutExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("KMSInvalidStateException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.KMSInvalidStateExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidRequestContentException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.InvalidRequestContentExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("CodeSigningConfigNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.CodeSigningConfigNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ProvisionedConcurrencyConfigNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ProvisionedConcurrencyConfigNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("RecursiveInvocationException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.RecursiveInvocationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("CodeStorageExceededException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.CodeStorageExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ENILimitReachedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.ENILimitReachedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("SubnetIPAddressLimitReachedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.SubnetIPAddressLimitReachedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("CodeVerificationFailedException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.CodeVerificationFailedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("EFSMountTimeoutException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.EFSMountTimeoutExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("RequestTooLargeException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.RequestTooLargeExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TooManyRequestsException").withExceptionUnmarshaller( com.amazonaws.services.lambda.model.transform.TooManyRequestsExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.lambda.model.AWSLambdaException.class)); /** * Constructs a new client to invoke service methods on AWS Lambda. 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. * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSLambdaClientBuilder#defaultClient()} */ @Deprecated public AWSLambdaClient() { this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Lambda. 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. * * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Lambda (ex: proxy settings, * retry counts, etc.). * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSLambdaClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSLambdaClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified AWS account credentials. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @deprecated use {@link AWSLambdaClientBuilder#withCredentials(AWSCredentialsProvider)} for example: * {@code AWSLambdaClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();} */ @Deprecated public AWSLambdaClient(AWSCredentials awsCredentials) { this(awsCredentials, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified AWS account credentials and * client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Lambda (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AWSLambdaClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSLambdaClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSLambdaClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified AWS account credentials * provider. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @deprecated use {@link AWSLambdaClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified AWS account credentials * provider and client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Lambda (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AWSLambdaClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSLambdaClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, null); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified AWS account credentials * provider, client configuration options, and request metric collector. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Lambda (ex: proxy settings, * retry counts, etc.). * @param requestMetricCollector * optional request metric collector * @deprecated use {@link AWSLambdaClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSLambdaClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSLambdaClientBuilder#withMetricsCollector(RequestMetricCollector)} */ @Deprecated public AWSLambdaClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(clientConfiguration, requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; this.advancedConfig = AdvancedConfig.EMPTY; init(); } public static AWSLambdaClientBuilder builder() { return AWSLambdaClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSLambdaClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AWS Lambda using the specified parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSLambdaClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("lambda.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/lambda/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/lambda/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Adds permissions to the resource-based policy of a version of an Lambda layer. Use this action * to grant layer usage permission to other accounts. You can grant permission to a single account, all accounts in * an organization, or all Amazon Web Services accounts. *

*

* To revoke permission, call RemoveLayerVersionPermission with the statement ID that you specified when you * added it. *

* * @param addLayerVersionPermissionRequest * @return Result of the AddLayerVersionPermission operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws PolicyLengthExceededException * The permissions policy for the resource is too large. For more information, see Lambda quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @sample AWSLambda.AddLayerVersionPermission * @see AWS API Documentation */ @Override public AddLayerVersionPermissionResult addLayerVersionPermission(AddLayerVersionPermissionRequest request) { request = beforeClientExecution(request); return executeAddLayerVersionPermission(request); } @SdkInternalApi final AddLayerVersionPermissionResult executeAddLayerVersionPermission(AddLayerVersionPermissionRequest addLayerVersionPermissionRequest) { ExecutionContext executionContext = createExecutionContext(addLayerVersionPermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AddLayerVersionPermissionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(addLayerVersionPermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddLayerVersionPermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddLayerVersionPermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Grants an Amazon Web Service, Amazon Web Services account, or Amazon Web Services organization permission to use * a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single * version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that * version or alias to invoke the function. Note: Lambda does not support adding policies to version $LATEST. *

*

* To grant permission to another account, specify the account ID as the Principal. To grant permission * to an organization defined in Organizations, specify the organization ID as the PrincipalOrgID. For * Amazon Web Services, the principal is a domain-style identifier that the service defines, such as * s3.amazonaws.com or sns.amazonaws.com. For Amazon Web Services, you can also specify * the ARN of the associated resource as the SourceArn. If you grant permission to a service principal * without specifying the source, other accounts could potentially configure resources in their account to invoke * your Lambda function. *

*

* This operation adds a statement to a resource-based permissions policy for the function. For more information * about function policies, see Using resource-based * policies for Lambda. *

* * @param addPermissionRequest * @return Result of the AddPermission operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws PolicyLengthExceededException * The permissions policy for the resource is too large. For more information, see Lambda quotas. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @sample AWSLambda.AddPermission * @see AWS API * Documentation */ @Override public AddPermissionResult addPermission(AddPermissionRequest request) { request = beforeClientExecution(request); return executeAddPermission(request); } @SdkInternalApi final AddPermissionResult executeAddPermission(AddPermissionRequest addPermissionRequest) { ExecutionContext executionContext = createExecutionContext(addPermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AddPermissionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addPermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddPermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddPermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an alias for a * Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke * a different version. *

*

* You can also map an alias to split invocation requests between two versions. Use the RoutingConfig * parameter to specify a second version and the percentage of invocation requests that it receives. *

* * @param createAliasRequest * @return Result of the CreateAlias operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.CreateAlias * @see AWS API * Documentation */ @Override public CreateAliasResult createAlias(CreateAliasRequest request) { request = beforeClientExecution(request); return executeCreateAlias(request); } @SdkInternalApi final CreateAliasResult executeCreateAlias(CreateAliasRequest createAliasRequest) { ExecutionContext executionContext = createExecutionContext(createAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createAliasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a code signing configuration. A code signing configuration * defines a list of allowed signing profiles and defines the code-signing validation policy (action to be taken if * deployment validation checks fail). *

* * @param createCodeSigningConfigRequest * @return Result of the CreateCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.CreateCodeSigningConfig * @see AWS * API Documentation */ @Override public CreateCodeSigningConfigResult createCodeSigningConfig(CreateCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeCreateCodeSigningConfig(request); } @SdkInternalApi final CreateCodeSigningConfigResult executeCreateCodeSigningConfig(CreateCodeSigningConfigRequest createCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(createCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a mapping between an event source and an Lambda function. Lambda reads items from the event source and * invokes the function. *

*

* For details about how to configure different event sources, see the following topics. *

* *

* The following error handling options are available only for stream sources (DynamoDB and Kinesis): *

*
    *
  • *

    * BisectBatchOnFunctionError – If the function returns an error, split the batch in two and retry. *

    *
  • *
  • *

    * DestinationConfig – Send discarded records to an Amazon SQS queue or Amazon SNS topic. *

    *
  • *
  • *

    * MaximumRecordAgeInSeconds – Discard records older than the specified age. The default value is * infinite (-1). When set to infinite (-1), failed records are retried until the record expires *

    *
  • *
  • *

    * MaximumRetryAttempts – Discard records after the specified number of retries. The default value is * infinite (-1). When set to infinite (-1), failed records are retried until the record expires. *

    *
  • *
  • *

    * ParallelizationFactor – Process multiple batches from each shard concurrently. *

    *
  • *
*

* For information about which configuration parameters apply to each event source, see the following topics. *

* * * @param createEventSourceMappingRequest * @return Result of the CreateEventSourceMapping operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.CreateEventSourceMapping * @see AWS API Documentation */ @Override public CreateEventSourceMappingResult createEventSourceMapping(CreateEventSourceMappingRequest request) { request = beforeClientExecution(request); return executeCreateEventSourceMapping(request); } @SdkInternalApi final CreateEventSourceMappingResult executeCreateEventSourceMapping(CreateEventSourceMappingRequest createEventSourceMappingRequest) { ExecutionContext executionContext = createExecutionContext(createEventSourceMappingRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEventSourceMappingRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createEventSourceMappingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEventSourceMapping"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEventSourceMappingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a Lambda function. To create a function, you need a deployment package and an * execution role. The deployment package is a .zip file archive or container image that contains your function * code. The execution role grants the function permission to use Amazon Web Services, such as Amazon CloudWatch * Logs for log streaming and X-Ray for request tracing. *

*

* If the deployment package is a container image, then you set the * package type to Image. For a container image, the code property must include the URI of a container * image in the Amazon ECR registry. You do not need to specify the handler and runtime properties. *

*

* If the deployment package is a .zip * file archive, then you set the package type to Zip. For a .zip file archive, the code property * specifies the location of the .zip file. You must also specify the handler and runtime properties. The code in * the deployment package must be compatible with the target instruction set architecture of the function ( * x86-64 or arm64). If you do not specify the architecture, then the default value is * x86-64. *

*

* When you create a function, Lambda provisions an instance of the function and its supporting resources. If your * function connects to a VPC, this process can take a minute or so. During this time, you can't invoke or modify * the function. The State, StateReason, and StateReasonCode fields in the * response from GetFunctionConfiguration indicate when the function is ready to invoke. For more * information, see Lambda function * states. *

*

* A function has an unpublished version, and can have published versions and aliases. The unpublished version * changes when you update your function's code and configuration. A published version is a snapshot of your * function code and configuration that can't be changed. An alias is a named resource that maps to a version, and * can be changed to map to a different version. Use the Publish parameter to create version * 1 of your function from its initial configuration. *

*

* The other parameters let you configure version-specific and function-level settings. You can modify * version-specific settings later with UpdateFunctionConfiguration. Function-level settings apply to both * the unpublished and published versions of the function, and include tags (TagResource) and per-function * concurrency limits (PutFunctionConcurrency). *

*

* You can use code signing if your deployment package is a .zip file archive. To enable code signing for this * function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with * UpdateFunctionCode, Lambda checks that the code package has a valid signature from a trusted publisher. * The code-signing configuration includes set of signing profiles, which define the trusted publishers for this * function. *

*

* If another Amazon Web Services account or an Amazon Web Service invokes your function, use AddPermission * to grant permission by creating a resource-based Identity and Access Management (IAM) policy. You can grant * permissions at the function level, on a version, or on an alias. *

*

* To invoke your function directly, use Invoke. To invoke your function in response to events in other * Amazon Web Services, create an event source mapping (CreateEventSourceMapping), or configure a function * trigger in the other service. For more information, see Invoking Lambda functions. *

* * @param createFunctionRequest * @return Result of the CreateFunction operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws CodeStorageExceededException * Your Amazon Web Services account has exceeded its maximum total code size. For more information, see Lambda quotas. * @throws CodeVerificationFailedException * The code signature failed one or more of the validation checks for signature mismatch or expiry, and the * code signing policy is set to ENFORCE. Lambda blocks the deployment. * @throws InvalidCodeSignatureException * The code signature failed the integrity check. If the integrity check fails, then Lambda blocks * deployment, even if the code signing policy is set to WARN. * @throws CodeSigningConfigNotFoundException * The specified code signing configuration does not exist. * @sample AWSLambda.CreateFunction * @see AWS API * Documentation */ @Override public CreateFunctionResult createFunction(CreateFunctionRequest request) { request = beforeClientExecution(request); return executeCreateFunction(request); } @SdkInternalApi final CreateFunctionResult executeCreateFunction(CreateFunctionRequest createFunctionRequest) { ExecutionContext executionContext = createExecutionContext(createFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateFunctionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createFunctionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateFunction"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateFunctionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) * endpoint that you can use to invoke your function. *

* * @param createFunctionUrlConfigRequest * @return Result of the CreateFunctionUrlConfig operation returned by the service. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.CreateFunctionUrlConfig * @see AWS * API Documentation */ @Override public CreateFunctionUrlConfigResult createFunctionUrlConfig(CreateFunctionUrlConfigRequest request) { request = beforeClientExecution(request); return executeCreateFunctionUrlConfig(request); } @SdkInternalApi final CreateFunctionUrlConfigResult executeCreateFunctionUrlConfig(CreateFunctionUrlConfigRequest createFunctionUrlConfigRequest) { ExecutionContext executionContext = createExecutionContext(createFunctionUrlConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateFunctionUrlConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createFunctionUrlConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateFunctionUrlConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateFunctionUrlConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a Lambda function alias. *

* * @param deleteAliasRequest * @return Result of the DeleteAlias operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.DeleteAlias * @see AWS API * Documentation */ @Override public DeleteAliasResult deleteAlias(DeleteAliasRequest request) { request = beforeClientExecution(request); return executeDeleteAlias(request); } @SdkInternalApi final DeleteAliasResult executeDeleteAlias(DeleteAliasRequest deleteAliasRequest) { ExecutionContext executionContext = createExecutionContext(deleteAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAliasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the code signing configuration. You can delete the code signing configuration only if no function is * using it. *

* * @param deleteCodeSigningConfigRequest * @return Result of the DeleteCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.DeleteCodeSigningConfig * @see AWS * API Documentation */ @Override public DeleteCodeSigningConfigResult deleteCodeSigningConfig(DeleteCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeDeleteCodeSigningConfig(request); } @SdkInternalApi final DeleteCodeSigningConfigResult executeDeleteCodeSigningConfig(DeleteCodeSigningConfigRequest deleteCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an event source * mapping. You can get the identifier of a mapping from the output of ListEventSourceMappings. *

*

* When you delete an event source mapping, it enters a Deleting state and might not be completely * deleted for several seconds. *

* * @param deleteEventSourceMappingRequest * @return Result of the DeleteEventSourceMapping operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceInUseException * The operation conflicts with the resource's availability. For example, you tried to update an event * source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING. * @sample AWSLambda.DeleteEventSourceMapping * @see AWS API Documentation */ @Override public DeleteEventSourceMappingResult deleteEventSourceMapping(DeleteEventSourceMappingRequest request) { request = beforeClientExecution(request); return executeDeleteEventSourceMapping(request); } @SdkInternalApi final DeleteEventSourceMappingResult executeDeleteEventSourceMapping(DeleteEventSourceMappingRequest deleteEventSourceMappingRequest) { ExecutionContext executionContext = createExecutionContext(deleteEventSourceMappingRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEventSourceMappingRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteEventSourceMappingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEventSourceMapping"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteEventSourceMappingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. * Otherwise, all versions and aliases are deleted. This doesn't require the user to have explicit permissions for * DeleteAlias. *

*

* To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping. For Amazon * Web Services and resources that invoke your function directly, delete the trigger in the service where you * originally configured it. *

* * @param deleteFunctionRequest * @return Result of the DeleteFunction operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.DeleteFunction * @see AWS API * Documentation */ @Override public DeleteFunctionResult deleteFunction(DeleteFunctionRequest request) { request = beforeClientExecution(request); return executeDeleteFunction(request); } @SdkInternalApi final DeleteFunctionResult executeDeleteFunction(DeleteFunctionRequest deleteFunctionRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteFunctionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteFunctionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFunction"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFunctionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes the code signing configuration from the function. *

* * @param deleteFunctionCodeSigningConfigRequest * @return Result of the DeleteFunctionCodeSigningConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws CodeSigningConfigNotFoundException * The specified code signing configuration does not exist. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.DeleteFunctionCodeSigningConfig * @see AWS API Documentation */ @Override public DeleteFunctionCodeSigningConfigResult deleteFunctionCodeSigningConfig(DeleteFunctionCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeDeleteFunctionCodeSigningConfig(request); } @SdkInternalApi final DeleteFunctionCodeSigningConfigResult executeDeleteFunctionCodeSigningConfig( DeleteFunctionCodeSigningConfigRequest deleteFunctionCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteFunctionCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteFunctionCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFunctionCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFunctionCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a concurrent execution limit from a function. *

* * @param deleteFunctionConcurrencyRequest * @return Result of the DeleteFunctionConcurrency operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.DeleteFunctionConcurrency * @see AWS API Documentation */ @Override public DeleteFunctionConcurrencyResult deleteFunctionConcurrency(DeleteFunctionConcurrencyRequest request) { request = beforeClientExecution(request); return executeDeleteFunctionConcurrency(request); } @SdkInternalApi final DeleteFunctionConcurrencyResult executeDeleteFunctionConcurrency(DeleteFunctionConcurrencyRequest deleteFunctionConcurrencyRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionConcurrencyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteFunctionConcurrencyRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteFunctionConcurrencyRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFunctionConcurrency"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFunctionConcurrencyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the configuration for asynchronous invocation for a function, version, or alias. *

*

* To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. *

* * @param deleteFunctionEventInvokeConfigRequest * @return Result of the DeleteFunctionEventInvokeConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.DeleteFunctionEventInvokeConfig * @see AWS API Documentation */ @Override public DeleteFunctionEventInvokeConfigResult deleteFunctionEventInvokeConfig(DeleteFunctionEventInvokeConfigRequest request) { request = beforeClientExecution(request); return executeDeleteFunctionEventInvokeConfig(request); } @SdkInternalApi final DeleteFunctionEventInvokeConfigResult executeDeleteFunctionEventInvokeConfig( DeleteFunctionEventInvokeConfigRequest deleteFunctionEventInvokeConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionEventInvokeConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteFunctionEventInvokeConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteFunctionEventInvokeConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFunctionEventInvokeConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFunctionEventInvokeConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL * results in a different URL address. *

* * @param deleteFunctionUrlConfigRequest * @return Result of the DeleteFunctionUrlConfig operation returned by the service. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.DeleteFunctionUrlConfig * @see AWS * API Documentation */ @Override public DeleteFunctionUrlConfigResult deleteFunctionUrlConfig(DeleteFunctionUrlConfigRequest request) { request = beforeClientExecution(request); return executeDeleteFunctionUrlConfig(request); } @SdkInternalApi final DeleteFunctionUrlConfigResult executeDeleteFunctionUrlConfig(DeleteFunctionUrlConfigRequest deleteFunctionUrlConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteFunctionUrlConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteFunctionUrlConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteFunctionUrlConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteFunctionUrlConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteFunctionUrlConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a version of an Lambda * layer. Deleted versions can no longer be viewed or added to functions. To avoid breaking functions, a copy of * the version remains in Lambda until no functions refer to it. *

* * @param deleteLayerVersionRequest * @return Result of the DeleteLayerVersion operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.DeleteLayerVersion * @see AWS API * Documentation */ @Override public DeleteLayerVersionResult deleteLayerVersion(DeleteLayerVersionRequest request) { request = beforeClientExecution(request); return executeDeleteLayerVersion(request); } @SdkInternalApi final DeleteLayerVersionResult executeDeleteLayerVersion(DeleteLayerVersionRequest deleteLayerVersionRequest) { ExecutionContext executionContext = createExecutionContext(deleteLayerVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteLayerVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteLayerVersionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteLayerVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteLayerVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes the provisioned concurrency configuration for a function. *

* * @param deleteProvisionedConcurrencyConfigRequest * @return Result of the DeleteProvisionedConcurrencyConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.DeleteProvisionedConcurrencyConfig * @see AWS API Documentation */ @Override public DeleteProvisionedConcurrencyConfigResult deleteProvisionedConcurrencyConfig(DeleteProvisionedConcurrencyConfigRequest request) { request = beforeClientExecution(request); return executeDeleteProvisionedConcurrencyConfig(request); } @SdkInternalApi final DeleteProvisionedConcurrencyConfigResult executeDeleteProvisionedConcurrencyConfig( DeleteProvisionedConcurrencyConfigRequest deleteProvisionedConcurrencyConfigRequest) { ExecutionContext executionContext = createExecutionContext(deleteProvisionedConcurrencyConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteProvisionedConcurrencyConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteProvisionedConcurrencyConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteProvisionedConcurrencyConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteProvisionedConcurrencyConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves details about your account's limits and usage in an Amazon Web Services * Region. *

* * @param getAccountSettingsRequest * @return Result of the GetAccountSettings operation returned by the service. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.GetAccountSettings * @see AWS API * Documentation */ @Override public GetAccountSettingsResult getAccountSettings(GetAccountSettingsRequest request) { request = beforeClientExecution(request); return executeGetAccountSettings(request); } @SdkInternalApi final GetAccountSettingsResult executeGetAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest) { ExecutionContext executionContext = createExecutionContext(getAccountSettingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAccountSettingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAccountSettingsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAccountSettings"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAccountSettingsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns details about a Lambda function alias. *

* * @param getAliasRequest * @return Result of the GetAlias operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetAlias * @see AWS API * Documentation */ @Override public GetAliasResult getAlias(GetAliasRequest request) { request = beforeClientExecution(request); return executeGetAlias(request); } @SdkInternalApi final GetAliasResult executeGetAlias(GetAliasRequest getAliasRequest) { ExecutionContext executionContext = createExecutionContext(getAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAliasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about the specified code signing configuration. *

* * @param getCodeSigningConfigRequest * @return Result of the GetCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.GetCodeSigningConfig * @see AWS * API Documentation */ @Override public GetCodeSigningConfigResult getCodeSigningConfig(GetCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeGetCodeSigningConfig(request); } @SdkInternalApi final GetCodeSigningConfigResult executeGetCodeSigningConfig(GetCodeSigningConfigRequest getCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(getCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns details about an event source mapping. You can get the identifier of a mapping from the output of * ListEventSourceMappings. *

* * @param getEventSourceMappingRequest * @return Result of the GetEventSourceMapping operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetEventSourceMapping * @see AWS * API Documentation */ @Override public GetEventSourceMappingResult getEventSourceMapping(GetEventSourceMappingRequest request) { request = beforeClientExecution(request); return executeGetEventSourceMapping(request); } @SdkInternalApi final GetEventSourceMappingResult executeGetEventSourceMapping(GetEventSourceMappingRequest getEventSourceMappingRequest) { ExecutionContext executionContext = createExecutionContext(getEventSourceMappingRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEventSourceMappingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getEventSourceMappingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetEventSourceMapping"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetEventSourceMappingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about the function or function version, with a link to download the deployment package that's * valid for 10 minutes. If you specify a function version, only details that are specific to that version are * returned. *

* * @param getFunctionRequest * @return Result of the GetFunction operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.GetFunction * @see AWS API * Documentation */ @Override public GetFunctionResult getFunction(GetFunctionRequest request) { request = beforeClientExecution(request); return executeGetFunction(request); } @SdkInternalApi final GetFunctionResult executeGetFunction(GetFunctionRequest getFunctionRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getFunctionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunction"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the code signing configuration for the specified function. *

* * @param getFunctionCodeSigningConfigRequest * @return Result of the GetFunctionCodeSigningConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetFunctionCodeSigningConfig * @see AWS API Documentation */ @Override public GetFunctionCodeSigningConfigResult getFunctionCodeSigningConfig(GetFunctionCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeGetFunctionCodeSigningConfig(request); } @SdkInternalApi final GetFunctionCodeSigningConfigResult executeGetFunctionCodeSigningConfig(GetFunctionCodeSigningConfigRequest getFunctionCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getFunctionCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunctionCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a * function, use PutFunctionConcurrency. *

* * @param getFunctionConcurrencyRequest * @return Result of the GetFunctionConcurrency operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.GetFunctionConcurrency * @see AWS * API Documentation */ @Override public GetFunctionConcurrencyResult getFunctionConcurrency(GetFunctionConcurrencyRequest request) { request = beforeClientExecution(request); return executeGetFunctionConcurrency(request); } @SdkInternalApi final GetFunctionConcurrencyResult executeGetFunctionConcurrency(GetFunctionConcurrencyRequest getFunctionConcurrencyRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionConcurrencyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionConcurrencyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getFunctionConcurrencyRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunctionConcurrency"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionConcurrencyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the version-specific settings of a Lambda function or version. The output includes only options that can * vary between versions of a function. To modify these settings, use UpdateFunctionConfiguration. *

*

* To get all of a function's details, including function-level settings, use GetFunction. *

* * @param getFunctionConfigurationRequest * @return Result of the GetFunctionConfiguration operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.GetFunctionConfiguration * @see AWS API Documentation */ @Override public GetFunctionConfigurationResult getFunctionConfiguration(GetFunctionConfigurationRequest request) { request = beforeClientExecution(request); return executeGetFunctionConfiguration(request); } @SdkInternalApi final GetFunctionConfigurationResult executeGetFunctionConfiguration(GetFunctionConfigurationRequest getFunctionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getFunctionConfigurationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunctionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the configuration for asynchronous invocation for a function, version, or alias. *

*

* To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. *

* * @param getFunctionEventInvokeConfigRequest * @return Result of the GetFunctionEventInvokeConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetFunctionEventInvokeConfig * @see AWS API Documentation */ @Override public GetFunctionEventInvokeConfigResult getFunctionEventInvokeConfig(GetFunctionEventInvokeConfigRequest request) { request = beforeClientExecution(request); return executeGetFunctionEventInvokeConfig(request); } @SdkInternalApi final GetFunctionEventInvokeConfigResult executeGetFunctionEventInvokeConfig(GetFunctionEventInvokeConfigRequest getFunctionEventInvokeConfigRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionEventInvokeConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionEventInvokeConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getFunctionEventInvokeConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunctionEventInvokeConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionEventInvokeConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns details about a Lambda function URL. *

* * @param getFunctionUrlConfigRequest * @return Result of the GetFunctionUrlConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetFunctionUrlConfig * @see AWS * API Documentation */ @Override public GetFunctionUrlConfigResult getFunctionUrlConfig(GetFunctionUrlConfigRequest request) { request = beforeClientExecution(request); return executeGetFunctionUrlConfig(request); } @SdkInternalApi final GetFunctionUrlConfigResult executeGetFunctionUrlConfig(GetFunctionUrlConfigRequest getFunctionUrlConfigRequest) { ExecutionContext executionContext = createExecutionContext(getFunctionUrlConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetFunctionUrlConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getFunctionUrlConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetFunctionUrlConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetFunctionUrlConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about a version of an Lambda layer, with a link to * download the layer archive that's valid for 10 minutes. *

* * @param getLayerVersionRequest * @return Result of the GetLayerVersion operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.GetLayerVersion * @see AWS API * Documentation */ @Override public GetLayerVersionResult getLayerVersion(GetLayerVersionRequest request) { request = beforeClientExecution(request); return executeGetLayerVersion(request); } @SdkInternalApi final GetLayerVersionResult executeGetLayerVersion(GetLayerVersionRequest getLayerVersionRequest) { ExecutionContext executionContext = createExecutionContext(getLayerVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLayerVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLayerVersionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLayerVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLayerVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns information about a version of an Lambda layer, with a link to * download the layer archive that's valid for 10 minutes. *

* * @param getLayerVersionByArnRequest * @return Result of the GetLayerVersionByArn operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.GetLayerVersionByArn * @see AWS * API Documentation */ @Override public GetLayerVersionByArnResult getLayerVersionByArn(GetLayerVersionByArnRequest request) { request = beforeClientExecution(request); return executeGetLayerVersionByArn(request); } @SdkInternalApi final GetLayerVersionByArnResult executeGetLayerVersionByArn(GetLayerVersionByArnRequest getLayerVersionByArnRequest) { ExecutionContext executionContext = createExecutionContext(getLayerVersionByArnRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLayerVersionByArnRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLayerVersionByArnRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLayerVersionByArn"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLayerVersionByArnResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the permission policy for a version of an Lambda layer. For more * information, see AddLayerVersionPermission. *

* * @param getLayerVersionPolicyRequest * @return Result of the GetLayerVersionPolicy operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.GetLayerVersionPolicy * @see AWS * API Documentation */ @Override public GetLayerVersionPolicyResult getLayerVersionPolicy(GetLayerVersionPolicyRequest request) { request = beforeClientExecution(request); return executeGetLayerVersionPolicy(request); } @SdkInternalApi final GetLayerVersionPolicyResult executeGetLayerVersionPolicy(GetLayerVersionPolicyRequest getLayerVersionPolicyRequest) { ExecutionContext executionContext = createExecutionContext(getLayerVersionPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLayerVersionPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLayerVersionPolicyRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLayerVersionPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLayerVersionPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the resource-based IAM * policy for a function, version, or alias. *

* * @param getPolicyRequest * @return Result of the GetPolicy operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.GetPolicy * @see AWS API * Documentation */ @Override public GetPolicyResult getPolicy(GetPolicyRequest request) { request = beforeClientExecution(request); return executeGetPolicy(request); } @SdkInternalApi final GetPolicyResult executeGetPolicy(GetPolicyRequest getPolicyRequest) { ExecutionContext executionContext = createExecutionContext(getPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getPolicyRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the provisioned concurrency configuration for a function's alias or version. *

* * @param getProvisionedConcurrencyConfigRequest * @return Result of the GetProvisionedConcurrencyConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ProvisionedConcurrencyConfigNotFoundException * The specified configuration does not exist. * @sample AWSLambda.GetProvisionedConcurrencyConfig * @see AWS API Documentation */ @Override public GetProvisionedConcurrencyConfigResult getProvisionedConcurrencyConfig(GetProvisionedConcurrencyConfigRequest request) { request = beforeClientExecution(request); return executeGetProvisionedConcurrencyConfig(request); } @SdkInternalApi final GetProvisionedConcurrencyConfigResult executeGetProvisionedConcurrencyConfig( GetProvisionedConcurrencyConfigRequest getProvisionedConcurrencyConfigRequest) { ExecutionContext executionContext = createExecutionContext(getProvisionedConcurrencyConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetProvisionedConcurrencyConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getProvisionedConcurrencyConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetProvisionedConcurrencyConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetProvisionedConcurrencyConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the runtime management configuration for a function's version. If the runtime update mode is * Manual, this includes the ARN of the runtime version and the runtime update mode. If the runtime update * mode is Auto or Function update, this includes the runtime update mode and null is * returned for the ARN. For more information, see Runtime updates. *

* * @param getRuntimeManagementConfigRequest * @return Result of the GetRuntimeManagementConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.GetRuntimeManagementConfig * @see AWS API Documentation */ @Override public GetRuntimeManagementConfigResult getRuntimeManagementConfig(GetRuntimeManagementConfigRequest request) { request = beforeClientExecution(request); return executeGetRuntimeManagementConfig(request); } @SdkInternalApi final GetRuntimeManagementConfigResult executeGetRuntimeManagementConfig(GetRuntimeManagementConfigRequest getRuntimeManagementConfigRequest) { ExecutionContext executionContext = createExecutionContext(getRuntimeManagementConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetRuntimeManagementConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getRuntimeManagementConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRuntimeManagementConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRuntimeManagementConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Invokes a Lambda function. You can invoke a function synchronously (and wait for the response), or * asynchronously. By default, Lambda invokes your function synchronously (i.e. theInvocationType is * RequestResponse). To invoke a function asynchronously, set InvocationType to * Event. Lambda passes the ClientContext object to your function for synchronous * invocations only. *

*

* For synchronous invocation, * details about the function response, including errors, are included in the response body and headers. For either * invocation type, you can find more information in the execution log and trace. *

*

* When an error occurs, your function may be invoked multiple times. Retry behavior varies by error type, client, * event source, and invocation type. For example, if you invoke a function asynchronously and it returns an error, * Lambda executes the function up to two more times. For more information, see Error handling and automatic retries * in Lambda. *

*

* For asynchronous invocation, * Lambda adds events to a queue before sending them to your function. If your function does not have enough * capacity to keep up with the queue, events may be lost. Occasionally, your function may receive the same event * multiple times, even if no error occurs. To retain events that were not processed, configure your function with a * dead-letter * queue. *

*

* The status code in the API response doesn't reflect function errors. Error codes are reserved for errors that * prevent your function from executing, such as permissions errors, quota errors, or issues with * your function's code and configuration. For example, Lambda returns TooManyRequestsException if * running the function would cause you to exceed a concurrency limit at either the account level ( * ConcurrentInvocationLimitExceeded) or function level ( * ReservedFunctionConcurrentInvocationLimitExceeded). *

*

* For functions with a long timeout, your client might disconnect during synchronous invocation while it waits for * a response. Configure your HTTP client, SDK, firewall, proxy, or operating system to allow for long connections * with timeout or keep-alive settings. *

*

* This operation requires permission for the lambda:InvokeFunction action. For * details on how to set up permissions for cross-account invocations, see Granting function access to other accounts. *

* * @param invokeRequest * @return Result of the Invoke operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidRequestContentException * The request body could not be parsed as JSON. * @throws RequestTooLargeException * The request payload exceeded the Invoke request body JSON input quota. For more information, * see Lambda quotas. * @throws UnsupportedMediaTypeException * The content type of the Invoke request body is not JSON. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws EC2UnexpectedException * Lambda received an unexpected Amazon EC2 client exception while setting up for the Lambda function. * @throws SubnetIPAddressLimitReachedException * Lambda couldn't set up VPC access for the Lambda function because one or more configured subnets has no * available IP addresses. * @throws ENILimitReachedException * Lambda couldn't create an elastic network interface in the VPC, specified as part of Lambda function * configuration, because the limit for network interfaces has been reached. For more information, see Lambda quotas. * @throws EFSMountConnectivityException * The Lambda function couldn't make a network connection to the configured file system. * @throws EFSMountFailureException * The Lambda function couldn't mount the configured file system due to a permission or configuration issue. * @throws EFSMountTimeoutException * The Lambda function made a network connection to the configured file system, but the mount operation * timed out. * @throws EFSIOException * An error occurred when reading from or writing to a connected file system. * @throws SnapStartException * The afterRestore() runtime hook * encountered an error. For more information, check the Amazon CloudWatch logs. * @throws SnapStartTimeoutException * Lambda couldn't restore the snapshot within the timeout limit. * @throws SnapStartNotReadyException * Lambda is initializing your function. You can invoke the function when the function state becomes * Active. * @throws EC2ThrottledException * Amazon EC2 throttled Lambda during Lambda function initialization using the execution role provided for * the function. * @throws EC2AccessDeniedException * Need additional permissions to configure VPC settings. * @throws InvalidSubnetIDException * The subnet ID provided in the Lambda function VPC configuration is not valid. * @throws InvalidSecurityGroupIDException * The security group ID provided in the Lambda function VPC configuration is not valid. * @throws InvalidZipFileException * Lambda could not unzip the deployment package. * @throws KMSDisabledException * Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda * function's KMS key settings. * @throws KMSInvalidStateException * Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for * Decrypt. Check the function's KMS key settings. * @throws KMSAccessDeniedException * Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda * function's KMS permissions. * @throws KMSNotFoundException * Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's * KMS key settings. * @throws InvalidRuntimeException * The runtime or runtime version specified is not supported. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceNotReadyException * The function is inactive and its VPC connection is no longer available. Wait for the VPC connection to * reestablish and try again. * @throws RecursiveInvocationException * Lambda has detected your function being invoked in a recursive loop with other Amazon Web Services * resources and stopped your function's invocation. * @sample AWSLambda.Invoke * @see AWS API * Documentation */ @Override public InvokeResult invoke(InvokeRequest request) { request = beforeClientExecution(request); return executeInvoke(request); } @SdkInternalApi final InvokeResult executeInvoke(InvokeRequest invokeRequest) { ExecutionContext executionContext = createExecutionContext(invokeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new InvokeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(invokeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "Invoke"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(false).withHasStreamingSuccessResponse(false), new InvokeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * *

* For asynchronous function invocation, use Invoke. *

*
*

* Invokes a function asynchronously. *

* *

* If you do use the InvokeAsync action, note that it doesn't support the use of X-Ray active tracing. Trace ID is * not propagated to the function, even if X-Ray active tracing is turned on. *

*
* * @param invokeAsyncRequest * @return Result of the InvokeAsync operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidRequestContentException * The request body could not be parsed as JSON. * @throws InvalidRuntimeException * The runtime or runtime version specified is not supported. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.InvokeAsync * @see AWS API * Documentation */ @Override @Deprecated public InvokeAsyncResult invokeAsync(InvokeAsyncRequest request) { request = beforeClientExecution(request); return executeInvokeAsync(request); } @SdkInternalApi final InvokeAsyncResult executeInvokeAsync(InvokeAsyncRequest invokeAsyncRequest) { ExecutionContext executionContext = createExecutionContext(invokeAsyncRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new InvokeAsyncRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(invokeAsyncRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "InvokeAsync"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); request.addHandlerContext(HandlerContextKey.HAS_STREAMING_INPUT, Boolean.TRUE); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new InvokeAsyncResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of aliases * for a Lambda function. *

* * @param listAliasesRequest * @return Result of the ListAliases operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListAliases * @see AWS API * Documentation */ @Override public ListAliasesResult listAliases(ListAliasesRequest request) { request = beforeClientExecution(request); return executeListAliases(request); } @SdkInternalApi final ListAliasesResult executeListAliases(ListAliasesRequest listAliasesRequest) { ExecutionContext executionContext = createExecutionContext(listAliasesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListAliasesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAliasesRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAliases"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAliasesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of code * signing configurations. A request returns up to 10,000 configurations per call. You can use the * MaxItems parameter to return fewer configurations per call. *

* * @param listCodeSigningConfigsRequest * @return Result of the ListCodeSigningConfigs operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.ListCodeSigningConfigs * @see AWS * API Documentation */ @Override public ListCodeSigningConfigsResult listCodeSigningConfigs(ListCodeSigningConfigsRequest request) { request = beforeClientExecution(request); return executeListCodeSigningConfigs(request); } @SdkInternalApi final ListCodeSigningConfigsResult executeListCodeSigningConfigs(ListCodeSigningConfigsRequest listCodeSigningConfigsRequest) { ExecutionContext executionContext = createExecutionContext(listCodeSigningConfigsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListCodeSigningConfigsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listCodeSigningConfigsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCodeSigningConfigs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListCodeSigningConfigsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists event source mappings. Specify an EventSourceArn to show only event source mappings for a * single event source. *

* * @param listEventSourceMappingsRequest * @return Result of the ListEventSourceMappings operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListEventSourceMappings * @see AWS * API Documentation */ @Override public ListEventSourceMappingsResult listEventSourceMappings(ListEventSourceMappingsRequest request) { request = beforeClientExecution(request); return executeListEventSourceMappings(request); } @SdkInternalApi final ListEventSourceMappingsResult executeListEventSourceMappings(ListEventSourceMappingsRequest listEventSourceMappingsRequest) { ExecutionContext executionContext = createExecutionContext(listEventSourceMappingsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEventSourceMappingsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listEventSourceMappingsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEventSourceMappings"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEventSourceMappingsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } @Override public ListEventSourceMappingsResult listEventSourceMappings() { return listEventSourceMappings(new ListEventSourceMappingsRequest()); } /** *

* Retrieves a list of configurations for asynchronous invocation for a function. *

*

* To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. *

* * @param listFunctionEventInvokeConfigsRequest * @return Result of the ListFunctionEventInvokeConfigs operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.ListFunctionEventInvokeConfigs * @see AWS API Documentation */ @Override public ListFunctionEventInvokeConfigsResult listFunctionEventInvokeConfigs(ListFunctionEventInvokeConfigsRequest request) { request = beforeClientExecution(request); return executeListFunctionEventInvokeConfigs(request); } @SdkInternalApi final ListFunctionEventInvokeConfigsResult executeListFunctionEventInvokeConfigs(ListFunctionEventInvokeConfigsRequest listFunctionEventInvokeConfigsRequest) { ExecutionContext executionContext = createExecutionContext(listFunctionEventInvokeConfigsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListFunctionEventInvokeConfigsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listFunctionEventInvokeConfigsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFunctionEventInvokeConfigs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFunctionEventInvokeConfigsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of Lambda function URLs for the specified function. *

* * @param listFunctionUrlConfigsRequest * @return Result of the ListFunctionUrlConfigs operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListFunctionUrlConfigs * @see AWS * API Documentation */ @Override public ListFunctionUrlConfigsResult listFunctionUrlConfigs(ListFunctionUrlConfigsRequest request) { request = beforeClientExecution(request); return executeListFunctionUrlConfigs(request); } @SdkInternalApi final ListFunctionUrlConfigsResult executeListFunctionUrlConfigs(ListFunctionUrlConfigsRequest listFunctionUrlConfigsRequest) { ExecutionContext executionContext = createExecutionContext(listFunctionUrlConfigsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListFunctionUrlConfigsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFunctionUrlConfigsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFunctionUrlConfigs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFunctionUrlConfigsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 * functions per call. *

*

* Set FunctionVersion to ALL to include all published versions of each function in * addition to the unpublished version. *

* *

* The ListFunctions operation returns a subset of the FunctionConfiguration fields. To get the * additional fields (State, StateReasonCode, StateReason, LastUpdateStatus, LastUpdateStatusReason, * LastUpdateStatusReasonCode, RuntimeVersionConfig) for a function or version, use GetFunction. *

*
* * @param listFunctionsRequest * @return Result of the ListFunctions operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @sample AWSLambda.ListFunctions * @see AWS API * Documentation */ @Override public ListFunctionsResult listFunctions(ListFunctionsRequest request) { request = beforeClientExecution(request); return executeListFunctions(request); } @SdkInternalApi final ListFunctionsResult executeListFunctions(ListFunctionsRequest listFunctionsRequest) { ExecutionContext executionContext = createExecutionContext(listFunctionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListFunctionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listFunctionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFunctions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFunctionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } @Override public ListFunctionsResult listFunctions() { return listFunctions(new ListFunctionsRequest()); } /** *

* List the functions that use the specified code signing configuration. You can use this method prior to deleting a * code signing configuration, to verify that no functions are using it. *

* * @param listFunctionsByCodeSigningConfigRequest * @return Result of the ListFunctionsByCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.ListFunctionsByCodeSigningConfig * @see AWS API Documentation */ @Override public ListFunctionsByCodeSigningConfigResult listFunctionsByCodeSigningConfig(ListFunctionsByCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeListFunctionsByCodeSigningConfig(request); } @SdkInternalApi final ListFunctionsByCodeSigningConfigResult executeListFunctionsByCodeSigningConfig( ListFunctionsByCodeSigningConfigRequest listFunctionsByCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(listFunctionsByCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListFunctionsByCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listFunctionsByCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFunctionsByCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListFunctionsByCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the versions of an Lambda * layer. Versions that have been deleted aren't listed. Specify a runtime identifier to list only * versions that indicate that they're compatible with that runtime. Specify a compatible architecture to include * only layer versions that are compatible with that architecture. *

* * @param listLayerVersionsRequest * @return Result of the ListLayerVersions operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListLayerVersions * @see AWS API * Documentation */ @Override public ListLayerVersionsResult listLayerVersions(ListLayerVersionsRequest request) { request = beforeClientExecution(request); return executeListLayerVersions(request); } @SdkInternalApi final ListLayerVersionsResult executeListLayerVersions(ListLayerVersionsRequest listLayerVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listLayerVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListLayerVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLayerVersionsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLayerVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLayerVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists Lambda layers and shows * information about the latest version of each. Specify a runtime identifier to list only * layers that indicate that they're compatible with that runtime. Specify a compatible architecture to include only * layers that are compatible with that instruction set architecture. *

* * @param listLayersRequest * @return Result of the ListLayers operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListLayers * @see AWS API * Documentation */ @Override public ListLayersResult listLayers(ListLayersRequest request) { request = beforeClientExecution(request); return executeListLayers(request); } @SdkInternalApi final ListLayersResult executeListLayers(ListLayersRequest listLayersRequest) { ExecutionContext executionContext = createExecutionContext(listLayersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListLayersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLayersRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLayers"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLayersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a list of provisioned concurrency configurations for a function. *

* * @param listProvisionedConcurrencyConfigsRequest * @return Result of the ListProvisionedConcurrencyConfigs operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.ListProvisionedConcurrencyConfigs * @see AWS API Documentation */ @Override public ListProvisionedConcurrencyConfigsResult listProvisionedConcurrencyConfigs(ListProvisionedConcurrencyConfigsRequest request) { request = beforeClientExecution(request); return executeListProvisionedConcurrencyConfigs(request); } @SdkInternalApi final ListProvisionedConcurrencyConfigsResult executeListProvisionedConcurrencyConfigs( ListProvisionedConcurrencyConfigsRequest listProvisionedConcurrencyConfigsRequest) { ExecutionContext executionContext = createExecutionContext(listProvisionedConcurrencyConfigsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListProvisionedConcurrencyConfigsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listProvisionedConcurrencyConfigsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListProvisionedConcurrencyConfigs"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListProvisionedConcurrencyConfigsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a function's tags. You can also * view tags with GetFunction. *

* * @param listTagsRequest * @return Result of the ListTags operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListTags * @see AWS API * Documentation */ @Override public ListTagsResult listTags(ListTagsRequest request) { request = beforeClientExecution(request); return executeListTags(request); } @SdkInternalApi final ListTagsResult executeListTags(ListTagsRequest listTagsRequest) { ExecutionContext executionContext = createExecutionContext(listTagsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTags"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of versions, * with the version-specific configuration of each. Lambda returns up to 50 versions per call. *

* * @param listVersionsByFunctionRequest * @return Result of the ListVersionsByFunction operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.ListVersionsByFunction * @see AWS * API Documentation */ @Override public ListVersionsByFunctionResult listVersionsByFunction(ListVersionsByFunctionRequest request) { request = beforeClientExecution(request); return executeListVersionsByFunction(request); } @SdkInternalApi final ListVersionsByFunctionResult executeListVersionsByFunction(ListVersionsByFunctionRequest listVersionsByFunctionRequest) { ExecutionContext executionContext = createExecutionContext(listVersionsByFunctionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListVersionsByFunctionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listVersionsByFunctionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListVersionsByFunction"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListVersionsByFunctionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an Lambda layer from * a ZIP archive. Each time you call PublishLayerVersion with the same layer name, a new version is * created. *

*

* Add layers to your function with CreateFunction or UpdateFunctionConfiguration. *

* * @param publishLayerVersionRequest * @return Result of the PublishLayerVersion operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws CodeStorageExceededException * Your Amazon Web Services account has exceeded its maximum total code size. For more information, see Lambda quotas. * @sample AWSLambda.PublishLayerVersion * @see AWS API * Documentation */ @Override public PublishLayerVersionResult publishLayerVersion(PublishLayerVersionRequest request) { request = beforeClientExecution(request); return executePublishLayerVersion(request); } @SdkInternalApi final PublishLayerVersionResult executePublishLayerVersion(PublishLayerVersionRequest publishLayerVersionRequest) { ExecutionContext executionContext = createExecutionContext(publishLayerVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PublishLayerVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(publishLayerVersionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PublishLayerVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PublishLayerVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a version from the * current code and configuration of a function. Use versions to create a snapshot of your function code and * configuration that doesn't change. *

*

* Lambda doesn't publish a version if the function's configuration and code haven't changed since the last version. * Use UpdateFunctionCode or UpdateFunctionConfiguration to update the function before publishing a * version. *

*

* Clients can invoke versions directly or with an alias. To create an alias, use CreateAlias. *

* * @param publishVersionRequest * @return Result of the PublishVersion operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws CodeStorageExceededException * Your Amazon Web Services account has exceeded its maximum total code size. For more information, see Lambda quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.PublishVersion * @see AWS API * Documentation */ @Override public PublishVersionResult publishVersion(PublishVersionRequest request) { request = beforeClientExecution(request); return executePublishVersion(request); } @SdkInternalApi final PublishVersionResult executePublishVersion(PublishVersionRequest publishVersionRequest) { ExecutionContext executionContext = createExecutionContext(publishVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PublishVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(publishVersionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PublishVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PublishVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update the code signing configuration for the function. Changes to the code signing configuration take effect the * next time a user tries to deploy a code package to the function. *

* * @param putFunctionCodeSigningConfigRequest * @return Result of the PutFunctionCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws CodeSigningConfigNotFoundException * The specified code signing configuration does not exist. * @sample AWSLambda.PutFunctionCodeSigningConfig * @see AWS API Documentation */ @Override public PutFunctionCodeSigningConfigResult putFunctionCodeSigningConfig(PutFunctionCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executePutFunctionCodeSigningConfig(request); } @SdkInternalApi final PutFunctionCodeSigningConfigResult executePutFunctionCodeSigningConfig(PutFunctionCodeSigningConfigRequest putFunctionCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(putFunctionCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutFunctionCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putFunctionCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutFunctionCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutFunctionCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency * level. *

*

* Concurrency settings apply to the function as a whole, including all published versions and the unpublished * version. Reserving concurrency both ensures that your function has capacity to process the specified number of * events simultaneously, and prevents it from scaling beyond that level. Use GetFunction to see the current * setting for a function. *

*

* Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as many * functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that * aren't configured with a per-function limit. For more information, see Lambda function scaling. *

* * @param putFunctionConcurrencyRequest * @return Result of the PutFunctionConcurrency operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.PutFunctionConcurrency * @see AWS * API Documentation */ @Override public PutFunctionConcurrencyResult putFunctionConcurrency(PutFunctionConcurrencyRequest request) { request = beforeClientExecution(request); return executePutFunctionConcurrency(request); } @SdkInternalApi final PutFunctionConcurrencyResult executePutFunctionConcurrency(PutFunctionConcurrencyRequest putFunctionConcurrencyRequest) { ExecutionContext executionContext = createExecutionContext(putFunctionConcurrencyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutFunctionConcurrencyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putFunctionConcurrencyRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutFunctionConcurrency"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutFunctionConcurrencyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Configures options for asynchronous * invocation on a function, version, or alias. If a configuration already exists for a function, version, or * alias, this operation overwrites it. If you exclude any settings, they are removed. To set one option without * affecting existing settings for other options, use UpdateFunctionEventInvokeConfig. *

*

* By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events * in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous * invocation queue for too long, Lambda discards it. To retain discarded events, configure a dead-letter queue with * UpdateFunctionConfiguration. *

*

* To send an invocation record to a queue, topic, function, or event bus, specify a destination. You can configure separate destinations for successful invocations (on-success) and events that * fail all processing attempts (on-failure). You can configure destinations in addition to or instead of a * dead-letter queue. *

* * @param putFunctionEventInvokeConfigRequest * @return Result of the PutFunctionEventInvokeConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.PutFunctionEventInvokeConfig * @see AWS API Documentation */ @Override public PutFunctionEventInvokeConfigResult putFunctionEventInvokeConfig(PutFunctionEventInvokeConfigRequest request) { request = beforeClientExecution(request); return executePutFunctionEventInvokeConfig(request); } @SdkInternalApi final PutFunctionEventInvokeConfigResult executePutFunctionEventInvokeConfig(PutFunctionEventInvokeConfigRequest putFunctionEventInvokeConfigRequest) { ExecutionContext executionContext = createExecutionContext(putFunctionEventInvokeConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutFunctionEventInvokeConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putFunctionEventInvokeConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutFunctionEventInvokeConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutFunctionEventInvokeConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds a provisioned concurrency configuration to a function's alias or version. *

* * @param putProvisionedConcurrencyConfigRequest * @return Result of the PutProvisionedConcurrencyConfig operation returned by the service. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ServiceException * The Lambda service encountered an internal error. * @sample AWSLambda.PutProvisionedConcurrencyConfig * @see AWS API Documentation */ @Override public PutProvisionedConcurrencyConfigResult putProvisionedConcurrencyConfig(PutProvisionedConcurrencyConfigRequest request) { request = beforeClientExecution(request); return executePutProvisionedConcurrencyConfig(request); } @SdkInternalApi final PutProvisionedConcurrencyConfigResult executePutProvisionedConcurrencyConfig( PutProvisionedConcurrencyConfigRequest putProvisionedConcurrencyConfigRequest) { ExecutionContext executionContext = createExecutionContext(putProvisionedConcurrencyConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutProvisionedConcurrencyConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putProvisionedConcurrencyConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutProvisionedConcurrencyConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutProvisionedConcurrencyConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Sets the runtime management configuration for a function's version. For more information, see Runtime updates. *

* * @param putRuntimeManagementConfigRequest * @return Result of the PutRuntimeManagementConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.PutRuntimeManagementConfig * @see AWS API Documentation */ @Override public PutRuntimeManagementConfigResult putRuntimeManagementConfig(PutRuntimeManagementConfigRequest request) { request = beforeClientExecution(request); return executePutRuntimeManagementConfig(request); } @SdkInternalApi final PutRuntimeManagementConfigResult executePutRuntimeManagementConfig(PutRuntimeManagementConfigRequest putRuntimeManagementConfigRequest) { ExecutionContext executionContext = createExecutionContext(putRuntimeManagementConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutRuntimeManagementConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putRuntimeManagementConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutRuntimeManagementConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutRuntimeManagementConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes a statement from the permissions policy for a version of an Lambda layer. For more * information, see AddLayerVersionPermission. *

* * @param removeLayerVersionPermissionRequest * @return Result of the RemoveLayerVersionPermission operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @sample AWSLambda.RemoveLayerVersionPermission * @see AWS API Documentation */ @Override public RemoveLayerVersionPermissionResult removeLayerVersionPermission(RemoveLayerVersionPermissionRequest request) { request = beforeClientExecution(request); return executeRemoveLayerVersionPermission(request); } @SdkInternalApi final RemoveLayerVersionPermissionResult executeRemoveLayerVersionPermission(RemoveLayerVersionPermissionRequest removeLayerVersionPermissionRequest) { ExecutionContext executionContext = createExecutionContext(removeLayerVersionPermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemoveLayerVersionPermissionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(removeLayerVersionPermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveLayerVersionPermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveLayerVersionPermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Revokes function-use permission from an Amazon Web Service or another Amazon Web Services account. You can get * the ID of the statement from the output of GetPolicy. *

* * @param removePermissionRequest * @return Result of the RemovePermission operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @sample AWSLambda.RemovePermission * @see AWS API * Documentation */ @Override public RemovePermissionResult removePermission(RemovePermissionRequest request) { request = beforeClientExecution(request); return executeRemovePermission(request); } @SdkInternalApi final RemovePermissionResult executeRemovePermission(RemovePermissionRequest removePermissionRequest) { ExecutionContext executionContext = createExecutionContext(removePermissionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new RemovePermissionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removePermissionRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemovePermission"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemovePermissionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds tags to a function. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.TagResource * @see AWS API * Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes tags from a function. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration of a Lambda function alias. *

* * @param updateAliasRequest * @return Result of the UpdateAlias operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.UpdateAlias * @see AWS API * Documentation */ @Override public UpdateAliasResult updateAlias(UpdateAliasRequest request) { request = beforeClientExecution(request); return executeUpdateAlias(request); } @SdkInternalApi final UpdateAliasResult executeUpdateAlias(UpdateAliasRequest updateAliasRequest) { ExecutionContext executionContext = createExecutionContext(updateAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAliasRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAlias"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAliasResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update the code signing configuration. Changes to the code signing configuration take effect the next time a user * tries to deploy a code package to the function. *

* * @param updateCodeSigningConfigRequest * @return Result of the UpdateCodeSigningConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @sample AWSLambda.UpdateCodeSigningConfig * @see AWS * API Documentation */ @Override public UpdateCodeSigningConfigResult updateCodeSigningConfig(UpdateCodeSigningConfigRequest request) { request = beforeClientExecution(request); return executeUpdateCodeSigningConfig(request); } @SdkInternalApi final UpdateCodeSigningConfigResult executeUpdateCodeSigningConfig(UpdateCodeSigningConfigRequest updateCodeSigningConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateCodeSigningConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateCodeSigningConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateCodeSigningConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateCodeSigningConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateCodeSigningConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume * later from the same location. *

*

* For details about how to configure different event sources, see the following topics. *

* *

* The following error handling options are available only for stream sources (DynamoDB and Kinesis): *

*
    *
  • *

    * BisectBatchOnFunctionError – If the function returns an error, split the batch in two and retry. *

    *
  • *
  • *

    * DestinationConfig – Send discarded records to an Amazon SQS queue or Amazon SNS topic. *

    *
  • *
  • *

    * MaximumRecordAgeInSeconds – Discard records older than the specified age. The default value is * infinite (-1). When set to infinite (-1), failed records are retried until the record expires *

    *
  • *
  • *

    * MaximumRetryAttempts – Discard records after the specified number of retries. The default value is * infinite (-1). When set to infinite (-1), failed records are retried until the record expires. *

    *
  • *
  • *

    * ParallelizationFactor – Process multiple batches from each shard concurrently. *

    *
  • *
*

* For information about which configuration parameters apply to each event source, see the following topics. *

* * * @param updateEventSourceMappingRequest * @return Result of the UpdateEventSourceMapping operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceInUseException * The operation conflicts with the resource's availability. For example, you tried to update an event * source mapping in the CREATING state, or you tried to delete an event source mapping currently UPDATING. * @sample AWSLambda.UpdateEventSourceMapping * @see AWS API Documentation */ @Override public UpdateEventSourceMappingResult updateEventSourceMapping(UpdateEventSourceMappingRequest request) { request = beforeClientExecution(request); return executeUpdateEventSourceMapping(request); } @SdkInternalApi final UpdateEventSourceMappingResult executeUpdateEventSourceMapping(UpdateEventSourceMappingRequest updateEventSourceMappingRequest) { ExecutionContext executionContext = createExecutionContext(updateEventSourceMappingRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateEventSourceMappingRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateEventSourceMappingRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateEventSourceMapping"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateEventSourceMappingResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by * a trusted publisher. For more information, see Configuring code signing for * Lambda. *

*

* If the function's package type is Image, then you must specify the code package in * ImageUri as the URI of a container image in the Amazon ECR * registry. *

*

* If the function's package type is Zip, then you must specify the deployment package as a .zip * file archive. Enter the Amazon S3 bucket and key of the code .zip file location. You can also provide the * function code inline using the ZipFile field. *

*

* The code in the deployment package must be compatible with the target instruction set architecture of the * function (x86-64 or arm64). *

*

* The function's code is locked when you publish a version. You can't modify the code of a published version, only * the unpublished version. *

* *

* For a function defined as a container image, Lambda resolves the image tag to an image digest. In Amazon ECR, if * you update the image tag to a new image, Lambda does not automatically update the function. *

*
* * @param updateFunctionCodeRequest * @return Result of the UpdateFunctionCode operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws CodeStorageExceededException * Your Amazon Web Services account has exceeded its maximum total code size. For more information, see Lambda quotas. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws CodeVerificationFailedException * The code signature failed one or more of the validation checks for signature mismatch or expiry, and the * code signing policy is set to ENFORCE. Lambda blocks the deployment. * @throws InvalidCodeSignatureException * The code signature failed the integrity check. If the integrity check fails, then Lambda blocks * deployment, even if the code signing policy is set to WARN. * @throws CodeSigningConfigNotFoundException * The specified code signing configuration does not exist. * @sample AWSLambda.UpdateFunctionCode * @see AWS API * Documentation */ @Override public UpdateFunctionCodeResult updateFunctionCode(UpdateFunctionCodeRequest request) { request = beforeClientExecution(request); return executeUpdateFunctionCode(request); } @SdkInternalApi final UpdateFunctionCodeResult executeUpdateFunctionCode(UpdateFunctionCodeRequest updateFunctionCodeRequest) { ExecutionContext executionContext = createExecutionContext(updateFunctionCodeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateFunctionCodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateFunctionCodeRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFunctionCode"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFunctionCodeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modify the version-specific settings of a Lambda function. *

*

* When you update a function, Lambda provisions an instance of the function and its supporting resources. If your * function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but * you can still invoke it. The LastUpdateStatus, LastUpdateStatusReason, and * LastUpdateStatusReasonCode fields in the response from GetFunctionConfiguration indicate when * the update is complete and the function is processing events with the new configuration. For more information, * see Lambda function states. *

*

* These settings can vary between versions of a function and are locked when you publish a version. You can't * modify the configuration of a published version, only the unpublished version. *

*

* To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an Amazon * Web Services account or Amazon Web Service, use AddPermission. *

* * @param updateFunctionConfigurationRequest * @return Result of the UpdateFunctionConfiguration operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws PreconditionFailedException * The RevisionId provided does not match the latest RevisionId for the Lambda function or alias. Call the * GetFunction or the GetAlias API operation to retrieve the latest RevisionId for * your resource. * @throws CodeVerificationFailedException * The code signature failed one or more of the validation checks for signature mismatch or expiry, and the * code signing policy is set to ENFORCE. Lambda blocks the deployment. * @throws InvalidCodeSignatureException * The code signature failed the integrity check. If the integrity check fails, then Lambda blocks * deployment, even if the code signing policy is set to WARN. * @throws CodeSigningConfigNotFoundException * The specified code signing configuration does not exist. * @sample AWSLambda.UpdateFunctionConfiguration * @see AWS API Documentation */ @Override public UpdateFunctionConfigurationResult updateFunctionConfiguration(UpdateFunctionConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateFunctionConfiguration(request); } @SdkInternalApi final UpdateFunctionConfigurationResult executeUpdateFunctionConfiguration(UpdateFunctionConfigurationRequest updateFunctionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(updateFunctionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateFunctionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateFunctionConfigurationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFunctionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFunctionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration for asynchronous invocation for a function, version, or alias. *

*

* To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig. *

* * @param updateFunctionEventInvokeConfigRequest * @return Result of the UpdateFunctionEventInvokeConfig operation returned by the service. * @throws ServiceException * The Lambda service encountered an internal error. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @sample AWSLambda.UpdateFunctionEventInvokeConfig * @see AWS API Documentation */ @Override public UpdateFunctionEventInvokeConfigResult updateFunctionEventInvokeConfig(UpdateFunctionEventInvokeConfigRequest request) { request = beforeClientExecution(request); return executeUpdateFunctionEventInvokeConfig(request); } @SdkInternalApi final UpdateFunctionEventInvokeConfigResult executeUpdateFunctionEventInvokeConfig( UpdateFunctionEventInvokeConfigRequest updateFunctionEventInvokeConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateFunctionEventInvokeConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateFunctionEventInvokeConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateFunctionEventInvokeConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFunctionEventInvokeConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFunctionEventInvokeConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration for a Lambda function URL. *

* * @param updateFunctionUrlConfigRequest * @return Result of the UpdateFunctionUrlConfig operation returned by the service. * @throws ResourceConflictException * The resource already exists, or another operation is in progress. * @throws ResourceNotFoundException * The resource specified in the request does not exist. * @throws InvalidParameterValueException * One of the parameters in the request is not valid. * @throws ServiceException * The Lambda service encountered an internal error. * @throws TooManyRequestsException * The request throughput limit was exceeded. For more information, see Lambda * quotas. * @sample AWSLambda.UpdateFunctionUrlConfig * @see AWS * API Documentation */ @Override public UpdateFunctionUrlConfigResult updateFunctionUrlConfig(UpdateFunctionUrlConfigRequest request) { request = beforeClientExecution(request); return executeUpdateFunctionUrlConfig(request); } @SdkInternalApi final UpdateFunctionUrlConfigResult executeUpdateFunctionUrlConfig(UpdateFunctionUrlConfigRequest updateFunctionUrlConfigRequest) { ExecutionContext executionContext = createExecutionContext(updateFunctionUrlConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateFunctionUrlConfigRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateFunctionUrlConfigRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lambda"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFunctionUrlConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFunctionUrlConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* 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. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public AWSLambdaWaiters waiters() { if (waiters == null) { synchronized (this) { if (waiters == null) { waiters = new AWSLambdaWaiters(this); } } } return waiters; } @Override public void shutdown() { super.shutdown(); if (waiters != null) { waiters.shutdown(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy