Skip to content

Commit 015f923

Browse files
authored
docs(data_classes): improve Event Source Data Classes documentation (#5916)
* rewrite data classes docs * update examples up to CloudFormation Custom Resource * continue fixing the doc examples * examples up to lambda function url * complete all examples * fix mypy and use events from tests * fix highlight kinesis event --------- Signed-off-by: Ana Falcão <[email protected]>
1 parent 3688e6e commit 015f923

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1070
-890
lines changed

docs/media/utilities_data_classes.png

-152 KB
Loading

docs/utilities/data_classes.md

Lines changed: 345 additions & 834 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"eventSource": "aws:mq",
3+
"eventSourceArn": "arn:aws:mq:us-east-2:111122223333:broker:test:b-9bcfa592-423a-4942-879d-eb284b418fc8",
4+
"messages": [
5+
{
6+
"messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-east-2.amazonaws.com-37557-1234520418293-4:1:1:1:1",
7+
"messageType": "jms/text-message",
8+
"destination": {
9+
"physicalName": "testQueue"
10+
},
11+
"data": "QUJDOkFBQUE=",
12+
"timestamp": 1598827811958,
13+
"properties": {
14+
"index": "1"
15+
}
16+
},
17+
{
18+
"messageID": "ID:b-9bcfa592-423a-4942-879d-eb284b418fc8-1.mq.us-east-2.amazonaws.com-37557-1234520418293-4:1:1:1:2",
19+
"messageType": "jms/bytes-message",
20+
"destination": {
21+
"physicalName": "testQueue2"
22+
},
23+
"data": "LQaGQ82S48k=",
24+
"timestamp": 1598827811959
25+
}
26+
]
27+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"resource": "/helloworld",
3+
"path": "/hello",
4+
"httpMethod": "GET",
5+
"headers": {
6+
"Accept": "*/*",
7+
"Host": "api.example.com"
8+
},
9+
"queryStringParameters": {
10+
"name": "John"
11+
},
12+
"pathParameters": null,
13+
"stageVariables": null,
14+
"requestContext": {
15+
"requestId": "c6af9ac6-7b61-11e6-9a41-93e8deadbeef",
16+
"stage": "prod"
17+
},
18+
"body": null,
19+
"isBase64Encoded": false
20+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"xAmzRequestId": "1a5ed718-5f53-471d-b6fe-5cf62d88d02a",
3+
"getObjectContext": {
4+
"inputS3Url": "https://myap-123412341234.s3-accesspoint.us-east-1.amazonaws.com/s3.txt?X-Amz-Security-Token=...",
5+
"outputRoute": "io-iad-cell001",
6+
"outputToken": "..."
7+
},
8+
"configuration": {
9+
"accessPointArn": "arn:aws:s3-object-lambda:us-east-1:123412341234:accesspoint/myolap",
10+
"supportingAccessPointArn": "arn:aws:s3:us-east-1:123412341234:accesspoint/myap",
11+
"payload": "test"
12+
},
13+
"userRequest": {
14+
"url": "/s3.txt",
15+
"headers": {
16+
"Host": "myolap-123412341234.s3-object-lambda.us-east-1.amazonaws.com",
17+
"Accept-Encoding": "identity",
18+
"X-Amz-Content-SHA256": "e3b0c44297fc1c149afbf4c8995fb92427ae41e4649b934ca495991b7852b855"
19+
}
20+
},
21+
"userIdentity": {
22+
"type": "IAMUser",
23+
"principalId": "...",
24+
"arn": "arn:aws:iam::123412341234:user/myuser",
25+
"accountId": "123412341234",
26+
"accessKeyId": "..."
27+
},
28+
"protocolVersion": "1.00"
29+
}

0 commit comments

Comments
 (0)