API generation
This commit is contained in:
@ -12,7 +12,6 @@ function buildIndicesCreate (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'wait_for_active_shards',
|
'wait_for_active_shards',
|
||||||
'timeout',
|
'timeout',
|
||||||
'master_timeout',
|
'master_timeout',
|
||||||
@ -24,7 +23,6 @@ function buildIndicesCreate (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
waitForActiveShards: 'wait_for_active_shards',
|
waitForActiveShards: 'wait_for_active_shards',
|
||||||
masterTimeout: 'master_timeout',
|
masterTimeout: 'master_timeout',
|
||||||
errorTrace: 'error_trace',
|
errorTrace: 'error_trace',
|
||||||
|
|||||||
@ -12,7 +12,6 @@ function buildIndicesGet (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'local',
|
'local',
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
'allow_no_indices',
|
'allow_no_indices',
|
||||||
@ -28,7 +27,6 @@ function buildIndicesGet (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
ignoreUnavailable: 'ignore_unavailable',
|
ignoreUnavailable: 'ignore_unavailable',
|
||||||
allowNoIndices: 'allow_no_indices',
|
allowNoIndices: 'allow_no_indices',
|
||||||
expandWildcards: 'expand_wildcards',
|
expandWildcards: 'expand_wildcards',
|
||||||
|
|||||||
@ -12,7 +12,6 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'include_defaults',
|
'include_defaults',
|
||||||
'ignore_unavailable',
|
'ignore_unavailable',
|
||||||
'allow_no_indices',
|
'allow_no_indices',
|
||||||
@ -26,7 +25,6 @@ function buildIndicesGetFieldMapping (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
includeDefaults: 'include_defaults',
|
includeDefaults: 'include_defaults',
|
||||||
ignoreUnavailable: 'ignore_unavailable',
|
ignoreUnavailable: 'ignore_unavailable',
|
||||||
allowNoIndices: 'allow_no_indices',
|
allowNoIndices: 'allow_no_indices',
|
||||||
|
|||||||
@ -12,7 +12,6 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'flat_settings',
|
'flat_settings',
|
||||||
'master_timeout',
|
'master_timeout',
|
||||||
'local',
|
'local',
|
||||||
@ -24,7 +23,6 @@ function buildIndicesGetTemplate (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
flatSettings: 'flat_settings',
|
flatSettings: 'flat_settings',
|
||||||
masterTimeout: 'master_timeout',
|
masterTimeout: 'master_timeout',
|
||||||
errorTrace: 'error_trace',
|
errorTrace: 'error_trace',
|
||||||
|
|||||||
@ -12,7 +12,6 @@ function buildIndicesPutTemplate (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'order',
|
'order',
|
||||||
'create',
|
'create',
|
||||||
'timeout',
|
'timeout',
|
||||||
@ -26,7 +25,6 @@ function buildIndicesPutTemplate (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
masterTimeout: 'master_timeout',
|
masterTimeout: 'master_timeout',
|
||||||
flatSettings: 'flat_settings',
|
flatSettings: 'flat_settings',
|
||||||
errorTrace: 'error_trace',
|
errorTrace: 'error_trace',
|
||||||
|
|||||||
@ -12,7 +12,6 @@ function buildIndicesRollover (opts) {
|
|||||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
const acceptedQuerystring = [
|
const acceptedQuerystring = [
|
||||||
'include_type_name',
|
|
||||||
'timeout',
|
'timeout',
|
||||||
'dry_run',
|
'dry_run',
|
||||||
'master_timeout',
|
'master_timeout',
|
||||||
@ -25,7 +24,6 @@ function buildIndicesRollover (opts) {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const snakeCase = {
|
const snakeCase = {
|
||||||
includeTypeName: 'include_type_name',
|
|
||||||
dryRun: 'dry_run',
|
dryRun: 'dry_run',
|
||||||
masterTimeout: 'master_timeout',
|
masterTimeout: 'master_timeout',
|
||||||
waitForActiveShards: 'wait_for_active_shards',
|
waitForActiveShards: 'wait_for_active_shards',
|
||||||
|
|||||||
77
api/api/ml.delete_trained_model.js
Normal file
77
api/api/ml.delete_trained_model.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||||
|
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||||
|
// See the LICENSE file in the project root for more information
|
||||||
|
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint camelcase: 0 */
|
||||||
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
|
function buildMlDeleteTrainedModel (opts) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
|
const acceptedQuerystring = [
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
const snakeCase = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ml.delete_trained_model request
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
|
return function mlDeleteTrainedModel (params, options, callback) {
|
||||||
|
options = options || {}
|
||||||
|
if (typeof options === 'function') {
|
||||||
|
callback = options
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
if (typeof params === 'function' || params == null) {
|
||||||
|
callback = params
|
||||||
|
params = {}
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// check required parameters
|
||||||
|
if (params['model_id'] == null && params['modelId'] == null) {
|
||||||
|
const err = new ConfigurationError('Missing required parameter: model_id or modelId')
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate headers object
|
||||||
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
var warnings = []
|
||||||
|
var { method, body, modelId, model_id, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
|
var ignore = options.ignore
|
||||||
|
if (typeof ignore === 'number') {
|
||||||
|
options.ignore = [ignore]
|
||||||
|
}
|
||||||
|
|
||||||
|
var path = ''
|
||||||
|
|
||||||
|
if (method == null) method = 'DELETE'
|
||||||
|
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: body || '',
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
options.warnings = warnings.length === 0 ? null : warnings
|
||||||
|
return makeRequest(request, options, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = buildMlDeleteTrainedModel
|
||||||
81
api/api/ml.get_trained_models.js
Normal file
81
api/api/ml.get_trained_models.js
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||||
|
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||||
|
// See the LICENSE file in the project root for more information
|
||||||
|
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint camelcase: 0 */
|
||||||
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
|
function buildMlGetTrainedModels (opts) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
|
const acceptedQuerystring = [
|
||||||
|
'allow_no_match',
|
||||||
|
'include_model_definition',
|
||||||
|
'from',
|
||||||
|
'size'
|
||||||
|
]
|
||||||
|
|
||||||
|
const snakeCase = {
|
||||||
|
allowNoMatch: 'allow_no_match',
|
||||||
|
includeModelDefinition: 'include_model_definition'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ml.get_trained_models request
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
|
return function mlGetTrainedModels (params, options, callback) {
|
||||||
|
options = options || {}
|
||||||
|
if (typeof options === 'function') {
|
||||||
|
callback = options
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
if (typeof params === 'function' || params == null) {
|
||||||
|
callback = params
|
||||||
|
params = {}
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate headers object
|
||||||
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
var warnings = []
|
||||||
|
var { method, body, modelId, model_id, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
|
var ignore = options.ignore
|
||||||
|
if (typeof ignore === 'number') {
|
||||||
|
options.ignore = [ignore]
|
||||||
|
}
|
||||||
|
|
||||||
|
var path = ''
|
||||||
|
|
||||||
|
if ((model_id || modelId) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_ml' + '/' + 'inference'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
options.warnings = warnings.length === 0 ? null : warnings
|
||||||
|
return makeRequest(request, options, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = buildMlGetTrainedModels
|
||||||
79
api/api/ml.get_trained_models_stats.js
Normal file
79
api/api/ml.get_trained_models_stats.js
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||||
|
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||||
|
// See the LICENSE file in the project root for more information
|
||||||
|
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
/* eslint camelcase: 0 */
|
||||||
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
|
function buildMlGetTrainedModelsStats (opts) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||||
|
|
||||||
|
const acceptedQuerystring = [
|
||||||
|
'allow_no_match',
|
||||||
|
'from',
|
||||||
|
'size'
|
||||||
|
]
|
||||||
|
|
||||||
|
const snakeCase = {
|
||||||
|
allowNoMatch: 'allow_no_match'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform a ml.get_trained_models_stats request
|
||||||
|
* TODO
|
||||||
|
*/
|
||||||
|
return function mlGetTrainedModelsStats (params, options, callback) {
|
||||||
|
options = options || {}
|
||||||
|
if (typeof options === 'function') {
|
||||||
|
callback = options
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
if (typeof params === 'function' || params == null) {
|
||||||
|
callback = params
|
||||||
|
params = {}
|
||||||
|
options = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// validate headers object
|
||||||
|
if (options.headers != null && typeof options.headers !== 'object') {
|
||||||
|
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||||
|
return handleError(err, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
var warnings = []
|
||||||
|
var { method, body, modelId, model_id, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||||
|
|
||||||
|
var ignore = options.ignore
|
||||||
|
if (typeof ignore === 'number') {
|
||||||
|
options.ignore = [ignore]
|
||||||
|
}
|
||||||
|
|
||||||
|
var path = ''
|
||||||
|
|
||||||
|
if ((model_id || modelId) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_ml' + '/' + 'inference' + '/' + encodeURIComponent(model_id || modelId) + '/' + '_stats'
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_ml' + '/' + 'inference' + '/' + '_stats'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
options.warnings = warnings.length === 0 ? null : warnings
|
||||||
|
return makeRequest(request, options, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = buildMlGetTrainedModelsStats
|
||||||
@ -292,6 +292,8 @@ function ESAPI (opts) {
|
|||||||
deleteJob: lazyLoad('ml.delete_job', opts),
|
deleteJob: lazyLoad('ml.delete_job', opts),
|
||||||
delete_model_snapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
delete_model_snapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
||||||
deleteModelSnapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
deleteModelSnapshot: lazyLoad('ml.delete_model_snapshot', opts),
|
||||||
|
delete_trained_model: lazyLoad('ml.delete_trained_model', opts),
|
||||||
|
deleteTrainedModel: lazyLoad('ml.delete_trained_model', opts),
|
||||||
estimate_memory_usage: lazyLoad('ml.estimate_memory_usage', opts),
|
estimate_memory_usage: lazyLoad('ml.estimate_memory_usage', opts),
|
||||||
estimateMemoryUsage: lazyLoad('ml.estimate_memory_usage', opts),
|
estimateMemoryUsage: lazyLoad('ml.estimate_memory_usage', opts),
|
||||||
evaluate_data_frame: lazyLoad('ml.evaluate_data_frame', opts),
|
evaluate_data_frame: lazyLoad('ml.evaluate_data_frame', opts),
|
||||||
@ -331,6 +333,10 @@ function ESAPI (opts) {
|
|||||||
getOverallBuckets: lazyLoad('ml.get_overall_buckets', opts),
|
getOverallBuckets: lazyLoad('ml.get_overall_buckets', opts),
|
||||||
get_records: lazyLoad('ml.get_records', opts),
|
get_records: lazyLoad('ml.get_records', opts),
|
||||||
getRecords: lazyLoad('ml.get_records', opts),
|
getRecords: lazyLoad('ml.get_records', opts),
|
||||||
|
get_trained_models: lazyLoad('ml.get_trained_models', opts),
|
||||||
|
getTrainedModels: lazyLoad('ml.get_trained_models', opts),
|
||||||
|
get_trained_models_stats: lazyLoad('ml.get_trained_models_stats', opts),
|
||||||
|
getTrainedModelsStats: lazyLoad('ml.get_trained_models_stats', opts),
|
||||||
info: lazyLoad('ml.info', opts),
|
info: lazyLoad('ml.info', opts),
|
||||||
open_job: lazyLoad('ml.open_job', opts),
|
open_job: lazyLoad('ml.open_job', opts),
|
||||||
openJob: lazyLoad('ml.open_job', opts),
|
openJob: lazyLoad('ml.open_job', opts),
|
||||||
|
|||||||
25
api/requestParams.d.ts
vendored
25
api/requestParams.d.ts
vendored
@ -579,7 +579,6 @@ export interface IndicesClose extends Generic {
|
|||||||
|
|
||||||
export interface IndicesCreate<T = any> extends Generic {
|
export interface IndicesCreate<T = any> extends Generic {
|
||||||
index: string;
|
index: string;
|
||||||
include_type_name?: boolean;
|
|
||||||
wait_for_active_shards?: string;
|
wait_for_active_shards?: string;
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
@ -671,7 +670,6 @@ export interface IndicesForcemerge extends Generic {
|
|||||||
|
|
||||||
export interface IndicesGet extends Generic {
|
export interface IndicesGet extends Generic {
|
||||||
index: string | string[];
|
index: string | string[];
|
||||||
include_type_name?: boolean;
|
|
||||||
local?: boolean;
|
local?: boolean;
|
||||||
ignore_unavailable?: boolean;
|
ignore_unavailable?: boolean;
|
||||||
allow_no_indices?: boolean;
|
allow_no_indices?: boolean;
|
||||||
@ -693,7 +691,6 @@ export interface IndicesGetAlias extends Generic {
|
|||||||
export interface IndicesGetFieldMapping extends Generic {
|
export interface IndicesGetFieldMapping extends Generic {
|
||||||
fields: string | string[];
|
fields: string | string[];
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
include_type_name?: boolean;
|
|
||||||
include_defaults?: boolean;
|
include_defaults?: boolean;
|
||||||
ignore_unavailable?: boolean;
|
ignore_unavailable?: boolean;
|
||||||
allow_no_indices?: boolean;
|
allow_no_indices?: boolean;
|
||||||
@ -724,7 +721,6 @@ export interface IndicesGetSettings extends Generic {
|
|||||||
|
|
||||||
export interface IndicesGetTemplate extends Generic {
|
export interface IndicesGetTemplate extends Generic {
|
||||||
name?: string | string[];
|
name?: string | string[];
|
||||||
include_type_name?: boolean;
|
|
||||||
flat_settings?: boolean;
|
flat_settings?: boolean;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
local?: boolean;
|
local?: boolean;
|
||||||
@ -779,7 +775,6 @@ export interface IndicesPutSettings<T = any> extends Generic {
|
|||||||
|
|
||||||
export interface IndicesPutTemplate<T = any> extends Generic {
|
export interface IndicesPutTemplate<T = any> extends Generic {
|
||||||
name: string;
|
name: string;
|
||||||
include_type_name?: boolean;
|
|
||||||
order?: number;
|
order?: number;
|
||||||
create?: boolean;
|
create?: boolean;
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
@ -804,7 +799,6 @@ export interface IndicesRefresh extends Generic {
|
|||||||
export interface IndicesRollover<T = any> extends Generic {
|
export interface IndicesRollover<T = any> extends Generic {
|
||||||
alias: string;
|
alias: string;
|
||||||
new_index?: string;
|
new_index?: string;
|
||||||
include_type_name?: boolean;
|
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
dry_run?: boolean;
|
dry_run?: boolean;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
@ -1612,6 +1606,10 @@ export interface MlDeleteModelSnapshot extends Generic {
|
|||||||
snapshot_id: string;
|
snapshot_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MlDeleteTrainedModel extends Generic {
|
||||||
|
model_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MlEstimateMemoryUsage<T = any> extends Generic {
|
export interface MlEstimateMemoryUsage<T = any> extends Generic {
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
@ -1783,6 +1781,21 @@ export interface MlGetRecords<T = any> extends Generic {
|
|||||||
body?: T;
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MlGetTrainedModels extends Generic {
|
||||||
|
model_id?: string;
|
||||||
|
allow_no_match?: boolean;
|
||||||
|
include_model_definition?: boolean;
|
||||||
|
from?: number;
|
||||||
|
size?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MlGetTrainedModelsStats extends Generic {
|
||||||
|
model_id?: string;
|
||||||
|
allow_no_match?: boolean;
|
||||||
|
from?: number;
|
||||||
|
size?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MlInfo extends Generic {
|
export interface MlInfo extends Generic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2296,7 +2296,6 @@ _Default:_ `open`
|
|||||||
----
|
----
|
||||||
client.indices.create({
|
client.indices.create({
|
||||||
index: string,
|
index: string,
|
||||||
include_type_name: boolean,
|
|
||||||
wait_for_active_shards: string,
|
wait_for_active_shards: string,
|
||||||
timeout: string,
|
timeout: string,
|
||||||
master_timeout: string,
|
master_timeout: string,
|
||||||
@ -2309,9 +2308,6 @@ link:{ref}/indices-create-index.html[Reference]
|
|||||||
|`index`
|
|`index`
|
||||||
|`string` - The name of the index
|
|`string` - The name of the index
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether a type should be expected in the body of the mappings.
|
|
||||||
|
|
||||||
|`wait_for_active_shards` or `waitForActiveShards`
|
|`wait_for_active_shards` or `waitForActiveShards`
|
||||||
|`string` - Set the number of active shards to wait for before the operation returns.
|
|`string` - Set the number of active shards to wait for before the operation returns.
|
||||||
|
|
||||||
@ -2671,7 +2667,6 @@ _Default:_ `open`
|
|||||||
----
|
----
|
||||||
client.indices.get({
|
client.indices.get({
|
||||||
index: string | string[],
|
index: string | string[],
|
||||||
include_type_name: boolean,
|
|
||||||
local: boolean,
|
local: boolean,
|
||||||
ignore_unavailable: boolean,
|
ignore_unavailable: boolean,
|
||||||
allow_no_indices: boolean,
|
allow_no_indices: boolean,
|
||||||
@ -2687,9 +2682,6 @@ link:{ref}/indices-get-index.html[Reference]
|
|||||||
|`index`
|
|`index`
|
||||||
|`string \| string[]` - A comma-separated list of index names
|
|`string \| string[]` - A comma-separated list of index names
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether to add the type name to the response (default: false)
|
|
||||||
|
|
||||||
|`local`
|
|`local`
|
||||||
|`boolean` - Return local information, do not retrieve the state from master node (default: false)
|
|`boolean` - Return local information, do not retrieve the state from master node (default: false)
|
||||||
|
|
||||||
@ -2758,7 +2750,6 @@ _Default:_ `all`
|
|||||||
client.indices.getFieldMapping({
|
client.indices.getFieldMapping({
|
||||||
fields: string | string[],
|
fields: string | string[],
|
||||||
index: string | string[],
|
index: string | string[],
|
||||||
include_type_name: boolean,
|
|
||||||
include_defaults: boolean,
|
include_defaults: boolean,
|
||||||
ignore_unavailable: boolean,
|
ignore_unavailable: boolean,
|
||||||
allow_no_indices: boolean,
|
allow_no_indices: boolean,
|
||||||
@ -2775,9 +2766,6 @@ link:{ref}/indices-get-field-mapping.html[Reference]
|
|||||||
|`index`
|
|`index`
|
||||||
|`string \| string[]` - A comma-separated list of index names
|
|`string \| string[]` - A comma-separated list of index names
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether a type should be returned in the body of the mappings.
|
|
||||||
|
|
||||||
|`include_defaults` or `includeDefaults`
|
|`include_defaults` or `includeDefaults`
|
||||||
|`boolean` - Whether the default mapping values should be returned as well
|
|`boolean` - Whether the default mapping values should be returned as well
|
||||||
|
|
||||||
@ -2888,7 +2876,6 @@ _Default:_ `open,closed`
|
|||||||
----
|
----
|
||||||
client.indices.getTemplate({
|
client.indices.getTemplate({
|
||||||
name: string | string[],
|
name: string | string[],
|
||||||
include_type_name: boolean,
|
|
||||||
flat_settings: boolean,
|
flat_settings: boolean,
|
||||||
master_timeout: string,
|
master_timeout: string,
|
||||||
local: boolean
|
local: boolean
|
||||||
@ -2900,9 +2887,6 @@ link:{ref}/indices-templates.html[Reference]
|
|||||||
|`name`
|
|`name`
|
||||||
|`string \| string[]` - The comma separated names of the index templates
|
|`string \| string[]` - The comma separated names of the index templates
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether a type should be returned in the body of the mappings.
|
|
||||||
|
|
||||||
|`flat_settings` or `flatSettings`
|
|`flat_settings` or `flatSettings`
|
||||||
|`boolean` - Return settings in flat format (default: false)
|
|`boolean` - Return settings in flat format (default: false)
|
||||||
|
|
||||||
@ -3112,7 +3096,6 @@ _Default:_ `open`
|
|||||||
----
|
----
|
||||||
client.indices.putTemplate({
|
client.indices.putTemplate({
|
||||||
name: string,
|
name: string,
|
||||||
include_type_name: boolean,
|
|
||||||
order: number,
|
order: number,
|
||||||
create: boolean,
|
create: boolean,
|
||||||
timeout: string,
|
timeout: string,
|
||||||
@ -3127,9 +3110,6 @@ link:{ref}/indices-templates.html[Reference]
|
|||||||
|`name`
|
|`name`
|
||||||
|`string` - The name of the template
|
|`string` - The name of the template
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether a type should be returned in the body of the mappings.
|
|
||||||
|
|
||||||
|`order`
|
|`order`
|
||||||
|`number` - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
|
|`number` - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
|
||||||
|
|
||||||
@ -3210,7 +3190,6 @@ _Default:_ `open`
|
|||||||
client.indices.rollover({
|
client.indices.rollover({
|
||||||
alias: string,
|
alias: string,
|
||||||
new_index: string,
|
new_index: string,
|
||||||
include_type_name: boolean,
|
|
||||||
timeout: string,
|
timeout: string,
|
||||||
dry_run: boolean,
|
dry_run: boolean,
|
||||||
master_timeout: string,
|
master_timeout: string,
|
||||||
@ -3227,9 +3206,6 @@ link:{ref}/indices-rollover-index.html[Reference]
|
|||||||
|`new_index` or `newIndex`
|
|`new_index` or `newIndex`
|
||||||
|`string` - The name of the rollover index
|
|`string` - The name of the rollover index
|
||||||
|
|
||||||
|`include_type_name` or `includeTypeName`
|
|
||||||
|`boolean` - Whether a type should be included in the body of the mappings.
|
|
||||||
|
|
||||||
|`timeout`
|
|`timeout`
|
||||||
|`string` - Explicit operation timeout
|
|`string` - Explicit operation timeout
|
||||||
|
|
||||||
@ -6425,6 +6401,22 @@ link:{ref}/ml-delete-snapshot.html[Reference]
|
|||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
=== ml.deleteTrainedModel
|
||||||
|
*Stability:* experimental
|
||||||
|
[source,ts]
|
||||||
|
----
|
||||||
|
client.ml.deleteTrainedModel({
|
||||||
|
model_id: string
|
||||||
|
})
|
||||||
|
----
|
||||||
|
link:TODO[Reference]
|
||||||
|
[cols=2*]
|
||||||
|
|===
|
||||||
|
|`model_id` or `modelId`
|
||||||
|
|`string` - The ID of the trained model to delete
|
||||||
|
|
||||||
|
|===
|
||||||
|
|
||||||
=== ml.estimateMemoryUsage
|
=== ml.estimateMemoryUsage
|
||||||
*Stability:* experimental
|
*Stability:* experimental
|
||||||
[source,ts]
|
[source,ts]
|
||||||
@ -7112,6 +7104,70 @@ link:{ref}/ml-get-record.html[Reference]
|
|||||||
|
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
=== ml.getTrainedModels
|
||||||
|
*Stability:* experimental
|
||||||
|
[source,ts]
|
||||||
|
----
|
||||||
|
client.ml.getTrainedModels({
|
||||||
|
model_id: string,
|
||||||
|
allow_no_match: boolean,
|
||||||
|
include_model_definition: boolean,
|
||||||
|
from: number,
|
||||||
|
size: number
|
||||||
|
})
|
||||||
|
----
|
||||||
|
link:TODO[Reference]
|
||||||
|
[cols=2*]
|
||||||
|
|===
|
||||||
|
|`model_id` or `modelId`
|
||||||
|
|`string` - The ID of the trained models to fetch
|
||||||
|
|
||||||
|
|`allow_no_match` or `allowNoMatch`
|
||||||
|
|`boolean` - Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) +
|
||||||
|
_Default:_ `true`
|
||||||
|
|
||||||
|
|`include_model_definition` or `includeModelDefinition`
|
||||||
|
|`boolean` - Should the full model definition be included in the results. These definitions can be large
|
||||||
|
|
||||||
|
|`from`
|
||||||
|
|`number` - skips a number of trained models
|
||||||
|
|
||||||
|
|`size`
|
||||||
|
|`number` - specifies a max number of trained models to get +
|
||||||
|
_Default:_ `100`
|
||||||
|
|
||||||
|
|===
|
||||||
|
|
||||||
|
=== ml.getTrainedModelsStats
|
||||||
|
*Stability:* experimental
|
||||||
|
[source,ts]
|
||||||
|
----
|
||||||
|
client.ml.getTrainedModelsStats({
|
||||||
|
model_id: string,
|
||||||
|
allow_no_match: boolean,
|
||||||
|
from: number,
|
||||||
|
size: number
|
||||||
|
})
|
||||||
|
----
|
||||||
|
link:TODO[Reference]
|
||||||
|
[cols=2*]
|
||||||
|
|===
|
||||||
|
|`model_id` or `modelId`
|
||||||
|
|`string` - The ID of the trained models stats to fetch
|
||||||
|
|
||||||
|
|`allow_no_match` or `allowNoMatch`
|
||||||
|
|`boolean` - Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) +
|
||||||
|
_Default:_ `true`
|
||||||
|
|
||||||
|
|`from`
|
||||||
|
|`number` - skips a number of trained models
|
||||||
|
|
||||||
|
|`size`
|
||||||
|
|`number` - specifies a max number of trained models to get +
|
||||||
|
_Default:_ `100`
|
||||||
|
|
||||||
|
|===
|
||||||
|
|
||||||
=== ml.info
|
=== ml.info
|
||||||
|
|
||||||
[source,ts]
|
[source,ts]
|
||||||
|
|||||||
6
index.d.ts
vendored
6
index.d.ts
vendored
@ -390,6 +390,8 @@ declare class Client extends EventEmitter {
|
|||||||
deleteJob: ApiMethod<RequestParams.MlDeleteJob>
|
deleteJob: ApiMethod<RequestParams.MlDeleteJob>
|
||||||
delete_model_snapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
delete_model_snapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
||||||
deleteModelSnapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
deleteModelSnapshot: ApiMethod<RequestParams.MlDeleteModelSnapshot>
|
||||||
|
delete_trained_model: ApiMethod<RequestParams.MlDeleteTrainedModel>
|
||||||
|
deleteTrainedModel: ApiMethod<RequestParams.MlDeleteTrainedModel>
|
||||||
estimate_memory_usage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
estimate_memory_usage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
||||||
estimateMemoryUsage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
estimateMemoryUsage: ApiMethod<RequestParams.MlEstimateMemoryUsage>
|
||||||
evaluate_data_frame: ApiMethod<RequestParams.MlEvaluateDataFrame>
|
evaluate_data_frame: ApiMethod<RequestParams.MlEvaluateDataFrame>
|
||||||
@ -429,6 +431,10 @@ declare class Client extends EventEmitter {
|
|||||||
getOverallBuckets: ApiMethod<RequestParams.MlGetOverallBuckets>
|
getOverallBuckets: ApiMethod<RequestParams.MlGetOverallBuckets>
|
||||||
get_records: ApiMethod<RequestParams.MlGetRecords>
|
get_records: ApiMethod<RequestParams.MlGetRecords>
|
||||||
getRecords: ApiMethod<RequestParams.MlGetRecords>
|
getRecords: ApiMethod<RequestParams.MlGetRecords>
|
||||||
|
get_trained_models: ApiMethod<RequestParams.MlGetTrainedModels>
|
||||||
|
getTrainedModels: ApiMethod<RequestParams.MlGetTrainedModels>
|
||||||
|
get_trained_models_stats: ApiMethod<RequestParams.MlGetTrainedModelsStats>
|
||||||
|
getTrainedModelsStats: ApiMethod<RequestParams.MlGetTrainedModelsStats>
|
||||||
info: ApiMethod<RequestParams.MlInfo>
|
info: ApiMethod<RequestParams.MlInfo>
|
||||||
open_job: ApiMethod<RequestParams.MlOpenJob>
|
open_job: ApiMethod<RequestParams.MlOpenJob>
|
||||||
openJob: ApiMethod<RequestParams.MlOpenJob>
|
openJob: ApiMethod<RequestParams.MlOpenJob>
|
||||||
|
|||||||
Reference in New Issue
Block a user