forked from elastic/elasticsearch-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndicesSimulateIndexTemplateRequest.ts
115 lines (113 loc) · 4.44 KB
/
IndicesSimulateIndexTemplateRequest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { DataStreamVisibility } from '@indices/_types/DataStream'
import { RequestBase } from '@_types/Base'
import {
IndexName,
Indices,
Metadata,
Name,
VersionNumber
} from '@_types/common'
import { Duration } from '@_types/Time'
import { integer } from '@_types/Numeric'
import { IndexTemplateMapping } from '../put_index_template/IndicesPutIndexTemplateRequest'
/**
*
* @rest_spec_name indices.simulate_index_template
* @availability stack since=7.9.0 stability=stable
* @availability serverless stability=stable visibility=public
*/
export interface Request extends RequestBase {
path_parts: {
/** Index or template name to simulate */
name: Name
}
query_parameters: {
/**
* 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.
* @server_default false
* */
create?: boolean
/**
* 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.
* @server_default 30s
*/
master_timeout?: Duration
/**
* If true, returns all relevant default configurations for the index template.
* @server_default false
* @availability stack since=8.11.0 stability=stable
* @availability serverless stability=stable
*/
include_defaults?: boolean
}
body: {
/**
* 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.
*/
allow_auto_create?: boolean
/**
* Array of wildcard (`*`) expressions used to match the names of data streams and indices during creation.
* @doc_id avoid-index-pattern-collisions
*/
index_patterns?: Indices
/**
* 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.
*/
composed_of?: Name[]
/**
* Template to be applied.
* It may optionally include an `aliases`, `mappings`, or `settings` configuration.
*/
template?: IndexTemplateMapping
/**
* 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.
*/
data_stream?: DataStreamVisibility
/**
* 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.
*/
priority?: integer
/**
* Version number used to manage index templates externally.
* This number is not automatically generated by Elasticsearch.
*/
version?: VersionNumber
/**
* Optional user metadata about the index template.
* May have any contents.
* This map is not automatically generated by Elasticsearch.
* @doc_id mapping-meta-field */
_meta?: Metadata
}
}