Skip to content

Commit 917da2d

Browse files
authored
fix: add Enabled to MSK model. Use this property for MSK events in integ tests (#3822)
1 parent ab81051 commit 917da2d

File tree

7 files changed

+16
-0
lines changed

7 files changed

+16
-0
lines changed

integration/resources/templates/combination/function_with_msk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Resources:
6060
MyMskEvent:
6161
Type: MSK
6262
Properties:
63+
Enabled: false
6364
StartingPosition: LATEST
6465
Stream:
6566
Ref: MyMskCluster

integration/resources/templates/combination/function_with_msk_trigger_and_confluent_schema_registry.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Resources:
6060
MyMskEvent:
6161
Type: MSK
6262
Properties:
63+
Enabled: false
6364
StartingPosition: LATEST
6465
Stream:
6566
Ref: MyMskCluster

integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ Resources:
2727
logs:CreateLogStream, logs:PutLogEvents, s3:ListBucket]
2828
Effect: Allow
2929
Resource: '*'
30+
- Action: [s3:PutObject, s3:ListBucket]
31+
Effect: Allow
32+
Resource:
33+
- arn:aws:s3:::*/*
34+
- arn:aws:s3:::*
3035
ManagedPolicyArns:
3136
- !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
3237
Tags:
@@ -60,6 +65,7 @@ Resources:
6065
MyMskEvent:
6166
Type: MSK
6267
Properties:
68+
Enabled: false
6369
StartingPosition: LATEST
6470
Stream:
6571
Ref: MyMskCluster

integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Resources:
3333
MyMskEvent:
3434
Type: MSK
3535
Properties:
36+
Enabled: false
3637
StartingPosition: LATEST
3738
Stream:
3839
Ref: MyMskCluster

samtranslator/internal/schema_source/aws_serverless_function.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ class HttpApiEvent(BaseModel):
411411

412412
class MSKEventProperties(BaseModel):
413413
ConsumerGroupId: Optional[PassThroughProp] = mskeventproperties("ConsumerGroupId")
414+
Enabled: Optional[PassThroughProp] # TODO: it doesn't show up in docs yet
414415
FilterCriteria: Optional[PassThroughProp] = mskeventproperties("FilterCriteria")
415416
KmsKeyArn: Optional[PassThroughProp] # TODO: add documentation
416417
MaximumBatchingWindowInSeconds: Optional[PassThroughProp] = mskeventproperties("MaximumBatchingWindowInSeconds")

samtranslator/schema/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275792,6 +275792,9 @@
275792275792
"DestinationConfig": {
275793275793
"$ref": "#/definitions/PassThroughProp"
275794275794
},
275795+
"Enabled": {
275796+
"$ref": "#/definitions/PassThroughProp"
275797+
},
275795275798
"FilterCriteria": {
275796275799
"allOf": [
275797275800
{

schema_source/sam.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,9 @@
23972397
"DestinationConfig": {
23982398
"$ref": "#/definitions/PassThroughProp"
23992399
},
2400+
"Enabled": {
2401+
"$ref": "#/definitions/PassThroughProp"
2402+
},
24002403
"FilterCriteria": {
24012404
"allOf": [
24022405
{

0 commit comments

Comments
 (0)