// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** * Runs an inline or stored script on incoming documents. The script runs in the ingest context. * * The script processor uses the script cache to avoid recompiling the script for each incoming document. To improve performance, ensure the script cache is properly sized before using a script processor in production. * * See: https://www.elastic.co/guide/en/elasticsearch/reference/current/script-processor.html */ export function elasticsearchIngestProcessorScript(args?: ElasticsearchIngestProcessorScriptArgs, opts?: pulumi.InvokeOptions): Promise { args = args || {}; if (!opts) { opts = {} } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("elasticstack:index/elasticsearchIngestProcessorScript:ElasticsearchIngestProcessorScript", { "description": args.description, "if": args.if, "ignoreFailure": args.ignoreFailure, "lang": args.lang, "onFailures": args.onFailures, "params": args.params, "scriptId": args.scriptId, "source": args.source, "tag": args.tag, }, opts); } /** * A collection of arguments for invoking ElasticsearchIngestProcessorScript. */ export interface ElasticsearchIngestProcessorScriptArgs { /** * Description of the processor. */ description?: string; /** * Conditionally execute the processor */ if?: string; /** * Ignore failures for the processor. */ ignoreFailure?: boolean; /** * Script language. */ lang?: string; /** * Handle failures for the processor. */ onFailures?: string[]; /** * Object containing parameters for the script. */ params?: string; /** * ID of a stored script. If no `source` is specified, this parameter is required. */ scriptId?: string; /** * Inline script. If no id is specified, this parameter is required. */ source?: string; /** * Identifier for the processor. */ tag?: string; } /** * A collection of values returned by ElasticsearchIngestProcessorScript. */ export interface ElasticsearchIngestProcessorScriptResult { /** * Description of the processor. */ readonly description?: string; /** * Internal identifier of the resource. */ readonly id: string; /** * Conditionally execute the processor */ readonly if?: string; /** * Ignore failures for the processor. */ readonly ignoreFailure?: boolean; /** * JSON representation of this data source. */ readonly json: string; /** * Script language. */ readonly lang?: string; /** * Handle failures for the processor. */ readonly onFailures?: string[]; /** * Object containing parameters for the script. */ readonly params?: string; /** * ID of a stored script. If no `source` is specified, this parameter is required. */ readonly scriptId?: string; /** * Inline script. If no id is specified, this parameter is required. */ readonly source?: string; /** * Identifier for the processor. */ readonly tag?: string; } export function elasticsearchIngestProcessorScriptOutput(args?: ElasticsearchIngestProcessorScriptOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply(a => elasticsearchIngestProcessorScript(a, opts)) } /** * A collection of arguments for invoking ElasticsearchIngestProcessorScript. */ export interface ElasticsearchIngestProcessorScriptOutputArgs { /** * Description of the processor. */ description?: pulumi.Input; /** * Conditionally execute the processor */ if?: pulumi.Input; /** * Ignore failures for the processor. */ ignoreFailure?: pulumi.Input; /** * Script language. */ lang?: pulumi.Input; /** * Handle failures for the processor. */ onFailures?: pulumi.Input[]>; /** * Object containing parameters for the script. */ params?: pulumi.Input; /** * ID of a stored script. If no `source` is specified, this parameter is required. */ scriptId?: pulumi.Input; /** * Inline script. If no id is specified, this parameter is required. */ source?: pulumi.Input; /** * Identifier for the processor. */ tag?: pulumi.Input; }