import * as cdk from "../../core";
import { Construct } from 'constructs';
import { IEventSourceDlq } from './dlq';
import { IFunction } from './function-base';
/**
 * (experimental) The type of authentication protocol or the VPC components for your event source's SourceAccessConfiguration.
 *
 * @see https://docs.aws.amazon.com/lambda/latest/dg/API_SourceAccessConfiguration.html#SSS-Type-SourceAccessConfiguration-Type
 * @experimental
 */
export declare class SourceAccessConfigurationType {
    /**
     * (experimental) (MQ) The Secrets Manager secret that stores your broker credentials.
     *
     * @experimental
     */
    static readonly BASIC_AUTH: SourceAccessConfigurationType;
    /**
     * (experimental) The subnets associated with your VPC.
     *
     * Lambda connects to these subnets to fetch data from your Self-Managed Apache Kafka cluster.
     *
     * @experimental
     */
    static readonly VPC_SUBNET: SourceAccessConfigurationType;
    /**
     * (experimental) The VPC security group used to manage access to your Self-Managed Apache Kafka brokers.
     *
     * @experimental
     */
    static readonly VPC_SECURITY_GROUP: SourceAccessConfigurationType;
    /**
     * (experimental) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your Self-Managed Apache Kafka brokers.
     *
     * @experimental
     */
    static readonly SASL_SCRAM_256_AUTH: SourceAccessConfigurationType;
    /**
     * (experimental) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your Self-Managed Apache Kafka brokers.
     *
     * @experimental
     */
    static readonly SASL_SCRAM_512_AUTH: SourceAccessConfigurationType;
    /**
     * (experimental) A custom source access configuration property.
     *
     * @experimental
     */
    static of(name: string): SourceAccessConfigurationType;
    /**
     * (experimental) The key to use in `SourceAccessConfigurationProperty.Type` property in CloudFormation.
     *
     * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type
     * @experimental
     */
    readonly type: string;
    private constructor();
}
/**
 * (experimental) Specific settings like the authentication protocol or the VPC components to secure access to your event source.
 *
 * @experimental
 */
export interface SourceAccessConfiguration {
    /**
     * (experimental) The type of authentication protocol or the VPC components for your event source.
     *
     * For example: "SASL_SCRAM_512_AUTH".
     *
     * @experimental
     */
    readonly type: SourceAccessConfigurationType;
    /**
     * (experimental) The value for your chosen configuration in type.
     *
     * For example: "URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName".
     * The exact string depends on the type.
     *
     * @see SourceAccessConfigurationType
     * @experimental
     */
    readonly uri: string;
}
/**
 * @experimental
 */
