Class SelfManagedKafkaEventSource.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.SelfManagedKafkaEventSource.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SelfManagedKafkaEventSource>
- Enclosing class:
SelfManagedKafkaEventSource
@Stability(Stable)
public static final class SelfManagedKafkaEventSource.Builder
extends Object
implements software.amazon.jsii.Builder<SelfManagedKafkaEventSource>
A fluent builder for
SelfManagedKafkaEventSource
.-
Method Summary
Modifier and TypeMethodDescriptionauthenticationMethod
(AuthenticationMethod authenticationMethod) The authentication method for your Kafka cluster.The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.bootstrapServers
(List<String> bootstrapServers) The list of host and port pairs that are the addresses of the Kafka brokers in a "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself.build()
create()
If the stream event source mapping should be enabled.maxBatchingWindow
(Duration maxBatchingWindow) The maximum amount of time to gather records before invoking the function.The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet.securityGroup
(ISecurityGroup securityGroup) If your Kafka brokers are only reachable via VPC, provide the security group here.startingPosition
(StartingPosition startingPosition) Where to begin consuming the stream.The Kafka topic to subscribe to.If your Kafka brokers are only reachable via VPC provide the VPC here.vpcSubnets
(SubnetSelection vpcSubnets) If your Kafka brokers are only reachable via VPC, provide the subnets selection here.
-
Method Details
-
create
- Returns:
- a new instance of
SelfManagedKafkaEventSource.Builder
.
-
startingPosition
@Stability(Stable) public SelfManagedKafkaEventSource.Builder startingPosition(StartingPosition startingPosition) Where to begin consuming the stream.- Parameters:
startingPosition
- Where to begin consuming the stream. This parameter is required.- Returns:
this
-
batchSize
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.Your function receives an event with all the retrieved records. Valid Range: * Minimum value of 1 * Maximum value of: * 1000 for
DynamoEventSource
* 10000 forKinesisEventSource
,ManagedKafkaEventSource
andSelfManagedKafkaEventSource
Default: 100
- Parameters:
batchSize
- The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function. This parameter is required.- Returns:
this
-
enabled
If the stream event source mapping should be enabled.Default: true
- Parameters:
enabled
- If the stream event source mapping should be enabled. This parameter is required.- Returns:
this
-
maxBatchingWindow
@Stability(Stable) public SelfManagedKafkaEventSource.Builder maxBatchingWindow(Duration maxBatchingWindow) The maximum amount of time to gather records before invoking the function.Maximum of Duration.minutes(5)
Default: Duration.seconds(0)
- Parameters:
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. This parameter is required.- Returns:
this
-
topic
The Kafka topic to subscribe to.- Parameters:
topic
- The Kafka topic to subscribe to. This parameter is required.- Returns:
this
-
secret
The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet.Default: none
- Parameters:
secret
- The secret with the Kafka credentials, see https://docs.aws.amazon.com/msk/latest/developerguide/msk-password.html for details This field is required if your Kafka brokers are accessed over the Internet. This parameter is required.- Returns:
this
-
bootstrapServers
@Stability(Stable) public SelfManagedKafkaEventSource.Builder bootstrapServers(List<String> bootstrapServers) The list of host and port pairs that are the addresses of the Kafka brokers in a "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself.They are in the format
abc.xyz.com:xxxx
.- Parameters:
bootstrapServers
- The list of host and port pairs that are the addresses of the Kafka brokers in a "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself. This parameter is required.- Returns:
this
-
authenticationMethod
@Stability(Stable) public SelfManagedKafkaEventSource.Builder authenticationMethod(AuthenticationMethod authenticationMethod) The authentication method for your Kafka cluster.Default: AuthenticationMethod.SASL_SCRAM_512_AUTH
- Parameters:
authenticationMethod
- The authentication method for your Kafka cluster. This parameter is required.- Returns:
this
-
securityGroup
@Stability(Stable) public SelfManagedKafkaEventSource.Builder securityGroup(ISecurityGroup securityGroup) If your Kafka brokers are only reachable via VPC, provide the security group here.Default: - none, required if setting vpc
- Parameters:
securityGroup
- If your Kafka brokers are only reachable via VPC, provide the security group here. This parameter is required.- Returns:
this
-
vpc
If your Kafka brokers are only reachable via VPC provide the VPC here.Default: none
- Parameters:
vpc
- If your Kafka brokers are only reachable via VPC provide the VPC here. This parameter is required.- Returns:
this
-
vpcSubnets
@Stability(Stable) public SelfManagedKafkaEventSource.Builder vpcSubnets(SubnetSelection vpcSubnets) If your Kafka brokers are only reachable via VPC, provide the subnets selection here.Default: - none, required if setting vpc
- Parameters:
vpcSubnets
- If your Kafka brokers are only reachable via VPC, provide the subnets selection here. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SelfManagedKafkaEventSource>
- Returns:
- a newly built instance of
SelfManagedKafkaEventSource
.
-