API generation
This commit is contained in:
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'flush', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'wait_for_completion', 'only_ancient_segments', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', waitForCompletion: 'wait_for_completion', onlyAncientSegments: 'only_ancient_segments', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
|
||||
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'flush', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
|
||||
|
||||
function IndicesApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -737,27 +737,6 @@ IndicesApi.prototype.getTemplate = function indicesGetTemplateApi (params, optio
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.open = function indicesOpenApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -1307,27 +1286,6 @@ IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, o
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.upgrade = function indicesUpgradeApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_upgrade'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -1593,7 +1551,6 @@ Object.defineProperties(IndicesApi.prototype, {
|
||||
get_mapping: { get () { return this.getMapping } },
|
||||
get_settings: { get () { return this.getSettings } },
|
||||
get_template: { get () { return this.getTemplate } },
|
||||
get_upgrade: { get () { return this.getUpgrade } },
|
||||
put_alias: { get () { return this.putAlias } },
|
||||
put_index_template: { get () { return this.putIndexTemplate } },
|
||||
put_mapping: { get () { return this.putMapping } },
|
||||
|
||||
@ -1725,6 +1725,43 @@ MlApi.prototype.updateModelSnapshot = function mlUpdateModelSnapshotApi (params,
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
MlApi.prototype.upgradeJobSnapshot = function mlUpgradeJobSnapshotApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['job_id'] == null && params['jobId'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot_id'] == null && params['snapshotId'] == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot_id or snapshotId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: job_id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, jobId, job_id, snapshotId, snapshot_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + 'model_snapshots' + '/' + encodeURIComponent(snapshot_id || snapshotId) + '/' + '_upgrade'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
MlApi.prototype.validate = function mlValidateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -1836,6 +1873,7 @@ Object.defineProperties(MlApi.prototype, {
|
||||
update_filter: { get () { return this.updateFilter } },
|
||||
update_job: { get () { return this.updateJob } },
|
||||
update_model_snapshot: { get () { return this.updateModelSnapshot } },
|
||||
upgrade_job_snapshot: { get () { return this.upgradeJobSnapshot } },
|
||||
validate_detector: { get () { return this.validateDetector } }
|
||||
})
|
||||
|
||||
|
||||
3
api/kibana.d.ts
vendored
3
api/kibana.d.ts
vendored
@ -227,7 +227,6 @@ interface KibanaClient {
|
||||
getMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesMigrateToDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putAlias<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutAlias<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
@ -249,7 +248,6 @@ interface KibanaClient {
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
unfreeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUnfreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpdateAliases<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validateQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesValidateQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
}
|
||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Info, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
@ -332,6 +330,7 @@ interface KibanaClient {
|
||||
updateFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpgradeJobSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validateDetector<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidateDetector<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
}
|
||||
|
||||
25
api/requestParams.d.ts
vendored
25
api/requestParams.d.ts
vendored
@ -185,7 +185,6 @@ export interface CatIndices extends Generic {
|
||||
index?: string | string[];
|
||||
format?: string;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
local?: boolean;
|
||||
master_timeout?: string;
|
||||
h?: string | string[];
|
||||
health?: 'green' | 'yellow' | 'red';
|
||||
@ -339,7 +338,6 @@ export interface CatShards extends Generic {
|
||||
index?: string | string[];
|
||||
format?: string;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
local?: boolean;
|
||||
master_timeout?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
@ -1143,13 +1141,6 @@ export interface IndicesGetTemplate extends Generic {
|
||||
local?: boolean;
|
||||
}
|
||||
|
||||
export interface IndicesGetUpgrade extends Generic {
|
||||
index?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesMigrateToDataStream extends Generic {
|
||||
name: string;
|
||||
}
|
||||
@ -1327,15 +1318,6 @@ export interface IndicesUpdateAliases<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface IndicesUpgrade extends Generic {
|
||||
index?: string | string[];
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
ignore_unavailable?: boolean;
|
||||
wait_for_completion?: boolean;
|
||||
only_ancient_segments?: boolean;
|
||||
}
|
||||
|
||||
export interface IndicesValidateQuery<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
@ -1839,6 +1821,13 @@ export interface MlUpdateModelSnapshot<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MlUpgradeJobSnapshot extends Generic {
|
||||
job_id: string;
|
||||
snapshot_id: string;
|
||||
timeout?: timevalue;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface MlValidate<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -724,7 +724,6 @@ client.cat.indices({
|
||||
index: string | string[],
|
||||
format: string,
|
||||
bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
|
||||
local: boolean,
|
||||
master_timeout: string,
|
||||
h: string | string[],
|
||||
health: 'green' | 'yellow' | 'red',
|
||||
@ -749,11 +748,6 @@ link:{ref}/cat-indices.html[Documentation] +
|
||||
|`bytes`
|
||||
|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values
|
||||
|
||||
|`local`
|
||||
|`boolean` - Return local information, do not retrieve the state from master node (default: false) +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`master_timeout` or `masterTimeout`
|
||||
|`string` - Explicit operation timeout for connection to master node
|
||||
|
||||
@ -1362,7 +1356,6 @@ client.cat.shards({
|
||||
index: string | string[],
|
||||
format: string,
|
||||
bytes: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb',
|
||||
local: boolean,
|
||||
master_timeout: string,
|
||||
h: string | string[],
|
||||
help: boolean,
|
||||
@ -1383,11 +1376,6 @@ link:{ref}/cat-shards.html[Documentation] +
|
||||
|`bytes`
|
||||
|`'b' \| 'k' \| 'kb' \| 'm' \| 'mb' \| 'g' \| 'gb' \| 't' \| 'tb' \| 'p' \| 'pb'` - The unit in which to display byte values
|
||||
|
||||
|`local`
|
||||
|`boolean` - Return local information, do not retrieve the state from master node (default: false) +
|
||||
|
||||
WARNING: This parameter has been deprecated.
|
||||
|
||||
|`master_timeout` or `masterTimeout`
|
||||
|`string` - Explicit operation timeout for connection to master node
|
||||
|
||||
@ -1959,7 +1947,7 @@ link:{ref}/cluster-allocation-explain.html[Documentation] +
|
||||
|
||||
[discrete]
|
||||
=== cluster.deleteComponentTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.cluster.deleteComponentTemplate({
|
||||
@ -2002,7 +1990,7 @@ _Default:_ `true`
|
||||
|
||||
[discrete]
|
||||
=== cluster.existsComponentTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.cluster.existsComponentTemplate({
|
||||
@ -2027,7 +2015,7 @@ link:{ref}/indices-component-template.html[Documentation] +
|
||||
|
||||
[discrete]
|
||||
=== cluster.getComponentTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.cluster.getComponentTemplate({
|
||||
@ -2191,7 +2179,7 @@ _Default:_ `30s`
|
||||
|
||||
[discrete]
|
||||
=== cluster.putComponentTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.cluster.putComponentTemplate({
|
||||
@ -4022,7 +4010,7 @@ _Default:_ `open`
|
||||
|
||||
[discrete]
|
||||
=== indices.deleteIndexTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.deleteIndexTemplate({
|
||||
@ -4152,7 +4140,7 @@ _Default:_ `all`
|
||||
|
||||
[discrete]
|
||||
=== indices.existsIndexTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.existsIndexTemplate({
|
||||
@ -4518,7 +4506,7 @@ _Default:_ `open`
|
||||
|
||||
[discrete]
|
||||
=== indices.getIndexTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.getIndexTemplate({
|
||||
@ -4664,36 +4652,6 @@ link:{ref}/indices-templates.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== indices.getUpgrade
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.getUpgrade({
|
||||
index: string | string[],
|
||||
ignore_unavailable: boolean,
|
||||
allow_no_indices: boolean,
|
||||
expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all'
|
||||
})
|
||||
----
|
||||
link:{ref}/indices-upgrade.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
|
||||
|`ignore_unavailable` or `ignoreUnavailable`
|
||||
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
|
||||
|`allow_no_indices` or `allowNoIndices`
|
||||
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
|
||||
|`expand_wildcards` or `expandWildcards`
|
||||
|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
|
||||
_Default:_ `open`
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== indices.migrateToDataStream
|
||||
|
||||
@ -4788,7 +4746,7 @@ link:{ref}/indices-aliases.html[Documentation] +
|
||||
|
||||
[discrete]
|
||||
=== indices.putIndexTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.putIndexTemplate({
|
||||
@ -5203,7 +5161,7 @@ link:{ref}/indices-shrink-index.html[Documentation] +
|
||||
|
||||
[discrete]
|
||||
=== indices.simulateIndexTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.simulateIndexTemplate({
|
||||
@ -5236,7 +5194,7 @@ link:{ref}/indices-templates.html[Documentation] +
|
||||
|
||||
[discrete]
|
||||
=== indices.simulateTemplate
|
||||
*Stability:* experimental
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.simulateTemplate({
|
||||
@ -5435,44 +5393,6 @@ link:{ref}/indices-aliases.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== indices.upgrade
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.indices.upgrade({
|
||||
index: string | string[],
|
||||
allow_no_indices: boolean,
|
||||
expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all',
|
||||
ignore_unavailable: boolean,
|
||||
wait_for_completion: boolean,
|
||||
only_ancient_segments: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/indices-upgrade.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`index`
|
||||
|`string \| string[]` - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
|
||||
|`allow_no_indices` or `allowNoIndices`
|
||||
|`boolean` - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
||||
|
||||
|`expand_wildcards` or `expandWildcards`
|
||||
|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
|
||||
_Default:_ `open`
|
||||
|
||||
|`ignore_unavailable` or `ignoreUnavailable`
|
||||
|`boolean` - Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
||||
|
||||
|`wait_for_completion` or `waitForCompletion`
|
||||
|`boolean` - Specify whether the request should block until the all segments are upgraded (default: false)
|
||||
|
||||
|`only_ancient_segments` or `onlyAncientSegments`
|
||||
|`boolean` - If true, only ancient (an older Lucene major release) segments will be upgraded
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== indices.validateQuery
|
||||
|
||||
@ -7568,6 +7488,35 @@ link:{ref}/ml-update-snapshot.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== ml.upgradeJobSnapshot
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.ml.upgradeJobSnapshot({
|
||||
job_id: string,
|
||||
snapshot_id: string,
|
||||
timeout: timevalue,
|
||||
wait_for_completion: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/ml-upgrade-job-model-snapshot.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`job_id` or `jobId`
|
||||
|`string` - The ID of the job
|
||||
|
||||
|`snapshot_id` or `snapshotId`
|
||||
|`string` - The ID of the snapshot
|
||||
|
||||
|`timeout`
|
||||
|`timevalue` - How long should the API wait for the job to be opened and the old snapshot to be loaded.
|
||||
|
||||
|`wait_for_completion` or `waitForCompletion`
|
||||
|`boolean` - Should the request wait until the task is complete before responding to the caller. Default is false.
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== ml.validate
|
||||
|
||||
|
||||
20
index.d.ts
vendored
20
index.d.ts
vendored
@ -1028,14 +1028,6 @@ declare class Client {
|
||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetTemplate, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetTemplate, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get_upgrade<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetUpgrade, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetUpgrade, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetUpgrade, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesGetUpgrade, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
migrate_to_data_stream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesMigrateToDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
migrate_to_data_stream<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
migrate_to_data_stream<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesMigrateToDataStream, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
@ -1168,10 +1160,6 @@ declare class Client {
|
||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesUpdateAliases<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesUpdateAliases<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesUpgrade, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesUpgrade, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
validate_query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesValidateQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validate_query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
validate_query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesValidateQuery<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
@ -1736,6 +1724,14 @@ declare class Client {
|
||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlUpdateModelSnapshot<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlUpdateModelSnapshot<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade_job_snapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpgradeJobSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgrade_job_snapshot<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade_job_snapshot<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlUpgradeJobSnapshot, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgrade_job_snapshot<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlUpgradeJobSnapshot, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpgradeJobSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlUpgradeJobSnapshot, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlUpgradeJobSnapshot, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlValidate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
|
||||
Reference in New Issue
Block a user