export interface EventSourceMappingOptions {
    /**
     * (experimental) The Amazon Resource Name (ARN) of the event source.
     *
     * Any record added to
     * this stream can invoke the Lambda function.
     *
     * @default - not set if using a self managed Kafka cluster, throws an error otherwise
     * @experimental
     */
    readonly eventSourceArn?: string;
    /**
     * (experimental) The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
     *
     * Your function receives an
     * event with all the retrieved records.
     *
     * Valid Range: Minimum value of 1. Maximum value of 10000.
     *
     * @default - Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records.
     * Both the default and maximum for Amazon SQS are 10 messages.
     * @experimental
     */
    readonly batchSize?: number;
    /**
     * (experimental) If the function returns an error, split the batch in two and retry.
     *
     * @default false
     * @experimental
     */
    readonly bisectBatchOnError?: boolean;
    /**
     * (experimental) An Amazon SQS queue or Amazon SNS topic destination for discarded records.
     *
     * @default discarded records are ignored
     * @experimental
     */
    readonly onFailure?: IEventSourceDlq;
    /**
     * (experimental) Set to false to disable the event source upon creation.
     *
     * @default true
     * @experimental
     */
    readonly enabled?: boolean;
    /**
     * (experimental) The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
     *
     * @default - Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources.
     * @see https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType
     * @experimental
     */
    readonly startingPosition?: StartingPosition;
    /**
     * (experimental) Allow functions to return partially successful responses for a batch of records.
     *
     * @default false
     * @see https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting
     * @experimental
     */
    readonly reportBatchItemFailures?: boolean;
    /**
     * (experimental) The maximum amount of time to gather records before invoking the function.
     *
     * Maximum of Duration.minutes(5)
     *
     * @default Duration.seconds(0)
     * @experimental
     */
    readonly maxBatchingWindow?: cdk.Duration;
    /**
     * (experimental) The maximum age of a record that Lambda sends to a function for processing.
     *
     * Valid Range:
     * * Minimum value of 60 seconds
     * * Maximum value of 7 days
     *
     * @default - infinite or until the record expires.
     * @experimental
     */
    readonly maxRecordAge?: cdk.Duration;
    /**
     * (experimental) The maximum number of times to retry when the function returns an error.
     *
     * Set to `undefined` if you want lambda to keep retrying infinitely or until
     * the record expires.
     *
     * Valid Range:
     * * Minimum value of 0
     * * Maximum value of 10000
     *
     * @default - infinite or until the record expires.
     * @experimental
     */
    readonly retryAttempts?: number;
    /**
     * (experimental) The number of batches to process from each shard concurrently.
     *
     * Valid Range:
     * * Minimum value of 1
     * * Maximum value of 10
     *
     * @default 1
     * @experimental
     */
    readonly parallelizationFactor?: number;
    /**
     * (experimental) The name of the Kafka topic.
     *
     * @default - no topic
     * @experimental
     */
    readonly kafkaTopic?: string;
    /**
     * (experimental) The size of the tumbling windows to group records sent to DynamoDB or Kinesis.
     *
     * @default - None
     * @see https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-windows
     *
     * Valid Range: 0 - 15 minutes
     * @experimental
     */
    readonly tumblingWindow?: cdk.Duration;
    /**
     * (experimental) A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster that a Kafka client connects to initially to bootstrap itself.
     *
     * They are in the format `abc.example.com:9096`.
     *
     * @default - none
     * @experimental
     */
    readonly kafkaBootstrapServers?: string[];
    /**
     * (experimental) Specific settings like the authentication protocol or the VPC components to secure access to your event source.
     *
     * @default - none
     * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html
     * @experimental
     */
    readonly sourceAccessConfigurations?: SourceAccessConfiguration[];
}
/**
 * (experimental) Properties for declaring a new event source mapping.
 *
 * @experimental
 */
export interface EventSourceMappingProps extends EventSourceMappingOptions {
    /**
     * (experimental) The target AWS Lambda function.
     *
     * @experimental
     */
    readonly target: IFunction;
}
/**
 * (experimental) Represents an event source mapping for a lambda function.
 *
 * @see https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html
 * @experimental
 */
export interface IEventSourceMapping extends cdk.IResource {
    /**
     * (experimental) The identifier for this EventSourceMapping.
     *
     * @experimental
     * @attribute true
     */
    readonly eventSourceMappingId: string;
}
/**
 * (experimental) Defines a Lambda EventSourceMapping resource.
 *
 * Usually, you won't need to define the mapping yourself. This will usually be done by
 * event sources. For example, to add an SQS event source to a function:
 *
 *     import { SqsEventSource } from '@aws-cdk/aws-lambda-event-sources';
 *     lambda.addEventSource(new SqsEventSource(sqs));
 *
 * The `SqsEventSource` class will automatically create the mapping, and will also
 * modify the Lambda's execution role so it can consume messages from the queue.
 *
 * @experimental
 */
export declare class EventSourceMapping extends cdk.Resource implements IEventSourceMapping {
    /**
     * (experimental) Import an event source into this stack from its event source id.
     *
     * @experimental
     */
    static fromEventSourceMappingId(scope: Construct, id: string, eventSourceMappingId: string): IEventSourceMapping;
    /**
     * (experimental) The identifier for this EventSourceMapping.
     *
     * @experimental
     */
    readonly eventSourceMappingId: string;
    /**
     * @experimental
     */
    constructor(scope: Construct, id: string, props: EventSourceMappingProps);
}
/**
 * (experimental) The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start reading.
 *
 * @experimental
 */
export declare enum StartingPosition {
    /**
     * (experimental) Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.
     *
     * @experimental
     */
    TRIM_HORIZON = "TRIM_HORIZON",
    /**
     * (experimental) Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.
     *
     * @experimental
     */
    LATEST = "LATEST"
}
