Auto-generated code for main (#2239)

This commit is contained in:
Elastic Machine
2024-05-09 20:50:16 +01:00
committed by GitHub
parent fe2d8c1915
commit b250049ee7
7 changed files with 1437 additions and 275 deletions

View File

@ -419,6 +419,9 @@ client.get({ id, index })
* *Request (object):* * *Request (object):*
** *`id` (string)*: Unique identifier of the document. ** *`id` (string)*: Unique identifier of the document.
** *`index` (string)*: Name of the index that contains the document. ** *`index` (string)*: Name of the index that contains the document.
** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default. ** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default.
** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time. ** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time.
** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. ** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.
@ -607,6 +610,9 @@ client.mget({ ... })
** *`index` (Optional, string)*: Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. ** *`index` (Optional, string)*: Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index.
** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])*: The documents you want to retrieve. Required if no index is specified in the request URI. ** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])*: The documents you want to retrieve. Required if no index is specified in the request URI.
** *`ids` (Optional, string | string[])*: The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI. ** *`ids` (Optional, string | string[])*: The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI.
** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default. ** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default.
** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time. ** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time.
** *`refresh` (Optional, boolean)*: If `true`, the request refreshes relevant shards before retrieving documents. ** *`refresh` (Optional, boolean)*: If `true`, the request refreshes relevant shards before retrieving documents.
@ -928,7 +934,7 @@ A post filter has no impact on the aggregation results.
** *`profile` (Optional, boolean)*: Set to `true` to return detailed timing information about the execution of individual components in a search request. ** *`profile` (Optional, boolean)*: Set to `true` to return detailed timing information about the execution of individual components in a search request.
NOTE: This is a debugging tool and adds significant overhead to search execution. NOTE: This is a debugging tool and adds significant overhead to search execution.
** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. ** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
** *`rescore` (Optional, { query, window_size } | { query, window_size }[])*: Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases. ** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*: Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.
** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit. ** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit.
** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Used to retrieve the next page of hits using a set of sort values from the previous page. ** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Used to retrieve the next page of hits using a set of sort values from the previous page.
** *`size` (Optional, number)*: The number of hits to return. ** *`size` (Optional, number)*: The number of hits to return.
@ -1031,6 +1037,9 @@ You can exclude fields from this subset using the `_source_excludes` query param
If the `_source` parameter is `false`, this parameter is ignored. If the `_source` parameter is `false`, this parameter is ignored.
** *`q` (Optional, string)*: Query in the Lucene query string syntax using query parameter search. ** *`q` (Optional, string)*: Query in the Lucene query string syntax using query parameter search.
Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
** *`force_synthetic_source` (Optional, boolean)*: Should this request force synthetic _source?
Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance.
Fetches with this enabled will be slower the enabling synthetic source natively in the index.
[discrete] [discrete]
=== search_mvt === search_mvt
@ -1437,7 +1446,7 @@ not included in the search results.
** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })* ** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*
** *`profile` (Optional, boolean)* ** *`profile` (Optional, boolean)*
** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. ** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
** *`rescore` (Optional, { query, window_size } | { query, window_size }[])* ** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*
** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit. ** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit.
** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* ** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*
** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more ** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more
@ -2462,10 +2471,6 @@ Elastic Agent uses these templates to configure backing indices for its data str
If you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.
If you dont use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API. If you dont use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.
** *`template` ({ aliases, mappings, settings, defaults, data_stream, lifecycle })*: The template to be applied which includes mappings, settings, or aliases configuration. ** *`template` ({ aliases, mappings, settings, defaults, data_stream, lifecycle })*: The template to be applied which includes mappings, settings, or aliases configuration.
** *`allow_auto_create` (Optional, boolean)*: 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 data streams matching the template must always be explicitly created.
** *`version` (Optional, number)*: Version number used to manage component templates externally. ** *`version` (Optional, number)*: Version number used to manage component templates externally.
This number isn't automatically generated or incremented by Elasticsearch. This number isn't automatically generated or incremented by Elasticsearch.
To unset a version, replace the template without specifying a version. To unset a version, replace the template without specifying a version.
@ -2473,6 +2478,8 @@ To unset a version, replace the template without specifying a version.
May have any contents. This map is not automatically generated by Elasticsearch. May have any contents. This map is not automatically generated by Elasticsearch.
This information is stored in the cluster state, so keeping it short is preferable. This information is stored in the cluster state, so keeping it short is preferable.
To unset `_meta`, replace the template without specifying this information. To unset `_meta`, replace the template without specifying this information.
** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing component templates. ** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing component templates.
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. ** *`master_timeout` (Optional, string | -1 | 0)*: 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. If no response is received before the timeout expires, the request fails and returns an error.
@ -2818,6 +2825,7 @@ client.esql.query({ query })
** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. ** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
** *`locale` (Optional, string)* ** *`locale` (Optional, string)*
** *`params` (Optional, number | number | string | boolean | null[])*: To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters. ** *`params` (Optional, number | number | string | boolean | null[])*: To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
** *`version` (Optional, Enum("2024.04.01"))*: The version of the ES|QL language in which the "query" field was written.
** *`format` (Optional, string)*: A short version of the Accept header, e.g. json, yaml. ** *`format` (Optional, string)*: A short version of the Accept header, e.g. json, yaml.
** *`delimiter` (Optional, string)*: The character to use between values within a CSV row. Only valid for the CSV format. ** *`delimiter` (Optional, string)*: The character to use between values within a CSV row. Only valid for the CSV format.
@ -2936,7 +2944,7 @@ not included in the search results.
** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })* ** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*
** *`profile` (Optional, boolean)* ** *`profile` (Optional, boolean)*
** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. ** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
** *`rescore` (Optional, { query, window_size } | { query, window_size }[])* ** *`rescore` (Optional, { window_size, query, learning_to_rank } | { window_size, query, learning_to_rank }[])*
** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit. ** *`script_fields` (Optional, Record<string, { script, ignore_failure }>)*: Retrieve a script evaluation (based on different fields) for each hit.
** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* ** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*
** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more ** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more
@ -3266,12 +3274,12 @@ If no index is specified or the index does not have a default analyzer, the anal
** *`analyzer` (Optional, string)*: The name of the analyzer that should be applied to the provided `text`. ** *`analyzer` (Optional, string)*: The name of the analyzer that should be applied to the provided `text`.
This could be a built-in analyzer, or an analyzer thats been configured in the index. This could be a built-in analyzer, or an analyzer thats been configured in the index.
** *`attributes` (Optional, string[])*: Array of token attributes used to filter the output of the `explain` parameter. ** *`attributes` (Optional, string[])*: Array of token attributes used to filter the output of the `explain` parameter.
** *`char_filter` (Optional, string | { type } | { type, mappings, mappings_path } | { type, flags, pattern, replacement } | { type, mode, name } | { type, normalize_kana, normalize_kanji }[])*: Array of character filters used to preprocess characters before the tokenizer. ** *`char_filter` (Optional, string | { type, escaped_tags } | { type, mappings, mappings_path } | { type, flags, pattern, replacement } | { type, mode, name } | { type, normalize_kana, normalize_kanji }[])*: Array of character filters used to preprocess characters before the tokenizer.
** *`explain` (Optional, boolean)*: If `true`, the response includes token attributes and additional details. ** *`explain` (Optional, boolean)*: If `true`, the response includes token attributes and additional details.
** *`field` (Optional, string)*: Field used to derive the analyzer. ** *`field` (Optional, string)*: Field used to derive the analyzer.
To use this parameter, you must specify an index. To use this parameter, you must specify an index.
If specified, the `analyzer` parameter overrides this value. If specified, the `analyzer` parameter overrides this value.
** *`filter` (Optional, string | { type, preserve_original } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type, dedup, dictionary, locale, longest_only } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, flags, pattern, replacement } | { type } | { type, script } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type, expand, format, lenient, synonyms, synonyms_path, tokenizer, updateable } | { type, expand, format, lenient, synonyms, synonyms_path, tokenizer, updateable } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, ignore_keywords, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, alternate, caseFirst, caseLevel, country, decomposition, hiraganaQuaternaryMode, language, numeric, rules, strength, variableTop, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])*: Array of token filters used to apply after the tokenizer. ** *`filter` (Optional, string | { type, preserve_original } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type, dedup, dictionary, locale, longest_only } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, flags, pattern, replacement } | { type } | { type, script } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type, expand, format, lenient, synonyms, synonyms_path, synonyms_set, tokenizer, updateable } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, ignore_keywords, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, alternate, caseFirst, caseLevel, country, decomposition, hiraganaQuaternaryMode, language, numeric, rules, strength, variableTop, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])*: Array of token filters used to apply after the tokenizer.
** *`normalizer` (Optional, string)*: Normalizer to use to convert text into a single token. ** *`normalizer` (Optional, string)*: Normalizer to use to convert text into a single token.
** *`text` (Optional, string | string[])*: Text to analyze. ** *`text` (Optional, string | string[])*: Text to analyze.
If an array of strings is provided, it is analyzed as a multi-value field. If an array of strings is provided, it is analyzed as a multi-value field.
@ -4206,7 +4214,17 @@ This number is not automatically generated by Elasticsearch.
** *`_meta` (Optional, Record<string, User-defined value>)*: Optional user metadata about the index template. ** *`_meta` (Optional, Record<string, User-defined value>)*: Optional user metadata about the index template.
May have any contents. May have any contents.
This map is not automatically generated by Elasticsearch. This map is not automatically generated by Elasticsearch.
** *`allow_auto_create` (Optional, boolean)*: 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.
** *`ignore_missing_component_templates` (Optional, string[])*: The configuration option ignore_missing_component_templates can be used when an index template
references a component template that might not exist
** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
that uses deprecated components, Elasticsearch will emit a deprecation warning.
** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing index templates. ** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing index templates.
** *`master_timeout` (Optional, string | -1 | 0)*: 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.
** *`cause` (Optional, string)*: User defined reason for creating/updating the index template
[discrete] [discrete]
==== put_mapping ==== put_mapping
@ -4234,7 +4252,7 @@ a new date field is added instead of string.
not used at all by Elasticsearch, but can be used to store not used at all by Elasticsearch, but can be used to store
application-specific metadata. application-specific metadata.
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields. ** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include: ** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, element_type, dims, similarity, index, index_options } | { type } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type }>)*: Mapping for a field. For new fields, this mapping can include:
- Field name - Field name
- Field data type - Field data type
@ -4319,11 +4337,9 @@ Templates with lower 'order' values are merged first. Templates with higher
** *`version` (Optional, number)*: Version number used to manage index templates externally. This number ** *`version` (Optional, number)*: Version number used to manage index templates externally. This number
is not automatically generated by Elasticsearch. is not automatically generated by Elasticsearch.
** *`create` (Optional, boolean)*: If true, this request cannot replace or update existing index templates. ** *`create` (Optional, boolean)*: If true, this request cannot replace or update existing index templates.
** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is ** *`master_timeout` (Optional, string | -1 | 0)*: 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. received before the timeout expires, the request fails and returns an error.
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. ** *`cause` (Optional, string)*
If no response is received before the timeout expires, the request fails and returns an error.
[discrete] [discrete]
==== recovery ==== recovery
@ -4563,7 +4579,26 @@ client.indices.simulateIndexTemplate({ name })
==== Arguments ==== Arguments
* *Request (object):* * *Request (object):*
** *`name` (string)*: Index or template name to simulate ** *`name` (string)*: Name of the index to simulate
** *`master_timeout` (Optional, string | -1 | 0)*: 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.
** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
[discrete]
==== simulate_template
Simulate resolving the given template name or body
{ref}/indices-simulate-template.html[Endpoint documentation]
[source,ts]
----
client.indices.simulateTemplate({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`name` (Optional, string)*: Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
this parameter and specify the template configuration in the request body.
** *`allow_auto_create` (Optional, boolean)*: This setting overrides the value of the `action.auto_create_index` cluster setting. ** *`allow_auto_create` (Optional, boolean)*: 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 `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. If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.
@ -4584,32 +4619,10 @@ This number is not automatically generated by Elasticsearch.
** *`_meta` (Optional, Record<string, User-defined value>)*: Optional user metadata about the index template. ** *`_meta` (Optional, Record<string, User-defined value>)*: Optional user metadata about the index template.
May have any contents. May have any contents.
This map is not automatically generated by Elasticsearch. This map is not automatically generated by Elasticsearch.
** *`create` (Optional, boolean)*: If `true`, the template passed in the body is only used if no existing ** *`ignore_missing_component_templates` (Optional, string[])*: The configuration option ignore_missing_component_templates can be used when an index template
templates match the same index patterns. If `false`, the simulation uses references a component template that might not exist
the template with the highest priority. Note that the template is not ** *`deprecated` (Optional, boolean)*: Marks this index template as deprecated. When creating or updating a non-deprecated index template
permanently added or updated in either case; it is only used for the that uses deprecated components, Elasticsearch will emit a deprecation warning.
simulation.
** *`master_timeout` (Optional, string | -1 | 0)*: 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.
** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
[discrete]
==== simulate_template
Simulate resolving the given template name or body
{ref}/indices-simulate-template.html[Endpoint documentation]
[source,ts]
----
client.indices.simulateTemplate({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`name` (Optional, string)*: Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
this parameter and specify the template configuration in the request body.
** *`template` (Optional, { index_patterns, composed_of, template, version, priority, _meta, allow_auto_create, data_stream })*
** *`create` (Optional, boolean)*: 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. ** *`create` (Optional, boolean)*: 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.
** *`master_timeout` (Optional, string | -1 | 0)*: 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. ** *`master_timeout` (Optional, string | -1 | 0)*: 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.
** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template. ** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template.
@ -4756,13 +4769,13 @@ Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
[discrete] [discrete]
=== inference === inference
[discrete] [discrete]
==== delete_model ==== delete
Delete model in the Inference API Delete an inference endpoint
{ref}/delete-inference-api.html[Endpoint documentation] {ref}/delete-inference-api.html[Endpoint documentation]
[source,ts] [source,ts]
---- ----
client.inference.deleteModel({ inference_id }) client.inference.delete({ inference_id })
---- ----
[discrete] [discrete]
@ -4770,28 +4783,28 @@ client.inference.deleteModel({ inference_id })
* *Request (object):* * *Request (object):*
** *`inference_id` (string)*: The inference Id ** *`inference_id` (string)*: The inference Id
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding"))*: The task type ** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
[discrete] [discrete]
==== get_model ==== get
Get a model in the Inference API Get an inference endpoint
{ref}/get-inference-api.html[Endpoint documentation] {ref}/get-inference-api.html[Endpoint documentation]
[source,ts] [source,ts]
---- ----
client.inference.getModel({ inference_id }) client.inference.get({ ... })
---- ----
[discrete] [discrete]
==== Arguments ==== Arguments
* *Request (object):* * *Request (object):*
** *`inference_id` (string)*: The inference Id ** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding"))*: The task type ** *`inference_id` (Optional, string)*: The inference Id
[discrete] [discrete]
==== inference ==== inference
Perform inference on a model Perform inference
{ref}/post-inference-api.html[Endpoint documentation] {ref}/post-inference-api.html[Endpoint documentation]
[source,ts] [source,ts]
@ -4804,19 +4817,22 @@ client.inference.inference({ inference_id, input })
* *Request (object):* * *Request (object):*
** *`inference_id` (string)*: The inference Id ** *`inference_id` (string)*: The inference Id
** *`input` (string | string[])*: Text input to the model. ** *`input` (string | string[])*: Inference input.
Either a string or an array of strings. Either a string or an array of strings.
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding"))*: The task type ** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
** *`query` (Optional, string)*: Query input, required for rerank task.
Not required for other tasks.
** *`task_settings` (Optional, User-defined value)*: Optional task settings ** *`task_settings` (Optional, User-defined value)*: Optional task settings
** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait for the inference request to complete.
[discrete] [discrete]
==== put_model ==== put
Configure a model for use in the Inference API Configure an inference endpoint for use in the Inference API
{ref}/put-inference-api.html[Endpoint documentation] {ref}/put-inference-api.html[Endpoint documentation]
[source,ts] [source,ts]
---- ----
client.inference.putModel({ inference_id }) client.inference.put({ inference_id })
---- ----
[discrete] [discrete]
@ -4824,8 +4840,8 @@ client.inference.putModel({ inference_id })
* *Request (object):* * *Request (object):*
** *`inference_id` (string)*: The inference Id ** *`inference_id` (string)*: The inference Id
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding"))*: The task type ** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
** *`model_config` (Optional, { service, service_settings, task_settings })* ** *`inference_config` (Optional, { service, service_settings, task_settings })*
[discrete] [discrete]
=== ingest === ingest
@ -6437,7 +6453,11 @@ or `windows-x86_64`. For portable models (those that work independent of process
architecture or OS features), leave this field unset. architecture or OS features), leave this field unset.
** *`tags` (Optional, string[])*: An array of tags to organize the model. ** *`tags` (Optional, string[])*: An array of tags to organize the model.
** *`prefix_strings` (Optional, { ingest, search })*: Optional prefix strings applied at inference ** *`prefix_strings` (Optional, { ingest, search })*: Optional prefix strings applied at inference
** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. ** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided,
the request defers definition decompression and skips relevant
validations.
** *`wait_for_completion` (Optional, boolean)*: Whether to wait for all child operations (e.g. model download)
to complete.
[discrete] [discrete]
==== put_trained_model_alias ==== put_trained_model_alias
@ -7927,6 +7947,7 @@ associated with the API key. An API key's actual
permission is the intersection of its assigned role permission is the intersection of its assigned role
descriptors and the owner user's role descriptors. descriptors and the owner user's role descriptors.
** *`active_only` (Optional, boolean)*: A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys. ** *`active_only` (Optional, boolean)*: A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys.
** *`with_profile_uid` (Optional, boolean)*: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
[discrete] [discrete]
==== get_builtin_privileges ==== get_builtin_privileges
@ -8131,7 +8152,7 @@ client.security.hasPrivileges({ ... })
* *Request (object):* * *Request (object):*
** *`user` (Optional, string)*: Username ** *`user` (Optional, string)*: Username
** *`application` (Optional, { application, privileges, resources }[])* ** *`application` (Optional, { application, privileges, resources }[])*
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "grant_api_key" | "manage" | "manage_api_key" | "manage_ccr" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "read_ccr" | "read_ilm" | "read_pipeline" | "read_slm" | "transport_client")[])*: A list of the cluster privileges that you want to check. ** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_connector_secrets" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of the cluster privileges that you want to check.
** *`index` (Optional, { names, privileges, allow_restricted_indices }[])* ** *`index` (Optional, { names, privileges, allow_restricted_indices }[])*
[discrete] [discrete]
@ -8245,7 +8266,7 @@ client.security.putRole({ name })
* *Request (object):* * *Request (object):*
** *`name` (string)*: The name of the role. ** *`name` (string)*: The name of the role.
** *`applications` (Optional, { application, privileges, resources }[])*: A list of application privilege entries. ** *`applications` (Optional, { application, privileges, resources }[])*: A list of application privilege entries.
** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "grant_api_key" | "manage" | "manage_api_key" | "manage_ccr" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "read_ccr" | "read_ilm" | "read_pipeline" | "read_slm" | "transport_client")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role. ** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "cross_cluster_replication" | "cross_cluster_search" | "delegate_pki" | "grant_api_key" | "manage" | "manage_api_key" | "manage_autoscaling" | "manage_behavioral_analytics" | "manage_ccr" | "manage_data_frame_transforms" | "manage_data_stream_global_retention" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_inference" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_search_application" | "manage_search_query_rules" | "manage_search_synonyms" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_data_frame_transforms" | "monitor_data_stream_global_retention" | "monitor_enrich" | "monitor_inference" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "none" | "post_behavioral_analytics_event" | "read_ccr" | "read_connector_secrets" | "read_fleet_secrets" | "read_ilm" | "read_pipeline" | "read_security" | "read_slm" | "transport_client" | "write_connector_secrets" | "write_fleet_secrets")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role.
** *`global` (Optional, Record<string, User-defined value>)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. ** *`global` (Optional, Record<string, User-defined value>)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.
** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries. ** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries.
** *`metadata` (Optional, Record<string, User-defined value>)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use. ** *`metadata` (Optional, Record<string, User-defined value>)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use.
@ -8336,6 +8357,8 @@ To page through more hits, use the `search_after` parameter.
** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Search after definition ** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Search after definition
** *`with_limited_by` (Optional, boolean)*: Return the snapshot of the owner user's role descriptors associated with the API key. ** *`with_limited_by` (Optional, boolean)*: Return the snapshot of the owner user's role descriptors associated with the API key.
An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors. An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors.
** *`with_profile_uid` (Optional, boolean)*: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists.
** *`typed_keys` (Optional, boolean)*: Determines whether aggregation names are prefixed by their respective types in the response.
[discrete] [discrete]
==== saml_authenticate ==== saml_authenticate

View File

@ -345,7 +345,7 @@ export default class Cluster {
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse> async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse>
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> { async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name'] const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['allow_auto_create', 'template', 'version', '_meta'] const acceptedBody: string[] = ['template', 'version', '_meta', 'deprecated']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
const userBody: any = params?.body const userBody: any = params?.body

View File

@ -52,7 +52,7 @@ export default class Esql {
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlQueryResponse> async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlQueryResponse>
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<any> { async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = [] const acceptedPath: string[] = []
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'query'] const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'query', 'version']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
const userBody: any = params?.body const userBody: any = params?.body
@ -63,6 +63,12 @@ export default class Esql {
body = userBody != null ? { ...userBody } : undefined body = userBody != null ? { ...userBody } : undefined
} }
// a version number is required for all ES|QL queries.
// inject a default value if none is provided.
if (typeof body === 'object' && body.version == null) {
body.version = '2024.04.01'
}
for (const key in params) { for (const key in params) {
if (acceptedBody.includes(key)) { if (acceptedBody.includes(key)) {
body = body ?? {} body = body ?? {}

View File

@ -1271,7 +1271,7 @@ export default class Indices {
async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutIndexTemplateResponse> async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutIndexTemplateResponse>
async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise<any> { async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name'] const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta'] const acceptedBody: string[] = ['index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'allow_auto_create', 'ignore_missing_component_templates', 'deprecated']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
const userBody: any = params?.body const userBody: any = params?.body
@ -1720,23 +1720,11 @@ export default class Indices {
async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateIndexTemplateResponse> async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateIndexTemplateResponse>
async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise<any> { async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name'] const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['allow_auto_create', 'index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error const body = undefined
const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
for (const key in params) { for (const key in params) {
if (acceptedBody.includes(key)) { if (acceptedPath.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue continue
} else if (key !== 'body') { } else if (key !== 'body') {
// @ts-expect-error // @ts-expect-error
@ -1753,20 +1741,28 @@ export default class Indices {
* Simulate resolving the given template name or body * Simulate resolving the given template name or body
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html | Elasticsearch API documentation}
*/ */
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateTemplateResponse> async simulateTemplate (this: That, params?: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateTemplateResponse>
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateTemplateResponse, unknown>> async simulateTemplate (this: That, params?: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateTemplateResponse, unknown>>
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateTemplateResponse> async simulateTemplate (this: That, params?: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesSimulateTemplateResponse>
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise<any> { async simulateTemplate (this: That, params?: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name'] const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['template'] const acceptedBody: string[] = ['allow_auto_create', 'index_patterns', 'composed_of', 'template', 'data_stream', 'priority', 'version', '_meta', 'ignore_missing_component_templates', 'deprecated']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
let body: any = params.body ?? undefined const userBody: any = params?.body
let body: Record<string, any> | string
if (typeof userBody === 'string') {
body = userBody
} else {
body = userBody != null ? { ...userBody } : undefined
}
params = params ?? {}
for (const key in params) { for (const key in params) {
if (acceptedBody.includes(key)) { if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error // @ts-expect-error
body = params[key] body[key] = params[key]
} else if (acceptedPath.includes(key)) { } else if (acceptedPath.includes(key)) {
continue continue
} else if (key !== 'body') { } else if (key !== 'body') {

View File

@ -44,13 +44,13 @@ export default class Inference {
} }
/** /**
* Delete model in the Inference API * Delete an inference endpoint
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html | Elasticsearch API documentation}
*/ */
async deleteModel (this: That, params: T.InferenceDeleteModelRequest | TB.InferenceDeleteModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceDeleteModelResponse> async delete (this: That, params: T.InferenceDeleteRequest | TB.InferenceDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceDeleteResponse>
async deleteModel (this: That, params: T.InferenceDeleteModelRequest | TB.InferenceDeleteModelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceDeleteModelResponse, unknown>> async delete (this: That, params: T.InferenceDeleteRequest | TB.InferenceDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceDeleteResponse, unknown>>
async deleteModel (this: That, params: T.InferenceDeleteModelRequest | TB.InferenceDeleteModelRequest, options?: TransportRequestOptions): Promise<T.InferenceDeleteModelResponse> async delete (this: That, params: T.InferenceDeleteRequest | TB.InferenceDeleteRequest, options?: TransportRequestOptions): Promise<T.InferenceDeleteResponse>
async deleteModel (this: That, params: T.InferenceDeleteModelRequest | TB.InferenceDeleteModelRequest, options?: TransportRequestOptions): Promise<any> { async delete (this: That, params: T.InferenceDeleteRequest | TB.InferenceDeleteRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['task_type', 'inference_id'] const acceptedPath: string[] = ['task_type', 'inference_id']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
const body = undefined const body = undefined
@ -77,17 +77,18 @@ export default class Inference {
} }
/** /**
* Get a model in the Inference API * Get an inference endpoint
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html | Elasticsearch API documentation}
*/ */
async getModel (this: That, params: T.InferenceGetModelRequest | TB.InferenceGetModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceGetModelResponse> async get (this: That, params?: T.InferenceGetRequest | TB.InferenceGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceGetResponse>
async getModel (this: That, params: T.InferenceGetModelRequest | TB.InferenceGetModelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceGetModelResponse, unknown>> async get (this: That, params?: T.InferenceGetRequest | TB.InferenceGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferenceGetResponse, unknown>>
async getModel (this: That, params: T.InferenceGetModelRequest | TB.InferenceGetModelRequest, options?: TransportRequestOptions): Promise<T.InferenceGetModelResponse> async get (this: That, params?: T.InferenceGetRequest | TB.InferenceGetRequest, options?: TransportRequestOptions): Promise<T.InferenceGetResponse>
async getModel (this: That, params: T.InferenceGetModelRequest | TB.InferenceGetModelRequest, options?: TransportRequestOptions): Promise<any> { async get (this: That, params?: T.InferenceGetRequest | TB.InferenceGetRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['task_type', 'inference_id'] const acceptedPath: string[] = ['task_type', 'inference_id']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
const body = undefined const body = undefined
params = params ?? {}
for (const key in params) { for (const key in params) {
if (acceptedPath.includes(key)) { if (acceptedPath.includes(key)) {
continue continue
@ -102,15 +103,18 @@ export default class Inference {
if (params.task_type != null && params.inference_id != null) { if (params.task_type != null && params.inference_id != null) {
method = 'GET' method = 'GET'
path = `/_inference/${encodeURIComponent(params.task_type.toString())}/${encodeURIComponent(params.inference_id.toString())}` path = `/_inference/${encodeURIComponent(params.task_type.toString())}/${encodeURIComponent(params.inference_id.toString())}`
} else { } else if (params.inference_id != null) {
method = 'GET' method = 'GET'
path = `/_inference/${encodeURIComponent(params.inference_id.toString())}` path = `/_inference/${encodeURIComponent(params.inference_id.toString())}`
} else {
method = 'GET'
path = '/_inference'
} }
return await this.transport.request({ path, method, querystring, body }, options) return await this.transport.request({ path, method, querystring, body }, options)
} }
/** /**
* Perform inference on a model * Perform inference
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html | Elasticsearch API documentation}
*/ */
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceInferenceResponse> async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferenceInferenceResponse>
@ -118,7 +122,7 @@ export default class Inference {
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceInferenceResponse> async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<T.InferenceInferenceResponse>
async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<any> { async inference (this: That, params: T.InferenceInferenceRequest | TB.InferenceInferenceRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['task_type', 'inference_id'] const acceptedPath: string[] = ['task_type', 'inference_id']
const acceptedBody: string[] = ['input', 'task_settings'] const acceptedBody: string[] = ['query', 'input', 'task_settings']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
const userBody: any = params?.body const userBody: any = params?.body
@ -155,15 +159,15 @@ export default class Inference {
} }
/** /**
* Configure a model for use in the Inference API * Configure an inference endpoint for use in the Inference API
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html | Elasticsearch API documentation} * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html | Elasticsearch API documentation}
*/ */
async putModel (this: That, params: T.InferencePutModelRequest | TB.InferencePutModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferencePutModelResponse> async put (this: That, params: T.InferencePutRequest | TB.InferencePutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.InferencePutResponse>
async putModel (this: That, params: T.InferencePutModelRequest | TB.InferencePutModelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferencePutModelResponse, unknown>> async put (this: That, params: T.InferencePutRequest | TB.InferencePutRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.InferencePutResponse, unknown>>
async putModel (this: That, params: T.InferencePutModelRequest | TB.InferencePutModelRequest, options?: TransportRequestOptions): Promise<T.InferencePutModelResponse> async put (this: That, params: T.InferencePutRequest | TB.InferencePutRequest, options?: TransportRequestOptions): Promise<T.InferencePutResponse>
async putModel (this: That, params: T.InferencePutModelRequest | TB.InferencePutModelRequest, options?: TransportRequestOptions): Promise<any> { async put (this: That, params: T.InferencePutRequest | TB.InferencePutRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['task_type', 'inference_id'] const acceptedPath: string[] = ['task_type', 'inference_id']
const acceptedBody: string[] = ['model_config'] const acceptedBody: string[] = ['inference_config']
const querystring: Record<string, any> = {} const querystring: Record<string, any> = {}
// @ts-expect-error // @ts-expect-error
let body: any = params.body ?? undefined let body: any = params.body ?? undefined

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff