import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Function service supports integration with Kafka message queue. By creating a Kafka trigger, the function service acts as a consumer to consume messages from Kafka and passes them to your function, triggering your function logic. You do not need to handle the details of message consumption; just write the function to process messages. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcenginecc from "@volcengine/pulumi-volcenginecc"; * * const vefaasTriggerDemo = new volcenginecc.vefaas.KafkaTrigger("VefaasTriggerDemo", { * functionId: "djb27tnr****", * name: "VefaasTriggerDemo", * maximumRetryAttempts: 74, * startingPosition: "Earliest", * enabled: false, * kafkaCredentials: { * mechanism: "PLAIN", * username: "VefaasTriggerDemo", * password: "*****", * }, * mqInstanceId: "kafka-cnng8cm4q2fncrvs****", * topicName: "VefaasTriggerDemo", * description: "VefaasTriggerDemo description", * batchFlushDurationMilliseconds: 8637, * batchSize: 709, * }); * ``` * * ## Import * * ```sh * $ pulumi import volcenginecc:vefaas/kafkaTrigger:KafkaTrigger example "function_id|kafka_trigger_id" * ``` */ export declare class KafkaTrigger extends pulumi.CustomResource { /** * Get an existing KafkaTrigger resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: KafkaTriggerState, opts?: pulumi.CustomResourceOptions): KafkaTrigger; /** * Returns true if the given object is an instance of KafkaTrigger. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is KafkaTrigger; /** * Maximum wait time for batch consumption by the trigger. Unit: milliseconds (ms). Valid range: 1000–60000 ms. Default: 1000 ms. */ readonly batchFlushDurationMilliseconds: pulumi.Output; /** * Number of messages per batch for trigger batch consumption. */ readonly batchSize: pulumi.Output; /** * Consumer group name of the Kafka message queue instance. */ readonly consumerGroup: pulumi.Output; /** * Kafka trigger creation time. */ readonly createdTime: pulumi.Output; /** * Description of the Kafka trigger. Limited to 200 characters. */ readonly description: pulumi.Output; /** * Enable the trigger when creating it. Options: true—enable. false—disable. */ readonly enabled: pulumi.Output; /** * Function ID. */ readonly functionId: pulumi.Output; /** * Kafka identity authentication. Function service uses Kafka ACL permission policies to authenticate message consumption for SASL users of types PLAIN and SCRAM-SHA-256. */ readonly kafkaCredentials: pulumi.Output; /** * Kafka trigger ID. */ readonly kafkaTriggerId: pulumi.Output; /** * Maximum number of retries when the function encounters a runtime error (including user code errors and runtime errors). Valid values: positive integers from 0 to 100. */ readonly maximumRetryAttempts: pulumi.Output; /** * Kafka message queue instance ID. */ readonly mqInstanceId: pulumi.Output; /** * Kafka trigger name. Trigger names must be unique within the same function. Only uppercase and lowercase letters, numbers, and underscores are allowed, must start with a letter, and be 4–63 characters long. */ readonly name: pulumi.Output; /** * Specify the starting position for consuming messages in the Topic. Options: Latest—consume only messages produced after subscribing to the Topic. Earliest—consume from the first message produced in the Topic. */ readonly startingPosition: pulumi.Output; /** * Kafka trigger status. Parameter values: ready—running, failed—failed, pending—starting. */ readonly status: pulumi.Output; /** * Topic name of the Kafka message queue instance. */ readonly topicName: pulumi.Output; /** * Last update time of the Kafka trigger. */ readonly updatedTime: pulumi.Output; /** * Create a KafkaTrigger resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: KafkaTriggerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering KafkaTrigger resources. */ export interface KafkaTriggerState { /** * Maximum wait time for batch consumption by the trigger. Unit: milliseconds (ms). Valid range: 1000–60000 ms. Default: 1000 ms. */ batchFlushDurationMilliseconds?: pulumi.Input; /** * Number of messages per batch for trigger batch consumption. */ batchSize?: pulumi.Input; /** * Consumer group name of the Kafka message queue instance. */ consumerGroup?: pulumi.Input; /** * Kafka trigger creation time. */ createdTime?: pulumi.Input; /** * Description of the Kafka trigger. Limited to 200 characters. */ description?: pulumi.Input; /** * Enable the trigger when creating it. Options: true—enable. false—disable. */ enabled?: pulumi.Input; /** * Function ID. */ functionId?: pulumi.Input; /** * Kafka identity authentication. Function service uses Kafka ACL permission policies to authenticate message consumption for SASL users of types PLAIN and SCRAM-SHA-256. */ kafkaCredentials?: pulumi.Input; /** * Kafka trigger ID. */ kafkaTriggerId?: pulumi.Input; /** * Maximum number of retries when the function encounters a runtime error (including user code errors and runtime errors). Valid values: positive integers from 0 to 100. */ maximumRetryAttempts?: pulumi.Input; /** * Kafka message queue instance ID. */ mqInstanceId?: pulumi.Input; /** * Kafka trigger name. Trigger names must be unique within the same function. Only uppercase and lowercase letters, numbers, and underscores are allowed, must start with a letter, and be 4–63 characters long. */ name?: pulumi.Input; /** * Specify the starting position for consuming messages in the Topic. Options: Latest—consume only messages produced after subscribing to the Topic. Earliest—consume from the first message produced in the Topic. */ startingPosition?: pulumi.Input; /** * Kafka trigger status. Parameter values: ready—running, failed—failed, pending—starting. */ status?: pulumi.Input; /** * Topic name of the Kafka message queue instance. */ topicName?: pulumi.Input; /** * Last update time of the Kafka trigger. */ updatedTime?: pulumi.Input; } /** * The set of arguments for constructing a KafkaTrigger resource. */ export interface KafkaTriggerArgs { /** * Maximum wait time for batch consumption by the trigger. Unit: milliseconds (ms). Valid range: 1000–60000 ms. Default: 1000 ms. */ batchFlushDurationMilliseconds?: pulumi.Input; /** * Number of messages per batch for trigger batch consumption. */ batchSize?: pulumi.Input; /** * Description of the Kafka trigger. Limited to 200 characters. */ description?: pulumi.Input; /** * Enable the trigger when creating it. Options: true—enable. false—disable. */ enabled?: pulumi.Input; /** * Function ID. */ functionId: pulumi.Input; /** * Kafka identity authentication. Function service uses Kafka ACL permission policies to authenticate message consumption for SASL users of types PLAIN and SCRAM-SHA-256. */ kafkaCredentials: pulumi.Input; /** * Maximum number of retries when the function encounters a runtime error (including user code errors and runtime errors). Valid values: positive integers from 0 to 100. */ maximumRetryAttempts?: pulumi.Input; /** * Kafka message queue instance ID. */ mqInstanceId: pulumi.Input; /** * Kafka trigger name. Trigger names must be unique within the same function. Only uppercase and lowercase letters, numbers, and underscores are allowed, must start with a letter, and be 4–63 characters long. */ name: pulumi.Input; /** * Specify the starting position for consuming messages in the Topic. Options: Latest—consume only messages produced after subscribing to the Topic. Earliest—consume from the first message produced in the Topic. */ startingPosition?: pulumi.Input; /** * Topic name of the Kafka message queue instance. */ topicName: pulumi.Input; }