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

com.pulumi.aws.lambda.inputs.EventSourceMappingState Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.lambda.inputs;

import com.pulumi.aws.lambda.inputs.EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingDestinationConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingDocumentDbEventSourceConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingFilterCriteriaArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingScalingConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedEventSourceArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSelfManagedKafkaEventSourceConfigArgs;
import com.pulumi.aws.lambda.inputs.EventSourceMappingSourceAccessConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class EventSourceMappingState extends com.pulumi.resources.ResourceArgs {

    public static final EventSourceMappingState Empty = new EventSourceMappingState();

    /**
     * Additional configuration block for Amazon Managed Kafka sources. Incompatible with "self_managed_event_source" and "self_managed_kafka_event_source_config". Detailed below.
     * 
     */
    @Import(name="amazonManagedKafkaEventSourceConfig")
    private @Nullable Output amazonManagedKafkaEventSourceConfig;

    /**
     * @return Additional configuration block for Amazon Managed Kafka sources. Incompatible with "self_managed_event_source" and "self_managed_kafka_event_source_config". Detailed below.
     * 
     */
    public Optional> amazonManagedKafkaEventSourceConfig() {
        return Optional.ofNullable(this.amazonManagedKafkaEventSourceConfig);
    }

    /**
     * The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100` for DynamoDB, Kinesis, MQ and MSK, `10` for SQS.
     * 
     */
    @Import(name="batchSize")
    private @Nullable Output batchSize;

    /**
     * @return The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100` for DynamoDB, Kinesis, MQ and MSK, `10` for SQS.
     * 
     */
    public Optional> batchSize() {
        return Optional.ofNullable(this.batchSize);
    }

    /**
     * - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to `false`.
     * 
     */
    @Import(name="bisectBatchOnFunctionError")
    private @Nullable Output bisectBatchOnFunctionError;

    /**
     * @return - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to `false`.
     * 
     */
    public Optional> bisectBatchOnFunctionError() {
        return Optional.ofNullable(this.bisectBatchOnFunctionError);
    }

    /**
     * - (Optional) An Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). Detailed below.
     * 
     */
    @Import(name="destinationConfig")
    private @Nullable Output destinationConfig;

    /**
     * @return - (Optional) An Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). Detailed below.
     * 
     */
    public Optional> destinationConfig() {
        return Optional.ofNullable(this.destinationConfig);
    }

    /**
     * - (Optional) Configuration settings for a DocumentDB event source. Detailed below.
     * 
     */
    @Import(name="documentDbEventSourceConfig")
    private @Nullable Output documentDbEventSourceConfig;

    /**
     * @return - (Optional) Configuration settings for a DocumentDB event source. Detailed below.
     * 
     */
    public Optional> documentDbEventSourceConfig() {
        return Optional.ofNullable(this.documentDbEventSourceConfig);
    }

    /**
     * Determines if the mapping will be enabled on creation. Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Determines if the mapping will be enabled on creation. Defaults to `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The event source ARN - this is required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream.  It is incompatible with a Self Managed Kafka source.
     * 
     */
    @Import(name="eventSourceArn")
    private @Nullable Output eventSourceArn;

    /**
     * @return The event source ARN - this is required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream.  It is incompatible with a Self Managed Kafka source.
     * 
     */
    public Optional> eventSourceArn() {
        return Optional.ofNullable(this.eventSourceArn);
    }

    /**
     * The criteria to use for [event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) Kinesis stream, DynamoDB stream, SQS queue event sources. Detailed below.
     * 
     */
    @Import(name="filterCriteria")
    private @Nullable Output filterCriteria;

    /**
     * @return The criteria to use for [event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) Kinesis stream, DynamoDB stream, SQS queue event sources. Detailed below.
     * 
     */
    public Optional> filterCriteria() {
        return Optional.ofNullable(this.filterCriteria);
    }

    /**
     * The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from `function_name` above.)
     * 
     */
    @Import(name="functionArn")
    private @Nullable Output functionArn;

    /**
     * @return The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from `function_name` above.)
     * 
     */
    public Optional> functionArn() {
        return Optional.ofNullable(this.functionArn);
    }

    /**
     * The name or the ARN of the Lambda function that will be subscribing to events.
     * 
     */
    @Import(name="functionName")
    private @Nullable Output functionName;

    /**
     * @return The name or the ARN of the Lambda function that will be subscribing to events.
     * 
     */
    public Optional> functionName() {
        return Optional.ofNullable(this.functionName);
    }

    /**
     * A list of current response type enums applied to the event source mapping for [AWS Lambda checkpointing](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting). Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: `ReportBatchItemFailures`.
     * 
     */
    @Import(name="functionResponseTypes")
    private @Nullable Output> functionResponseTypes;

    /**
     * @return A list of current response type enums applied to the event source mapping for [AWS Lambda checkpointing](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting). Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: `ReportBatchItemFailures`.
     * 
     */
    public Optional>> functionResponseTypes() {
        return Optional.ofNullable(this.functionResponseTypes);
    }

    /**
     * The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
     * 
     */
    @Import(name="kmsKeyArn")
    private @Nullable Output kmsKeyArn;

    /**
     * @return The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
     * 
     */
    public Optional> kmsKeyArn() {
        return Optional.ofNullable(this.kmsKeyArn);
    }

    /**
     * The date this resource was last modified.
     * 
     */
    @Import(name="lastModified")
    private @Nullable Output lastModified;

    /**
     * @return The date this resource was last modified.
     * 
     */
    public Optional> lastModified() {
        return Optional.ofNullable(this.lastModified);
    }

    /**
     * The result of the last AWS Lambda invocation of your Lambda function.
     * 
     */
    @Import(name="lastProcessingResult")
    private @Nullable Output lastProcessingResult;

    /**
     * @return The result of the last AWS Lambda invocation of your Lambda function.
     * 
     */
    public Optional> lastProcessingResult() {
        return Optional.ofNullable(this.lastProcessingResult);
    }

    /**
     * The maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer (or accumulate in the case of an SQS queue event source) until either `maximum_batching_window_in_seconds` expires or `batch_size` has been met. For streaming event sources, defaults to as soon as records are available in the stream. If the batch it reads from the stream/queue only has one record in it, Lambda only sends one record to the function. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues.
     * 
     */
    @Import(name="maximumBatchingWindowInSeconds")
    private @Nullable Output maximumBatchingWindowInSeconds;

    /**
     * @return The maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer (or accumulate in the case of an SQS queue event source) until either `maximum_batching_window_in_seconds` expires or `batch_size` has been met. For streaming event sources, defaults to as soon as records are available in the stream. If the batch it reads from the stream/queue only has one record in it, Lambda only sends one record to the function. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues.
     * 
     */
    public Optional> maximumBatchingWindowInSeconds() {
        return Optional.ofNullable(this.maximumBatchingWindowInSeconds);
    }

    /**
     * - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
     * 
     */
    @Import(name="maximumRecordAgeInSeconds")
    private @Nullable Output maximumRecordAgeInSeconds;

    /**
     * @return - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
     * 
     */
    public Optional> maximumRecordAgeInSeconds() {
        return Optional.ofNullable(this.maximumRecordAgeInSeconds);
    }

    /**
     * - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
     * 
     */
    @Import(name="maximumRetryAttempts")
    private @Nullable Output maximumRetryAttempts;

    /**
     * @return - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
     * 
     */
    public Optional> maximumRetryAttempts() {
        return Optional.ofNullable(this.maximumRetryAttempts);
    }

    /**
     * - (Optional) The number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
     * 
     */
    @Import(name="parallelizationFactor")
    private @Nullable Output parallelizationFactor;

    /**
     * @return - (Optional) The number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
     * 
     */
    public Optional> parallelizationFactor() {
        return Optional.ofNullable(this.parallelizationFactor);
    }

    /**
     * The name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
     * 
     */
    @Import(name="queues")
    private @Nullable Output queues;

    /**
     * @return The name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
     * 
     */
    public Optional> queues() {
        return Optional.ofNullable(this.queues);
    }

    /**
     * Scaling configuration of the event source. Only available for SQS queues. Detailed below.
     * 
     */
    @Import(name="scalingConfig")
    private @Nullable Output scalingConfig;

    /**
     * @return Scaling configuration of the event source. Only available for SQS queues. Detailed below.
     * 
     */
    public Optional> scalingConfig() {
        return Optional.ofNullable(this.scalingConfig);
    }

    /**
     * - (Optional) For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include `source_access_configuration`. Detailed below.
     * 
     */
    @Import(name="selfManagedEventSource")
    private @Nullable Output selfManagedEventSource;

    /**
     * @return - (Optional) For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include `source_access_configuration`. Detailed below.
     * 
     */
    public Optional> selfManagedEventSource() {
        return Optional.ofNullable(this.selfManagedEventSource);
    }

    /**
     * Additional configuration block for Self Managed Kafka sources. Incompatible with "event_source_arn" and "amazon_managed_kafka_event_source_config". Detailed below.
     * 
     */
    @Import(name="selfManagedKafkaEventSourceConfig")
    private @Nullable Output selfManagedKafkaEventSourceConfig;

    /**
     * @return Additional configuration block for Self Managed Kafka sources. Incompatible with "event_source_arn" and "amazon_managed_kafka_event_source_config". Detailed below.
     * 
     */
    public Optional> selfManagedKafkaEventSourceConfig() {
        return Optional.ofNullable(this.selfManagedKafkaEventSourceConfig);
    }

    /**
     * For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include `self_managed_event_source`. Detailed below.
     * 
     */
    @Import(name="sourceAccessConfigurations")
    private @Nullable Output> sourceAccessConfigurations;

    /**
     * @return For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include `self_managed_event_source`. Detailed below.
     * 
     */
    public Optional>> sourceAccessConfigurations() {
        return Optional.ofNullable(this.sourceAccessConfigurations);
    }

    /**
     * The position in the stream where AWS Lambda should start reading. Must be one of `AT_TIMESTAMP` (Kinesis only), `LATEST` or `TRIM_HORIZON` if getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the [AWS DynamoDB Streams API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) and [AWS Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType).
     * 
     */
    @Import(name="startingPosition")
    private @Nullable Output startingPosition;

    /**
     * @return The position in the stream where AWS Lambda should start reading. Must be one of `AT_TIMESTAMP` (Kinesis only), `LATEST` or `TRIM_HORIZON` if getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the [AWS DynamoDB Streams API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) and [AWS Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType).
     * 
     */
    public Optional> startingPosition() {
        return Optional.ofNullable(this.startingPosition);
    }

    /**
     * A timestamp in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) of the data record which to start reading when using `starting_position` set to `AT_TIMESTAMP`. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.
     * 
     */
    @Import(name="startingPositionTimestamp")
    private @Nullable Output startingPositionTimestamp;

    /**
     * @return A timestamp in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) of the data record which to start reading when using `starting_position` set to `AT_TIMESTAMP`. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.
     * 
     */
    public Optional> startingPositionTimestamp() {
        return Optional.ofNullable(this.startingPositionTimestamp);
    }

    /**
     * The state of the event source mapping.
     * 
     */
    @Import(name="state")
    private @Nullable Output state;

    /**
     * @return The state of the event source mapping.
     * 
     */
    public Optional> state() {
        return Optional.ofNullable(this.state);
    }

    /**
     * The reason the event source mapping is in its current state.
     * 
     */
    @Import(name="stateTransitionReason")
    private @Nullable Output stateTransitionReason;

    /**
     * @return The reason the event source mapping is in its current state.
     * 
     */
    public Optional> stateTransitionReason() {
        return Optional.ofNullable(this.stateTransitionReason);
    }

    /**
     * The name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
     * 
     */
    @Import(name="topics")
    private @Nullable Output> topics;

    /**
     * @return The name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
     * 
     */
    public Optional>> topics() {
        return Optional.ofNullable(this.topics);
    }

    /**
     * The duration in seconds of a processing window for [AWS Lambda streaming analytics](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-windows). The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
     * 
     */
    @Import(name="tumblingWindowInSeconds")
    private @Nullable Output tumblingWindowInSeconds;

    /**
     * @return The duration in seconds of a processing window for [AWS Lambda streaming analytics](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-windows). The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
     * 
     */
    public Optional> tumblingWindowInSeconds() {
        return Optional.ofNullable(this.tumblingWindowInSeconds);
    }

    /**
     * The UUID of the created event source mapping.
     * 
     */
    @Import(name="uuid")
    private @Nullable Output uuid;

    /**
     * @return The UUID of the created event source mapping.
     * 
     */
    public Optional> uuid() {
        return Optional.ofNullable(this.uuid);
    }

    private EventSourceMappingState() {}

    private EventSourceMappingState(EventSourceMappingState $) {
        this.amazonManagedKafkaEventSourceConfig = $.amazonManagedKafkaEventSourceConfig;
        this.batchSize = $.batchSize;
        this.bisectBatchOnFunctionError = $.bisectBatchOnFunctionError;
        this.destinationConfig = $.destinationConfig;
        this.documentDbEventSourceConfig = $.documentDbEventSourceConfig;
        this.enabled = $.enabled;
        this.eventSourceArn = $.eventSourceArn;
        this.filterCriteria = $.filterCriteria;
        this.functionArn = $.functionArn;
        this.functionName = $.functionName;
        this.functionResponseTypes = $.functionResponseTypes;
        this.kmsKeyArn = $.kmsKeyArn;
        this.lastModified = $.lastModified;
        this.lastProcessingResult = $.lastProcessingResult;
        this.maximumBatchingWindowInSeconds = $.maximumBatchingWindowInSeconds;
        this.maximumRecordAgeInSeconds = $.maximumRecordAgeInSeconds;
        this.maximumRetryAttempts = $.maximumRetryAttempts;
        this.parallelizationFactor = $.parallelizationFactor;
        this.queues = $.queues;
        this.scalingConfig = $.scalingConfig;
        this.selfManagedEventSource = $.selfManagedEventSource;
        this.selfManagedKafkaEventSourceConfig = $.selfManagedKafkaEventSourceConfig;
        this.sourceAccessConfigurations = $.sourceAccessConfigurations;
        this.startingPosition = $.startingPosition;
        this.startingPositionTimestamp = $.startingPositionTimestamp;
        this.state = $.state;
        this.stateTransitionReason = $.stateTransitionReason;
        this.topics = $.topics;
        this.tumblingWindowInSeconds = $.tumblingWindowInSeconds;
        this.uuid = $.uuid;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(EventSourceMappingState defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private EventSourceMappingState $;

        public Builder() {
            $ = new EventSourceMappingState();
        }

        public Builder(EventSourceMappingState defaults) {
            $ = new EventSourceMappingState(Objects.requireNonNull(defaults));
        }

        /**
         * @param amazonManagedKafkaEventSourceConfig Additional configuration block for Amazon Managed Kafka sources. Incompatible with "self_managed_event_source" and "self_managed_kafka_event_source_config". Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder amazonManagedKafkaEventSourceConfig(@Nullable Output amazonManagedKafkaEventSourceConfig) {
            $.amazonManagedKafkaEventSourceConfig = amazonManagedKafkaEventSourceConfig;
            return this;
        }

        /**
         * @param amazonManagedKafkaEventSourceConfig Additional configuration block for Amazon Managed Kafka sources. Incompatible with "self_managed_event_source" and "self_managed_kafka_event_source_config". Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder amazonManagedKafkaEventSourceConfig(EventSourceMappingAmazonManagedKafkaEventSourceConfigArgs amazonManagedKafkaEventSourceConfig) {
            return amazonManagedKafkaEventSourceConfig(Output.of(amazonManagedKafkaEventSourceConfig));
        }

        /**
         * @param batchSize The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100` for DynamoDB, Kinesis, MQ and MSK, `10` for SQS.
         * 
         * @return builder
         * 
         */
        public Builder batchSize(@Nullable Output batchSize) {
            $.batchSize = batchSize;
            return this;
        }

        /**
         * @param batchSize The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to `100` for DynamoDB, Kinesis, MQ and MSK, `10` for SQS.
         * 
         * @return builder
         * 
         */
        public Builder batchSize(Integer batchSize) {
            return batchSize(Output.of(batchSize));
        }

        /**
         * @param bisectBatchOnFunctionError - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder bisectBatchOnFunctionError(@Nullable Output bisectBatchOnFunctionError) {
            $.bisectBatchOnFunctionError = bisectBatchOnFunctionError;
            return this;
        }

        /**
         * @param bisectBatchOnFunctionError - (Optional) If the function returns an error, split the batch in two and retry. Only available for stream sources (DynamoDB and Kinesis). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder bisectBatchOnFunctionError(Boolean bisectBatchOnFunctionError) {
            return bisectBatchOnFunctionError(Output.of(bisectBatchOnFunctionError));
        }

        /**
         * @param destinationConfig - (Optional) An Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder destinationConfig(@Nullable Output destinationConfig) {
            $.destinationConfig = destinationConfig;
            return this;
        }

        /**
         * @param destinationConfig - (Optional) An Amazon SQS queue, Amazon SNS topic or Amazon S3 bucket (only available for Kafka sources) destination for failed records. Only available for stream sources (DynamoDB and Kinesis) and Kafka sources (Amazon MSK and Self-managed Apache Kafka). Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder destinationConfig(EventSourceMappingDestinationConfigArgs destinationConfig) {
            return destinationConfig(Output.of(destinationConfig));
        }

        /**
         * @param documentDbEventSourceConfig - (Optional) Configuration settings for a DocumentDB event source. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder documentDbEventSourceConfig(@Nullable Output documentDbEventSourceConfig) {
            $.documentDbEventSourceConfig = documentDbEventSourceConfig;
            return this;
        }

        /**
         * @param documentDbEventSourceConfig - (Optional) Configuration settings for a DocumentDB event source. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder documentDbEventSourceConfig(EventSourceMappingDocumentDbEventSourceConfigArgs documentDbEventSourceConfig) {
            return documentDbEventSourceConfig(Output.of(documentDbEventSourceConfig));
        }

        /**
         * @param enabled Determines if the mapping will be enabled on creation. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Determines if the mapping will be enabled on creation. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param eventSourceArn The event source ARN - this is required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream.  It is incompatible with a Self Managed Kafka source.
         * 
         * @return builder
         * 
         */
        public Builder eventSourceArn(@Nullable Output eventSourceArn) {
            $.eventSourceArn = eventSourceArn;
            return this;
        }

        /**
         * @param eventSourceArn The event source ARN - this is required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker, MSK cluster or DocumentDB change stream.  It is incompatible with a Self Managed Kafka source.
         * 
         * @return builder
         * 
         */
        public Builder eventSourceArn(String eventSourceArn) {
            return eventSourceArn(Output.of(eventSourceArn));
        }

        /**
         * @param filterCriteria The criteria to use for [event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) Kinesis stream, DynamoDB stream, SQS queue event sources. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder filterCriteria(@Nullable Output filterCriteria) {
            $.filterCriteria = filterCriteria;
            return this;
        }

        /**
         * @param filterCriteria The criteria to use for [event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) Kinesis stream, DynamoDB stream, SQS queue event sources. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder filterCriteria(EventSourceMappingFilterCriteriaArgs filterCriteria) {
            return filterCriteria(Output.of(filterCriteria));
        }

        /**
         * @param functionArn The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from `function_name` above.)
         * 
         * @return builder
         * 
         */
        public Builder functionArn(@Nullable Output functionArn) {
            $.functionArn = functionArn;
            return this;
        }

        /**
         * @param functionArn The the ARN of the Lambda function the event source mapping is sending events to. (Note: this is a computed value that differs from `function_name` above.)
         * 
         * @return builder
         * 
         */
        public Builder functionArn(String functionArn) {
            return functionArn(Output.of(functionArn));
        }

        /**
         * @param functionName The name or the ARN of the Lambda function that will be subscribing to events.
         * 
         * @return builder
         * 
         */
        public Builder functionName(@Nullable Output functionName) {
            $.functionName = functionName;
            return this;
        }

        /**
         * @param functionName The name or the ARN of the Lambda function that will be subscribing to events.
         * 
         * @return builder
         * 
         */
        public Builder functionName(String functionName) {
            return functionName(Output.of(functionName));
        }

        /**
         * @param functionResponseTypes A list of current response type enums applied to the event source mapping for [AWS Lambda checkpointing](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting). Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: `ReportBatchItemFailures`.
         * 
         * @return builder
         * 
         */
        public Builder functionResponseTypes(@Nullable Output> functionResponseTypes) {
            $.functionResponseTypes = functionResponseTypes;
            return this;
        }

        /**
         * @param functionResponseTypes A list of current response type enums applied to the event source mapping for [AWS Lambda checkpointing](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting). Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: `ReportBatchItemFailures`.
         * 
         * @return builder
         * 
         */
        public Builder functionResponseTypes(List functionResponseTypes) {
            return functionResponseTypes(Output.of(functionResponseTypes));
        }

        /**
         * @param functionResponseTypes A list of current response type enums applied to the event source mapping for [AWS Lambda checkpointing](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting). Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: `ReportBatchItemFailures`.
         * 
         * @return builder
         * 
         */
        public Builder functionResponseTypes(String... functionResponseTypes) {
            return functionResponseTypes(List.of(functionResponseTypes));
        }

        /**
         * @param kmsKeyArn The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyArn(@Nullable Output kmsKeyArn) {
            $.kmsKeyArn = kmsKeyArn;
            return this;
        }

        /**
         * @param kmsKeyArn The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's filter criteria.
         * 
         * @return builder
         * 
         */
        public Builder kmsKeyArn(String kmsKeyArn) {
            return kmsKeyArn(Output.of(kmsKeyArn));
        }

        /**
         * @param lastModified The date this resource was last modified.
         * 
         * @return builder
         * 
         */
        public Builder lastModified(@Nullable Output lastModified) {
            $.lastModified = lastModified;
            return this;
        }

        /**
         * @param lastModified The date this resource was last modified.
         * 
         * @return builder
         * 
         */
        public Builder lastModified(String lastModified) {
            return lastModified(Output.of(lastModified));
        }

        /**
         * @param lastProcessingResult The result of the last AWS Lambda invocation of your Lambda function.
         * 
         * @return builder
         * 
         */
        public Builder lastProcessingResult(@Nullable Output lastProcessingResult) {
            $.lastProcessingResult = lastProcessingResult;
            return this;
        }

        /**
         * @param lastProcessingResult The result of the last AWS Lambda invocation of your Lambda function.
         * 
         * @return builder
         * 
         */
        public Builder lastProcessingResult(String lastProcessingResult) {
            return lastProcessingResult(Output.of(lastProcessingResult));
        }

        /**
         * @param maximumBatchingWindowInSeconds The maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer (or accumulate in the case of an SQS queue event source) until either `maximum_batching_window_in_seconds` expires or `batch_size` has been met. For streaming event sources, defaults to as soon as records are available in the stream. If the batch it reads from the stream/queue only has one record in it, Lambda only sends one record to the function. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues.
         * 
         * @return builder
         * 
         */
        public Builder maximumBatchingWindowInSeconds(@Nullable Output maximumBatchingWindowInSeconds) {
            $.maximumBatchingWindowInSeconds = maximumBatchingWindowInSeconds;
            return this;
        }

        /**
         * @param maximumBatchingWindowInSeconds The maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Records will continue to buffer (or accumulate in the case of an SQS queue event source) until either `maximum_batching_window_in_seconds` expires or `batch_size` has been met. For streaming event sources, defaults to as soon as records are available in the stream. If the batch it reads from the stream/queue only has one record in it, Lambda only sends one record to the function. Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues.
         * 
         * @return builder
         * 
         */
        public Builder maximumBatchingWindowInSeconds(Integer maximumBatchingWindowInSeconds) {
            return maximumBatchingWindowInSeconds(Output.of(maximumBatchingWindowInSeconds));
        }

        /**
         * @param maximumRecordAgeInSeconds - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
         * 
         * @return builder
         * 
         */
        public Builder maximumRecordAgeInSeconds(@Nullable Output maximumRecordAgeInSeconds) {
            $.maximumRecordAgeInSeconds = maximumRecordAgeInSeconds;
            return this;
        }

        /**
         * @param maximumRecordAgeInSeconds - (Optional) The maximum age of a record that Lambda sends to a function for processing. Only available for stream sources (DynamoDB and Kinesis). Must be either -1 (forever, and the default value) or between 60 and 604800 (inclusive).
         * 
         * @return builder
         * 
         */
        public Builder maximumRecordAgeInSeconds(Integer maximumRecordAgeInSeconds) {
            return maximumRecordAgeInSeconds(Output.of(maximumRecordAgeInSeconds));
        }

        /**
         * @param maximumRetryAttempts - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
         * 
         * @return builder
         * 
         */
        public Builder maximumRetryAttempts(@Nullable Output maximumRetryAttempts) {
            $.maximumRetryAttempts = maximumRetryAttempts;
            return this;
        }

        /**
         * @param maximumRetryAttempts - (Optional) The maximum number of times to retry when the function returns an error. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of -1 (forever), maximum of 10000.
         * 
         * @return builder
         * 
         */
        public Builder maximumRetryAttempts(Integer maximumRetryAttempts) {
            return maximumRetryAttempts(Output.of(maximumRetryAttempts));
        }

        /**
         * @param parallelizationFactor - (Optional) The number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
         * 
         * @return builder
         * 
         */
        public Builder parallelizationFactor(@Nullable Output parallelizationFactor) {
            $.parallelizationFactor = parallelizationFactor;
            return this;
        }

        /**
         * @param parallelizationFactor - (Optional) The number of batches to process from each shard concurrently. Only available for stream sources (DynamoDB and Kinesis). Minimum and default of 1, maximum of 10.
         * 
         * @return builder
         * 
         */
        public Builder parallelizationFactor(Integer parallelizationFactor) {
            return parallelizationFactor(Output.of(parallelizationFactor));
        }

        /**
         * @param queues The name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
         * 
         * @return builder
         * 
         */
        public Builder queues(@Nullable Output queues) {
            $.queues = queues;
            return this;
        }

        /**
         * @param queues The name of the Amazon MQ broker destination queue to consume. Only available for MQ sources. The list must contain exactly one queue name.
         * 
         * @return builder
         * 
         */
        public Builder queues(String queues) {
            return queues(Output.of(queues));
        }

        /**
         * @param scalingConfig Scaling configuration of the event source. Only available for SQS queues. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder scalingConfig(@Nullable Output scalingConfig) {
            $.scalingConfig = scalingConfig;
            return this;
        }

        /**
         * @param scalingConfig Scaling configuration of the event source. Only available for SQS queues. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder scalingConfig(EventSourceMappingScalingConfigArgs scalingConfig) {
            return scalingConfig(Output.of(scalingConfig));
        }

        /**
         * @param selfManagedEventSource - (Optional) For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include `source_access_configuration`. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedEventSource(@Nullable Output selfManagedEventSource) {
            $.selfManagedEventSource = selfManagedEventSource;
            return this;
        }

        /**
         * @param selfManagedEventSource - (Optional) For Self Managed Kafka sources, the location of the self managed cluster. If set, configuration must also include `source_access_configuration`. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedEventSource(EventSourceMappingSelfManagedEventSourceArgs selfManagedEventSource) {
            return selfManagedEventSource(Output.of(selfManagedEventSource));
        }

        /**
         * @param selfManagedKafkaEventSourceConfig Additional configuration block for Self Managed Kafka sources. Incompatible with "event_source_arn" and "amazon_managed_kafka_event_source_config". Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedKafkaEventSourceConfig(@Nullable Output selfManagedKafkaEventSourceConfig) {
            $.selfManagedKafkaEventSourceConfig = selfManagedKafkaEventSourceConfig;
            return this;
        }

        /**
         * @param selfManagedKafkaEventSourceConfig Additional configuration block for Self Managed Kafka sources. Incompatible with "event_source_arn" and "amazon_managed_kafka_event_source_config". Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder selfManagedKafkaEventSourceConfig(EventSourceMappingSelfManagedKafkaEventSourceConfigArgs selfManagedKafkaEventSourceConfig) {
            return selfManagedKafkaEventSourceConfig(Output.of(selfManagedKafkaEventSourceConfig));
        }

        /**
         * @param sourceAccessConfigurations For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include `self_managed_event_source`. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder sourceAccessConfigurations(@Nullable Output> sourceAccessConfigurations) {
            $.sourceAccessConfigurations = sourceAccessConfigurations;
            return this;
        }

        /**
         * @param sourceAccessConfigurations For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include `self_managed_event_source`. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder sourceAccessConfigurations(List sourceAccessConfigurations) {
            return sourceAccessConfigurations(Output.of(sourceAccessConfigurations));
        }

        /**
         * @param sourceAccessConfigurations For Self Managed Kafka sources, the access configuration for the source. If set, configuration must also include `self_managed_event_source`. Detailed below.
         * 
         * @return builder
         * 
         */
        public Builder sourceAccessConfigurations(EventSourceMappingSourceAccessConfigurationArgs... sourceAccessConfigurations) {
            return sourceAccessConfigurations(List.of(sourceAccessConfigurations));
        }

        /**
         * @param startingPosition The position in the stream where AWS Lambda should start reading. Must be one of `AT_TIMESTAMP` (Kinesis only), `LATEST` or `TRIM_HORIZON` if getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the [AWS DynamoDB Streams API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) and [AWS Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType).
         * 
         * @return builder
         * 
         */
        public Builder startingPosition(@Nullable Output startingPosition) {
            $.startingPosition = startingPosition;
            return this;
        }

        /**
         * @param startingPosition The position in the stream where AWS Lambda should start reading. Must be one of `AT_TIMESTAMP` (Kinesis only), `LATEST` or `TRIM_HORIZON` if getting events from Kinesis, DynamoDB, MSK or Self Managed Apache Kafka. Must not be provided if getting events from SQS. More information about these positions can be found in the [AWS DynamoDB Streams API Reference](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) and [AWS Kinesis API Reference](https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType).
         * 
         * @return builder
         * 
         */
        public Builder startingPosition(String startingPosition) {
            return startingPosition(Output.of(startingPosition));
        }

        /**
         * @param startingPositionTimestamp A timestamp in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) of the data record which to start reading when using `starting_position` set to `AT_TIMESTAMP`. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.
         * 
         * @return builder
         * 
         */
        public Builder startingPositionTimestamp(@Nullable Output startingPositionTimestamp) {
            $.startingPositionTimestamp = startingPositionTimestamp;
            return this;
        }

        /**
         * @param startingPositionTimestamp A timestamp in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) of the data record which to start reading when using `starting_position` set to `AT_TIMESTAMP`. If a record with this exact timestamp does not exist, the next later record is chosen. If the timestamp is older than the current trim horizon, the oldest available record is chosen.
         * 
         * @return builder
         * 
         */
        public Builder startingPositionTimestamp(String startingPositionTimestamp) {
            return startingPositionTimestamp(Output.of(startingPositionTimestamp));
        }

        /**
         * @param state The state of the event source mapping.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output state) {
            $.state = state;
            return this;
        }

        /**
         * @param state The state of the event source mapping.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Output.of(state));
        }

        /**
         * @param stateTransitionReason The reason the event source mapping is in its current state.
         * 
         * @return builder
         * 
         */
        public Builder stateTransitionReason(@Nullable Output stateTransitionReason) {
            $.stateTransitionReason = stateTransitionReason;
            return this;
        }

        /**
         * @param stateTransitionReason The reason the event source mapping is in its current state.
         * 
         * @return builder
         * 
         */
        public Builder stateTransitionReason(String stateTransitionReason) {
            return stateTransitionReason(Output.of(stateTransitionReason));
        }

        /**
         * @param topics The name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
         * 
         * @return builder
         * 
         */
        public Builder topics(@Nullable Output> topics) {
            $.topics = topics;
            return this;
        }

        /**
         * @param topics The name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
         * 
         * @return builder
         * 
         */
        public Builder topics(List topics) {
            return topics(Output.of(topics));
        }

        /**
         * @param topics The name of the Kafka topics. Only available for MSK sources. A single topic name must be specified.
         * 
         * @return builder
         * 
         */
        public Builder topics(String... topics) {
            return topics(List.of(topics));
        }

        /**
         * @param tumblingWindowInSeconds The duration in seconds of a processing window for [AWS Lambda streaming analytics](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-windows). The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
         * 
         * @return builder
         * 
         */
        public Builder tumblingWindowInSeconds(@Nullable Output tumblingWindowInSeconds) {
            $.tumblingWindowInSeconds = tumblingWindowInSeconds;
            return this;
        }

        /**
         * @param tumblingWindowInSeconds The duration in seconds of a processing window for [AWS Lambda streaming analytics](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-windows). The range is between 1 second up to 900 seconds. Only available for stream sources (DynamoDB and Kinesis).
         * 
         * @return builder
         * 
         */
        public Builder tumblingWindowInSeconds(Integer tumblingWindowInSeconds) {
            return tumblingWindowInSeconds(Output.of(tumblingWindowInSeconds));
        }

        /**
         * @param uuid The UUID of the created event source mapping.
         * 
         * @return builder
         * 
         */
        public Builder uuid(@Nullable Output uuid) {
            $.uuid = uuid;
            return this;
        }

        /**
         * @param uuid The UUID of the created event source mapping.
         * 
         * @return builder
         * 
         */
        public Builder uuid(String uuid) {
            return uuid(Output.of(uuid));
        }

        public EventSourceMappingState build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy