Skip to content

Commit

Permalink
feat: Add StartingPositionTimestamp to SelfManagedKafka
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed Jun 22, 2023
1 parent cdef07f commit cfdaebb
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ class SelfManagedKafkaEventProperties(BaseModel):
"KafkaBootstrapServers"
)
SourceAccessConfigurations: PassThroughProp = selfmanagedkafkaeventproperties("SourceAccessConfigurations")
StartingPosition: Optional[PassThroughProp] # TODO: add documentation
StartingPositionTimestamp: Optional[PassThroughProp] # TODO: add documentation
Topics: PassThroughProp = selfmanagedkafkaeventproperties("Topics")


Expand Down
6 changes: 6 additions & 0 deletions samtranslator/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -238958,6 +238958,12 @@
"markdownDescription": "An array of the authentication protocol, VPC components, or virtual host to secure and define your event source\\. \n*Valid values*: `BASIC_AUTH | CLIENT_CERTIFICATE_TLS_AUTH | SASL_SCRAM_256_AUTH | SASL_SCRAM_512_AUTH | SERVER_ROOT_CA_CERTIFICATE` \n*Type*: List of [SourceAccessConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html) \n*Required*: Yes \n*AWS CloudFormation compatibility*: This property is passed directly to the `[ SourceAccessConfigurations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations)` property of an `AWS::Lambda::EventSourceMapping` resource\\.",
"title": "SourceAccessConfigurations"
},
"StartingPosition": {
"$ref": "#/definitions/PassThroughProp"
},
"StartingPositionTimestamp": {
"$ref": "#/definitions/PassThroughProp"
},
"Topics": {
"allOf": [
{
Expand Down
6 changes: 6 additions & 0 deletions schema_source/sam.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2753,6 +2753,12 @@
"markdownDescription": "An array of the authentication protocol, VPC components, or virtual host to secure and define your event source\\. \n*Valid values*: `BASIC_AUTH | CLIENT_CERTIFICATE_TLS_AUTH | SASL_SCRAM_256_AUTH | SASL_SCRAM_512_AUTH | SERVER_ROOT_CA_CERTIFICATE` \n*Type*: List of [SourceAccessConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html) \n*Required*: Yes \n*AWS CloudFormation compatibility*: This property is passed directly to the `[ SourceAccessConfigurations](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations)` property of an `AWS::Lambda::EventSourceMapping` resource\\.",
"title": "SourceAccessConfigurations"
},
"StartingPosition": {
"$ref": "#/definitions/PassThroughProp"
},
"StartingPositionTimestamp": {
"$ref": "#/definitions/PassThroughProp"
},
"Topics": {
"allOf": [
{
Expand Down
2 changes: 2 additions & 0 deletions tests/translator/input/function_with_self_managed_kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Resources:
- Type: VPC_SECURITY_GROUP
URI: security_group:sg-67890
ConsumerGroupId: consumergroup1
StartingPosition: AT_TIMESTAMP
StartingPositionTimestamp: 1672560000
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"URI": "security_group:sg-67890"
}
],
"StartingPosition": "AT_TIMESTAMP",
"StartingPositionTimestamp": 1672560000,
"Topics": [
"Topic1"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"URI": "security_group:sg-67890"
}
],
"StartingPosition": "AT_TIMESTAMP",
"StartingPositionTimestamp": 1672560000,
"Topics": [
"Topic1"
]
Expand Down
2 changes: 2 additions & 0 deletions tests/translator/output/function_with_self_managed_kafka.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"URI": "security_group:sg-67890"
}
],
"StartingPosition": "AT_TIMESTAMP",
"StartingPositionTimestamp": 1672560000,
"Topics": [
"Topic1"
]
Expand Down

0 comments on commit cfdaebb

Please sign in to comment.