diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js index a060f3539..ed025087e 100644 --- a/api/api/clear_scroll.js +++ b/api/api/clear_scroll.js @@ -11,7 +11,7 @@ function buildClearScroll (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts /** - * Perform a [clear_scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll) request + * Perform a [clear_scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#search-request-scroll) request * * @param {list} scroll_id - A comma-separated list of scroll IDs to clear * @param {object} body - A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter diff --git a/api/api/data_frame.delete_data_frame_transform.js b/api/api/data_frame.delete_data_frame_transform.js index 6a1f582a2..dd33f4ec8 100644 --- a/api/api/data_frame.delete_data_frame_transform.js +++ b/api/api/data_frame.delete_data_frame_transform.js @@ -14,11 +14,10 @@ function buildDataFrameDeleteDataFrameTransform (opts) { * Perform a [data_frame.delete_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-data-frame-transform.html) request * * @param {string} transform_id - The id of the transform to delete - * @param {boolean} force - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. */ const acceptedQuerystring = [ - 'force' + ] const snakeCase = { diff --git a/api/api/data_frame.put_data_frame_transform.js b/api/api/data_frame.put_data_frame_transform.js index b8fe48800..ff34e6b23 100644 --- a/api/api/data_frame.put_data_frame_transform.js +++ b/api/api/data_frame.put_data_frame_transform.js @@ -14,16 +14,15 @@ function buildDataFramePutDataFrameTransform (opts) { * Perform a [data_frame.put_data_frame_transform](https://www.elastic.co/guide/en/elasticsearch/reference/current/put-data-frame-transform.html) request * * @param {string} transform_id - The id of the new transform. - * @param {boolean} defer_validation - If validations should be deferred until data frame transform starts, defaults to false. * @param {object} body - The data frame transform definition */ const acceptedQuerystring = [ - 'defer_validation' + ] const snakeCase = { - deferValidation: 'defer_validation' + } return function dataFramePutDataFrameTransform (params, options, callback) { diff --git a/api/api/indices.flush_synced.js b/api/api/indices.flush_synced.js index 1168477c3..4b47dd478 100644 --- a/api/api/indices.flush_synced.js +++ b/api/api/indices.flush_synced.js @@ -11,7 +11,7 @@ function buildIndicesFlushSynced (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts /** - * Perform a [indices.flush_synced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html#synced-flush-api) request + * Perform a [indices.flush_synced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request * * @param {list} index - A comma-separated list of index names; use `_all` or empty string for all indices * @param {boolean} ignore_unavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) diff --git a/api/api/scroll.js b/api/api/scroll.js index 09c35ac49..7c8ebe097 100644 --- a/api/api/scroll.js +++ b/api/api/scroll.js @@ -11,7 +11,7 @@ function buildScroll (opts) { // eslint-disable-next-line no-unused-vars const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts /** - * Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#request-body-search-scroll) request + * Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-body.html#search-request-scroll) request * * @param {string} scroll_id - The scroll ID * @param {time} scroll - Specify how long a consistent view of the index should be maintained for scrolled search diff --git a/api/api/slm.delete_lifecycle.js b/api/api/slm.delete_lifecycle.js deleted file mode 100644 index b3512bf58..000000000 --- a/api/api/slm.delete_lifecycle.js +++ /dev/null @@ -1,81 +0,0 @@ -// 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 buildSlmDeleteLifecycle (opts) { - // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts - /** - * Perform a [slm.delete_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html) request - * - * @param {string} policy - The id of the snapshot lifecycle policy to remove - */ - - const acceptedQuerystring = [ - - ] - - const snakeCase = { - - } - - return function slmDeleteLifecycle (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.body != null) { - const err = new ConfigurationError('This API does not require a body') - 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, policy, ...querystring } = params - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) - - if (method == null) { - method = 'DELETE' - } - - var ignore = options.ignore - if (typeof ignore === 'number') { - options.ignore = [ignore] - } - - var path = '' - - path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) - - // build request object - const request = { - method, - path, - body: '', - querystring - } - - options.warnings = warnings.length === 0 ? null : warnings - return makeRequest(request, options, callback) - } -} - -module.exports = buildSlmDeleteLifecycle diff --git a/api/api/slm.execute_lifecycle.js b/api/api/slm.execute_lifecycle.js deleted file mode 100644 index 6725d8f38..000000000 --- a/api/api/slm.execute_lifecycle.js +++ /dev/null @@ -1,81 +0,0 @@ -// 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 buildSlmExecuteLifecycle (opts) { - // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts - /** - * Perform a [slm.execute_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html) request - * - * @param {string} policy_id - The id of the snapshot lifecycle policy to be executed - */ - - const acceptedQuerystring = [ - - ] - - const snakeCase = { - - } - - return function slmExecuteLifecycle (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.body != null) { - const err = new ConfigurationError('This API does not require a body') - 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, policyId, policy_id, ...querystring } = params - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) - - if (method == null) { - method = 'PUT' - } - - var ignore = options.ignore - if (typeof ignore === 'number') { - options.ignore = [ignore] - } - - var path = '' - - path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute' - - // build request object - const request = { - method, - path, - body: '', - querystring - } - - options.warnings = warnings.length === 0 ? null : warnings - return makeRequest(request, options, callback) - } -} - -module.exports = buildSlmExecuteLifecycle diff --git a/api/api/slm.get_lifecycle.js b/api/api/slm.get_lifecycle.js deleted file mode 100644 index a5ccea5c9..000000000 --- a/api/api/slm.get_lifecycle.js +++ /dev/null @@ -1,85 +0,0 @@ -// 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 buildSlmGetLifecycle (opts) { - // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts - /** - * Perform a [slm.get_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html) request - * - * @param {string} policy_id - Comma-separated list of snapshot lifecycle policies to retrieve - */ - - const acceptedQuerystring = [ - - ] - - const snakeCase = { - - } - - return function slmGetLifecycle (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.body != null) { - const err = new ConfigurationError('This API does not require a body') - 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, policyId, policy_id, ...querystring } = params - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) - - if (method == null) { - method = 'GET' - } - - var ignore = options.ignore - if (typeof ignore === 'number') { - options.ignore = [ignore] - } - - var path = '' - - if ((policy_id || policyId) != null) { - path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) - } else { - path = '/' + '_slm' + '/' + 'policy' - } - - // build request object - const request = { - method, - path, - body: null, - querystring - } - - options.warnings = warnings.length === 0 ? null : warnings - return makeRequest(request, options, callback) - } -} - -module.exports = buildSlmGetLifecycle diff --git a/api/api/slm.put_lifecycle.js b/api/api/slm.put_lifecycle.js deleted file mode 100644 index f20a906a5..000000000 --- a/api/api/slm.put_lifecycle.js +++ /dev/null @@ -1,76 +0,0 @@ -// 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 buildSlmPutLifecycle (opts) { - // eslint-disable-next-line no-unused-vars - const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts - /** - * Perform a [slm.put_lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api.html) request - * - * @param {string} policy_id - The id of the snapshot lifecycle policy - * @param {object} body - The snapshot lifecycle policy definition to register - */ - - const acceptedQuerystring = [ - - ] - - const snakeCase = { - - } - - return function slmPutLifecycle (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, policyId, policy_id, ...querystring } = params - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings) - - if (method == null) { - method = 'PUT' - } - - var ignore = options.ignore - if (typeof ignore === 'number') { - options.ignore = [ignore] - } - - var path = '' - - path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) - - // build request object - const request = { - method, - path, - body: body || '', - querystring - } - - options.warnings = warnings.length === 0 ? null : warnings - return makeRequest(request, options, callback) - } -} - -module.exports = buildSlmPutLifecycle diff --git a/api/index.js b/api/index.js index 92ebd15a5..86752a00f 100644 --- a/api/index.js +++ b/api/index.js @@ -457,16 +457,6 @@ function ESAPI (opts) { put_user: lazyLoad('security.put_user', opts), putUser: lazyLoad('security.put_user', opts) }, - slm: { - delete_lifecycle: lazyLoad('slm.delete_lifecycle', opts), - deleteLifecycle: lazyLoad('slm.delete_lifecycle', opts), - execute_lifecycle: lazyLoad('slm.execute_lifecycle', opts), - executeLifecycle: lazyLoad('slm.execute_lifecycle', opts), - get_lifecycle: lazyLoad('slm.get_lifecycle', opts), - getLifecycle: lazyLoad('slm.get_lifecycle', opts), - put_lifecycle: lazyLoad('slm.put_lifecycle', opts), - putLifecycle: lazyLoad('slm.put_lifecycle', opts) - }, snapshot: { create: lazyLoad('snapshot.create', opts), create_repository: lazyLoad('snapshot.create_repository', opts), diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 3f5dacd74..d44881883 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1365,7 +1365,6 @@ export interface CcrUnfollow extends Generic { export interface DataFrameDeleteDataFrameTransform extends Generic { transform_id: string; - force?: boolean; } export interface DataFrameGetDataFrameTransform extends Generic { @@ -1388,7 +1387,6 @@ export interface DataFramePreviewDataFrameTransform extends Generic { export interface DataFramePutDataFrameTransform extends Generic { transform_id: string; - defer_validation?: boolean; body: T; } @@ -2028,23 +2026,6 @@ export interface SecurityPutUser extends Generic { body: T; } -export interface SlmDeleteLifecycle extends Generic { - policy?: string; -} - -export interface SlmExecuteLifecycle extends Generic { - policy_id?: string; -} - -export interface SlmGetLifecycle extends Generic { - policy_id?: string; -} - -export interface SlmPutLifecycle extends Generic { - policy_id?: string; - body?: T; -} - export interface SqlClearCursor extends Generic { body: T; } diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 9890e16ca..eb9b7c2a7 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -757,7 +757,7 @@ link:{ref}/cat-thread-pool.html[Reference] ---- client.clearScroll([params] [, options] [, callback]) ---- -link:{ref}/search-request-body.html#request-body-search-scroll[Reference] +link:{ref}/search-request-scroll.html[Reference] [cols=2*] |=== |`scroll_id` or `scrollId` @@ -1976,7 +1976,7 @@ _Default:_ `open` ---- client.indices.flushSynced([params] [, options] [, callback]) ---- -link:{ref}/indices-flush.html#synced-flush-api[Reference] +link:{ref}/indices-synced-flush.html[Reference] [cols=2*] |=== |`index` @@ -3305,7 +3305,7 @@ link:https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-exec ---- client.scroll([params] [, options] [, callback]) ---- -link:{ref}/search-request-body.html#request-body-search-scroll[Reference] +link:{ref}/search-request-scroll.html[Reference] [cols=2*] |=== |`scroll_id` or `scrollId` @@ -4251,9 +4251,6 @@ link:{ref}/delete-data-frame-transform.html[Reference] |`transform_id` or `transformId` |`string` - The id of the transform to delete -|`force` -|`boolean` - When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. - |=== === dataFrame.getDataFrameTransform @@ -4324,9 +4321,6 @@ link:{ref}/put-data-frame-transform.html[Reference] |`transform_id` or `transformId` |`string` - The id of the new transform. -|`defer_validation` or `deferValidation` -|`boolean` - If validations should be deferred until data frame transform starts, defaults to false. - |`body` |`object` - The data frame transform definition @@ -6316,61 +6310,6 @@ link:{ref}/security-api-put-user.html[Reference] |=== -=== slm.deleteLifecycle -[source,js] ----- -client.slm.deleteLifecycle([params] [, options] [, callback]) ----- -link:{ref}/slm-api.html[Reference] -[cols=2*] -|=== -|`policy` -|`string` - The id of the snapshot lifecycle policy to remove - -|=== - -=== slm.executeLifecycle -[source,js] ----- -client.slm.executeLifecycle([params] [, options] [, callback]) ----- -link:{ref}/slm-api.html[Reference] -[cols=2*] -|=== -|`policy_id` or `policyId` -|`string` - The id of the snapshot lifecycle policy to be executed - -|=== - -=== slm.getLifecycle -[source,js] ----- -client.slm.getLifecycle([params] [, options] [, callback]) ----- -link:{ref}/slm-api.html[Reference] -[cols=2*] -|=== -|`policy_id` or `policyId` -|`string` - Comma-separated list of snapshot lifecycle policies to retrieve - -|=== - -=== slm.putLifecycle -[source,js] ----- -client.slm.putLifecycle([params] [, options] [, callback]) ----- -link:{ref}/slm-api.html[Reference] -[cols=2*] -|=== -|`policy_id` or `policyId` -|`string` - The id of the snapshot lifecycle policy - -|`body` -|`object` - The snapshot lifecycle policy definition to register - -|=== - === sql.clearCursor [source,js] ---- diff --git a/index.d.ts b/index.d.ts index c747ae284..9610adfc0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -554,16 +554,6 @@ declare class Client extends EventEmitter { put_user: ApiMethod putUser: ApiMethod } - slm: { - delete_lifecycle: ApiMethod - deleteLifecycle: ApiMethod - execute_lifecycle: ApiMethod - executeLifecycle: ApiMethod - get_lifecycle: ApiMethod - getLifecycle: ApiMethod - put_lifecycle: ApiMethod - putLifecycle: ApiMethod - } snapshot: { create: ApiMethod create_repository: ApiMethod