1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. ElasticsearchEnrichPolicy
elasticstack 0.11.14 published on Monday, Apr 14, 2025 by elastic

elasticstack.ElasticsearchEnrichPolicy

Explore with Pulumi AI

Creates or updates enrich policies, see: https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-apis.html

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";

const myIndex = new elasticstack.ElasticsearchIndex("myIndex", {
    mappings: JSON.stringify({
        properties: {
            email: {
                type: "text",
            },
            first_name: {
                type: "text",
            },
            last_name: {
                type: "text",
            },
        },
    }),
    deletionProtection: false,
});
const policy1 = new elasticstack.ElasticsearchEnrichPolicy("policy1", {
    policyType: "match",
    indices: [myIndex.name],
    matchField: "email",
    enrichFields: [
        "first_name",
        "last_name",
    ],
    query: JSON.stringify({
        bool: {
            must: [{
                term: {
                    b: "A",
                },
            }],
            must_not: [{
                term: {
                    a: "B",
                },
            }],
        },
    }),
});
Copy
import pulumi
import json
import pulumi_elasticstack as elasticstack

my_index = elasticstack.ElasticsearchIndex("myIndex",
    mappings=json.dumps({
        "properties": {
            "email": {
                "type": "text",
            },
            "first_name": {
                "type": "text",
            },
            "last_name": {
                "type": "text",
            },
        },
    }),
    deletion_protection=False)
policy1 = elasticstack.ElasticsearchEnrichPolicy("policy1",
    policy_type="match",
    indices=[my_index.name],
    match_field="email",
    enrich_fields=[
        "first_name",
        "last_name",
    ],
    query=json.dumps({
        "bool": {
            "must": [{
                "term": {
                    "b": "A",
                },
            }],
            "must_not": [{
                "term": {
                    "a": "B",
                },
            }],
        },
    }))
Copy
package main

