<filename>sdk/dotnet/GetIngestProcessorUserAgent.cs<gh_stars>0// *** 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! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Elasticstack
{
    public static class GetIngestProcessorUserAgent
    {
        /// <summary>
        /// The `user_agent` processor extracts details from the user agent string a browser sends with its web requests. This processor adds this information by default under the `user_agent` field.
        /// 
        /// The ingest-user-agent module ships by default with the regexes.yaml made available by uap-java with an Apache 2.0 license. For more details see https://github.com/ua-parser/uap-core.
        /// 
        /// 
        /// See: https://www.elastic.co/guide/en/elasticsearch/reference/current/user-agent-processor.html
        /// 
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Elasticstack = Pulumi.Elasticstack;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var agent = Elasticstack.GetIngestProcessorUserAgent.Invoke(new()
        ///     {
        ///         Field = "agent",
        ///     });
        /// 
        ///     var myIngestPipeline = new Elasticstack.IngestPipeline("myIngestPipeline", new()
        ///     {
        ///         Processors = new[]
        ///         {
        ///             agent.Apply(getIngestProcessorUserAgentResult =&gt; getIngestProcessorUserAgentResult.Json),
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetIngestProcessorUserAgentResult> InvokeAsync(GetIngestProcessorUserAgentArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetIngestProcessorUserAgentResult>("elasticstack:index/getIngestProcessorUserAgent:getIngestProcessorUserAgent", args ?? new GetIngestProcessorUserAgentArgs(), options.WithDefaults());

        /// <summary>
        /// The `user_agent` processor extracts details from the user agent string a browser sends with its web requests. This processor adds this information by default under the `user_agent` field.
        /// 
        /// The ingest-user-agent module ships by default with the regexes.yaml made available by uap-java with an Apache 2.0 license. For more details see https://github.com/ua-parser/uap-core.
        /// 
        /// 
        /// See: https://www.elastic.co/guide/en/elasticsearch/reference/current/user-agent-processor.html
        /// 
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Elasticstack = Pulumi.Elasticstack;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var agent = Elasticstack.GetIngestProcessorUserAgent.Invoke(new()
        ///     {
        ///         Field = "agent",
        ///     });
        /// 
        ///     var myIngestPipeline = new Elasticstack.IngestPipeline("myIngestPipeline", new()
        ///     {
        ///         Processors = new[]
        ///         {
        ///             agent.Apply(getIngestProcessorUserAgentResult =&gt; getIngestProcessorUserAgentResult.Json),
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetIngestProcessorUserAgentResult> Invoke(GetIngestProcessorUserAgentInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetIngestProcessorUserAgentResult>("elasticstack:index/getIngestProcessorUserAgent:getIngestProcessorUserAgent", args ?? new GetIngestProcessorUserAgentInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetIngestProcessorUserAgentArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0**
        /// </summary>
        [Input("extractDeviceType")]
        public bool? ExtractDeviceType { get; set; }

        /// <summary>
        /// The field containing the user agent string.
        /// </summary>
        [Input("field", required: true)]
        public string Field { get; set; } = null!;

        /// <summary>
        /// If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.
        /// </summary>
        [Input("ignoreMissing")]
        public bool? IgnoreMissing { get; set; }

        [Input("properties")]
        private List<string>? _properties;

        /// <summary>
        /// Controls what properties are added to `target_field`.
        /// </summary>
        public List<string> Properties
        {
            get => _properties ?? (_properties = new List<string>());
            set => _properties = value;
        }

        /// <summary>
        /// The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string.
        /// </summary>
        [Input("regexFile")]
        public string? RegexFile { get; set; }

        /// <summary>
        /// The field that will be filled with the user agent details.
        /// </summary>
        [Input("targetField")]
        public string? TargetField { get; set; }

        public GetIngestProcessorUserAgentArgs()
        {
        }
        public static new GetIngestProcessorUserAgentArgs Empty => new GetIngestProcessorUserAgentArgs();
    }

    public sealed class GetIngestProcessorUserAgentInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0**
        /// </summary>
        [Input("extractDeviceType")]
        public Input<bool>? ExtractDeviceType { get; set; }

        /// <summary>
        /// The field containing the user agent string.
        /// </summary>
        [Input("field", required: true)]
        public Input<string> Field { get; set; } = null!;

        /// <summary>
        /// If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.
        /// </summary>
        [Input("ignoreMissing")]
        public Input<bool>? IgnoreMissing { get; set; }

        [Input("properties")]
        private InputList<string>? _properties;

        /// <summary>
        /// Controls what properties are added to `target_field`.
        /// </summary>
        public InputList<string> Properties
        {
            get => _properties ?? (_properties = new InputList<string>());
            set => _properties = value;
        }

        /// <summary>
        /// The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string.
        /// </summary>
        [Input("regexFile")]
        public Input<string>? RegexFile { get; set; }

        /// <summary>
        /// The field that will be filled with the user agent details.
        /// </summary>
        [Input("targetField")]
        public Input<string>? TargetField { get; set; }

        public GetIngestProcessorUserAgentInvokeArgs()
        {
        }
        public static new GetIngestProcessorUserAgentInvokeArgs Empty => new GetIngestProcessorUserAgentInvokeArgs();
    }


    [OutputType]
    public sealed class GetIngestProcessorUserAgentResult
    {
        /// <summary>
        /// Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0**
        /// </summary>
        public readonly bool? ExtractDeviceType;
        /// <summary>
        /// The field containing the user agent string.
        /// </summary>
        public readonly string Field;
        /// <summary>
        /// Internal identifier of the resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.
        /// </summary>
        public readonly bool? IgnoreMissing;
        /// <summary>
        /// JSON representation of this data source.
        /// </summary>
        public readonly string Json;
        /// <summary>
        /// Controls what properties are added to `target_field`.
        /// </summary>
        public readonly ImmutableArray<string> Properties;
        /// <summary>
        /// The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string.
        /// </summary>
        public readonly string? RegexFile;
        /// <summary>
        /// The field that will be filled with the user agent details.
        /// </summary>
        public readonly string? TargetField;

        [OutputConstructor]
        private GetIngestProcessorUserAgentResult(
            bool? extractDeviceType,

            string field,

            string id,

            bool? ignoreMissing,

            string json,

            ImmutableArray<string> properties,

            string? regexFile,

            string? targetField)
        {
            ExtractDeviceType = extractDeviceType;
            Field = field;
            Id = id;
            IgnoreMissing = ignoreMissing;
            Json = json;
            Properties = properties;
            RegexFile = regexFile;
            TargetField = targetField;
        }
    }
}
