published on Thursday, May 14, 2026 by elastic
published on Thursday, May 14, 2026 by elastic
Helper data source which can be used to create the configuration for an inference ingest processor. The inference processor uses a pre-trained data frame analytics model or a model deployed for natural language processing tasks to infer against the data that is being ingested in the pipeline. See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-pipeline
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const inference = elasticstack.getElasticsearchIngestProcessorInference({
modelId: "example",
inputOutput: {
inputField: "body",
outputField: "body_vector",
},
});
const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline", {
name: "inference-ingest",
processors: [inference.then(inference => inference.json)],
});
import pulumi
import pulumi_elasticstack as elasticstack
inference = elasticstack.get_elasticsearch_ingest_processor_inference(model_id="example",
input_output={
"input_field": "body",
"output_field": "body_vector",
})
my_ingest_pipeline = elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline",
name="inference-ingest",
processors=[inference.json])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
inference, err := elasticstack.GetElasticsearchIngestProcessorInference(ctx, &elasticstack.GetElasticsearchIngestProcessorInferenceArgs{
ModelId: "example",
InputOutput: elasticstack.GetElasticsearchIngestProcessorInferenceInputOutput{
InputField: "body",
OutputField: pulumi.StringRef("body_vector"),
},
}, nil)
if err != nil {
return err
}
_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "my_ingest_pipeline", &elasticstack.ElasticsearchIngestPipelineArgs{
Name: pulumi.String("inference-ingest"),
Processors: pulumi.StringArray{
pulumi.String(inference.Json),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var inference = Elasticstack.GetElasticsearchIngestProcessorInference.Invoke(new()
{
ModelId = "example",
InputOutput = new Elasticstack.Inputs.GetElasticsearchIngestProcessorInferenceInputOutputInputArgs
{
InputField = "body",
OutputField = "body_vector",
},
});
var myIngestPipeline = new Elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline", new()
{
Name = "inference-ingest",
Processors = new[]
{
inference.Apply(getElasticsearchIngestProcessorInferenceResult => getElasticsearchIngestProcessorInferenceResult.Json),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticstackFunctions;
import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorInferenceArgs;
import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorInferenceInputOutputArgs;
import com.pulumi.elasticstack.ElasticsearchIngestPipeline;
import com.pulumi.elasticstack.ElasticsearchIngestPipelineArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var inference = ElasticstackFunctions.getElasticsearchIngestProcessorInference(GetElasticsearchIngestProcessorInferenceArgs.builder()
.modelId("example")
.inputOutput(GetElasticsearchIngestProcessorInferenceInputOutputArgs.builder()
.inputField("body")
.outputField("body_vector")
.build())
.build());
var myIngestPipeline = new ElasticsearchIngestPipeline("myIngestPipeline", ElasticsearchIngestPipelineArgs.builder()
.name("inference-ingest")
.processors(inference.json())
.build());
}
}
resources:
myIngestPipeline:
type: elasticstack:ElasticsearchIngestPipeline
name: my_ingest_pipeline
properties:
name: inference-ingest
processors:
- ${inference.json}
variables:
inference:
fn::invoke:
function: elasticstack:getElasticsearchIngestProcessorInference
arguments:
modelId: example
inputOutput:
inputField: body
outputField: body_vector
Example coming soon!
Using getElasticsearchIngestProcessorInference
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getElasticsearchIngestProcessorInference(args: GetElasticsearchIngestProcessorInferenceArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorInferenceResult>
function getElasticsearchIngestProcessorInferenceOutput(args: GetElasticsearchIngestProcessorInferenceOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorInferenceResult>def get_elasticsearch_ingest_processor_inference(description: Optional[str] = None,
field_map: Optional[Mapping[str, str]] = None,
if_: Optional[str] = None,
ignore_failure: Optional[bool] = None,
input_output: Optional[GetElasticsearchIngestProcessorInferenceInputOutput] = None,
model_id: Optional[str] = None,
on_failures: Optional[Sequence[str]] = None,
tag: Optional[str] = None,
target_field: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorInferenceResult
def get_elasticsearch_ingest_processor_inference_output(description: pulumi.Input[Optional[str]] = None,
field_map: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
if_: pulumi.Input[Optional[str]] = None,
ignore_failure: pulumi.Input[Optional[bool]] = None,
input_output: pulumi.Input[Optional[GetElasticsearchIngestProcessorInferenceInputOutputArgs]] = None,
model_id: pulumi.Input[Optional[str]] = None,
on_failures: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
tag: pulumi.Input[Optional[str]] = None,
target_field: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorInferenceResult]func GetElasticsearchIngestProcessorInference(ctx *Context, args *GetElasticsearchIngestProcessorInferenceArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorInferenceResult, error)
func GetElasticsearchIngestProcessorInferenceOutput(ctx *Context, args *GetElasticsearchIngestProcessorInferenceOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorInferenceResultOutput> Note: This function is named GetElasticsearchIngestProcessorInference in the Go SDK.
public static class GetElasticsearchIngestProcessorInference
{
public static Task<GetElasticsearchIngestProcessorInferenceResult> InvokeAsync(GetElasticsearchIngestProcessorInferenceArgs args, InvokeOptions? opts = null)
public static Output<GetElasticsearchIngestProcessorInferenceResult> Invoke(GetElasticsearchIngestProcessorInferenceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetElasticsearchIngestProcessorInferenceResult> getElasticsearchIngestProcessorInference(GetElasticsearchIngestProcessorInferenceArgs args, InvokeOptions options)
public static Output<GetElasticsearchIngestProcessorInferenceResult> getElasticsearchIngestProcessorInference(GetElasticsearchIngestProcessorInferenceArgs args, InvokeOptions options)
fn::invoke:
function: elasticstack:index/getElasticsearchIngestProcessorInference:getElasticsearchIngestProcessorInference
arguments:
# arguments dictionarydata "elasticstack_getelasticsearchingestprocessorinference" "name" {
# arguments
}The following arguments are supported:
- Model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- Description string
- Description of the processor.
- Field
Map Dictionary<string, string> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- On
Failures List<string> - Handle failures for the processor.
- Tag string
- Identifier for the processor.
- Target
Field string - Field added to incoming documents to contain results objects.
- Model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- Description string
- Description of the processor.
- Field
Map map[string]string - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- On
Failures []string - Handle failures for the processor.
- Tag string
- Identifier for the processor.
- Target
Field string - Field added to incoming documents to contain results objects.
- model_
id string - The ID or alias for the trained model, or the ID of the deployment.
- description string
- Description of the processor.
- field_
map map(string) - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if string
- Conditionally execute the processor
- ignore_
failure bool - Ignore failures for the processor.
- input_
output object - Input and output field mappings for the inference processor.
- on_
failures list(string) - Handle failures for the processor.
- tag string
- Identifier for the processor.
- target_
field string - Field added to incoming documents to contain results objects.
- model
Id String - The ID or alias for the trained model, or the ID of the deployment.
- description String
- Description of the processor.
- field
Map Map<String,String> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if_ String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on
Failures List<String> - Handle failures for the processor.
- tag String
- Identifier for the processor.
- target
Field String - Field added to incoming documents to contain results objects.
- model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- description string
- Description of the processor.
- field
Map {[key: string]: string} - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if string
- Conditionally execute the processor
- ignore
Failure boolean - Ignore failures for the processor.
- input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on
Failures string[] - Handle failures for the processor.
- tag string
- Identifier for the processor.
- target
Field string - Field added to incoming documents to contain results objects.
- model_
id str - The ID or alias for the trained model, or the ID of the deployment.
- description str
- Description of the processor.
- field_
map Mapping[str, str] - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if_ str
- Conditionally execute the processor
- ignore_
failure bool - Ignore failures for the processor.
- input_
output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on_
failures Sequence[str] - Handle failures for the processor.
- tag str
- Identifier for the processor.
- target_
field str - Field added to incoming documents to contain results objects.
- model
Id String - The ID or alias for the trained model, or the ID of the deployment.
- description String
- Description of the processor.
- field
Map Map<String> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- input
Output Property Map - Input and output field mappings for the inference processor.
- on
Failures List<String> - Handle failures for the processor.
- tag String
- Identifier for the processor.
- target
Field String - Field added to incoming documents to contain results objects.
getElasticsearchIngestProcessorInference Result
The following output properties are available:
- Id string
- Internal identifier of the resource
- Ignore
Failure bool - Ignore failures for the processor.
- Json string
- JSON representation of this data source.
- Model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- Description string
- Description of the processor.
- Field
Map Dictionary<string, string> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- If string
- Conditionally execute the processor
- Input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- On
Failures List<string> - Handle failures for the processor.
- Tag string
- Identifier for the processor.
- Target
Field string - Field added to incoming documents to contain results objects.
- Id string
- Internal identifier of the resource
- Ignore
Failure bool - Ignore failures for the processor.
- Json string
- JSON representation of this data source.
- Model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- Description string
- Description of the processor.
- Field
Map map[string]string - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- If string
- Conditionally execute the processor
- Input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- On
Failures []string - Handle failures for the processor.
- Tag string
- Identifier for the processor.
- Target
Field string - Field added to incoming documents to contain results objects.
- id string
- Internal identifier of the resource
- ignore_
failure bool - Ignore failures for the processor.
- json string
- JSON representation of this data source.
- model_
id string - The ID or alias for the trained model, or the ID of the deployment.
- description string
- Description of the processor.
- field_
map map(string) - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if string
- Conditionally execute the processor
- input_
output object - Input and output field mappings for the inference processor.
- on_
failures list(string) - Handle failures for the processor.
- tag string
- Identifier for the processor.
- target_
field string - Field added to incoming documents to contain results objects.
- id String
- Internal identifier of the resource
- ignore
Failure Boolean - Ignore failures for the processor.
- json String
- JSON representation of this data source.
- model
Id String - The ID or alias for the trained model, or the ID of the deployment.
- description String
- Description of the processor.
- field
Map Map<String,String> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if_ String
- Conditionally execute the processor
- input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on
Failures List<String> - Handle failures for the processor.
- tag String
- Identifier for the processor.
- target
Field String - Field added to incoming documents to contain results objects.
- id string
- Internal identifier of the resource
- ignore
Failure boolean - Ignore failures for the processor.
- json string
- JSON representation of this data source.
- model
Id string - The ID or alias for the trained model, or the ID of the deployment.
- description string
- Description of the processor.
- field
Map {[key: string]: string} - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if string
- Conditionally execute the processor
- input
Output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on
Failures string[] - Handle failures for the processor.
- tag string
- Identifier for the processor.
- target
Field string - Field added to incoming documents to contain results objects.
- id str
- Internal identifier of the resource
- ignore_
failure bool - Ignore failures for the processor.
- json str
- JSON representation of this data source.
- model_
id str - The ID or alias for the trained model, or the ID of the deployment.
- description str
- Description of the processor.
- field_
map Mapping[str, str] - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if_ str
- Conditionally execute the processor
- input_
output GetElasticsearch Ingest Processor Inference Input Output - Input and output field mappings for the inference processor.
- on_
failures Sequence[str] - Handle failures for the processor.
- tag str
- Identifier for the processor.
- target_
field str - Field added to incoming documents to contain results objects.
- id String
- Internal identifier of the resource
- ignore
Failure Boolean - Ignore failures for the processor.
- json String
- JSON representation of this data source.
- model
Id String - The ID or alias for the trained model, or the ID of the deployment.
- description String
- Description of the processor.
- field
Map Map<String> - Maps the document field names to the known field names of the model. Maps the document fields to the model's expected input fields.
- if String
- Conditionally execute the processor
- input
Output Property Map - Input and output field mappings for the inference processor.
- on
Failures List<String> - Handle failures for the processor.
- tag String
- Identifier for the processor.
- target
Field String - Field added to incoming documents to contain results objects.
Supporting Types
GetElasticsearchIngestProcessorInferenceInputOutput
- Input
Field string - The field name from which the inference processor reads its input value.
- Output
Field string - The field name to which the inference processor writes its output.
- Input
Field string - The field name from which the inference processor reads its input value.
- Output
Field string - The field name to which the inference processor writes its output.
- input_
field string - The field name from which the inference processor reads its input value.
- output_
field string - The field name to which the inference processor writes its output.
- input
Field String - The field name from which the inference processor reads its input value.
- output
Field String - The field name to which the inference processor writes its output.
- input
Field string - The field name from which the inference processor reads its input value.
- output
Field string - The field name to which the inference processor writes its output.
- input_
field str - The field name from which the inference processor reads its input value.
- output_
field str - The field name to which the inference processor writes its output.
- input
Field String - The field name from which the inference processor reads its input value.
- output
Field String - The field name to which the inference processor writes its output.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstackTerraform Provider.
published on Thursday, May 14, 2026 by elastic
