io.cloudshiftdev.awscdk.services.lambda.eventsources.KafkaEventSourceProps.kt Maven / Gradle / Ivy
The newest version!
@file:Suppress("RedundantVisibilityModifier","RedundantUnitReturnType","RemoveRedundantQualifierName","unused","UnusedImport","ClassName","REDUNDANT_PROJECTION","DEPRECATION")
package io.cloudshiftdev.awscdk.services.lambda.eventsources
import io.cloudshiftdev.awscdk.Duration
import io.cloudshiftdev.awscdk.common.CdkDslMarker
import io.cloudshiftdev.awscdk.common.CdkObject
import io.cloudshiftdev.awscdk.common.CdkObjectWrappers
import io.cloudshiftdev.awscdk.services.kms.IKey
import io.cloudshiftdev.awscdk.services.lambda.IEventSourceDlq
import io.cloudshiftdev.awscdk.services.lambda.StartingPosition
import io.cloudshiftdev.awscdk.services.secretsmanager.ISecret
import kotlin.Any
import kotlin.Boolean
import kotlin.Number
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Properties for a Kafka event source.
*
* Example:
*
* ```
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import io.cloudshiftdev.awscdk.*;
* import io.cloudshiftdev.awscdk.services.kms.*;
* import io.cloudshiftdev.awscdk.services.lambda.*;
* import io.cloudshiftdev.awscdk.services.lambda.eventsources.*;
* import io.cloudshiftdev.awscdk.services.secretsmanager.*;
* IEventSourceDlq eventSourceDlq;
* Object filters;
* Key key;
* Secret secret;
* KafkaEventSourceProps kafkaEventSourceProps = KafkaEventSourceProps.builder()
* .startingPosition(StartingPosition.TRIM_HORIZON)
* .topic("topic")
* // the properties below are optional
* .batchSize(123)
* .consumerGroupId("consumerGroupId")
* .enabled(false)
* .filterEncryption(key)
* .filters(List.of(Map.of(
* "filtersKey", filters)))
* .maxBatchingWindow(Duration.minutes(30))
* .onFailure(eventSourceDlq)
* .secret(secret)
* .build();
* ```
*/
public interface KafkaEventSourceProps : BaseStreamEventSourceProps {
/**
* 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 lenght between 1 and 200 and full the pattern '[a-zA-Z0-9-/ *:_+=.@-]*'.
*
* Default: - none
*
* [Documentation](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id)
*/
public fun consumerGroupId(): String? = unwrap(this).getConsumerGroupId()
/**
* Add Customer managed KMS key to encrypt Filter Criteria.
*
* Default: - none
*
* [Documentation](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk)
*/
public fun filterEncryption(): IKey? = unwrap(this).getFilterEncryption()?.let(IKey::wrap)
/**
* Add filter criteria to Event Source.
*
* Default: - none
*
* [Documentation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html)
*/
public fun filters(): List