// *** 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"; /** * Sets user-related details (such as `username`, `roles`, `email`, `fullName`, `metadata`, `apiKey`, `realm` and `authenticationTyp`e) from the current authenticated user to the current document by pre-processing the ingest. The `apiKey` property exists only if the user authenticates with an API key. It is an object containing the id, name and metadata (if it exists and is non-empty) fields of the API key. The realm property is also an object with two fields, name and type. When using API key authentication, the realm property refers to the realm from which the API key is created. The `authenticationType property` is a string that can take value from `REALM`, `API_KEY`, `TOKEN` and `ANONYMOUS`. * * See: https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-node-set-security-user-processor.html * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as elasticstack from "@pulumi/elasticstack"; * * const user = elasticstack.ElasticsearchIngestProcessorSetSecurityUser({ * field: "user", * properties: [ * "username", * "realm", * ], * }); * const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", {processors: [user.then(user => user.json)]}); * ``` */ export function elasticsearchIngestProcessorSetSecurityUser(args: ElasticsearchIngestProcessorSetSecurityUserArgs, opts?: pulumi.InvokeOptions): Promise { if (!opts) { opts = {} } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); return pulumi.runtime.invoke("elasticstack:index/elasticsearchIngestProcessorSetSecurityUser:ElasticsearchIngestProcessorSetSecurityUser", { "description": args.description, "field": args.field, "if": args.if, "ignoreFailure": args.ignoreFailure, "onFailures": args.onFailures, "properties": args.properties, "tag": args.tag, }, opts); } /** * A collection of arguments for invoking ElasticsearchIngestProcessorSetSecurityUser. */ export interface ElasticsearchIngestProcessorSetSecurityUserArgs { /** * Description of the processor. */ description?: string; /** * The field to store the user information into. */ field: string; /** * Conditionally execute the processor */ if?: string; /** * Ignore failures for the processor. */ ignoreFailure?: boolean; /** * Handle failures for the processor. */ onFailures?: string[]; /** * Controls what user related properties are added to the `field`. */ properties?: string[]; /** * Identifier for the processor. */ tag?: string; } /** * A collection of values returned by ElasticsearchIngestProcessorSetSecurityUser. */ export interface ElasticsearchIngestProcessorSetSecurityUserResult { /** * Description of the processor. */ readonly description?: string; /** * The field to store the user information into. */ readonly field: 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; /** * Handle failures for the processor. */ readonly onFailures?: string[]; /** * Controls what user related properties are added to the `field`. */ readonly properties?: string[]; /** * Identifier for the processor. */ readonly tag?: string; } export function elasticsearchIngestProcessorSetSecurityUserOutput(args: ElasticsearchIngestProcessorSetSecurityUserOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output { return pulumi.output(args).apply(a => elasticsearchIngestProcessorSetSecurityUser(a, opts)) } /** * A collection of arguments for invoking ElasticsearchIngestProcessorSetSecurityUser. */ export interface ElasticsearchIngestProcessorSetSecurityUserOutputArgs { /** * Description of the processor. */ description?: pulumi.Input; /** * The field to store the user information into. */ field: pulumi.Input; /** * Conditionally execute the processor */ if?: pulumi.Input; /** * Ignore failures for the processor. */ ignoreFailure?: pulumi.Input; /** * Handle failures for the processor. */ onFailures?: pulumi.Input[]>; /** * Controls what user related properties are added to the `field`. */ properties?: pulumi.Input[]>; /** * Identifier for the processor. */ tag?: pulumi.Input; }