GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(parser): add IoT Core registry models to parser.models exports (#… · exg/powertools-lambda-python@914923c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • aws_lambda_powertools/utilities/parser/models
    • __init__.py
  • docs/utilities
    • parser.md
  • tests/functional/parser
    • test_model_imports.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎aws_lambda_powertools/utilities/parser/models/__init__.py‎

Copy file name to clipboardExpand all lines: aws_lambda_powertools/utilities/parser/models/__init__.py
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@
7878
)
7979
from .event_bridge import EventBridgeModel
8080
from .event_bridge_v2 import EventBridgeV2Model, EventBridgeV2RecordModel, EventBridgeV2SystemMetadataModel
81+
from .iot_registry_events import (
82+
IoTCoreAddOrDeleteFromThingGroupEvent,
83+
IoTCoreAddOrRemoveFromThingGroupEvent,
84+
IoTCoreThingEvent,
85+
IoTCoreThingGroupEvent,
86+
IoTCoreThingTypeAssociationEvent,
87+
IoTCoreThingTypeEvent,
88+
)
8189
from .kafka import (
8290
KafkaBaseEventModel,
8391
KafkaMskEventModel,
@@ -203,6 +211,12 @@
203211
"EventBridgeV2Model": "event_bridge_v2",
204212
"EventBridgeV2RecordModel": "event_bridge_v2",
205213
"EventBridgeV2SystemMetadataModel": "event_bridge_v2",
214+
"IoTCoreAddOrDeleteFromThingGroupEvent": "iot_registry_events",
215+
"IoTCoreAddOrRemoveFromThingGroupEvent": "iot_registry_events",
216+
"IoTCoreThingEvent": "iot_registry_events",
217+
"IoTCoreThingGroupEvent": "iot_registry_events",
218+
"IoTCoreThingTypeAssociationEvent": "iot_registry_events",
219+
"IoTCoreThingTypeEvent": "iot_registry_events",
206220
"KafkaBaseEventModel": "kafka",
207221
"KafkaMskEventModel": "kafka",
208222
"KafkaRecordModel": "kafka",
@@ -370,6 +384,12 @@ def __dir__() -> list[str]:
370384
"KafkaSelfManagedEventModel",
371385
"KafkaRecordModel",
372386
"KafkaMskEventModel",
387+
"IoTCoreAddOrDeleteFromThingGroupEvent",
388+
"IoTCoreAddOrRemoveFromThingGroupEvent",
389+
"IoTCoreThingEvent",
390+
"IoTCoreThingGroupEvent",
391+
"IoTCoreThingTypeAssociationEvent",
392+
"IoTCoreThingTypeEvent",
373393
"KafkaBaseEventModel",
374394
"KinesisFirehoseSqsModel",
375395
"KinesisFirehoseSqsRecord",
Collapse file

‎docs/utilities/parser.md‎

Copy file name to clipboardExpand all lines: docs/utilities/parser.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The example above uses `SqsModel`. Other built-in models can be found below.
118118
| **CloudFormationCustomResourceCreateModel** | Lambda Event Source payload for AWS CloudFormation `CREATE` operation |
119119
| **CloudFormationCustomResourceUpdateModel** | Lambda Event Source payload for AWS CloudFormation `UPDATE` operation |
120120
| **CloudFormationCustomResourceDeleteModel** | Lambda Event Source payload for AWS CloudFormation `DELETE` operation |
121-
| **CloudwatchLogsModel** | Lambda Event Source payload for Amazon CloudWatch Logs |
121+
| **CloudWatchLogsModel** | Lambda Event Source payload for Amazon CloudWatch Logs |
122122
| **CognitoPreSignupTriggerModel** | Lambda User Pool Pre-Sign-Up trigger event |
123123
| **CognitoPostConfirmationTriggerModel** | Lambda User Pool Post Confirmation trigger event |
124124
| **CognitoPreAuthenticationTriggerModel** | Lambda User Pool Pre Authentication trigger event |
@@ -212,7 +212,7 @@ You can use pre-built envelopes provided by the Parser to extract and parse spec
212212
| **EventBridgeEnvelope** | 1. Parses data using `EventBridgeModel`. ``2. Parses `detail` key using your model`` and returns it. | `Model` |
213213
| **EventBridgeV2Envelope** | 1. Parses data using `EventBridgeV2Model`. ``2. Parses `Data` (or `Data.detail` for PutEvents) of each record using your model`` and returns them in a list. Also accepts RAW deliveries. | `List[Model]` |
214214
| **SqsEnvelope** | 1. Parses data using `SqsModel`. ``2. Parses records in `body` key using your model`` and return them in a list. | `List[Model]` |
215-
| **CloudWatchLogsEnvelope** | 1. Parses data using `CloudwatchLogsModel` which will base64 decode and decompress it. ``2. Parses records in `message` key using your model`` and return them in a list. | `List[Model]` |
215+
| **CloudWatchLogsEnvelope** | 1. Parses data using `CloudWatchLogsModel` which will base64 decode and decompress it. ``2. Parses records in `message` key using your model`` and return them in a list. | `List[Model]` |
216216
| **KinesisDataStreamEnvelope** | 1. Parses data using `KinesisDataStreamModel` which will base64 decode it. ``2. Parses records in the `Records` key using your model`` and returns them in a list. | `List[Model]` |
217217
| **KinesisFirehoseEnvelope** | 1. Parses data using `KinesisFirehoseModel` which will base64 decode it. ``2. Parses records in the `Records` key using your model`` and returns them in a list. | `List[Model]` |
218218
| **SnsEnvelope** | 1. Parses data using `SnsModel`. ``2. Parses records in `body` key using your model`` and return them in a list. | `List[Model]` |
Collapse file

‎tests/functional/parser/test_model_imports.py‎

Copy file name to clipboardExpand all lines: tests/functional/parser/test_model_imports.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
MODEL_IMPORT_CASES = [
99
("SqsModel", "sqs", ["sqs"]),
10+
("IoTCoreThingEvent", "iot_registry_events", ["iot_registry_events"]),
11+
("IoTCoreThingTypeEvent", "iot_registry_events", ["iot_registry_events"]),
12+
("IoTCoreThingTypeAssociationEvent", "iot_registry_events", ["iot_registry_events"]),
13+
("IoTCoreThingGroupEvent", "iot_registry_events", ["iot_registry_events"]),
14+
("IoTCoreAddOrRemoveFromThingGroupEvent", "iot_registry_events", ["iot_registry_events"]),
15+
("IoTCoreAddOrDeleteFromThingGroupEvent", "iot_registry_events", ["iot_registry_events"]),
1016
("S3Model", "s3", ["s3", "event_bridge"]),
1117
("AppSyncEventsModel", "appsync_events", ["appsync_events", "appsync"]),
1218
("LambdaFunctionUrlModel", "lambda_function_url", ["lambda_function_url", "apigwv2"]),

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.