Interface AwsLambdaRuntimeApi

All Known Implementing Classes:
AbstractMicronautLambdaRuntime, AbstractRequestStreamHandlerMicronautLambdaRuntime, APIGatewayV2HTTPEventMicronautLambdaRuntime, ApplicationLoadBalancerMicronautLambdaRuntime, MicronautLambdaRuntime

public interface AwsLambdaRuntimeApi
Since:
2.0.0
Author:
sdelamo
See Also:
  • Field Details

    • PATH_REQUEST_ID

      static final String PATH_REQUEST_ID
      See Also:
    • INVOCATION_TEMPLATE

      static final io.micronaut.http.uri.UriTemplate INVOCATION_TEMPLATE
    • ERROR_TEMPLATE

      static final io.micronaut.http.uri.UriTemplate ERROR_TEMPLATE
    • NEXT_INVOCATION_URI

      static final String NEXT_INVOCATION_URI
      See Also:
    • INIT_ERROR_URI

      static final String INIT_ERROR_URI
      See Also:
    • LAMBDA_RUNTIME_FUNCTION_ERROR_TYPE

      static final String LAMBDA_RUNTIME_FUNCTION_ERROR_TYPE
      See Also:
  • Method Details

    • responseUri

      @NonNull default @NonNull String responseUri(@NonNull @NonNull String requestId)
      Parameters:
      requestId - AWS Lambda Request ID
      Returns:
      invocation response path for given request
    • errorUri

      @NonNull default @NonNull String errorUri(@NonNull @NonNull String requestId)
      Parameters:
      requestId - AWS Lambda Request ID
      Returns:
      invocation error path for given request
    • invocationResponseRequest

      default io.micronaut.http.HttpRequest invocationResponseRequest(@NonNull @NonNull String requestId, Object body)
      Parameters:
      requestId - AWS Lambda Request ID
      body - The body of the request
      Returns:
      Invocation Response Request
    • invocationErrorRequest

      default io.micronaut.http.HttpRequest<AwsLambdaRuntimeApiError> invocationErrorRequest(@NonNull @NonNull String requestId, @Nullable @Nullable String errorMessage, @Nullable @Nullable String errorType, @Nullable @Nullable String lambdaFunctionErrorType)
      Parameters:
      requestId - Lambda Request Identifier
      errorMessage - Error Message
      errorType - Error Type
      lambdaFunctionErrorType - Lambda Function Error Type
      Returns:
      A request to the invocation error path to inform in JSON format about the error which was thrown during the function execution.
    • initializationErrorRequest

      default io.micronaut.http.HttpRequest<AwsLambdaRuntimeApiError> initializationErrorRequest(@Nullable @Nullable String errorMessage, @Nullable @Nullable String errorType, @Nullable @Nullable String lambdaFunctionErrorType)
      Parameters:
      errorMessage - Error Message
      errorType - Error Type
      lambdaFunctionErrorType - Lambda Function Error Type
      Returns:
      A post request which should be send if the runtime encounters an error during initialization to post an error message to the initialization error path.