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.dynamodb.ITable as CloudshiftdevAwscdkServicesDynamodbITable
import software.amazon.awscdk.services.dynamodb.ITable as AmazonAwscdkServicesDynamodbITable
/**
* Use an Amazon DynamoDB stream as an event source for AWS Lambda.
*
* Example:
*
* ```
* import io.cloudshiftdev.awscdk.services.lambda.eventsources.*;
* import io.cloudshiftdev.awscdk.services.dynamodb.*;
* Function fn;
* Table table = Table.Builder.create(this, "Table")
* .partitionKey(Attribute.builder()
* .name("id")
* .type(AttributeType.STRING)
* .build())
* .stream(StreamViewType.NEW_IMAGE)
* .build();
* fn.addEventSource(DynamoEventSource.Builder.create(table)
* .startingPosition(StartingPosition.LATEST)
* .filters(List.of(FilterCriteria.filter(Map.of("eventName", FilterRule.isEqual("INSERT")))))
* .build());
* ```
*/
public open class DynamoEventSource(
cdkObject: software.amazon.awscdk.services.lambda.eventsources.DynamoEventSource,
) : StreamEventSource(cdkObject) {
public constructor(table: CloudshiftdevAwscdkServicesDynamodbITable,
props: DynamoEventSourceProps) :
this(software.amazon.awscdk.services.lambda.eventsources.DynamoEventSource(table.let(CloudshiftdevAwscdkServicesDynamodbITable.Companion::unwrap),
props.let(DynamoEventSourceProps.Companion::unwrap))
)
public constructor(table: CloudshiftdevAwscdkServicesDynamodbITable,
props: DynamoEventSourceProps.Builder.() -> Unit) : this(table, DynamoEventSourceProps(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()
/**
* A fluent builder for [io.cloudshiftdev.awscdk.services.lambda.eventsources.DynamoEventSource].
*/
@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