1. Packages
  2. Packages
  3. Elasticstack Provider
  4. API Docs
  5. getElasticsearchIngestProcessorUserAgent
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic

    Helper data source which can be used to create the configuration for a user agent processor. This processor extracts details from the user agent string a browser sends with its web requests. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/user-agent-processor.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const agent = elasticstack.getElasticsearchIngestProcessorUserAgent({
        field: "agent",
    });
    const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline", {
        name: "agent-ingest",
        processors: [agent.then(agent => agent.json)],
    });
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    agent = elasticstack.get_elasticsearch_ingest_processor_user_agent(field="agent")
    my_ingest_pipeline = elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline",
        name="agent-ingest",
        processors=[agent.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 {
    		agent, err := elasticstack.GetElasticsearchIngestProcessorUserAgent(ctx, &elasticstack.GetElasticsearchIngestProcessorUserAgentArgs{
    			Field: "agent",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "my_ingest_pipeline", &elasticstack.ElasticsearchIngestPipelineArgs{
    			Name: pulumi.String("agent-ingest"),
    			Processors: pulumi.StringArray{
    				pulumi.String(agent.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 agent = Elasticstack.GetElasticsearchIngestProcessorUserAgent.Invoke(new()
        {
            Field = "agent",
        });
    
        var myIngestPipeline = new Elasticstack.ElasticsearchIngestPipeline("my_ingest_pipeline", new()
        {
            Name = "agent-ingest",
            Processors = new[]
            {
                agent.Apply(getElasticsearchIngestProcessorUserAgentResult => getElasticsearchIngestProcessorUserAgentResult.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.GetElasticsearchIngestProcessorUserAgentArgs;
    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 agent = ElasticstackFunctions.getElasticsearchIngestProcessorUserAgent(GetElasticsearchIngestProcessorUserAgentArgs.builder()
                .field("agent")
                .build());
    
            var myIngestPipeline = new ElasticsearchIngestPipeline("myIngestPipeline", ElasticsearchIngestPipelineArgs.builder()
                .name("agent-ingest")
                .processors(agent.json())
                .build());
    
        }
    }
    
    resources:
      myIngestPipeline:
        type: elasticstack:ElasticsearchIngestPipeline
        name: my_ingest_pipeline
        properties:
          name: agent-ingest
          processors:
            - ${agent.json}
    variables:
      agent:
        fn::invoke:
          function: elasticstack:getElasticsearchIngestProcessorUserAgent
          arguments:
            field: agent
    
    Example coming soon!
    

    Using getElasticsearchIngestProcessorUserAgent

    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 getElasticsearchIngestProcessorUserAgent(args: GetElasticsearchIngestProcessorUserAgentArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorUserAgentResult>
    function getElasticsearchIngestProcessorUserAgentOutput(args: GetElasticsearchIngestProcessorUserAgentOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorUserAgentResult>
    def get_elasticsearch_ingest_processor_user_agent(description: Optional[str] = None,
                                                      extract_device_type: Optional[bool] = None,
                                                      field: Optional[str] = None,
                                                      if_: Optional[str] = None,
                                                      ignore_failure: Optional[bool] = None,
                                                      ignore_missing: Optional[bool] = None,
                                                      on_failures: Optional[Sequence[str]] = None,
                                                      properties: Optional[Sequence[str]] = None,
                                                      regex_file: Optional[str] = None,
                                                      tag: Optional[str] = None,
                                                      target_field: Optional[str] = None,
                                                      opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorUserAgentResult
    def get_elasticsearch_ingest_processor_user_agent_output(description: pulumi.Input[Optional[str]] = None,
                                                      extract_device_type: pulumi.Input[Optional[bool]] = None,
                                                      field: pulumi.Input[Optional[str]] = None,
                                                      if_: pulumi.Input[Optional[str]] = None,
                                                      ignore_failure: pulumi.Input[Optional[bool]] = None,
                                                      ignore_missing: pulumi.Input[Optional[bool]] = None,
                                                      on_failures: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                                      properties: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                                                      regex_file: pulumi.Input[Optional[str]] = None,
                                                      tag: pulumi.Input[Optional[str]] = None,
                                                      target_field: pulumi.Input[Optional[str]] = None,
                                                      opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorUserAgentResult]
    func GetElasticsearchIngestProcessorUserAgent(ctx *Context, args *GetElasticsearchIngestProcessorUserAgentArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorUserAgentResult, error)
    func GetElasticsearchIngestProcessorUserAgentOutput(ctx *Context, args *GetElasticsearchIngestProcessorUserAgentOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorUserAgentResultOutput

    > Note: This function is named GetElasticsearchIngestProcessorUserAgent in the Go SDK.

    public static class GetElasticsearchIngestProcessorUserAgent 
    {
        public static Task<GetElasticsearchIngestProcessorUserAgentResult> InvokeAsync(GetElasticsearchIngestProcessorUserAgentArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticsearchIngestProcessorUserAgentResult> Invoke(GetElasticsearchIngestProcessorUserAgentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticsearchIngestProcessorUserAgentResult> getElasticsearchIngestProcessorUserAgent(GetElasticsearchIngestProcessorUserAgentArgs args, InvokeOptions options)
    public static Output<GetElasticsearchIngestProcessorUserAgentResult> getElasticsearchIngestProcessorUserAgent(GetElasticsearchIngestProcessorUserAgentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getElasticsearchIngestProcessorUserAgent:getElasticsearchIngestProcessorUserAgent
      arguments:
        # arguments dictionary
    data "elasticstack_getelasticsearchingestprocessoruseragent" "name" {
        # arguments
    }

    The following arguments are supported:

    Field string
    The field containing the user agent string.
    Description string
    Description of the processor.
    ExtractDeviceType bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures List<string>
    Handle failures for the processor.
    Properties List<string>
    Controls what properties are added to target_field.
    RegexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    Tag string
    Identifier for the processor.
    TargetField string
    The field that will be filled with the user agent details.
    Field string
    The field containing the user agent string.
    Description string
    Description of the processor.
    ExtractDeviceType bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures []string
    Handle failures for the processor.
    Properties []string
    Controls what properties are added to target_field.
    RegexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    Tag string
    Identifier for the processor.
    TargetField string
    The field that will be filled with the user agent details.
    field string
    The field containing the user agent string.
    description string
    Description of the processor.
    extract_device_type bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if string
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures list(string)
    Handle failures for the processor.
    properties list(string)
    Controls what properties are added to target_field.
    regex_file string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag string
    Identifier for the processor.
    target_field string
    The field that will be filled with the user agent details.
    field String
    The field containing the user agent string.
    description String
    Description of the processor.
    extractDeviceType Boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if_ String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    properties List<String>
    Controls what properties are added to target_field.
    regexFile String
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag String
    Identifier for the processor.
    targetField String
    The field that will be filled with the user agent details.
    field string
    The field containing the user agent string.
    description string
    Description of the processor.
    extractDeviceType boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if string
    Conditionally execute the processor
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures string[]
    Handle failures for the processor.
    properties string[]
    Controls what properties are added to target_field.
    regexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag string
    Identifier for the processor.
    targetField string
    The field that will be filled with the user agent details.
    field str
    The field containing the user agent string.
    description str
    Description of the processor.
    extract_device_type bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if_ str
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures Sequence[str]
    Handle failures for the processor.
    properties Sequence[str]
    Controls what properties are added to target_field.
    regex_file str
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag str
    Identifier for the processor.
    target_field str
    The field that will be filled with the user agent details.
    field String
    The field containing the user agent string.
    description String
    Description of the processor.
    extractDeviceType Boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    properties List<String>
    Controls what properties are added to target_field.
    regexFile String
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag String
    Identifier for the processor.
    targetField String
    The field that will be filled with the user agent details.

    getElasticsearchIngestProcessorUserAgent Result

    The following output properties are available:

    Field string
    The field containing the user agent string.
    Id string
    Internal identifier of the resource.
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    ExtractDeviceType bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    If string
    Conditionally execute the processor
    OnFailures List<string>
    Handle failures for the processor.
    Properties List<string>
    Controls what properties are added to target_field.
    RegexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    Tag string
    Identifier for the processor.
    TargetField string
    The field that will be filled with the user agent details.
    Field string
    The field containing the user agent string.
    Id string
    Internal identifier of the resource.
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    ExtractDeviceType bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    If string
    Conditionally execute the processor
    OnFailures []string
    Handle failures for the processor.
    Properties []string
    Controls what properties are added to target_field.
    RegexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    Tag string
    Identifier for the processor.
    TargetField string
    The field that will be filled with the user agent details.
    field string
    The field containing the user agent string.
    id string
    Internal identifier of the resource.
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    json string
    JSON representation of this data source.
    description string
    Description of the processor.
    extract_device_type bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if string
    Conditionally execute the processor
    on_failures list(string)
    Handle failures for the processor.
    properties list(string)
    Controls what properties are added to target_field.
    regex_file string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag string
    Identifier for the processor.
    target_field string
    The field that will be filled with the user agent details.
    field String
    The field containing the user agent string.
    id String
    Internal identifier of the resource.
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    extractDeviceType Boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if_ String
    Conditionally execute the processor
    onFailures List<String>
    Handle failures for the processor.
    properties List<String>
    Controls what properties are added to target_field.
    regexFile String
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag String
    Identifier for the processor.
    targetField String
    The field that will be filled with the user agent details.
    field string
    The field containing the user agent string.
    id string
    Internal identifier of the resource.
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    json string
    JSON representation of this data source.
    description string
    Description of the processor.
    extractDeviceType boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if string
    Conditionally execute the processor
    onFailures string[]
    Handle failures for the processor.
    properties string[]
    Controls what properties are added to target_field.
    regexFile string
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag string
    Identifier for the processor.
    targetField string
    The field that will be filled with the user agent details.
    field str
    The field containing the user agent string.
    id str
    Internal identifier of the resource.
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    json str
    JSON representation of this data source.
    description str
    Description of the processor.
    extract_device_type bool
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if_ str
    Conditionally execute the processor
    on_failures Sequence[str]
    Handle failures for the processor.
    properties Sequence[str]
    Controls what properties are added to target_field.
    regex_file str
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag str
    Identifier for the processor.
    target_field str
    The field that will be filled with the user agent details.
    field String
    The field containing the user agent string.
    id String
    Internal identifier of the resource.
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    extractDeviceType Boolean
    Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version 8.0
    if String
    Conditionally execute the processor
    onFailures List<String>
    Handle failures for the processor.
    properties List<String>
    Controls what properties are added to target_field.
    regexFile String
    The name of the file in the config/ingest-user-agent directory containing the regular expressions for parsing the user agent string.
    tag String
    Identifier for the processor.
    targetField String
    The field that will be filled with the user agent details.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    Viewing docs for elasticstack 0.15.0
    published on Thursday, May 14, 2026 by elastic
      Try Pulumi Cloud free. Your team will thank you.