import (
	"encoding/json"

	"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 {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"properties": map[string]interface{}{
				"email": map[string]interface{}{
					"type": "text",
				},
				"first_name": map[string]interface{}{
					"type": "text",
				},
				"last_name": map[string]interface{}{
					"type": "text",
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		myIndex, err := elasticstack.NewElasticsearchIndex(ctx, "myIndex", &elasticstack.ElasticsearchIndexArgs{
			Mappings:           pulumi.String(json0),
			DeletionProtection: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"bool": map[string]interface{}{
				"must": []map[string]interface{}{
					map[string]interface{}{
						"term": map[string]interface{}{
							"b": "A",
						},
					},
				},
				"must_not": []map[string]interface{}{
					map[string]interface{}{
						"term": map[string]interface{}{
							"a": "B",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		_, err = elasticstack.NewElasticsearchEnrichPolicy(ctx, "policy1", &elasticstack.ElasticsearchEnrichPolicyArgs{
			PolicyType: pulumi.String("match"),
			Indices: pulumi.StringArray{
				myIndex.Name,
			},
			MatchField: pulumi.String("email"),
			EnrichFields: pulumi.StringArray{
				pulumi.String("first_name"),
				pulumi.String("last_name"),
			},
			Query: pulumi.String(json1),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;

return await Deployment.RunAsync(() => 
{
    var myIndex = new Elasticstack.ElasticsearchIndex("myIndex", new()
    {
        Mappings = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["properties"] = new Dictionary<string, object?>
            {
                ["email"] = new Dictionary<string, object?>
                {
                    ["type"] = "text",
                },
                ["first_name"] = new Dictionary<string, object?>
                {
                    ["type"] = "text",
                },
                ["last_name"] = new Dictionary<string, object?>
                {
                    ["type"] = "text",
                },
            },
        }),
        DeletionProtection = false,
    });

    var policy1 = new Elasticstack.ElasticsearchEnrichPolicy("policy1", new()
    {
        PolicyType = "match",
        Indices = new[]
        {
            myIndex.Name,
        },
        MatchField = "email",
        EnrichFields = new[]
        {
            "first_name",
            "last_name",
        },
        Query = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["bool"] = new Dictionary<string, object?>
            {
                ["must"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["term"] = new Dictionary<string, object?>
                        {
                            ["b"] = "A",
                        },
                    },
                },
                ["must_not"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["term"] = new Dictionary<string, object?>
                        {
                            ["a"] = "B",
                        },
                    },
                },
            },
        }),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticsearchIndex;
import com.pulumi.elasticstack.ElasticsearchIndexArgs;
import com.pulumi.elasticstack.ElasticsearchEnrichPolicy;
import com.pulumi.elasticstack.ElasticsearchEnrichPolicyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
        var myIndex = new ElasticsearchIndex("myIndex", ElasticsearchIndexArgs.builder()
            .mappings(serializeJson(
                jsonObject(
                    jsonProperty("properties", jsonObject(
                        jsonProperty("email", jsonObject(
                            jsonProperty("type", "text")
                        )),
                        jsonProperty("first_name", jsonObject(
                            jsonProperty("type", "text")
                        )),
                        jsonProperty("last_name", jsonObject(
                            jsonProperty("type", "text")
                        ))
                    ))
                )))
            .deletionProtection(false)
            .build());

        var policy1 = new ElasticsearchEnrichPolicy("policy1", ElasticsearchEnrichPolicyArgs.builder()
            .policyType("match")
            .indices(myIndex.name())
            .matchField("email")
            .enrichFields(            
                "first_name",
                "last_name")
            .query(serializeJson(
                jsonObject(
                    jsonProperty("bool", jsonObject(
                        jsonProperty("must", jsonArray(jsonObject(
                            jsonProperty("term", jsonObject(
                                jsonProperty("b", "A")
                            ))
                        ))),
                        jsonProperty("must_not", jsonArray(jsonObject(
                            jsonProperty("term", jsonObject(
                                jsonProperty("a", "B")
                            ))
                        )))
                    ))
                )))
            .build());

    }
}
Copy
resources:
  myIndex:
    type: elasticstack:ElasticsearchIndex
    properties:
      mappings:
        fn::toJSON:
          properties:
            email:
              type: text
            first_name:
              type: text
            last_name:
              type: text
      deletionProtection: false
  policy1:
    type: elasticstack:ElasticsearchEnrichPolicy
    properties:
      policyType: match
      indices:
        - ${myIndex.name}
      matchField: email
      enrichFields:
        - first_name
        - last_name
      query:
        fn::toJSON:
          bool:
            must:
              - term:
                  b: A
            must_not:
              - term:
                  a: B
Copy

Create ElasticsearchEnrichPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ElasticsearchEnrichPolicy(name: string, args: ElasticsearchEnrichPolicyArgs, opts?: CustomResourceOptions);
@overload
def ElasticsearchEnrichPolicy(resource_name: str,
                              args: ElasticsearchEnrichPolicyArgs,
                              opts: Optional[ResourceOptions] = None)

@overload
def ElasticsearchEnrichPolicy(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              enrich_fields: Optional[Sequence[str]] = None,
                              indices: Optional[Sequence[str]] = None,
                              match_field: Optional[str] = None,
                              policy_type: Optional[str] = None,
                              elasticsearch_connection: Optional[ElasticsearchEnrichPolicyElasticsearchConnectionArgs] = None,
                              elasticsearch_enrich_policy_id: Optional[str] = None,
                              execute: Optional[bool] = None,
                              name: Optional[str] = None,
                              query: Optional[str] = None)
func NewElasticsearchEnrichPolicy(ctx *Context, name string, args ElasticsearchEnrichPolicyArgs, opts ...ResourceOption) (*ElasticsearchEnrichPolicy, error)
public ElasticsearchEnrichPolicy(string name, ElasticsearchEnrichPolicyArgs args, CustomResourceOptions? opts = null)
public ElasticsearchEnrichPolicy(String name, ElasticsearchEnrichPolicyArgs args)
public ElasticsearchEnrichPolicy(String name, ElasticsearchEnrichPolicyArgs args, CustomResourceOptions options)
type: elasticstack:ElasticsearchEnrichPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ElasticsearchEnrichPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ElasticsearchEnrichPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ElasticsearchEnrichPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ElasticsearchEnrichPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ElasticsearchEnrichPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var elasticsearchEnrichPolicyResource = new Elasticstack.ElasticsearchEnrichPolicy("elasticsearchEnrichPolicyResource", new()
{
    EnrichFields = new[]
    {
        "string",
    },
    Indices = new[]
    {
        "string",
    },
    MatchField = "string",
    PolicyType = "string",
    ElasticsearchEnrichPolicyId = "string",
    Execute = false,
    Name = "string",
    Query = "string",
});
Copy
example, err := elasticstack.NewElasticsearchEnrichPolicy(ctx, "elasticsearchEnrichPolicyResource", &elasticstack.ElasticsearchEnrichPolicyArgs{
EnrichFields: pulumi.StringArray{
pulumi.String("string"),
},
Indices: pulumi.StringArray{
pulumi.String("string"),
},
MatchField: pulumi.String("string"),
PolicyType: pulumi.String("string"),
ElasticsearchEnrichPolicyId: pulumi.String("string"),
Execute: pulumi.Bool(false),
Name: pulumi.String("string"),
Query: pulumi.String("string"),
})
Copy
var elasticsearchEnrichPolicyResource = new ElasticsearchEnrichPolicy("elasticsearchEnrichPolicyResource", ElasticsearchEnrichPolicyArgs.builder()
    .enrichFields("string")
    .indices("string")
    .matchField("string")
    .policyType("string")
    .elasticsearchEnrichPolicyId("string")
    .execute(false)
    .name("string")
    .query("string")
    .build());
Copy
elasticsearch_enrich_policy_resource = elasticstack.ElasticsearchEnrichPolicy("elasticsearchEnrichPolicyResource",
    enrich_fields=["string"],
    indices=["string"],
    match_field="string",
    policy_type="string",
    elasticsearch_enrich_policy_id="string",
    execute=False,
    name="string",
    query="string")
Copy
const elasticsearchEnrichPolicyResource = new elasticstack.ElasticsearchEnrichPolicy("elasticsearchEnrichPolicyResource", {
    enrichFields: ["string"],
    indices: ["string"],
    matchField: "string",
    policyType: "string",
    elasticsearchEnrichPolicyId: "string",
    execute: false,
    name: "string",
    query: "string",
});
Copy
type: elasticstack:ElasticsearchEnrichPolicy
properties:
    elasticsearchEnrichPolicyId: string
    enrichFields:
        - string
    execute: false
    indices:
        - string
    matchField: string
    name: string
    policyType: string
    query: string
Copy

ElasticsearchEnrichPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ElasticsearchEnrichPolicy resource accepts the following input properties:

EnrichFields This property is required. List<string>
Fields to add to matching incoming documents. These fields must be present in the source indices.
Indices This property is required. List<string>
Array of one or more source indices used to create the enrich index.
MatchField This property is required. string
Field in source indices used to match incoming documents.
PolicyType This property is required. string
The type of enrich policy, can be one of geo_match, match, range.
ElasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

ElasticsearchEnrichPolicyId string
The ID of this resource.
Execute bool
Whether to call the execute API function in order to create the enrich index.
Name string
Name of the enrich policy to manage.
Query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
EnrichFields This property is required. []string
Fields to add to matching incoming documents. These fields must be present in the source indices.
Indices This property is required. []string
Array of one or more source indices used to create the enrich index.
MatchField This property is required. string
Field in source indices used to match incoming documents.
PolicyType This property is required. string
The type of enrich policy, can be one of geo_match, match, range.
ElasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnectionArgs
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

ElasticsearchEnrichPolicyId string
The ID of this resource.
Execute bool
Whether to call the execute API function in order to create the enrich index.
Name string
Name of the enrich policy to manage.
Query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
enrichFields This property is required. List<String>
Fields to add to matching incoming documents. These fields must be present in the source indices.
indices This property is required. List<String>
Array of one or more source indices used to create the enrich index.
matchField This property is required. String
Field in source indices used to match incoming documents.
policyType This property is required. String
The type of enrich policy, can be one of geo_match, match, range.
elasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId String
The ID of this resource.
execute Boolean
Whether to call the execute API function in order to create the enrich index.
name String
Name of the enrich policy to manage.
query String
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
enrichFields This property is required. string[]
Fields to add to matching incoming documents. These fields must be present in the source indices.
indices This property is required. string[]
Array of one or more source indices used to create the enrich index.
matchField This property is required. string
Field in source indices used to match incoming documents.
policyType This property is required. string
The type of enrich policy, can be one of geo_match, match, range.
elasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId string
The ID of this resource.
execute boolean
Whether to call the execute API function in order to create the enrich index.
name string
Name of the enrich policy to manage.
query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
enrich_fields This property is required. Sequence[str]
Fields to add to matching incoming documents. These fields must be present in the source indices.
indices This property is required. Sequence[str]
Array of one or more source indices used to create the enrich index.
match_field This property is required. str
Field in source indices used to match incoming documents.
policy_type This property is required. str
The type of enrich policy, can be one of geo_match, match, range.
elasticsearch_connection ElasticsearchEnrichPolicyElasticsearchConnectionArgs
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearch_enrich_policy_id str
The ID of this resource.
execute bool
Whether to call the execute API function in order to create the enrich index.
name str
Name of the enrich policy to manage.
query str
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
enrichFields This property is required. List<String>
Fields to add to matching incoming documents. These fields must be present in the source indices.
indices This property is required. List<String>
Array of one or more source indices used to create the enrich index.
matchField This property is required. String
Field in source indices used to match incoming documents.
policyType This property is required. String
The type of enrich policy, can be one of geo_match, match, range.
elasticsearchConnection Property Map
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId String
The ID of this resource.
execute Boolean
Whether to call the execute API function in order to create the enrich index.
name String
Name of the enrich policy to manage.
query String
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.

Outputs

All input properties are implicitly available as output properties. Additionally, the ElasticsearchEnrichPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ElasticsearchEnrichPolicy Resource

Get an existing ElasticsearchEnrichPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ElasticsearchEnrichPolicyState, opts?: CustomResourceOptions): ElasticsearchEnrichPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        elasticsearch_connection: Optional[ElasticsearchEnrichPolicyElasticsearchConnectionArgs] = None,
        elasticsearch_enrich_policy_id: Optional[str] = None,
        enrich_fields: Optional[Sequence[str]] = None,
        execute: Optional[bool] = None,
        indices: Optional[Sequence[str]] = None,
        match_field: Optional[str] = None,
        name: Optional[str] = None,
        policy_type: Optional[str] = None,
        query: Optional[str] = None) -> ElasticsearchEnrichPolicy
func GetElasticsearchEnrichPolicy(ctx *Context, name string, id IDInput, state *ElasticsearchEnrichPolicyState, opts ...ResourceOption) (*ElasticsearchEnrichPolicy, error)
public static ElasticsearchEnrichPolicy Get(string name, Input<string> id, ElasticsearchEnrichPolicyState? state, CustomResourceOptions? opts = null)
public static ElasticsearchEnrichPolicy get(String name, Output<String> id, ElasticsearchEnrichPolicyState state, CustomResourceOptions options)
resources:  _:    type: elasticstack:ElasticsearchEnrichPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ElasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

ElasticsearchEnrichPolicyId string
The ID of this resource.
EnrichFields List<string>
Fields to add to matching incoming documents. These fields must be present in the source indices.
Execute bool
Whether to call the execute API function in order to create the enrich index.
Indices List<string>
Array of one or more source indices used to create the enrich index.
MatchField string
Field in source indices used to match incoming documents.
Name string
Name of the enrich policy to manage.
PolicyType string
The type of enrich policy, can be one of geo_match, match, range.
Query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
ElasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnectionArgs
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

ElasticsearchEnrichPolicyId string
The ID of this resource.
EnrichFields []string
Fields to add to matching incoming documents. These fields must be present in the source indices.
Execute bool
Whether to call the execute API function in order to create the enrich index.
Indices []string
Array of one or more source indices used to create the enrich index.
MatchField string
Field in source indices used to match incoming documents.
Name string
Name of the enrich policy to manage.
PolicyType string
The type of enrich policy, can be one of geo_match, match, range.
Query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
elasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId String
The ID of this resource.
enrichFields List<String>
Fields to add to matching incoming documents. These fields must be present in the source indices.
execute Boolean
Whether to call the execute API function in order to create the enrich index.
indices List<String>
Array of one or more source indices used to create the enrich index.
matchField String
Field in source indices used to match incoming documents.
name String
Name of the enrich policy to manage.
policyType String
The type of enrich policy, can be one of geo_match, match, range.
query String
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
elasticsearchConnection ElasticsearchEnrichPolicyElasticsearchConnection
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId string
The ID of this resource.
enrichFields string[]
Fields to add to matching incoming documents. These fields must be present in the source indices.
execute boolean
Whether to call the execute API function in order to create the enrich index.
indices string[]
Array of one or more source indices used to create the enrich index.
matchField string
Field in source indices used to match incoming documents.
name string
Name of the enrich policy to manage.
policyType string
The type of enrich policy, can be one of geo_match, match, range.
query string
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
elasticsearch_connection ElasticsearchEnrichPolicyElasticsearchConnectionArgs
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearch_enrich_policy_id str
The ID of this resource.
enrich_fields Sequence[str]
Fields to add to matching incoming documents. These fields must be present in the source indices.
execute bool
Whether to call the execute API function in order to create the enrich index.
indices Sequence[str]
Array of one or more source indices used to create the enrich index.
match_field str
Field in source indices used to match incoming documents.
name str
Name of the enrich policy to manage.
policy_type str
The type of enrich policy, can be one of geo_match, match, range.
query str
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.
elasticsearchConnection Property Map
Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

Deprecated: Deprecated

elasticsearchEnrichPolicyId String
The ID of this resource.
enrichFields List<String>
Fields to add to matching incoming documents. These fields must be present in the source indices.
execute Boolean
Whether to call the execute API function in order to create the enrich index.
indices List<String>
Array of one or more source indices used to create the enrich index.
matchField String
Field in source indices used to match incoming documents.
name String
Name of the enrich policy to manage.
policyType String
The type of enrich policy, can be one of geo_match, match, range.
query String
Query used to filter documents in the enrich index. The policy only uses documents matching this query to enrich incoming documents. Defaults to a match_all query.

Supporting Types

ElasticsearchEnrichPolicyElasticsearchConnection
, ElasticsearchEnrichPolicyElasticsearchConnectionArgs

ApiKey string
API Key to use for authentication to Elasticsearch
BearerToken string
Bearer Token to use for authentication to Elasticsearch
CaData string
PEM-encoded custom Certificate Authority certificate
CaFile string
Path to a custom Certificate Authority certificate
CertData string
PEM encoded certificate for client auth
CertFile string
Path to a file containing the PEM encoded certificate for client auth
Endpoints List<string>
EsClientAuthentication string
ES Client Authentication field to be used with the JWT token
Insecure bool
Disable TLS certificate validation
KeyData string
PEM encoded private key for client auth
KeyFile string
Path to a file containing the PEM encoded private key for client auth
Password string
Password to use for API authentication to Elasticsearch.
Username string
Username to use for API authentication to Elasticsearch.
ApiKey string
API Key to use for authentication to Elasticsearch
BearerToken string
Bearer Token to use for authentication to Elasticsearch
CaData string
PEM-encoded custom Certificate Authority certificate
CaFile string
Path to a custom Certificate Authority certificate
CertData string
PEM encoded certificate for client auth
CertFile string
Path to a file containing the PEM encoded certificate for client auth
Endpoints []string
EsClientAuthentication string
ES Client Authentication field to be used with the JWT token
Insecure bool
Disable TLS certificate validation
KeyData string
PEM encoded private key for client auth
KeyFile string
Path to a file containing the PEM encoded private key for client auth
Password string
Password to use for API authentication to Elasticsearch.
Username string
Username to use for API authentication to Elasticsearch.
apiKey String
API Key to use for authentication to Elasticsearch
bearerToken String
Bearer Token to use for authentication to Elasticsearch
caData String
PEM-encoded custom Certificate Authority certificate
caFile String
Path to a custom Certificate Authority certificate
certData String
PEM encoded certificate for client auth
certFile String
Path to a file containing the PEM encoded certificate for client auth
endpoints List<String>
esClientAuthentication String
ES Client Authentication field to be used with the JWT token
insecure Boolean
Disable TLS certificate validation
keyData String
PEM encoded private key for client auth
keyFile String
Path to a file containing the PEM encoded private key for client auth
password String
Password to use for API authentication to Elasticsearch.
username String
Username to use for API authentication to Elasticsearch.
apiKey string
API Key to use for authentication to Elasticsearch
bearerToken string
Bearer Token to use for authentication to Elasticsearch
caData string
PEM-encoded custom Certificate Authority certificate
caFile string
Path to a custom Certificate Authority certificate
certData string
PEM encoded certificate for client auth
certFile string
Path to a file containing the PEM encoded certificate for client auth
endpoints string[]
esClientAuthentication string
ES Client Authentication field to be used with the JWT token
insecure boolean
Disable TLS certificate validation
keyData string
PEM encoded private key for client auth
keyFile string
Path to a file containing the PEM encoded private key for client auth
password string
Password to use for API authentication to Elasticsearch.
username string
Username to use for API authentication to Elasticsearch.
api_key str
API Key to use for authentication to Elasticsearch
bearer_token str
Bearer Token to use for authentication to Elasticsearch
ca_data str
PEM-encoded custom Certificate Authority certificate
ca_file str
Path to a custom Certificate Authority certificate
cert_data str
PEM encoded certificate for client auth
cert_file str
Path to a file containing the PEM encoded certificate for client auth
endpoints Sequence[str]
es_client_authentication str
ES Client Authentication field to be used with the JWT token
insecure bool
Disable TLS certificate validation
key_data str
PEM encoded private key for client auth
key_file str
Path to a file containing the PEM encoded private key for client auth
password str
Password to use for API authentication to Elasticsearch.
username str
Username to use for API authentication to Elasticsearch.
apiKey String
API Key to use for authentication to Elasticsearch
bearerToken String
Bearer Token to use for authentication to Elasticsearch
caData String
PEM-encoded custom Certificate Authority certificate
caFile String
Path to a custom Certificate Authority certificate
certData String
PEM encoded certificate for client auth
certFile String
Path to a file containing the PEM encoded certificate for client auth
endpoints List<String>
esClientAuthentication String
ES Client Authentication field to be used with the JWT token
insecure Boolean
Disable TLS certificate validation
keyData String
PEM encoded private key for client auth
keyFile String
Path to a file containing the PEM encoded private key for client auth
password String
Password to use for API authentication to Elasticsearch.
username String
Username to use for API authentication to Elasticsearch.

Import

NOTE: while importing index resource, keep in mind, that some of the default index settings will be imported into the TF state too

You can later adjust the index configuration to account for those imported settings

$ pulumi import elasticstack:index/elasticsearchEnrichPolicy:ElasticsearchEnrichPolicy policy1 <cluster_uuid>/<policy_name>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
elasticstack elastic/terraform-provider-elasticstack
License
Notes
This Pulumi package is based on the elasticstack Terraform Provider.