Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@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.services.kms.IKey
import io.cloudshiftdev.awscdk.services.lambda.IEventSourceDlq
import io.cloudshiftdev.awscdk.services.lambda.IFunction
import io.cloudshiftdev.awscdk.services.lambda.StartingPosition
import kotlin.Any
import kotlin.Boolean
import kotlin.Number
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import io.cloudshiftdev.awscdk.services.kinesis.IStream as CloudshiftdevAwscdkServicesKinesisIStream
import software.amazon.awscdk.services.kinesis.IStream as AmazonAwscdkServicesKinesisIStream
/**
* Use an Amazon Kinesis stream as an event source for AWS Lambda.
*
* Example:
*
* ```
* import io.cloudshiftdev.awscdk.services.kinesis.*;
* import io.cloudshiftdev.awscdk.services.lambda.eventsources.KinesisEventSource;
* Function myFunction;
* Stream stream = new Stream(this, "MyStream");
* myFunction.addEventSource(KinesisEventSource.Builder.create(stream)
* .batchSize(100) // default
* .startingPosition(StartingPosition.TRIM_HORIZON)
* .build());
* ```
*/
public open class KinesisEventSource(
cdkObject: software.amazon.awscdk.services.lambda.eventsources.KinesisEventSource,
) : StreamEventSource(cdkObject) {
public constructor(stream: CloudshiftdevAwscdkServicesKinesisIStream,
props: KinesisEventSourceProps) :
this(software.amazon.awscdk.services.lambda.eventsources.KinesisEventSource(stream.let(CloudshiftdevAwscdkServicesKinesisIStream.Companion::unwrap),
props.let(KinesisEventSourceProps.Companion::unwrap))
)
public constructor(stream: CloudshiftdevAwscdkServicesKinesisIStream,
props: KinesisEventSourceProps.Builder.() -> Unit) : this(stream,
KinesisEventSourceProps(props)
)
/**
* Called by `lambda.addEventSource` to allow the event source to bind to this function.
*
* @param target
*/
public override fun bind(target: IFunction) {
unwrap(this).bind(target.let(IFunction.Companion::unwrap))
}
/**
* The ARN for this EventSourceMapping.
*/
public open fun eventSourceMappingArn(): String = unwrap(this).getEventSourceMappingArn()
/**
* The identifier for this EventSourceMapping.
*/
public open fun eventSourceMappingId(): String = unwrap(this).getEventSourceMappingId()
/**
*
*/
public open fun stream(): CloudshiftdevAwscdkServicesKinesisIStream =
unwrap(this).getStream().let(CloudshiftdevAwscdkServicesKinesisIStream::wrap)
/**
* A fluent builder for [io.cloudshiftdev.awscdk.services.lambda.eventsources.KinesisEventSource].
*/
@CdkDslMarker
public interface Builder {
/**
* 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` and `SelfManagedKafkaEventSource`
*
*
* Default: 100
*
* @param batchSize The largest number of records that AWS Lambda will retrieve from your event
* source at the time of invoking your function.
*/
public fun batchSize(batchSize: Number)
/**
* If the function returns an error, split the batch in two and retry.
*
* Default: false
*
* @param bisectBatchOnError If the function returns an error, split the batch in two and retry.
*
*/
public fun bisectBatchOnError(bisectBatchOnError: Boolean)
/**
* If the stream event source mapping should be enabled.
*
* Default: true
*
* @param enabled If the stream event source mapping should be enabled.
*/
public fun enabled(enabled: Boolean)
/**
* 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)
* @param filterEncryption Add Customer managed KMS key to encrypt Filter Criteria.
*/
public fun filterEncryption(filterEncryption: IKey)
/**
* Add filter criteria option.
*
* Default: - None
*
* @param filters Add filter criteria option.
*/
public fun filters(filters: List