All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.lambda.kotlin.EventSourceMappingArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.lambda.kotlin

import com.pulumi.awsnative.lambda.EventSourceMappingArgs.builder
import com.pulumi.awsnative.lambda.kotlin.enums.EventSourceMappingFunctionResponseTypesItem
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingDestinationConfigArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingDestinationConfigArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingDocumentDbEventSourceConfigArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingDocumentDbEventSourceConfigArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingFilterCriteriaArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingFilterCriteriaArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingScalingConfigArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingScalingConfigArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSelfManagedEventSourceArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSelfManagedEventSourceArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSourceAccessConfigurationArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.EventSourceMappingSourceAccessConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The ``AWS::Lambda::EventSourceMapping`` resource creates a mapping between an event source and an LAMlong function. LAM reads items from the event source and triggers the function.
 *  For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source.
 *   +   [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping)
 *   +   [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping)
 *   +   [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource)
 *   +   [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping)
 *   +   [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html)
 *   +   [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html)
 *   +   [Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html)
 * @property amazonManagedKafkaEventSourceConfig Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
 * @property batchSize The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
 *   +   *Amazon Kinesis* – Default 100. Max 10,000.
 *   +   *Amazon DynamoDB Streams* – Default 100. Max 10,000.
 *   +   *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
 *   +   *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000.
 *   +   *Self-managed Apache Kafka* – Default 100. Max 10,000.
 *   +   *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000.
 *   +   *DocumentDB* – Default 100. Max 10,000.
 * @property bisectBatchOnFunctionError (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
 * @property destinationConfig (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
 * @property documentDbEventSourceConfig Specific configuration settings for a DocumentDB event source.
 * @property enabled When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
 *  Default: True
 * @property eventSourceArn The Amazon Resource Name (ARN) of the event source.
 *   +   *Amazon Kinesis* – The ARN of the data stream or a stream consumer.
 *   +   *Amazon DynamoDB Streams* – The ARN of the stream.
 *   +   *Amazon Simple Queue Service* – The ARN of the queue.
 *   +   *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).
 *   +   *Amazon MQ* – The ARN of the broker.
 *   +   *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
 * @property filterCriteria An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).
 * @property functionName The name or ARN of the Lambda function.
 *   **Name formats**
 *  +   *Function name* – ``MyFunction``.
 *   +   *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction``.
 *   +   *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD``.
 *   +   *Partial ARN* – ``123456789012:function:MyFunction``.
 *  The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
 * @property functionResponseTypes (Streams and SQS) A list of current response type enums applied to the event source mapping.
 *  Valid Values: ``ReportBatchItemFailures``
 * @property kmsKeyArn The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics) .
 * @property maximumBatchingWindowInSeconds The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
 *   *Default (, , event sources)*: 0
 *   *Default (, Kafka, , event sources)*: 500 ms
 *   *Related setting:* For SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
 * @property maximumRecordAgeInSeconds (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
 *   The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
 * @property maximumRetryAttempts (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
 * @property parallelizationFactor (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
 * @property queues (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
 * @property scalingConfig (Amazon SQS only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).
 * @property selfManagedEventSource The self-managed Apache Kafka cluster for your event source.
 * @property selfManagedKafkaEventSourceConfig Specific configuration settings for a self-managed Apache Kafka event source.
 * @property sourceAccessConfigurations An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
 * @property startingPosition The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
 *   +   *LATEST* - Read only new records.
 *   +   *TRIM_HORIZON* - Process all available records.
 *   +   *AT_TIMESTAMP* - Specify a time from which to start reading records.
 * @property startingPositionTimestamp With ``StartingPosition`` set to ``AT_TIMESTAMP``, the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.
 * @property topics The name of the Kafka topic.
 * @property tumblingWindowInSeconds (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
 */
public data class EventSourceMappingArgs(
    public val amazonManagedKafkaEventSourceConfig: Output? = null,
    public val batchSize: Output? = null,
    public val bisectBatchOnFunctionError: Output? = null,
    public val destinationConfig: Output? = null,
    public val documentDbEventSourceConfig: Output? =
        null,
    public val enabled: Output? = null,
    public val eventSourceArn: Output? = null,
    public val filterCriteria: Output? = null,
    public val functionName: Output? = null,
    public val functionResponseTypes: Output>? =
        null,
    public val kmsKeyArn: Output? = null,
    public val maximumBatchingWindowInSeconds: Output? = null,
    public val maximumRecordAgeInSeconds: Output? = null,
    public val maximumRetryAttempts: Output? = null,
    public val parallelizationFactor: Output? = null,
    public val queues: Output>? = null,
    public val scalingConfig: Output? = null,
    public val selfManagedEventSource: Output? = null,
    public val selfManagedKafkaEventSourceConfig: Output? = null,
    public val sourceAccessConfigurations: Output>? = null,
    public val startingPosition: Output? = null,
    public val startingPositionTimestamp: Output? = null,
    public val topics: Output>? = null,
    public val tumblingWindowInSeconds: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lambda.EventSourceMappingArgs =
        com.pulumi.awsnative.lambda.EventSourceMappingArgs.builder()
            .amazonManagedKafkaEventSourceConfig(
                amazonManagedKafkaEventSourceConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .batchSize(batchSize?.applyValue({ args0 -> args0 }))
            .bisectBatchOnFunctionError(bisectBatchOnFunctionError?.applyValue({ args0 -> args0 }))
            .destinationConfig(destinationConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .documentDbEventSourceConfig(
                documentDbEventSourceConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .eventSourceArn(eventSourceArn?.applyValue({ args0 -> args0 }))
            .filterCriteria(filterCriteria?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .functionName(functionName?.applyValue({ args0 -> args0 }))
            .functionResponseTypes(
                functionResponseTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .kmsKeyArn(kmsKeyArn?.applyValue({ args0 -> args0 }))
            .maximumBatchingWindowInSeconds(maximumBatchingWindowInSeconds?.applyValue({ args0 -> args0 }))
            .maximumRecordAgeInSeconds(maximumRecordAgeInSeconds?.applyValue({ args0 -> args0 }))
            .maximumRetryAttempts(maximumRetryAttempts?.applyValue({ args0 -> args0 }))
            .parallelizationFactor(parallelizationFactor?.applyValue({ args0 -> args0 }))
            .queues(queues?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .scalingConfig(scalingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .selfManagedEventSource(
                selfManagedEventSource?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .selfManagedKafkaEventSourceConfig(
                selfManagedKafkaEventSourceConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .sourceAccessConfigurations(
                sourceAccessConfigurations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .startingPosition(startingPosition?.applyValue({ args0 -> args0 }))
            .startingPositionTimestamp(startingPositionTimestamp?.applyValue({ args0 -> args0 }))
            .topics(topics?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tumblingWindowInSeconds(tumblingWindowInSeconds?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EventSourceMappingArgs].
 */
@PulumiTagMarker
public class EventSourceMappingArgsBuilder internal constructor() {
    private var amazonManagedKafkaEventSourceConfig:
        Output? = null

    private var batchSize: Output? = null

    private var bisectBatchOnFunctionError: Output? = null

    private var destinationConfig: Output? = null

    private var documentDbEventSourceConfig:
        Output? = null

    private var enabled: Output? = null

    private var eventSourceArn: Output? = null

    private var filterCriteria: Output? = null

    private var functionName: Output? = null

    private var functionResponseTypes: Output>? =
        null

    private var kmsKeyArn: Output? = null

    private var maximumBatchingWindowInSeconds: Output? = null

    private var maximumRecordAgeInSeconds: Output? = null

    private var maximumRetryAttempts: Output? = null

    private var parallelizationFactor: Output? = null

    private var queues: Output>? = null

    private var scalingConfig: Output? = null

    private var selfManagedEventSource: Output? = null

    private var selfManagedKafkaEventSourceConfig:
        Output? = null

    private var sourceAccessConfigurations:
        Output>? = null

    private var startingPosition: Output? = null

    private var startingPositionTimestamp: Output? = null

    private var topics: Output>? = null

    private var tumblingWindowInSeconds: Output? = null

    /**
     * @param value Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
     */
    @JvmName("nkujquunxyikrrgh")
    public suspend fun amazonManagedKafkaEventSourceConfig(`value`: Output) {
        this.amazonManagedKafkaEventSourceConfig = value
    }

    /**
     * @param value The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
     *   +   *Amazon Kinesis* – Default 100. Max 10,000.
     *   +   *Amazon DynamoDB Streams* – Default 100. Max 10,000.
     *   +   *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
     *   +   *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000.
     *   +   *Self-managed Apache Kafka* – Default 100. Max 10,000.
     *   +   *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000.
     *   +   *DocumentDB* – Default 100. Max 10,000.
     */
    @JvmName("shfuxdolxumoevdo")
    public suspend fun batchSize(`value`: Output) {
        this.batchSize = value
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
     */
    @JvmName("omadcruuxywhaypo")
    public suspend fun bisectBatchOnFunctionError(`value`: Output) {
        this.bisectBatchOnFunctionError = value
    }

    /**
     * @param value (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
     */
    @JvmName("aohthqljoxfifery")
    public suspend fun destinationConfig(`value`: Output) {
        this.destinationConfig = value
    }

    /**
     * @param value Specific configuration settings for a DocumentDB event source.
     */
    @JvmName("aimnkjxjfalfbnwm")
    public suspend fun documentDbEventSourceConfig(`value`: Output) {
        this.documentDbEventSourceConfig = value
    }

    /**
     * @param value When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
     *  Default: True
     */
    @JvmName("ortchxdkutilqnsq")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the event source.
     *   +   *Amazon Kinesis* – The ARN of the data stream or a stream consumer.
     *   +   *Amazon DynamoDB Streams* – The ARN of the stream.
     *   +   *Amazon Simple Queue Service* – The ARN of the queue.
     *   +   *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).
     *   +   *Amazon MQ* – The ARN of the broker.
     *   +   *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
     */
    @JvmName("lfkhyedxvnwylvul")
    public suspend fun eventSourceArn(`value`: Output) {
        this.eventSourceArn = value
    }

    /**
     * @param value An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).
     */
    @JvmName("ygjpbesncvvpwsix")
    public suspend fun filterCriteria(`value`: Output) {
        this.filterCriteria = value
    }

    /**
     * @param value The name or ARN of the Lambda function.
     *   **Name formats**
     *  +   *Function name* – ``MyFunction``.
     *   +   *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction``.
     *   +   *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD``.
     *   +   *Partial ARN* – ``123456789012:function:MyFunction``.
     *  The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
     */
    @JvmName("hjvyilgyplrrlmhx")
    public suspend fun functionName(`value`: Output) {
        this.functionName = value
    }

    /**
     * @param value (Streams and SQS) A list of current response type enums applied to the event source mapping.
     *  Valid Values: ``ReportBatchItemFailures``
     */
    @JvmName("uxdqkcfnofeajquk")
    public suspend fun functionResponseTypes(`value`: Output>) {
        this.functionResponseTypes = value
    }

    @JvmName("atjtatjkvvonqqhd")
    public suspend fun functionResponseTypes(vararg values: Output) {
        this.functionResponseTypes = Output.all(values.asList())
    }

    /**
     * @param values (Streams and SQS) A list of current response type enums applied to the event source mapping.
     *  Valid Values: ``ReportBatchItemFailures``
     */
    @JvmName("udmklmplpwepqxfb")
    public suspend fun functionResponseTypes(values: List>) {
        this.functionResponseTypes = Output.all(values)
    }

    /**
     * @param value The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics) .
     */
    @JvmName("qbubrtyyjankfemv")
    public suspend fun kmsKeyArn(`value`: Output) {
        this.kmsKeyArn = value
    }

    /**
     * @param value The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
     *   *Default (, , event sources)*: 0
     *   *Default (, Kafka, , event sources)*: 500 ms
     *   *Related setting:* For SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
     */
    @JvmName("rjiwidcrarmxtwrt")
    public suspend fun maximumBatchingWindowInSeconds(`value`: Output) {
        this.maximumBatchingWindowInSeconds = value
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
     *   The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
     */
    @JvmName("umgmxrhflfybfhxs")
    public suspend fun maximumRecordAgeInSeconds(`value`: Output) {
        this.maximumRecordAgeInSeconds = value
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
     */
    @JvmName("lfvdpjugmjpvfdvb")
    public suspend fun maximumRetryAttempts(`value`: Output) {
        this.maximumRetryAttempts = value
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
     */
    @JvmName("wpgxuerkrlymakwj")
    public suspend fun parallelizationFactor(`value`: Output) {
        this.parallelizationFactor = value
    }

    /**
     * @param value (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
     */
    @JvmName("jkwtdgohswqhnvxm")
    public suspend fun queues(`value`: Output>) {
        this.queues = value
    }

    @JvmName("vmrfqtmypwqcnevl")
    public suspend fun queues(vararg values: Output) {
        this.queues = Output.all(values.asList())
    }

    /**
     * @param values (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
     */
    @JvmName("hepenwhimjpxxpum")
    public suspend fun queues(values: List>) {
        this.queues = Output.all(values)
    }

    /**
     * @param value (Amazon SQS only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).
     */
    @JvmName("lirveogllgcywxkc")
    public suspend fun scalingConfig(`value`: Output) {
        this.scalingConfig = value
    }

    /**
     * @param value The self-managed Apache Kafka cluster for your event source.
     */
    @JvmName("vhabagknshysdonv")
    public suspend fun selfManagedEventSource(`value`: Output) {
        this.selfManagedEventSource = value
    }

    /**
     * @param value Specific configuration settings for a self-managed Apache Kafka event source.
     */
    @JvmName("odeqcxfvtansqgmi")
    public suspend fun selfManagedKafkaEventSourceConfig(`value`: Output) {
        this.selfManagedKafkaEventSourceConfig = value
    }

    /**
     * @param value An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("msnxhotjvlumwojb")
    public suspend fun sourceAccessConfigurations(`value`: Output>) {
        this.sourceAccessConfigurations = value
    }

    @JvmName("tryavvbxrmtkymms")
    public suspend fun sourceAccessConfigurations(vararg values: Output) {
        this.sourceAccessConfigurations = Output.all(values.asList())
    }

    /**
     * @param values An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("wwxnsoxwufnfaplr")
    public suspend fun sourceAccessConfigurations(values: List>) {
        this.sourceAccessConfigurations = Output.all(values)
    }

    /**
     * @param value The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
     *   +   *LATEST* - Read only new records.
     *   +   *TRIM_HORIZON* - Process all available records.
     *   +   *AT_TIMESTAMP* - Specify a time from which to start reading records.
     */
    @JvmName("yangosckxqunffwy")
    public suspend fun startingPosition(`value`: Output) {
        this.startingPosition = value
    }

    /**
     * @param value With ``StartingPosition`` set to ``AT_TIMESTAMP``, the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.
     */
    @JvmName("lhnrkrcrcfjjnuax")
    public suspend fun startingPositionTimestamp(`value`: Output) {
        this.startingPositionTimestamp = value
    }

    /**
     * @param value The name of the Kafka topic.
     */
    @JvmName("rqdgqpgmnekfgnlk")
    public suspend fun topics(`value`: Output>) {
        this.topics = value
    }

    @JvmName("ryrrtoisrwsauiks")
    public suspend fun topics(vararg values: Output) {
        this.topics = Output.all(values.asList())
    }

    /**
     * @param values The name of the Kafka topic.
     */
    @JvmName("godyarqjslwmfeun")
    public suspend fun topics(values: List>) {
        this.topics = Output.all(values)
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
     */
    @JvmName("vbxandfpmutohpeg")
    public suspend fun tumblingWindowInSeconds(`value`: Output) {
        this.tumblingWindowInSeconds = value
    }

    /**
     * @param value Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
     */
    @JvmName("mmcsroludhxerblc")
    public suspend fun amazonManagedKafkaEventSourceConfig(`value`: EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.amazonManagedKafkaEventSourceConfig = mapped
    }

    /**
     * @param argument Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
     */
    @JvmName("ibnhikbsjflgwxet")
    public suspend fun amazonManagedKafkaEventSourceConfig(argument: suspend EventSourceMappingAmazonManagedKafkaEventSourceConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            EventSourceMappingAmazonManagedKafkaEventSourceConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.amazonManagedKafkaEventSourceConfig = mapped
    }

    /**
     * @param value The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).
     *   +   *Amazon Kinesis* – Default 100. Max 10,000.
     *   +   *Amazon DynamoDB Streams* – Default 100. Max 10,000.
     *   +   *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.
     *   +   *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000.
     *   +   *Self-managed Apache Kafka* – Default 100. Max 10,000.
     *   +   *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000.
     *   +   *DocumentDB* – Default 100. Max 10,000.
     */
    @JvmName("favveoldggwaiwni")
    public suspend fun batchSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.batchSize = mapped
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false.
     */
    @JvmName("vhgltflkrvbgbvkw")
    public suspend fun bisectBatchOnFunctionError(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bisectBatchOnFunctionError = mapped
    }

    /**
     * @param value (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
     */
    @JvmName("oekwuqdifhnnhbcs")
    public suspend fun destinationConfig(`value`: EventSourceMappingDestinationConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationConfig = mapped
    }

    /**
     * @param argument (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it.
     */
    @JvmName("wkutgxpnixjcvelb")
    public suspend fun destinationConfig(argument: suspend EventSourceMappingDestinationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingDestinationConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.destinationConfig = mapped
    }

    /**
     * @param value Specific configuration settings for a DocumentDB event source.
     */
    @JvmName("hmalucympofhheyf")
    public suspend fun documentDbEventSourceConfig(`value`: EventSourceMappingDocumentDbEventSourceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.documentDbEventSourceConfig = mapped
    }

    /**
     * @param argument Specific configuration settings for a DocumentDB event source.
     */
    @JvmName("vpewhmmqbexdatls")
    public suspend fun documentDbEventSourceConfig(argument: suspend EventSourceMappingDocumentDbEventSourceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingDocumentDbEventSourceConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.documentDbEventSourceConfig = mapped
    }

    /**
     * @param value When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
     *  Default: True
     */
    @JvmName("cqyroprswnrgqegm")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the event source.
     *   +   *Amazon Kinesis* – The ARN of the data stream or a stream consumer.
     *   +   *Amazon DynamoDB Streams* – The ARN of the stream.
     *   +   *Amazon Simple Queue Service* – The ARN of the queue.
     *   +   *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster or the ARN of the VPC connection (for [cross-account event source mappings](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc)).
     *   +   *Amazon MQ* – The ARN of the broker.
     *   +   *Amazon DocumentDB* – The ARN of the DocumentDB change stream.
     */
    @JvmName("hksbrnksurkpbcus")
    public suspend fun eventSourceArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventSourceArn = mapped
    }

    /**
     * @param value An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).
     */
    @JvmName("xipdegwjqdcbmxam")
    public suspend fun filterCriteria(`value`: EventSourceMappingFilterCriteriaArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filterCriteria = mapped
    }

    /**
     * @param argument An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html).
     */
    @JvmName("qrrqgduqpefuxovw")
    public suspend fun filterCriteria(argument: suspend EventSourceMappingFilterCriteriaArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingFilterCriteriaArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.filterCriteria = mapped
    }

    /**
     * @param value The name or ARN of the Lambda function.
     *   **Name formats**
     *  +   *Function name* – ``MyFunction``.
     *   +   *Function ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction``.
     *   +   *Version or Alias ARN* – ``arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD``.
     *   +   *Partial ARN* – ``123456789012:function:MyFunction``.
     *  The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.
     */
    @JvmName("osbpfifcosvjcfcu")
    public suspend fun functionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionName = mapped
    }

    /**
     * @param value (Streams and SQS) A list of current response type enums applied to the event source mapping.
     *  Valid Values: ``ReportBatchItemFailures``
     */
    @JvmName("fmciurxsrhobhtpi")
    public suspend fun functionResponseTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionResponseTypes = mapped
    }

    /**
     * @param values (Streams and SQS) A list of current response type enums applied to the event source mapping.
     *  Valid Values: ``ReportBatchItemFailures``
     */
    @JvmName("jlxmcmvlnfvivycm")
    public suspend fun functionResponseTypes(vararg values: EventSourceMappingFunctionResponseTypesItem) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.functionResponseTypes = mapped
    }

    /**
     * @param value The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics) .
     */
    @JvmName("cxvnlilgddbbwhde")
    public suspend fun kmsKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyArn = mapped
    }

    /**
     * @param value The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
     *   *Default (, , event sources)*: 0
     *   *Default (, Kafka, , event sources)*: 500 ms
     *   *Related setting:* For SQS event sources, when you set ``BatchSize`` to a value greater than 10, you must set ``MaximumBatchingWindowInSeconds`` to at least 1.
     */
    @JvmName("sqvpqclbkvgnuakh")
    public suspend fun maximumBatchingWindowInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumBatchingWindowInSeconds = mapped
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.
     *   The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed
     */
    @JvmName("lebepefelywkbblm")
    public suspend fun maximumRecordAgeInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumRecordAgeInSeconds = mapped
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.
     */
    @JvmName("afgvtyaewfgcgoub")
    public suspend fun maximumRetryAttempts(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumRetryAttempts = mapped
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.
     */
    @JvmName("xwelksiqpteeygfk")
    public suspend fun parallelizationFactor(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parallelizationFactor = mapped
    }

    /**
     * @param value (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
     */
    @JvmName("hgcupcrfuyqotuck")
    public suspend fun queues(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queues = mapped
    }

    /**
     * @param values (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
     */
    @JvmName("syybkargnhceopnu")
    public suspend fun queues(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.queues = mapped
    }

    /**
     * @param value (Amazon SQS only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).
     */
    @JvmName("ldelqscqktdtqcwc")
    public suspend fun scalingConfig(`value`: EventSourceMappingScalingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scalingConfig = mapped
    }

    /**
     * @param argument (Amazon SQS only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency).
     */
    @JvmName("fkboawtoiqcrswsj")
    public suspend fun scalingConfig(argument: suspend EventSourceMappingScalingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingScalingConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scalingConfig = mapped
    }

    /**
     * @param value The self-managed Apache Kafka cluster for your event source.
     */
    @JvmName("wehfxxochlmwfojv")
    public suspend fun selfManagedEventSource(`value`: EventSourceMappingSelfManagedEventSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selfManagedEventSource = mapped
    }

    /**
     * @param argument The self-managed Apache Kafka cluster for your event source.
     */
    @JvmName("htmusnfwyqvqpnsh")
    public suspend fun selfManagedEventSource(argument: suspend EventSourceMappingSelfManagedEventSourceArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingSelfManagedEventSourceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.selfManagedEventSource = mapped
    }

    /**
     * @param value Specific configuration settings for a self-managed Apache Kafka event source.
     */
    @JvmName("odudrrkhogjptgmv")
    public suspend fun selfManagedKafkaEventSourceConfig(`value`: EventSourceMappingSelfManagedKafkaEventSourceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selfManagedKafkaEventSourceConfig = mapped
    }

    /**
     * @param argument Specific configuration settings for a self-managed Apache Kafka event source.
     */
    @JvmName("qtjnsgxghyogphua")
    public suspend fun selfManagedKafkaEventSourceConfig(argument: suspend EventSourceMappingSelfManagedKafkaEventSourceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = EventSourceMappingSelfManagedKafkaEventSourceConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.selfManagedKafkaEventSourceConfig = mapped
    }

    /**
     * @param value An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("xwyfsfddlkwujfmj")
    public suspend fun sourceAccessConfigurations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceAccessConfigurations = mapped
    }

    /**
     * @param argument An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("esvkrnhhdxxgfhmq")
    public suspend fun sourceAccessConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EventSourceMappingSourceAccessConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sourceAccessConfigurations = mapped
    }

    /**
     * @param argument An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("alcjxklauhbvbuvq")
    public suspend fun sourceAccessConfigurations(vararg argument: suspend EventSourceMappingSourceAccessConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EventSourceMappingSourceAccessConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sourceAccessConfigurations = mapped
    }

    /**
     * @param argument An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("anhaawdxscphmnbu")
    public suspend fun sourceAccessConfigurations(argument: suspend EventSourceMappingSourceAccessConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EventSourceMappingSourceAccessConfigurationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.sourceAccessConfigurations = mapped
    }

    /**
     * @param values An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
     */
    @JvmName("pjnwpgdoogjujfeh")
    public suspend fun sourceAccessConfigurations(vararg values: EventSourceMappingSourceAccessConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceAccessConfigurations = mapped
    }

    /**
     * @param value The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
     *   +   *LATEST* - Read only new records.
     *   +   *TRIM_HORIZON* - Process all available records.
     *   +   *AT_TIMESTAMP* - Specify a time from which to start reading records.
     */
    @JvmName("tmsnpmugwfraojgb")
    public suspend fun startingPosition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startingPosition = mapped
    }

    /**
     * @param value With ``StartingPosition`` set to ``AT_TIMESTAMP``, the time from which to start reading, in Unix time seconds. ``StartingPositionTimestamp`` cannot be in the future.
     */
    @JvmName("cabyrcvbaumdpttj")
    public suspend fun startingPositionTimestamp(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startingPositionTimestamp = mapped
    }

    /**
     * @param value The name of the Kafka topic.
     */
    @JvmName("jwrjdqtpxbmruvkg")
    public suspend fun topics(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topics = mapped
    }

    /**
     * @param values The name of the Kafka topic.
     */
    @JvmName("itcxcogggtxxuysx")
    public suspend fun topics(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.topics = mapped
    }

    /**
     * @param value (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.
     */
    @JvmName("prkloouvneddgvjr")
    public suspend fun tumblingWindowInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tumblingWindowInSeconds = mapped
    }

    internal fun build(): EventSourceMappingArgs = EventSourceMappingArgs(
        amazonManagedKafkaEventSourceConfig = amazonManagedKafkaEventSourceConfig,
        batchSize = batchSize,
        bisectBatchOnFunctionError = bisectBatchOnFunctionError,
        destinationConfig = destinationConfig,
        documentDbEventSourceConfig = documentDbEventSourceConfig,
        enabled = enabled,
        eventSourceArn = eventSourceArn,
        filterCriteria = filterCriteria,
        functionName = functionName,
        functionResponseTypes = functionResponseTypes,
        kmsKeyArn = kmsKeyArn,
        maximumBatchingWindowInSeconds = maximumBatchingWindowInSeconds,
        maximumRecordAgeInSeconds = maximumRecordAgeInSeconds,
        maximumRetryAttempts = maximumRetryAttempts,
        parallelizationFactor = parallelizationFactor,
        queues = queues,
        scalingConfig = scalingConfig,
        selfManagedEventSource = selfManagedEventSource,
        selfManagedKafkaEventSourceConfig = selfManagedKafkaEventSourceConfig,
        sourceAccessConfigurations = sourceAccessConfigurations,
        startingPosition = startingPosition,
        startingPositionTimestamp = startingPositionTimestamp,
        topics = topics,
        tumblingWindowInSeconds = tumblingWindowInSeconds,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy