From 6d50c9fa306a74fa735c269efb34da0c03121886 Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 4 Mar 2020 09:19:06 +0100 Subject: [PATCH] API generation --- api/api/cat.ml_datafeeds.js | 2 +- api/api/cat.ml_jobs.js | 2 +- api/api/cat.ml_trained_models.js | 2 +- api/api/ml.put_datafeed.js | 10 +++++++-- api/api/ml.update_datafeed.js | 10 +++++++-- api/requestParams.d.ts | 8 +++++++ docs/reference.asciidoc | 38 +++++++++++++++++++++++++++++--- 7 files changed, 62 insertions(+), 10 deletions(-) diff --git a/api/api/cat.ml_datafeeds.js b/api/api/cat.ml_datafeeds.js index b727192eb..879a9c9db 100644 --- a/api/api/cat.ml_datafeeds.js +++ b/api/api/cat.ml_datafeeds.js @@ -28,7 +28,7 @@ function buildCatMlDatafeeds (opts) { /** * Perform a cat.ml_datafeeds request - * http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html + * http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html */ return function catMlDatafeeds (params, options, callback) { options = options || {} diff --git a/api/api/cat.ml_jobs.js b/api/api/cat.ml_jobs.js index fe145366e..26badad5d 100644 --- a/api/api/cat.ml_jobs.js +++ b/api/api/cat.ml_jobs.js @@ -29,7 +29,7 @@ function buildCatMlJobs (opts) { /** * Perform a cat.ml_jobs request - * http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html + * http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html */ return function catMlJobs (params, options, callback) { options = options || {} diff --git a/api/api/cat.ml_trained_models.js b/api/api/cat.ml_trained_models.js index b3a8e09e9..df66dfa32 100644 --- a/api/api/cat.ml_trained_models.js +++ b/api/api/cat.ml_trained_models.js @@ -31,7 +31,7 @@ function buildCatMlTrainedModels (opts) { /** * Perform a cat.ml_trained_models request - * https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html + * https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html */ return function catMlTrainedModels (params, options, callback) { options = options || {} diff --git a/api/api/ml.put_datafeed.js b/api/api/ml.put_datafeed.js index 9d71b897c..1ffef3ff0 100644 --- a/api/api/ml.put_datafeed.js +++ b/api/api/ml.put_datafeed.js @@ -12,11 +12,17 @@ function buildMlPutDatafeed (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - + 'ignore_unavailable', + 'allow_no_indices', + 'ignore_throttled', + 'expand_wildcards' ] const snakeCase = { - + ignoreUnavailable: 'ignore_unavailable', + allowNoIndices: 'allow_no_indices', + ignoreThrottled: 'ignore_throttled', + expandWildcards: 'expand_wildcards' } /** diff --git a/api/api/ml.update_datafeed.js b/api/api/ml.update_datafeed.js index 318a22be0..faac2d45b 100644 --- a/api/api/ml.update_datafeed.js +++ b/api/api/ml.update_datafeed.js @@ -12,11 +12,17 @@ function buildMlUpdateDatafeed (opts) { const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const acceptedQuerystring = [ - + 'ignore_unavailable', + 'allow_no_indices', + 'ignore_throttled', + 'expand_wildcards' ] const snakeCase = { - + ignoreUnavailable: 'ignore_unavailable', + allowNoIndices: 'allow_no_indices', + ignoreThrottled: 'ignore_throttled', + expandWildcards: 'expand_wildcards' } /** diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 9ed79e31a..0f7d7e07b 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1893,6 +1893,10 @@ export interface MlPutDataFrameAnalytics extends Generic { export interface MlPutDatafeed extends Generic { datafeed_id: string; + ignore_unavailable?: boolean; + allow_no_indices?: boolean; + ignore_throttled?: boolean; + expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; body: T; } @@ -1954,6 +1958,10 @@ export interface MlStopDatafeed extends Generic { export interface MlUpdateDatafeed extends Generic { datafeed_id: string; + ignore_unavailable?: boolean; + allow_no_indices?: boolean; + ignore_throttled?: boolean; + expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; body: T; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 04eac4be6..400cd8093 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -5370,7 +5370,7 @@ client.cat.mlDatafeeds({ v: boolean }) ---- -link:{ref}/ml-get-datafeed-stats.html[Documentation] + +link:{ref}/cat-datafeeds.html[Documentation] + [cols=2*] |=== |`datafeed_id` or `datafeedId` @@ -5415,7 +5415,7 @@ client.cat.mlJobs({ v: boolean }) ---- -link:{ref}/ml-get-job-stats.html[Documentation] + +link:{ref}/cat-anomaly-detectors.html[Documentation] + [cols=2*] |=== |`job_id` or `jobId` @@ -5465,7 +5465,7 @@ client.cat.mlTrainedModels({ v: boolean }) ---- -link:{ref}/get-inference-stats.html[Documentation] + +link:{ref}/cat-trained-model.html[Documentation] + [cols=2*] |=== |`model_id` or `modelId` @@ -7584,6 +7584,10 @@ link:{ref}/put-dfanalytics.html[Documentation] + ---- client.ml.putDatafeed({ datafeed_id: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + ignore_throttled: boolean, + expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all', body: object }) ---- @@ -7593,6 +7597,18 @@ link:{ref}/ml-put-datafeed.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeed to create +|`ignore_unavailable` or `ignoreUnavailable` +|`boolean` - Ignore unavailable indexes (default: false) + +|`allow_no_indices` or `allowNoIndices` +|`boolean` - Ignore if the source indices expressions resolves to no concrete indices (default: true) + +|`ignore_throttled` or `ignoreThrottled` +|`boolean` - Ignore indices that are marked as throttled (default: true) + +|`expand_wildcards` or `expandWildcards` +|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether source index expressions should get expanded to open or closed indices (default: open) + |`body` |`object` - The datafeed config @@ -7827,6 +7843,10 @@ link:{ref}/ml-stop-datafeed.html[Documentation] + ---- client.ml.updateDatafeed({ datafeed_id: string, + ignore_unavailable: boolean, + allow_no_indices: boolean, + ignore_throttled: boolean, + expand_wildcards: 'open' | 'closed' | 'hidden' | 'none' | 'all', body: object }) ---- @@ -7836,6 +7856,18 @@ link:{ref}/ml-update-datafeed.html[Documentation] + |`datafeed_id` or `datafeedId` |`string` - The ID of the datafeed to update +|`ignore_unavailable` or `ignoreUnavailable` +|`boolean` - Ignore unavailable indexes (default: false) + +|`allow_no_indices` or `allowNoIndices` +|`boolean` - Ignore if the source indices expressions resolves to no concrete indices (default: true) + +|`ignore_throttled` or `ignoreThrottled` +|`boolean` - Ignore indices that are marked as throttled (default: true) + +|`expand_wildcards` or `expandWildcards` +|`'open' \| 'closed' \| 'hidden' \| 'none' \| 'all'` - Whether source index expressions should get expanded to open or closed indices (default: open) + |`body` |`object` - The datafeed update settings