AbstractProtectedauth0ProtectedauthorizationProtectedbodyProtectedclaimsProtectedclientProtectedclientProtectedclientProtectedcognitoProtectedcurrentProtecteddefaultProtectedeventProtectedhttpProtected OptionalinitProtectedloggerProtectedlogProtectedmetricsProtectedpathProtectedpathProtectedprincipalProtectedprojectProtectedqueryProtectedrequestThe id API Gateway assigned to the request: the same value as the apigw-requestid (HTTP API) or
x-amzn-RequestId (REST API) header of its response. It's logged in the request's START and END-* lines and
added to the body of an unhandled error ({ message, requestId }), whose message is generic: the requester can
report it, and it leads to the log line with the real cause — e.g. in CloudWatch Logs Insights,
filter @message like "<requestId>". Note: there @requestId is a different value, the id of the Lambda
invocation; read it from the lines found to get every other line of the same invocation.
ProtectedresourceProtectedresourceProtectedresourceProtectedreturnProtected OptionalreturnProtectedstageProtectedtemplateProtectedtracerProtectedtracerProtectedtracerProtectedtranslationsProtectedcheckTo
ProtecteddeleteTo
ProtecteddeleteTo
ProtecteddoneDefault ending function for the Lambda.
Optionalerror: anyOptionalrawResult: anyProtectedgetGet the current log level for the current Lambda function's logger.
Note: "FATAL" means that no log will be printed.
ProtectedgetForce the parsing of a query parameter as an array of strings.
ProtectedgetForce the parsing of a query parameter as a boolean.
ProtectedgetTo
ProtectedgetTo
ProtectedhandleRemap an error to manage the logging and make sure no unhandled error is returned to the requester.
The main function (to override), that handles the request and must terminate invoking the method done.
ProtectedheadTo
ProtectedheadTo
Simulate an internal API request, invoking directly the lambda and therefore saving resources.
the body of the response
ProtectedisWhether the app is in maintenance, according to the status file its front-ends read (APP_STATUS_URL, e.g. the
assets/status.json of the front-end's bucket); while it is, every request is answered 503, which a front-end on
@idea-ionic/common >= 8.13.10 meets by reading its status again. Opt-in: without the variable, the API is never
in maintenance. A file that can't be read leaves the last value known, or an open API the first time.
Not for an app that reads its status through the API (viaApi): that request would be refused too, and the app
would never show its maintenance page.
ProtectedloadLoad a shared resource in the back-end (translation, template, etc.). Search for the specified file path in both the Lambda function's main folder and the layers folder.
Load the translations from the shared resources and set them with a fallback language.
OptionaldefLang: stringProtectedpatchTo
ProtectedpatchTo
ProtectedpostTo
ProtectedpostTo
ProtectedpreparePrepare the CloudWatch metrics at the beginning of a request.
ProtectedpublishPublish the CloudWatch metrics (default and custom-defined) at the end of a reqeust.
Optionalerror: anyProtectedputTo
ProtectedputTo
Set the log level for the current Lambda function's logger.
ProtectedsharedCheck whether shared resource exists in the back-end (translation, template, etc.). Search for the specified file path in both the Lambda function's main folder and the layers folder.
Raise the log level of the current Lambda function's logger to "FATAL", hence avoiding printing any log.
ProtectedstoreStore the log associated to the request (no response/error handling).
Get a translated term by key, optionally interpolating variables (e.g. {{user}}).
If the term doesn't exist in the current language, it is searched in the default language.
OptionalinterpolateParams: any
An abstract class to inherit to manage API requests (AWS API Gateway) in an AWS Lambda function.