forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.py
31 lines (19 loc) · 867 Bytes
/
router.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from aws_lambda_powertools.event_handler.api_gateway import Router
from aws_lambda_powertools.utilities.data_classes import (
ALBEvent,
APIGatewayProxyEvent,
APIGatewayProxyEventV2,
LambdaFunctionUrlEvent,
)
class APIGatewayRouter(Router):
"""Specialized Router class that exposes current_event as an APIGatewayProxyEvent"""
current_event: APIGatewayProxyEvent
class APIGatewayHttpRouter(Router):
"""Specialized Router class that exposes current_event as an APIGatewayProxyEventV2"""
current_event: APIGatewayProxyEventV2
class LambdaFunctionUrlRouter(Router):
"""Specialized Router class that exposes current_event as a LambdaFunctionUrlEvent"""
current_event: LambdaFunctionUrlEvent
class ALBRouter(Router):
"""Specialized Router class that exposes current_event as an ALBEvent"""
current_event: ALBEvent