---
type: api
title: Create instance configuration
description: Create instance configuration and return the auto-generated ID.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-create-instance-configuration
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/operation/operation-create-instance-configuration
products:
  - Elastic Cloud Enterprise
---

# Create instance configuration

## Paths

- `POST` `/platform/configuration/instances`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#basicauth)
- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-enterprise/authentication#apikey)

## Description

Create instance configuration and return the auto-generated ID.

## Request Body

`application/json`

the Instance Configuration

- `id` (string) — optional
  Unique identifier for the instance configuration
- `name` (string) — required
  Display name for the instance configuration.
- `config_version` (integer) — optional
  If the IC is configuration controlled, this field is the version either being read back (reads return the latest IC unless specified by the 'config_version' URL param), or the version to update. Cannot be used in creates. For unversioned IC reads it is left empty.
- `description` (string) — optional
  Optional description for the instance configuration
- `instance_type` (enum) — optional
  The type of instance. For instance configurations where the type is specified in the 'id', the default value of 'instance_type' will be automatically inferred.
  Values: `elasticsearch`, `kibana`, `apm`, `integrations_server`, `appsearch`, `enterprise_search`
- `node_types` ([] string) — optional
  Node types (master, data) for the instance. For instance configurations where the type (and tier) is specified in the 'id', the default value of 'node_types' will be automatically inferred.
- `discrete_sizes` ({} DiscreteSizes) — required
  Instance sizes that are supported by the Elasticsearch instance, Kibana instance, or APM Server configuration.
  - `sizes` ([] integer) — required
    List of supported sizes
  - `default_size` (integer) — optional
    The default size
  - `resource` (enum) — optional
    The unit that each size represents. If not specified, it will default to 'memory'.
    Values: `memory`, `storage`
- `allocator_filter` ({} QueryContainer) — optional
  The container for all of the allowed Elasticsearch queries. Specify only one property each time.
  - `match` (map string to MatchQuery) — optional
    Map values ({} MatchQuery)
    - `query` (string) — required
      The text/numeric/date to query for.
    - `operator` (string) — optional
      The operator flag can be set to or or and to control the boolean clauses (defaults to or).
    - `minimum_should_match` (integer) — optional
      The minimum number of optional should clauses to match.
    - `analyzer` (string) — optional
      The analyzer that will be used to perform the analysis process on the text. Defaults to the analyzer that was used to index the field.
  - `match_all` (MatchAllQuery) — optional
    A query that matches all documents.
  - `match_none` (MatchNoneQuery) — optional
    A query that doesn't match any documents.
  - `term` (map string to TermQuery) — optional
    Map values ({} TermQuery)
    - `value` (string) — required
      The exact value to query for.
  - `bool` ({} BoolQuery) — optional
    A query for documents that match boolean combinations of other queries.
    - `must` ([] QueryContainer) — optional — recursive
      Same fields as `allocator_filter`
    - `should` ([] QueryContainer) — optional — recursive
      Same fields as `allocator_filter`
    - `must_not` ([] QueryContainer) — optional — recursive
      Same fields as `allocator_filter`
    - `filter` ([] QueryContainer) — optional — recursive
      Same fields as `allocator_filter`
    - `minimum_should_match` (integer) — optional
      The minimum number of optional should clauses to match.
  - `query_string` ({} QueryStringQuery) — optional
    A query that uses the strict query string syntax for parsing. Will return an error for invalid syntax.
    - `query` (string) — required
      The actual query to be parsed.
    - `default_field` (string) — optional
      The default field for query terms if no prefix field is specified.
    - `analyzer` (string) — optional
      The analyzer used to analyze each term of the query when creating composite queries.
    - `default_operator` (string) — optional
      The default operator used if no explicit operator is specified.
    - `allow_leading_wildcard` (boolean) — optional
      When set, * or ? are allowed as the first character. Defaults to false.
  - `nested` ({} NestedQuery) — optional
    A query that matches nested objects.
    - `query` ({} QueryContainer) — required — recursive
      The container for all of the allowed Elasticsearch queries. Specify only one property each time.
      Same fields as `allocator_filter`
    - `path` (string) — required
      The path to the nested object.
    - `score_mode` (enum) — optional
      Allows to specify how inner children matching affects score of the parent. Refer to the Elasticsearch documentation for details.
      Values: `avg`, `sum`, `min`, `max`, `none`
  - `prefix` (map string to PrefixQuery) — optional
    Map values ({} PrefixQuery)
    - `value` (string) — required
      The prefix to search for.
    - `boost` (number) — optional
      An optional boost value to apply to the query.
  - `exists` ({} ExistsQuery) — optional
    Matches documents that have at least one non-`null` value in the original field.
    - `field` (string) — required
      The field to check for non-null values in.
  - `range` (map string to RangeQuery) — optional
    Map values ({} RangeQuery)
    - `gt` (object) — optional
      Greater-than
    - `gte` (object) — optional
      Greater-than or equal to
    - `lt` (object) — optional
      Less-than
    - `lte` (object) — optional
      Less-than or equal to.
    - `boost` (number) — optional
      An optional boost value to apply to the query.
    - `format` (string) — optional
      Formatted dates will be parsed using the format specified on the date field by default, but it can be overridden by passing the format parameter.
    - `time_zone` (string) — optional
      Dates can be converted from another timezone to UTC either by specifying the time zone in the date value itself (if the format accepts it), or it can be specified as the time_zone parameter.
  - `simple_query_string` ({} SimpleQueryStringQuery) — optional
    A query that uses simple query string syntax. Will ignore invalid syntax.
    - `query` (string) — required
      The query expressed in simple query string syntax.
    - `fields` ([] string) — optional
      Array of fields to search
    - `default_operator` (string) — optional
      The boolean operator used to combine the terms of the query. Valid values are `OR` (default) and `AND`.
    - `analyze_wildcard` (boolean) — optional
      If `true`, the query attempts to analyze wildcard terms. Defaults to `false`.
    - `analyzer` (string) — optional
      The name of the analyzer to use to convert the query text into tokens.
    - `auto_generate_synonyms_phrase_query` (boolean) — optional
      If `true`, the parse creates a `match_phrase` uery for each multi-position token. Defaults to `true`.
    - `flags` (string) — optional
      List of enabled operators for the simple query string syntax. Defaults to `ALL`.
    - `fuzzy_max_expansions` (integer) — optional
      Maximum number of terms to which the query expands for fuzzy matching. Defaults to 50.
    - `fuzzy_prefix_length` (integer) — optional
      Number of beginning characters left unchanged for fuzzy matching. Defaults to 0.
    - `fuzzy_transpositions` (boolean) — optional
      If `true`, edits for fuzzy matching include transpositions of two adjacent characters. Defaults to `false`.
    - `lenient` (boolean) — optional
      If `true`, format-based errors, such as providing a text value for a numeric field are ignored. Defaults to `false`.
    - `minimum_should_match` (string) — optional
      Minimum number of clauses that must match for a document to be returned.
    - `quote_field_suffix` (string) — optional
      Suffix appended to quoted text in the query string.
