forked from opensearch-project/opensearch-api-specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathism._common.yaml
417 lines (417 loc) · 11 KB
/
ism._common.yaml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
openapi: 3.1.0
info:
title: Schemas of ism._common Category
description: Schemas of `ism._common` category..
version: 1.0.0
paths: {}
components:
schemas:
Metadata:
type: object
properties:
_id:
$ref: '_common.yaml#/components/schemas/Id'
_primary_term:
type: number
_seq_no:
$ref: '_common.yaml#/components/schemas/SequenceNumber'
_version:
$ref: '_common.yaml#/components/schemas/VersionNumber'
Policy:
type: object
description: |-
A policy defines how an index is managed throughout its lifetime.
properties:
policy_id:
type: string
description:
type: string
last_updated_time:
type: integer # TODO: field is strict_date_time||epoch_millis
schema_version:
type: number
error_notification:
oneOf:
- $ref: '#/components/schemas/ErrorNotification'
- type: 'null'
default_state:
type: string
description: The default state an index is in.
states:
type: array
description: List of states for the index to transition between.
items:
$ref: '#/components/schemas/States'
ism_template:
oneOf:
- $ref: '#/components/schemas/IsmTemplate'
- type: 'null'
- type: array
items:
$ref: '#/components/schemas/IsmTemplate'
PolicyWithMetadata:
type: object
allOf:
- $ref: '#/components/schemas/Metadata'
- $ref: '#/components/schemas/PolicyEnvelope'
States:
type: object
description: |-
A list of actions to perform, and transitions to enter a new state.
Once a managed index enters a state it will sequentially execute the actions
in the same order listed in the policy. Once all actions have been successfully completed
state transitions will be checked until a true condition is eventually met.
If you define multiple transitions in a state, the first one in the list that is true will be used.
properties:
name:
type: string
actions:
type: array
description: A list of actions to perform.
items:
$ref: '#/components/schemas/Action'
transitions:
type: array
description: A list of transitions to enter a new state.
items:
$ref: '#/components/schemas/Transition'
Action:
type: object
description: An action to perform.
properties:
timeout:
$ref: '#/components/schemas/ActionTimeout'
retry:
$ref: '#/components/schemas/ActionRetry'
alias:
$ref: '#/components/schemas/ActionAlias'
delete:
$ref: '#/components/schemas/ActionDelete'
force_merge:
$ref: '#/components/schemas/ActionForceMerge'
read_only:
$ref: '#/components/schemas/ActionReadOnly'
read_write:
$ref: '#/components/schemas/ActionReadWrite'
replica_count:
$ref: '#/components/schemas/ActionReplicaCount'
index_priority:
$ref: '#/components/schemas/ActionIndexPriority'
close:
$ref: '#/components/schemas/ActionClose'
open:
$ref: '#/components/schemas/ActionOpen'
snapshot:
$ref: '#/components/schemas/ActionSnapshot'
rollover:
$ref: '#/components/schemas/ActionRollover'
notification:
$ref: '#/components/schemas/ActionNotification'
allocation:
$ref: '#/components/schemas/ActionAllocation'
rollup:
$ref: '#/components/schemas/ActionRollup'
transform:
$ref: '#/components/schemas/ActionTransform'
shrink:
$ref: '#/components/schemas/ActionShrink'
custom:
$ref: '#/components/schemas/ActionCustom'
ActionTimeout:
type: object
properties:
timeout:
type: object
ActionRetry:
type: object
properties:
count:
type: integer
backoff:
type: string
delay:
type: string
ActionAlias:
type: object
properties:
actions:
type: object
additionalProperties: true
ActionDelete:
type: object
ActionForceMerge:
type: object
properties:
max_num_segments:
type: integer
ActionReadOnly:
type: object
ActionReadWrite:
type: object
ActionReplicaCount:
type: object
properties:
number_of_replicas:
type: number
ActionIndexPriority:
type: object
properties:
priority:
type: number
ActionClose:
type: object
ActionOpen:
type: object
ActionSnapshot:
type: object
properties:
repository:
type: string
snapshot:
type: string
include_global_state:
type: boolean
ActionRollover:
type: object
properties:
min_size:
type: number
min_index_age:
type: number
min_doc_count:
type: number
min_primary_shard_size:
type: number
copy_alias:
type: boolean
ActionNotification:
type: object
additionalProperties: true
ActionAllocation:
type: object
properties:
require:
type: object
additionalProperties: true
include:
type: object
additionalProperties: true
exclude:
type: object
additionalProperties: true
wait_for:
type: boolean
ActionRollup:
type: object
additionalProperties: true
ActionTransform:
type: object
additionalProperties: true
ActionShrink:
type: object
additionalProperties: true
ActionCustom:
type: object
additionalProperties: true
Transition:
type: object
description: A transition into a new state.
properties:
state_name:
type: string
conditions:
type: object
additionalProperties: true
GetPoliciesResponse:
type: object
properties:
total_policies:
type: number
policies:
type: array
items:
$ref: '#/components/schemas/PolicyWithMetadata'
GetPolicyResponse:
$ref: '#/components/schemas/PolicyWithMetadata'
PutPolicyResponse:
allOf:
- $ref: '#/components/schemas/Metadata'
- type: object
properties:
policy:
$ref: '#/components/schemas/PolicyEnvelope'
DeletePolicyResponse:
$ref: '_common.yaml#/components/schemas/WriteResponseBase'
ChangeResponse:
type: object
properties:
updated_indices:
type: number
failures:
type: boolean
failed_indices:
type: array
items:
$ref: '#/components/schemas/FailedIndex'
ChangePolicyResponse:
$ref: '#/components/schemas/ChangeResponse'
FailedIndex:
type: object
properties:
index_name:
type: string
index_uuid:
type: string
reason:
type: string
RemovePolicyResponse:
$ref: '#/components/schemas/ChangePolicyResponse'
AddPolicyResponse:
$ref: '#/components/schemas/ChangePolicyResponse'
PolicyEnvelope:
type: object
properties:
policy:
$ref: '#/components/schemas/Policy'
PutPolicyRequest:
$ref: '#/components/schemas/PolicyEnvelope'
AddPolicyRequest:
type: object
properties:
policy_id:
type: string
required:
- policy_id
ChangePolicyRequest:
type: object
properties:
policy_id:
type: string
state:
type: string
include:
type: array
items:
$ref: '#/components/schemas/IncludeState'
required:
- policy_id
IncludeState:
type: object
properties:
state:
type: string
ExplainIndexResponse:
type: object
properties:
total_managed_indices:
type: number
additionalProperties:
$ref: '#/components/schemas/ExplainPolicy'
ExplainPolicy:
type: object
properties:
index.plugins.index_state_management.policy_id:
type: ['null', string]
index.opendistro.index_state_management.policy_id:
type: ['null', string]
enabled:
type: [boolean, 'null']
ErrorNotification:
type: object
properties:
destination:
$ref: '#/components/schemas/ErrorNotificationDestination'
channel:
$ref: '#/components/schemas/Channel'
message_template:
type: object
additionalProperties: true
Channel:
type: object
properties:
id:
type: string
ErrorNotificationDestination:
type: object
properties:
name:
type: string
last_update_time:
type: integer
additionalProperties:
anyOf:
- $ref: '#/components/schemas/ErrorNotificationChime'
- $ref: '#/components/schemas/ErrorNotificationSlack'
ErrorNotificationChime:
type: object
properties:
url:
type: string
ErrorNotificationSlack:
type: object
properties:
url:
type: string
custom_webhook:
$ref: '#/components/schemas/SlackCustomWebhook'
SlackCustomWebhook:
type: object
properties:
url:
type: string
scheme:
type: string
host:
type: string
port:
type: integer
path:
type: string
query_params:
type: object
additionalProperties: true
header_params:
type: object
additionalProperties: true
username:
type: string
password:
type: string
IsmTemplate:
type: object
properties:
index_patterns:
type: array
items:
type: string
priority:
type: number
last_updated_time:
type: integer
RetryIndexRequest:
type: object
properties:
state:
type: string
required:
- state
RetryIndexResponse:
$ref: '#/components/schemas/ChangeResponse'
RefreshSearchAnalyzersResponse:
type: object
properties:
_shards:
$ref: '_common.yaml#/components/schemas/ShardStatistics'
successful_refresh_details:
type: array
items:
$ref: '#/components/schemas/RefreshSearchAnalyzersResponseDetails'
RefreshSearchAnalyzersResponseDetails:
type: object
properties:
index:
type: string
refreshed_analyzers:
type: array
items:
type: string