Package software.amazon.cloudformation
Class LambdaWrapper<ResourceT,CallbackT>
- java.lang.Object
-
- software.amazon.cloudformation.LambdaWrapper<ResourceT,CallbackT>
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
public abstract class LambdaWrapper<ResourceT,CallbackT> extends Object implements com.amazonaws.services.lambda.runtime.RequestStreamHandler
-
-
Field Summary
Fields Modifier and Type Field Description static software.amazon.awssdk.http.SdkHttpClientHTTP_CLIENT
-
Constructor Summary
Constructors Constructor Description LambdaWrapper(CallbackAdapter<ResourceT> callbackAdapter, CredentialsProvider platformCredentialsProvider, CredentialsProvider providerCredentialsProvider, CloudWatchLogPublisher providerEventsLogger, LogPublisher platformEventsLogger, MetricsPublisher platformMetricsPublisher, MetricsPublisher providerMetricsPublisher, CloudWatchScheduler scheduler, software.amazon.cloudformation.resource.SchemaValidator validator, Serializer serializer, software.amazon.awssdk.http.SdkHttpClient httpClient)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(InputStream inputStream, OutputStream outputStream, com.amazonaws.services.lambda.runtime.Context context)abstract ProgressEvent<ResourceT,CallbackT>invokeHandler(AmazonWebServicesClientProxy proxy, ResourceHandlerRequest<ResourceT> request, Action action, CallbackT callbackContext)Implemented by the handler package as the key entry point.
-
-
-
Constructor Detail
-
LambdaWrapper
public LambdaWrapper(CallbackAdapter<ResourceT> callbackAdapter, CredentialsProvider platformCredentialsProvider, CredentialsProvider providerCredentialsProvider, CloudWatchLogPublisher providerEventsLogger, LogPublisher platformEventsLogger, MetricsPublisher platformMetricsPublisher, MetricsPublisher providerMetricsPublisher, CloudWatchScheduler scheduler, software.amazon.cloudformation.resource.SchemaValidator validator, Serializer serializer, software.amazon.awssdk.http.SdkHttpClient httpClient)
-
-
Method Detail
-
handleRequest
public void handleRequest(InputStream inputStream, OutputStream outputStream, com.amazonaws.services.lambda.runtime.Context context) throws IOException, TerminalException
- Specified by:
handleRequestin interfacecom.amazonaws.services.lambda.runtime.RequestStreamHandler- Throws:
IOExceptionTerminalException
-
invokeHandler
public abstract ProgressEvent<ResourceT,CallbackT> invokeHandler(AmazonWebServicesClientProxy proxy, ResourceHandlerRequest<ResourceT> request, Action action, CallbackT callbackContext) throws Exception
Implemented by the handler package as the key entry point.- Parameters:
proxy- Amazon webservice proxy to inject credentials correctly.request- incoming request for the callaction- which action to takeAction.CREATE,Action.DELETE,Action.READAction.LISTorAction.UPDATEcallbackContext- the callback context to handle reentrant calls- Returns:
- progress event indicating success, in progress with delay callback or failed state
- Throws:
Exception- propagate any unexpected errors
-
-