- `storage_multiplier` (number) — optional
  Settings for the instance storage multiplier
- `deleted_on` (string) — optional
  Date/time that this instance configuration was marked for deletion
- `system_owned` (boolean) — optional
  Indicates if a instance configuration is system owned (restricts the set of operations that can be performed on it)
- `metadata` (object) — optional
  Optional arbitrary metadata to associate with this template.
- `cpu_multiplier` (number) — optional
  Settings for the instance CPU multiplier
- `allowed_zones` ([] string) — optional
  The zones this instance configuration may exist in. Leaving out this parameter or specifying an empty list implies all zones are allowed. Normally not needed, but can be useful for exceptional infrastructure constraints.
- `max_zones` (integer) — optional
  The maximum number of availability zones in which this instance configuration has allocators. This field will be missing unless explicitly requested with the show_max_zones parameter.

## Responses

#### `201`

Instance Configuration added with the auto generated ID returned

`application/octet-stream`

- `id` (string)
  The ID
- `config_version` (object)
  The version, if the entity is configuration controlled
- `config_version_updated` (object)
  Returns true if the update resulted in a new version of the configuration controlled entity
#### `400`

cluster_type in the InstanceConfiguration model is invalid (code: 'configuration.invalid_cluster_type') or the discrete_sizes in the InstanceConfiguration model is invalid (code: 'configuration.invalid_discrete_sizes') or the metadata in the InstanceConfiguration model has empty keys or values (code: 'configuration.bad_meta_data')

`application/octet-stream`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
#### `403`

system_owned or deleted_on cannot be set externally (code: 'configuration.system_owned')

`application/octet-stream`

- `errors` ([] BasicFailedReplyElement)
  A list of errors that occurred in the failing request
  - `code` (string)
    A structured code representing the error type that occurred
  - `message` (string)
    A human readable message describing the error that occurred
  - `fields` ([] string)
    If the error can be tied to a specific field or fields in the user request, this lists those fields
## Code Examples

#### Console

```console
POST /platform/configuration/instances
```

#### curl

```curl
curl -X POST "/platform/configuration/instances"
```

