Class SelfManagedKafkaEventSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.lambda.eventsources.SelfManagedKafkaEventSourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<SelfManagedKafkaEventSourceProps>
- Enclosing interface:
SelfManagedKafkaEventSourceProps
@Stability(Stable)
public static final class SelfManagedKafkaEventSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<SelfManagedKafkaEventSourceProps>
A builder for
SelfManagedKafkaEventSourceProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticationMethod
(AuthenticationMethod authenticationMethod) Sets the value ofSelfManagedKafkaEventSourceProps.getAuthenticationMethod()
Sets the value ofBaseStreamEventSourceProps.getBatchSize()
bootstrapServers
(List<String> bootstrapServers) Sets the value ofSelfManagedKafkaEventSourceProps.getBootstrapServers()
build()
Builds the configured instance.consumerGroupId
(String consumerGroupId) Sets the value ofKafkaEventSourceProps.getConsumerGroupId()
Sets the value ofBaseStreamEventSourceProps.getEnabled()
filterEncryption
(IKey filterEncryption) Sets the value ofKafkaEventSourceProps.getFilterEncryption()
Sets the value ofKafkaEventSourceProps.getFilters()
maxBatchingWindow
(Duration maxBatchingWindow) Sets the value ofBaseStreamEventSourceProps.getMaxBatchingWindow()
onFailure
(IEventSourceDlq onFailure) Sets the value ofKafkaEventSourceProps.getOnFailure()
provisionedPollerConfig
(ProvisionedPollerConfig provisionedPollerConfig) Sets the value ofBaseStreamEventSourceProps.getProvisionedPollerConfig()
rootCaCertificate
(ISecret rootCaCertificate) Sets the value ofinvalid @link
SelfManagedKafkaEventSourceProps#getRootCaCertificate
Sets the value ofKafkaEventSourceProps.getSecret()
securityGroup
(ISecurityGroup securityGroup) Sets the value ofSelfManagedKafkaEventSourceProps.getSecurityGroup()
startingPosition
(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()
Sets the value ofKafkaEventSourceProps.getTopic()
Sets the value ofSelfManagedKafkaEventSourceProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofSelfManagedKafkaEventSourceProps.getVpcSubnets()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bootstrapServers
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder bootstrapServers(List<String> bootstrapServers) Sets the value ofSelfManagedKafkaEventSourceProps.getBootstrapServers()
- 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. They are in the formatabc.xyz.com:xxxx
.- Returns:
this
-
authenticationMethod
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder authenticationMethod(AuthenticationMethod authenticationMethod) Sets the value ofSelfManagedKafkaEventSourceProps.getAuthenticationMethod()
- Parameters:
authenticationMethod
- The authentication method for your Kafka cluster.- Returns:
this
-
rootCaCertificate
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder rootCaCertificate(ISecret rootCaCertificate) Sets the value ofinvalid @link
SelfManagedKafkaEventSourceProps#getRootCaCertificate
- Parameters:
rootCaCertificate
- The secret with the root CA certificate used by your Kafka brokers for TLS encryption This field is required if your Kafka brokers use certificates signed by a private CA.- Returns:
this
-
securityGroup
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder securityGroup(ISecurityGroup securityGroup) Sets the value ofSelfManagedKafkaEventSourceProps.getSecurityGroup()
- Parameters:
securityGroup
- If your Kafka brokers are only reachable via VPC, provide the security group here.- Returns:
this
-
vpc
Sets the value ofSelfManagedKafkaEventSourceProps.getVpc()
- Parameters:
vpc
- If your Kafka brokers are only reachable via VPC provide the VPC here.- Returns:
this
-
vpcSubnets
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder vpcSubnets(SubnetSelection vpcSubnets) Sets the value ofSelfManagedKafkaEventSourceProps.getVpcSubnets()
- Parameters:
vpcSubnets
- If your Kafka brokers are only reachable via VPC, provide the subnets selection here.- Returns:
this
-
topic
Sets the value ofKafkaEventSourceProps.getTopic()
- Parameters:
topic
- The Kafka topic to subscribe to. This parameter is required.- Returns:
this
-
consumerGroupId
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder consumerGroupId(String consumerGroupId) Sets the value ofKafkaEventSourceProps.getConsumerGroupId()
- Parameters:
consumerGroupId
- The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a length between 1 and 200 and full the pattern '[a-zA-Z0-9-/:_+=.@-]'.- Returns:
this
-
filterEncryption
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder filterEncryption(IKey filterEncryption) Sets the value ofKafkaEventSourceProps.getFilterEncryption()
- Parameters:
filterEncryption
- Add Customer managed KMS key to encrypt Filter Criteria.- Returns:
this
-
filters
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder filters(List<? extends Map<String, ? extends Object>> filters) Sets the value ofKafkaEventSourceProps.getFilters()
- Parameters:
filters
- Add filter criteria to Event Source.- Returns:
this
-
onFailure
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder onFailure(IEventSourceDlq onFailure) Sets the value ofKafkaEventSourceProps.getOnFailure()
- Parameters:
onFailure
- Add an on Failure Destination for this Kafka event. SNS/SQS/S3 are supported- Returns:
this
-
secret
Sets the value ofKafkaEventSourceProps.getSecret()
- 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.- Returns:
this
-
startingPosition
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder startingPosition(StartingPosition startingPosition) Sets the value ofBaseStreamEventSourceProps.getStartingPosition()
- Parameters:
startingPosition
- Where to begin consuming the stream. This parameter is required.- Returns:
this
-
batchSize
Sets the value ofBaseStreamEventSourceProps.getBatchSize()
- Parameters:
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 for
KinesisEventSource
,ManagedKafkaEventSource
andSelfManagedKafkaEventSource
- 1000 for
- Returns:
this
-
enabled
Sets the value ofBaseStreamEventSourceProps.getEnabled()
- Parameters:
enabled
- If the stream event source mapping should be enabled.- Returns:
this
-
maxBatchingWindow
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder maxBatchingWindow(Duration maxBatchingWindow) Sets the value ofBaseStreamEventSourceProps.getMaxBatchingWindow()
- Parameters:
maxBatchingWindow
- The maximum amount of time to gather records before invoking the function. Maximum of Duration.minutes(5).- Returns:
this
-
provisionedPollerConfig
@Stability(Stable) public SelfManagedKafkaEventSourceProps.Builder provisionedPollerConfig(ProvisionedPollerConfig provisionedPollerConfig) Sets the value ofBaseStreamEventSourceProps.getProvisionedPollerConfig()
- Parameters:
provisionedPollerConfig
- Configuration for provisioned pollers that read from the event source. When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the source.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<SelfManagedKafkaEventSourceProps>
- Returns:
- a new instance of
SelfManagedKafkaEventSourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-