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

com.pulumi.awsnative.lambda.kotlin.outputs.GetEventSourceMappingResult.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.lambda.kotlin.outputs

import com.pulumi.awsnative.lambda.kotlin.enums.EventSourceMappingFunctionResponseTypesItem
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @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 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 id The event source mapping's ID.
 * @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 sourceAccessConfigurations An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
 * @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 GetEventSourceMappingResult(
    public val batchSize: Int? = null,
    public val bisectBatchOnFunctionError: Boolean? = null,
    public val destinationConfig: EventSourceMappingDestinationConfig? = null,
    public val documentDbEventSourceConfig: EventSourceMappingDocumentDbEventSourceConfig? = null,
    public val enabled: Boolean? = null,
    public val filterCriteria: EventSourceMappingFilterCriteria? = null,
    public val functionName: String? = null,
    public val functionResponseTypes: List? = null,
    public val id: String? = null,
    public val maximumBatchingWindowInSeconds: Int? = null,
    public val maximumRecordAgeInSeconds: Int? = null,
    public val maximumRetryAttempts: Int? = null,
    public val parallelizationFactor: Int? = null,
    public val queues: List? = null,
    public val scalingConfig: EventSourceMappingScalingConfig? = null,
    public val sourceAccessConfigurations: List? = null,
    public val topics: List? = null,
    public val tumblingWindowInSeconds: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.lambda.outputs.GetEventSourceMappingResult): GetEventSourceMappingResult = GetEventSourceMappingResult(
            batchSize = javaType.batchSize().map({ args0 -> args0 }).orElse(null),
            bisectBatchOnFunctionError = javaType.bisectBatchOnFunctionError().map({ args0 ->
                args0
            }).orElse(null),
            destinationConfig = javaType.destinationConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.outputs.EventSourceMappingDestinationConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            documentDbEventSourceConfig = javaType.documentDbEventSourceConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.outputs.EventSourceMappingDocumentDbEventSourceConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
            filterCriteria = javaType.filterCriteria().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.outputs.EventSourceMappingFilterCriteria.Companion.toKotlin(args0)
                })
            }).orElse(null),
            functionName = javaType.functionName().map({ args0 -> args0 }).orElse(null),
            functionResponseTypes = javaType.functionResponseTypes().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.enums.EventSourceMappingFunctionResponseTypesItem.Companion.toKotlin(args0)
                })
            }),
            id = javaType.id().map({ args0 -> args0 }).orElse(null),
            maximumBatchingWindowInSeconds = javaType.maximumBatchingWindowInSeconds().map({ args0 ->
                args0
            }).orElse(null),
            maximumRecordAgeInSeconds = javaType.maximumRecordAgeInSeconds().map({ args0 ->
                args0
            }).orElse(null),
            maximumRetryAttempts = javaType.maximumRetryAttempts().map({ args0 -> args0 }).orElse(null),
            parallelizationFactor = javaType.parallelizationFactor().map({ args0 -> args0 }).orElse(null),
            queues = javaType.queues().map({ args0 -> args0 }),
            scalingConfig = javaType.scalingConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.outputs.EventSourceMappingScalingConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            sourceAccessConfigurations = javaType.sourceAccessConfigurations().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.lambda.kotlin.outputs.EventSourceMappingSourceAccessConfiguration.Companion.toKotlin(args0)
                })
            }),
            topics = javaType.topics().map({ args0 -> args0 }),
            tumblingWindowInSeconds = javaType.tumblingWindowInSeconds().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy