Files
agent-claw/cdk/node_modules/aws-cdk-lib/aws-lambda-event-sources/lib/kafka-dlq.d.ts
2026-05-06 18:55:16 -05:00

39 lines
1.4 KiB
TypeScript

import type { DlqDestinationConfig, IEventSourceDlq, IEventSourceMapping, IFunction } from '../../aws-lambda';
/**
* A Kafka topic dead letter queue destination configuration for a Lambda event source.
*
* This destination can only be used with Kafka-based event sources (MSK and self-managed Kafka).
* When used with other event source types, a validation error will be thrown.
*
* ## Kafka URI Format
*
* new KafkaDlq('my-topic');
*
* ## Topic Naming Requirements
*
* Kafka topic names must follow these rules:
* - Only alphanumeric characters, dots (.), underscores (_), and hyphens (-) are allowed
* - Cannot be empty
* - Must be a valid Kafka topic name
*
*/
export declare class KafkaDlq implements IEventSourceDlq {
private readonly topicName;
/**
* Creates a new Kafka DLQ destination.
*
* @throws {TypeError} When the topic name is empty or contains invalid characters
*/
constructor(topicName: string);
/**
* Returns a destination configuration for the DLQ.
*
* The returned configuration is used in the AWS Lambda EventSourceMapping's DestinationConfig
* to specify where failed records should be sent.
*
* @returns The DLQ destination configuration with the properly formatted Kafka URI
*
*/
bind(_target: IEventSourceMapping, _targetHandler: IFunction): DlqDestinationConfig;
}