﻿---
title: stack es indices simulate-template cli command
description: Simulate an index template. Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/537/cli/stack/es/indices/simulate-template
---

# stack es indices simulate-template cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es indices simulate-template [options]
```

Simulate an index template.
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--[no-]create">
    If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
  </definition>
  <definition term="--cause string">
    User defined reason for dry-run creating the new template for simulation purposes
  </definition>
  <definition term="--master-timeout string">
    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.
  </definition>
  <definition term="--[no-]include-defaults">
    If true, returns all relevant default configurations for the index template.
  </definition>
  <definition term="--[no-]allow-auto-create">
    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.
  </definition>
  <definition term="--index-patterns string">
    Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.
    **Repeatable:** pass `--index-patterns` multiple times to supply more than one value
  </definition>
  <definition term="--composed-of string[]">
    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.
  </definition>
  <definition term="--template string">
    Template to be applied.
    It may optionally include an `aliases`, `mappings`, or `settings` configuration.
  </definition>
  <definition term="--data-stream string">
    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.
  </definition>
  <definition term="--priority number">
    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.
  </definition>
  <definition term="--version number">
    Version number used to manage index templates externally.
    This number is not automatically generated by Elasticsearch.
  </definition>
  <definition term="--meta string">
    Optional user metadata about the index template.
    May have any contents.
    This map is not automatically generated by Elasticsearch.
  </definition>
  <definition term="--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
  </definition>
  <definition term="--[no-]deprecated">
    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.
  </definition>
  <definition term="--name string">
    Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
    this parameter and specify the template configuration in the request body.
  </definition>
  <definition term="--[no-]error-trace">
    When set to `true` Elasticsearch will include the full stack trace of errors
    when they occur.
  </definition>
  <definition term="--filter-path string">
    Comma-separated list of filters in dot notation which reduce the response
    returned by Elasticsearch.
    **Repeatable:** pass `--filter-path` multiple times to supply more than one value
  </definition>
  <definition term="--[no-]human">
    When set to `true` will return statistics in a format suitable for humans.
    For example `"exists_time": "1h"` for humans and
    `"exists_time_in_millis": 3600000` for computers. When disabled the human
    readable values will be omitted. This makes sense for responses being consumed
    only by machines.
  </definition>
  <definition term="--[no-]pretty">
    If set to `true` the returned JSON will be "pretty-formatted". Only use
    this option for debugging only.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--[no-]json">
    output as JSON
  </definition>
</definitions>