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
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
from .utils import NamespacedClient, query_params, _make_path
class CatClient(NamespacedClient):
@query_params("expand_wildcards", "format", "h", "help", "local", "s", "v")
async def aliases(self, name=None, params=None, headers=None):
"""
Shows information about currently configured aliases to indices including
filter and routing infos.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-alias.html>`_
:arg name: A comma-separated list of alias names to return
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, hidden, none, all Default: all
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "aliases", name), params=params, headers=headers
)
@query_params("bytes", "format", "h", "help", "local", "master_timeout", "s", "v")
async def allocation(self, node_id=None, params=None, headers=None):
"""
Provides a snapshot of how many shards are allocated to each data node and how
much disk space they are using.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-allocation.html>`_
:arg node_id: A comma-separated list of node IDs or names to
limit the returned information
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "allocation", node_id),
params=params,
headers=headers,
)
@query_params("format", "h", "help", "s", "v")
async def count(self, index=None, params=None, headers=None):
"""
Provides quick access to the document count of the entire cluster, or
individual indices.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-count.html>`_
:arg index: A comma-separated list of index names to limit the
returned information
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "count", index), params=params, headers=headers
)
@query_params("format", "h", "help", "s", "time", "ts", "v")
async def health(self, params=None, headers=None):
"""
Returns a concise representation of the cluster health.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-health.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg ts: Set to false to disable timestamping Default: True
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/health", params=params, headers=headers
)
@query_params("help", "s")
async def help(self, params=None, headers=None):
"""
Returns help for the Cat APIs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat.html>`_
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
"""
return await self.transport.perform_request(
"GET", "/_cat", params=params, headers=headers
)
@query_params(
"bytes",
"expand_wildcards",
"format",
"h",
"health",
"help",
"include_unloaded_segments",
"local",
"master_timeout",
"pri",
"s",
"time",
"v",
)
async def indices(self, index=None, params=None, headers=None):
"""
Returns information about indices: number of primaries and replicas, document
counts, disk size, ...
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-indices.html>`_
:arg index: A comma-separated list of index names to limit the
returned information
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg expand_wildcards: Whether to expand wildcard expression to
concrete indices that are open, closed or both. Valid choices: open,
closed, hidden, none, all Default: all
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg health: A health status ("green", "yellow", or "red" to
filter only indices matching the specified health status Valid choices:
green, yellow, red
:arg help: Return help information
:arg include_unloaded_segments: If set to true segment stats
will include stats for segments that are not currently loaded into
memory
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg pri: Set to true to return stats only for primary shards
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "indices", index), params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
async def master(self, params=None, headers=None):
"""
Returns information about the master node.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-master.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/master", params=params, headers=headers
)
@query_params(
"bytes",
"format",
"full_id",
"h",
"help",
"local",
"master_timeout",
"s",
"time",
"v",
)
async def nodes(self, params=None, headers=None):
"""
Returns basic statistics about performance of cluster nodes.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-nodes.html>`_
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg full_id: Return the full node ID instead of the shortened
version (default: false)
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Calculate the selected nodes using the local cluster
state rather than the state from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/nodes", params=params, headers=headers
)
@query_params(
"active_only", "bytes", "detailed", "format", "h", "help", "s", "time", "v"
)
async def recovery(self, index=None, params=None, headers=None):
"""
Returns information about index shard recoveries, both on-going completed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-recovery.html>`_
:arg index: Comma-separated list or wildcard expression of index
names to limit the returned information
:arg active_only: If `true`, the response only includes ongoing
shard recoveries
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg detailed: If `true`, the response includes detailed
information about shard recoveries
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "recovery", index), params=params, headers=headers
)
@query_params(
"bytes", "format", "h", "help", "local", "master_timeout", "s", "time", "v"
)
async def shards(self, index=None, params=None, headers=None):
"""
Provides a detailed view of shard allocation on nodes.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-shards.html>`_
:arg index: A comma-separated list of index names to limit the
returned information
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "shards", index), params=params, headers=headers
)
@query_params("bytes", "format", "h", "help", "s", "v")
async def segments(self, index=None, params=None, headers=None):
"""
Provides low-level information about the segments in the shards of an index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-segments.html>`_
:arg index: A comma-separated list of index names to limit the
returned information
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "segments", index), params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "time", "v")
async def pending_tasks(self, params=None, headers=None):
"""
Returns a concise representation of the cluster pending tasks.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-pending-tasks.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/pending_tasks", params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "size", "v")
async def thread_pool(self, thread_pool_patterns=None, params=None, headers=None):
"""
Returns cluster-wide thread pool statistics per node. By default the active,
queue and rejected statistics are returned for all thread pools.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-thread-pool.html>`_
:arg thread_pool_patterns: A comma-separated list of regular-
expressions to filter the thread pools in the output
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg size: The multiplier in which to display values Valid
choices: , k, m, g, t, p
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "thread_pool", thread_pool_patterns),
params=params,
headers=headers,
)
@query_params("bytes", "format", "h", "help", "s", "v")
async def fielddata(self, fields=None, params=None, headers=None):
"""
Shows how much heap memory is currently being used by fielddata on every data
node in the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-fielddata.html>`_
:arg fields: A comma-separated list of fields to return in the
output
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "fielddata", fields),
params=params,
headers=headers,
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
async def plugins(self, params=None, headers=None):
"""
Returns information about installed plugins across nodes node.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-plugins.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/plugins", params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
async def nodeattrs(self, params=None, headers=None):
"""
Returns information about custom node attributes.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-nodeattrs.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/nodeattrs", params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
async def repositories(self, params=None, headers=None):
"""
Returns information about snapshot repositories registered in the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-repositories.html>`_
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/repositories", params=params, headers=headers
)
@query_params(
"format", "h", "help", "ignore_unavailable", "master_timeout", "s", "time", "v"
)
async def snapshots(self, repository=None, params=None, headers=None):
"""
Returns all snapshots in a specific repository.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-snapshots.html>`_
:arg repository: Name of repository from which to fetch the
snapshot information
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg ignore_unavailable: Set to true to ignore unavailable
snapshots
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "snapshots", repository),
params=params,
headers=headers,
)
@query_params(
"actions",
"detailed",
"format",
"h",
"help",
"node_id",
"parent_task",
"s",
"time",
"v",
)
async def tasks(self, params=None, headers=None):
"""
Returns information about the tasks currently executing on one or more nodes in
the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/tasks.html>`_
:arg actions: A comma-separated list of actions that should be
returned. Leave empty to return all.
:arg detailed: Return detailed task information (default: false)
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg node_id: A comma-separated list of node IDs or names to
limit the returned information; use `_local` to return information from
the node you're connecting to, leave empty to get information from all
nodes
:arg parent_task: Return tasks with specified parent task id.
Set to -1 to return all.
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", "/_cat/tasks", params=params, headers=headers
)
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
async def templates(self, name=None, params=None, headers=None):
"""
Returns information about existing templates.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-templates.html>`_
:arg name: A pattern that returned template names must match
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg local: Return local information, do not retrieve the state
from master node (default: false)
:arg master_timeout: Explicit operation timeout for connection
to master node
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET", _make_path("_cat", "templates", name), params=params, headers=headers
)
@query_params("allow_no_match", "bytes", "format", "h", "help", "s", "time", "v")
async def ml_data_frame_analytics(self, id=None, params=None, headers=None):
"""
Gets configuration and usage information about data frame analytics jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-dfanalytics.html>`_
:arg id: The ID of the data frame analytics to fetch
:arg allow_no_match: Whether to ignore if a wildcard expression
matches no configs. (This includes `_all` string or when no configs have
been specified)
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "ml", "data_frame", "analytics", id),
params=params,
headers=headers,
)
@query_params("allow_no_datafeeds", "format", "h", "help", "s", "time", "v")
async def ml_datafeeds(self, datafeed_id=None, params=None, headers=None):
"""
Gets configuration and usage information about datafeeds.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-datafeeds.html>`_
:arg datafeed_id: The ID of the datafeeds stats to fetch
:arg allow_no_datafeeds: Whether to ignore if a wildcard
expression matches no datafeeds. (This includes `_all` string or when no
datafeeds have been specified)
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "ml", "datafeeds", datafeed_id),
params=params,
headers=headers,
)
@query_params("allow_no_jobs", "bytes", "format", "h", "help", "s", "time", "v")
async def ml_jobs(self, job_id=None, params=None, headers=None):
"""
Gets configuration and usage information about anomaly detection jobs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-anomaly-detectors.html>`_
:arg job_id: The ID of the jobs stats to fetch
:arg allow_no_jobs: Whether to ignore if a wildcard expression
matches no jobs. (This includes `_all` string or when no jobs have been
specified)
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
return await self.transport.perform_request(
"GET",
_make_path("_cat", "ml", "anomaly_detectors", job_id),
params=params,
headers=headers,
)
@query_params(
"allow_no_match",
"bytes",
"format",
"from_",
"h",
"help",
"s",
"size",
"time",
"v",
)
async def ml_trained_models(self, model_id=None, params=None, headers=None):
"""
Gets configuration and usage information about inference trained models.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-trained-model.html>`_
:arg model_id: The ID of the trained models stats to fetch
:arg allow_no_match: Whether to ignore if a wildcard expression
matches no trained models. (This includes `_all` string or when no
trained models have been specified) Default: True
:arg bytes: The unit in which to display byte values Valid
choices: b, k, kb, m, mb, g, gb, t, tb, p, pb
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg from_: skips a number of trained models
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg size: specifies a max number of trained models to get
Default: 100
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
# from is a reserved word so it cannot be used, use from_ instead
if "from_" in params:
params["from"] = params.pop("from_")
return await self.transport.perform_request(
"GET",
_make_path("_cat", "ml", "trained_models", model_id),
params=params,
headers=headers,
)
@query_params(
"allow_no_match", "format", "from_", "h", "help", "s", "size", "time", "v"
)
async def transforms(self, transform_id=None, params=None, headers=None):
"""
Gets configuration and usage information about transforms.
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/cat-transforms.html>`_
:arg transform_id: The id of the transform for which to get
stats. '_all' or '*' implies all transforms
:arg allow_no_match: Whether to ignore if a wildcard expression
matches no transforms. (This includes `_all` string or when no
transforms have been specified)
:arg format: a short version of the Accept header, e.g. json,
yaml
:arg from_: skips a number of transform configs, defaults to 0
:arg h: Comma-separated list of column names to display
:arg help: Return help information
:arg s: Comma-separated list of column names or column aliases
to sort by
:arg size: specifies a max number of transforms to get, defaults
to 100
:arg time: The unit in which to display time values Valid
choices: d, h, m, s, ms, micros, nanos
:arg v: Verbose mode. Display column headers
"""
# from is a reserved word so it cannot be used, use from_ instead
if "from_" in params:
params["from"] = params.pop("from_")
return await self.transport.perform_request(
"GET",
_make_path("_cat", "transforms", transform_id),
params=params,
headers=headers,
)