Interface AwsLambdaRuntimeApi
- All Known Implementing Classes:
AbstractMicronautLambdaRuntime
,AbstractRequestStreamHandlerMicronautLambdaRuntime
,APIGatewayV2HTTPEventMicronautLambdaRuntime
,ApplicationLoadBalancerMicronautLambdaRuntime
,MicronautLambdaRuntime
public interface AwsLambdaRuntimeApi
- Since:
- 2.0.0
- Author:
- sdelamo
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault @NonNull String
default io.micronaut.http.HttpRequest<AwsLambdaRuntimeApiError>
initializationErrorRequest
(@Nullable String errorMessage, @Nullable String errorType, @Nullable String lambdaFunctionErrorType) default io.micronaut.http.HttpRequest<AwsLambdaRuntimeApiError>
invocationErrorRequest
(@NonNull String requestId, @Nullable String errorMessage, @Nullable String errorType, @Nullable String lambdaFunctionErrorType) default io.micronaut.http.HttpRequest
invocationResponseRequest
(@NonNull String requestId, Object body) default @NonNull String
responseUri
(@NonNull String requestId)
-
Field Details
-
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
- See Also:
-
INIT_ERROR_URI
- See Also:
-
LAMBDA_RUNTIME_FUNCTION_ERROR_TYPE
- See Also:
-
-
Method Details
-
responseUri
- Parameters:
requestId
- AWS Lambda Request ID- Returns:
- invocation response path for given request
-
errorUri
- 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 IDbody
- 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 IdentifiererrorMessage
- Error MessageerrorType
- Error TypelambdaFunctionErrorType
- 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 MessageerrorType
- Error TypelambdaFunctionErrorType
- 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.
-