// *** 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"; /** * The `userAgent` processor extracts details from the user agent string a browser sends with its web requests. This processor adds this information by default under the `userAgent` 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 * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as elasticstack from "@pulumi/elasticstack"; * * const agent = elasticstack.ElasticsearchIngestProcessorUserAgent({ * field: "agent", * }); * const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", {processors: [agent.then(agent => agent.json)]}); * ``` */ export function elasticsearchIngestProcessorUserAgent(args: ElasticsearchIngestProcessorUserAgentArgs, opts?: pulumi.InvokeOptions): Promise { if (!opts) { opts = {} } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("elasticstack:index/elasticsearchIngestProcessorUserAgent:ElasticsearchIngestProcessorUserAgent", { "extractDeviceType": args.extractDeviceType, "field": args.field, "ignoreMissing": args.ignoreMissing, "properties": args.properties, "regexFile": args.regexFile, "targetField": args.targetField, }, opts); } /** * A collection of arguments for invoking ElasticsearchIngestProcessorUserAgent. */ export interface ElasticsearchIngestProcessorUserAgentArgs { /** * Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0** */ extractDeviceType?: boolean; /** * The field containing the user agent string. */ field: string; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document. */ ignoreMissing?: boolean; /** * Controls what properties are added to `targetField`. */ properties?: string[]; /** * The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. */ regexFile?: string; /** * The field that will be filled with the user agent details. */ targetField?: string; } /** * A collection of values returned by ElasticsearchIngestProcessorUserAgent. */ export interface ElasticsearchIngestProcessorUserAgentResult { /** * Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0** */ readonly extractDeviceType?: boolean; /** * The field containing the user agent string. */ readonly field: string; /** * Internal identifier of the resource. */ readonly id: string; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document. */ readonly ignoreMissing?: boolean; /** * JSON representation of this data source. */ readonly json: string; /** * Controls what properties are added to `targetField`. */ readonly properties?: string[]; /** * The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. */ readonly regexFile?: string; /** * The field that will be filled with the user agent details. */ readonly targetField?: string; } export function elasticsearchIngestProcessorUserAgentOutput(args: ElasticsearchIngestProcessorUserAgentOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply(a => elasticsearchIngestProcessorUserAgent(a, opts)) } /** * A collection of arguments for invoking ElasticsearchIngestProcessorUserAgent. */ export interface ElasticsearchIngestProcessorUserAgentOutputArgs { /** * Extracts device type from the user agent string on a best-effort basis. Supported only starting from Elasticsearch version **8.0** */ extractDeviceType?: pulumi.Input; /** * The field containing the user agent string. */ field: pulumi.Input; /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document. */ ignoreMissing?: pulumi.Input; /** * Controls what properties are added to `targetField`. */ properties?: pulumi.Input[]>; /** * The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. */ regexFile?: pulumi.Input; /** * The field that will be filled with the user agent details. */ targetField?: pulumi.Input; }