import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Creates or updates an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as elasticstack from "@pulumi/elasticstack"; * * const myTemplate = new elasticstack.ElasticsearchIndexTemplate("myTemplate", { * priority: 42, * indexPatterns: [ * "logstash*", * "filebeat*", * ], * template: { * aliases: [ * { * name: "my_template_test", * }, * { * name: "another_test", * }, * ], * settings: JSON.stringify({ * number_of_shards: "3", * }), * }, * }); * const myDataStream = new elasticstack.ElasticsearchIndexTemplate("myDataStream", { * indexPatterns: ["stream*"], * dataStream: {}, * }); * ``` * * ## Import * * ```sh * $ pulumi import elasticstack:index/elasticsearchIndexTemplate:ElasticsearchIndexTemplate my_template / * ``` */ export declare class ElasticsearchIndexTemplate extends pulumi.CustomResource { /** * Get an existing ElasticsearchIndexTemplate resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ElasticsearchIndexTemplateState, opts?: pulumi.CustomResourceOptions): ElasticsearchIndexTemplate; /** * Returns true if the given object is an instance of ElasticsearchIndexTemplate. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ElasticsearchIndexTemplate; /** * An ordered list of component template names. */ readonly composedOfs: pulumi.Output; /** * If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. */ readonly dataStream: pulumi.Output; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ readonly elasticsearchConnection: pulumi.Output; /** * Internal identifier of the resource */ readonly id: pulumi.Output; /** * Array of wildcard (*) expressions used to match the names of data streams and indices during creation. */ readonly indexPatterns: pulumi.Output; /** * Optional user metadata about the index template. */ readonly metadata: pulumi.Output; /** * Name of the index template to create. */ readonly name: pulumi.Output; /** * Priority to determine index template precedence when a new data stream or index is created. */ readonly priority: pulumi.Output; /** * Template to be applied. It may optionally include an aliases, mappings, or settings configuration. */ readonly template: pulumi.Output; /** * Version number used to manage index templates externally. */ readonly version: pulumi.Output; /** * Create a ElasticsearchIndexTemplate resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ElasticsearchIndexTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ElasticsearchIndexTemplate resources. */ export interface ElasticsearchIndexTemplateState { /** * An ordered list of component template names. */ composedOfs?: pulumi.Input[]>; /** * If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. */ dataStream?: pulumi.Input; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Internal identifier of the resource */ id?: pulumi.Input; /** * Array of wildcard (*) expressions used to match the names of data streams and indices during creation. */ indexPatterns?: pulumi.Input[]>; /** * Optional user metadata about the index template. */ metadata?: pulumi.Input; /** * Name of the index template to create. */ name?: pulumi.Input; /** * Priority to determine index template precedence when a new data stream or index is created. */ priority?: pulumi.Input; /** * Template to be applied. It may optionally include an aliases, mappings, or settings configuration. */ template?: pulumi.Input; /** * Version number used to manage index templates externally. */ version?: pulumi.Input; } /** * The set of arguments for constructing a ElasticsearchIndexTemplate resource. */ export interface ElasticsearchIndexTemplateArgs { /** * An ordered list of component template names. */ composedOfs?: pulumi.Input[]>; /** * If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. */ dataStream?: pulumi.Input; /** * Used to establish connection to Elasticsearch server. Overrides environment variables if present. */ elasticsearchConnection?: pulumi.Input; /** * Array of wildcard (*) expressions used to match the names of data streams and indices during creation. */ indexPatterns: pulumi.Input[]>; /** * Optional user metadata about the index template. */ metadata?: pulumi.Input; /** * Name of the index template to create. */ name?: pulumi.Input; /** * Priority to determine index template precedence when a new data stream or index is created. */ priority?: pulumi.Input; /** * Template to be applied. It may optionally include an aliases, mappings, or settings configuration. */ template?: pulumi.Input; /** * Version number used to manage index templates externally. */ version?: pulumi.Input; }