Files
elasticsearch-js/docs/reference/api/IndicesPutIndexTemplateRequest.md
2025-05-28 10:02:30 -05:00

21 lines
4.0 KiB
Markdown

# `IndicesPutIndexTemplateRequest` [interface-IndicesPutIndexTemplateRequest]
| Name | Type | Description |
| - | - | - |
| `_meta` | [Metadata](./Metadata.md) | Optional user metadata about the index template. It may have any contents. It is not automatically generated or used by Elasticsearch. This user-defined object is stored in the cluster state, so keeping it short is preferable To unset the metadata, replace the template without specifying it. |
| `allow_auto_create` | boolean | This setting overrides the value of the `action.auto_create_index` cluster setting. If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`. If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. |
| `body` | string | ({ [key: string]: any; } & { name?: never; create?: never; master_timeout?: never; cause?: never; index_patterns?: never; composed_of?: never; template?: never; data_stream?: never; priority?: never; version?: never; _meta?: never; allow_auto_create?: never; ignore_missing_component_templates?: never; deprecated?: never; }) | All values in `body` will be added to the request body. |
| `cause` | string | User defined reason for creating/updating the index template |
| `composed_of` | [Name](./Name.md)[] | An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence. |
| `create` | boolean | If `true`, this request cannot replace or update existing index templates. |
| `data_stream` | [IndicesDataStreamVisibility](./IndicesDataStreamVisibility.md) | If this object is included, the template is used to create data streams and their backing indices. Supports an empty object. Data streams require a matching index template with a `data_stream` object. |
| `deprecated` | boolean | Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning. |
| `ignore_missing_component_templates` | string[] | The configuration option ignore_missing_component_templates can be used when an index template references a component template that might not exist |
| `index_patterns` | [Indices](./Indices.md) | Name of the index template to create. |
| `master_timeout` | [Duration](./Duration.md) | Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. |
| `name` | [Name](./Name.md) | Index or template name |
| `priority` | [long](./long.md) | Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch. |
| `querystring` | { [key: string]: any; } & { name?: never; create?: never; master_timeout?: never; cause?: never; index_patterns?: never; composed_of?: never; template?: never; data_stream?: never; priority?: never; version?: never; _meta?: never; allow_auto_create?: never; ignore_missing_component_templates?: never; deprecated?: never; } | All values in `querystring` will be added to the request querystring. |
| `template` | [IndicesPutIndexTemplateIndexTemplateMapping](./IndicesPutIndexTemplateIndexTemplateMapping.md) | Template to be applied. It may optionally include an `aliases`, `mappings`, or `settings` configuration. |
| `version` | [VersionNumber](./VersionNumber.md) | Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch. External systems can use these version numbers to simplify template management. To unset a version, replace the template without specifying one. |