Options
All
  • Public
  • Public/Protected
  • All
Menu

lambaa - v4.2.0

Index

Controller

Event Handler Decorator

  • API(method: HTTPMethod, resource: string): MethodDecorator
  • DELETE(resource: string): MethodDecorator
  • Define an API Gateway HTTP DELETE request handler.

    Parameters

    • resource: string

      The request resource path.

    Returns MethodDecorator

  • DynamoDB(tableArn: string): MethodDecorator
  • Define a Dynamo DB stream event handler.

    Parameters

    • tableArn: string

      The ARN of the table (not the event stream ARN).

    Returns MethodDecorator

  • EventBridge(source: string, detailType: string): MethodDecorator
  • Define an EventBridge event handler.

    Parameters

    • source: string

      The event source. This identifies the service that generated the event.

    • detailType: string

      The event detail-type. This identifies the fields and values that appear in the detail field.

    Returns MethodDecorator

  • GET(resource: string): MethodDecorator
  • Define an API Gateway HTTP GET request handler.

    Parameters

    • resource: string

      The request resource path.

    Returns MethodDecorator

  • Kinesis(arn: string): MethodDecorator
  • Define a Kinesis stream event handler.

    Parameters

    • arn: string

      The ARN of the event stream.

    Returns MethodDecorator

  • PATCH(resource: string): MethodDecorator
  • Define an API Gateway HTTP PATCH request handler.

    Parameters

    • resource: string

      The request resource path.

    Returns MethodDecorator

  • POST(resource: string): MethodDecorator
  • Define an API Gateway HTTP POST request handler.

    Parameters

    • resource: string

      The request resource path.

    Returns MethodDecorator

  • PUT(resource: string): MethodDecorator
  • Define an API Gateway HTTP PUT request handler.

    Parameters

    • resource: string

      The request resource path.

    Returns MethodDecorator

  • Route(method: HTTPMethod, resource: string): MethodDecorator
  • S3(arn: string): MethodDecorator
  • Define an S3 event handler.

    Parameters

    • arn: string

      The ARN of the S3 bucket.

    Returns MethodDecorator

  • SNS(arn: string): MethodDecorator
  • Define an SNS event handler.

    Parameters

    • arn: string

      The ARN of the topic.

    Returns MethodDecorator

  • SQS(arn: string): MethodDecorator
  • Define an SQS event handler.

    Parameters

    • arn: string

      The ARN of the queue.

    Returns MethodDecorator

  • Schedule(arn: string): MethodDecorator

Middleware

Handler<TEvent, TResult>: ((r: TEvent, c: Context) => Promise<TResult>)

Type Parameters

  • TEvent = APIGatewayProxyEvent

  • TResult = APIGatewayProxyResult

Type declaration

    • (r: TEvent, c: Context): Promise<TResult>
    • Defines a Lambda event handler.

      Parameters

      • r: TEvent
      • c: Context

      Returns Promise<TResult>

MiddlewareFunction<TEvent, TResult>: ((event: TEvent, context: Context, next: Handler<TEvent, TResult>, middlewareContext?: MiddlewareContext) => Promise<TResult>)

Type Parameters

  • TEvent = APIGatewayProxyEvent

  • TResult = APIGatewayProxyResult

Type declaration

    • (event: TEvent, context: Context, next: Handler<TEvent, TResult>, middlewareContext?: MiddlewareContext): Promise<TResult>
    • Defines a middleware invoke function.

      Parameters

      Returns Promise<TResult>

Error

RequestErrorCode: "MISSING_PATH_PARAMETER" | "MISSING_QUERY_PARAMETER" | "MISSING_REQUEST_DATA" | "MISSING_HEADER" | "INVALID_REQUEST_DATA"

A RequestError code.

RouterErrorCode: "ROUTE_NOT_FOUND"

A RouterError code.

API Gateway Request Parameter Decorator

  • FromPath(name: string): ParameterDecorator
  • Extract a parameter from the API Gateway request resource path.

    Parameters

    • name: string

    Returns ParameterDecorator

Other

HTTPMethod: "GET" | "POST" | "DELETE" | "PATCH" | "PUT"

Generated using TypeDoc