U Ec_F@s(ddlmZmZmZGdddeZdS))NamespacedClient query_params _make_pathc@seZdZeddddddddNd d Zed ddddd dddOd dZeddddddPddZeddddddddQddZedddRddZed dddddddd dddd dSddZ eddddd dddTddZ ed dddddd ddd dUdd Z ed!d d"dddddd dVd#d$Z ed ddddd ddd dWd%d&Z ed ddddddXd'd(Zeddddd ddddYd)d*Zeddddd dd+ddZd,d-Zed dddddd[d.d/Zeddddd ddd\d0d1Zeddddd ddd]d2d3Zeddddd ddd^d4d5Zedddd6d dddd_d7d8Zed9d"dddd:d;ddd d`dd?Zed@d dddddddbdAdBZedCdddddddcdDdEZedFd dddddddddGdHZed@d ddIdddd+dd dedJdKZed@ddIdddd+dd dfdLdMZdS)g CatClientZexpand_wildcardsformathhelplocalsvNcCs|jjdtdd|||dS)a Shows information about currently configured aliases to indices including filter and routing infos. ``_ :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 GET_cataliasesparamsheaders transportperform_requestrselfnamerrr?/tmp/pip-target-m1bursmm/lib/python/elasticsearch/client/cat.pyrs  zCatClient.aliasesbytesZmaster_timeoutcCs|jjdtdd|||dS)a Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. ``_ :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 r r allocationrr)rnode_idrrrrrr/s  zCatClient.allocationcCs|jjdtdd|||dS)a Provides quick access to the document count of the entire cluster, or individual indices. ``_ :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 r r countrrrindexrrrrrrMs  zCatClient.counttimetscCs|jjdd||dS)a Returns a concise representation of the cluster health. ``_ :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 r z /_cat/healthrrrrrrrrrhealthbs zCatClient.healthcCs|jjdd||dS)a  Returns help for the Cat APIs. ``_ :arg help: Return help information :arg s: Comma-separated list of column names or column aliases to sort by r z/_catrr"r#rrrrws zCatClient.helpr$Zinclude_unloaded_segmentspricCs|jjdtdd|||dS)a Returns information about indices: number of primaries and replicas, document counts, disk size, ... ``_ :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 r r indicesrrrrrrr&s 1 zCatClient.indicescCs|jjdd||dS)a Returns information about the master node. ``_ :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 r z /_cat/masterrr"r#rrrmasters zCatClient.masterZfull_idcCs|jjdd||dS)aQ Returns basic statistics about performance of cluster nodes. ``_ :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 r z /_cat/nodesrr"r#rrrnodess #zCatClient.nodesZ active_onlyZdetailedcCs|jjdtdd|||dS)aS Returns information about index shard recoveries, both on-going completed. ``_ :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 r r recoveryrrrrrrr)s  zCatClient.recoverycCs|jjdtdd|||dS)a+ Provides a detailed view of shard allocation on nodes. ``_ :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 r r shardsrrrrrrr*s  zCatClient.shardscCs|jjdtdd|||dS)a Provides low-level information about the segments in the shards of an index. ``_ :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 r r segmentsrrrrrrr+3s  zCatClient.segmentscCs|jjdd||dS)aT Returns a concise representation of the cluster pending tasks. ``_ :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 r z/_cat/pending_tasksrr"r#rrr pending_tasksIs zCatClient.pending_taskssizecCs|jjdtdd|||dS)a# Returns cluster-wide thread pool statistics per node. By default the active, queue and rejected statistics are returned for all thread pools. ``_ :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 r r thread_poolrr)rZthread_pool_patternsrrrrrr.as  zCatClient.thread_poolcCs|jjdtdd|||dS)a Shows how much heap memory is currently being used by fielddata on every data node in the cluster. ``_ :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 r r fielddatarr)rfieldsrrrrrr/s  zCatClient.fielddatacCs|jjdd||dS)a Returns information about installed plugins across nodes node. ``_ :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 r z /_cat/pluginsrr"r#rrrpluginss zCatClient.pluginscCs|jjdd||dS)a Returns information about custom node attributes. ``_ :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 r z/_cat/nodeattrsrr"r#rrr nodeattrss zCatClient.nodeattrscCs|jjdd||dS)a Returns information about snapshot repositories registered in the cluster. ``_ :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 r z/_cat/repositoriesrr"r#rrr repositoriess zCatClient.repositoriesZignore_unavailablecCs|jjdtdd|||dS)a Returns all snapshots in a specific repository. ``_ :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 r r snapshotsrr)r repositoryrrrrrr4s  zCatClient.snapshotsactionsrZ parent_taskcCs|jjdd||dS)a Returns information about the tasks currently executing on one or more nodes in the cluster. ``_ :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 r z /_cat/tasksrr"r#rrrtaskss %zCatClient.taskscCs|jjdtdd|||dS)a Returns information about existing templates. ``_ :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 r r templatesrrrrrrr8#s  zCatClient.templatesZallow_no_matchcCs |jjdtdddd|||dS)a Gets configuration and usage information about data frame analytics jobs. ``_ :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 r r mlZ data_frameZ analyticsrr)ridrrrrrml_data_frame_analytics:s z!CatClient.ml_data_frame_analyticsZallow_no_datafeedscCs|jjdtddd|||dS)au Gets configuration and usage information about datafeeds. ``_ :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 r r r9Z datafeedsrr)rZ datafeed_idrrrrr ml_datafeedsWs  zCatClient.ml_datafeedsZ allow_no_jobscCs|jjdtddd|||dS)a Gets configuration and usage information about anomaly detection jobs. ``_ :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 r r r9Zanomaly_detectorsrr)rZjob_idrrrrrml_jobsrs  zCatClient.ml_jobsfrom_cCs4d|kr|d|d<|jjdtddd|||dS)a Gets configuration and usage information about inference trained models. ``_ :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 r>fromr r r9Ztrained_modelsrpoprrr)rZmodel_idrrrrrml_trained_modelss% zCatClient.ml_trained_modelscCs2d|kr|d|d<|jjdtdd|||dS)aS Gets configuration and usage information about transforms. ``_ :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 r>r?r r transformsrr@)rZ transform_idrrrrrrCs zCatClient.transforms)NNN)NNN)NNN)NN)NN)NNN)NN)NN)NNN)NNN)NNN)NN)NNN)NNN)NN)NN)NN)NNN)NN)NNN)NNN)NNN)NNN)NNN)NNN)__name__ __module__ __qualname__rrrrr$rr&r'r(r)r*r+r,r.r/r1r2r3r4r7r8r;r<r=rBrCrrrrrs      &                  #rN)utilsrrrrrrrrs