From d6d7b5f14c4b035340125016a12578eb5c8d87cf Mon Sep 17 00:00:00 2001 From: delvedor Date: Fri, 16 Jul 2021 11:27:42 +0200 Subject: [PATCH] API generation --- api/api/ilm.js | 26 +++- api/api/ml.js | 28 ++++ api/api/security.js | 170 +++++++++++++++++++++++- api/api/snapshot.js | 32 ++++- api/api/sql.js | 90 ++++++++++++- api/requestParams.d.ts | 66 ++++++++++ docs/reference.asciidoc | 285 +++++++++++++++++++++++++++++++++++++++- index.d.ts | 96 ++++++++++++++ 8 files changed, 782 insertions(+), 11 deletions(-) diff --git a/api/api/ilm.js b/api/api/ilm.js index 9ded145c4..b108bbf91 100644 --- a/api/api/ilm.js +++ b/api/api/ilm.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors'] -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors' } +const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors', 'dry_run'] +const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors', dryRun: 'dry_run' } function IlmApi (transport, ConfigurationError) { this.transport = transport @@ -132,6 +132,27 @@ IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback return this.transport.request(request, options, callback) } +IlmApi.prototype.migrateToDataTiers = function ilmMigrateToDataTiersApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_ilm' + '/' + 'migrate_to_data_tiers' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -287,6 +308,7 @@ Object.defineProperties(IlmApi.prototype, { explain_lifecycle: { get () { return this.explainLifecycle } }, get_lifecycle: { get () { return this.getLifecycle } }, get_status: { get () { return this.getStatus } }, + migrate_to_data_tiers: { get () { return this.migrateToDataTiers } }, move_to_step: { get () { return this.moveToStep } }, put_lifecycle: { get () { return this.putLifecycle } }, remove_policy: { get () { return this.removePolicy } } diff --git a/api/api/ml.js b/api/api/ml.js index 46823e764..a803d633b 100644 --- a/api/api/ml.js +++ b/api/api/ml.js @@ -1493,6 +1493,33 @@ MlApi.prototype.putTrainedModelAlias = function mlPutTrainedModelAliasApi (param return this.transport.request(request, options, callback) } +MlApi.prototype.resetJob = function mlResetJobApi (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) + } + + let { method, body, jobId, job_id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_reset' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + MlApi.prototype.revertModelSnapshot = function mlRevertModelSnapshotApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -1964,6 +1991,7 @@ Object.defineProperties(MlApi.prototype, { put_job: { get () { return this.putJob } }, put_trained_model: { get () { return this.putTrainedModel } }, put_trained_model_alias: { get () { return this.putTrainedModelAlias } }, + reset_job: { get () { return this.resetJob } }, revert_model_snapshot: { get () { return this.revertModelSnapshot } }, set_upgrade_mode: { get () { return this.setUpgradeMode } }, start_data_frame_analytics: { get () { return this.startDataFrameAnalytics } }, diff --git a/api/api/security.js b/api/api/security.js index 96d775dc5..5908f7c13 100644 --- a/api/api/security.js +++ b/api/api/security.js @@ -1032,6 +1032,168 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca return this.transport.request(request, options, callback) } +SecurityApi.prototype.samlAuthenticate = function securitySamlAuthenticateApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.body == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'saml' + '/' + 'authenticate' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SecurityApi.prototype.samlCompleteLogout = function securitySamlCompleteLogoutApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.body == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'saml' + '/' + 'complete_logout' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SecurityApi.prototype.samlInvalidate = function securitySamlInvalidateApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.body == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'saml' + '/' + 'invalidate' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SecurityApi.prototype.samlLogout = function securitySamlLogoutApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.body == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'saml' + '/' + 'logout' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SecurityApi.prototype.samlPrepareAuthentication = function securitySamlPrepareAuthenticationApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.body == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + let { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'saml' + '/' + 'prepare' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SecurityApi.prototype.samlServiceProviderMetadata = function securitySamlServiceProviderMetadataApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.realm_name == null && params.realmName == null) { + const err = new this[kConfigurationError]('Missing required parameter: realm_name or realmName') + return handleError(err, callback) + } + + let { method, body, realmName, realm_name, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'GET' + path = '/' + '_security' + '/' + 'saml' + '/' + 'metadata' + '/' + encodeURIComponent(realm_name || realmName) + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + return this.transport.request(request, options, callback) +} + Object.defineProperties(SecurityApi.prototype, { change_password: { get () { return this.changePassword } }, clear_api_key_cache: { get () { return this.clearApiKeyCache } }, @@ -1065,7 +1227,13 @@ Object.defineProperties(SecurityApi.prototype, { put_privileges: { get () { return this.putPrivileges } }, put_role: { get () { return this.putRole } }, put_role_mapping: { get () { return this.putRoleMapping } }, - put_user: { get () { return this.putUser } } + put_user: { get () { return this.putUser } }, + saml_authenticate: { get () { return this.samlAuthenticate } }, + saml_complete_logout: { get () { return this.samlCompleteLogout } }, + saml_invalidate: { get () { return this.samlInvalidate } }, + saml_logout: { get () { return this.samlLogout } }, + saml_prepare_authentication: { get () { return this.samlPrepareAuthentication } }, + saml_service_provider_metadata: { get () { return this.samlServiceProviderMetadata } } }) module.exports = SecurityApi diff --git a/api/api/snapshot.js b/api/api/snapshot.js index 911d13f2d..3028779fd 100644 --- a/api/api/snapshot.js +++ b/api/api/snapshot.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'index_details', 'verbose', 'local'] -const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable', indexDetails: 'index_details' } +const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'index_details', 'include_repository', 'verbose', 'local', 'blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'detailed', 'rarely_abort_writes'] +const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable', indexDetails: 'index_details', includeRepository: 'include_repository', blobCount: 'blob_count', readNodeCount: 'read_node_count', earlyReadNodeCount: 'early_read_node_count', rareActionProbability: 'rare_action_probability', maxBlobSize: 'max_blob_size', maxTotalDataSize: 'max_total_data_size', rarelyAbortWrites: 'rarely_abort_writes' } function SnapshotApi (transport, ConfigurationError) { this.transport = transport @@ -301,6 +301,33 @@ SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, return this.transport.request(request, options, callback) } +SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.repository == null) { + const err = new this[kConfigurationError]('Missing required parameter: repository') + return handleError(err, callback) + } + + let { method, body, repository, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'POST' + path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_analyze' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -405,6 +432,7 @@ Object.defineProperties(SnapshotApi.prototype, { create_repository: { get () { return this.createRepository } }, delete_repository: { get () { return this.deleteRepository } }, get_repository: { get () { return this.getRepository } }, + repository_analyze: { get () { return this.repositoryAnalyze } }, verify_repository: { get () { return this.verifyRepository } } }) diff --git a/api/api/sql.js b/api/api/sql.js index 543a8011a..be7c56938 100644 --- a/api/api/sql.js +++ b/api/api/sql.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'format'] -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' } +const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'delimiter', 'format', 'keep_alive', 'wait_for_completion_timeout'] +const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', keepAlive: 'keep_alive', waitForCompletionTimeout: 'wait_for_completion_timeout' } function SqlApi (transport, ConfigurationError) { this.transport = transport @@ -58,6 +58,87 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call return this.transport.request(request, options, callback) } +SqlApi.prototype.deleteAsync = function sqlDeleteAsyncApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.id == null) { + const err = new this[kConfigurationError]('Missing required parameter: id') + return handleError(err, callback) + } + + let { method, body, id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'DELETE' + path = '/' + '_sql' + '/' + 'async' + '/' + 'delete' + '/' + encodeURIComponent(id) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + +SqlApi.prototype.getAsync = function sqlGetAsyncApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.id == null) { + const err = new this[kConfigurationError]('Missing required parameter: id') + return handleError(err, callback) + } + + let { method, body, id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'GET' + path = '/' + '_sql' + '/' + 'async' + '/' + encodeURIComponent(id) + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + return this.transport.request(request, options, callback) +} + +SqlApi.prototype.getAsyncStatus = function sqlGetAsyncStatusApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params.id == null) { + const err = new this[kConfigurationError]('Missing required parameter: id') + return handleError(err, callback) + } + + let { method, body, id, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + let path = '' + if (method == null) method = 'GET' + path = '/' + '_sql' + '/' + 'async' + '/' + 'status' + '/' + encodeURIComponent(id) + + // build request object + const request = { + method, + path, + body: null, + querystring + } + + return this.transport.request(request, options, callback) +} + SqlApi.prototype.query = function sqlQueryApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -113,7 +194,10 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback } Object.defineProperties(SqlApi.prototype, { - clear_cursor: { get () { return this.clearCursor } } + clear_cursor: { get () { return this.clearCursor } }, + delete_async: { get () { return this.deleteAsync } }, + get_async: { get () { return this.getAsync } }, + get_async_status: { get () { return this.getAsyncStatus } } }) module.exports = SqlApi diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 57a8a6d41..9ab796748 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -897,6 +897,11 @@ export interface IlmGetLifecycle extends Generic { export interface IlmGetStatus extends Generic { } +export interface IlmMigrateToDataTiers extends Generic { + dry_run?: boolean; + body?: T; +} + export interface IlmMoveToStep extends Generic { index: string; body?: T; @@ -1856,6 +1861,11 @@ export interface MlPutTrainedModelAlias extends Generic { reassign?: boolean; } +export interface MlResetJob extends Generic { + job_id: string; + wait_for_completion?: boolean; +} + export interface MlRevertModelSnapshot extends Generic { job_id: string; snapshot_id: string; @@ -2422,6 +2432,30 @@ export interface SecurityPutUser extends Generic { body: T; } +export interface SecuritySamlAuthenticate extends Generic { + body: T; +} + +export interface SecuritySamlCompleteLogout extends Generic { + body: T; +} + +export interface SecuritySamlInvalidate extends Generic { + body: T; +} + +export interface SecuritySamlLogout extends Generic { + body: T; +} + +export interface SecuritySamlPrepareAuthentication extends Generic { + body: T; +} + +export interface SecuritySamlServiceProviderMetadata extends Generic { + realm_name: string; +} + export interface ShutdownDeleteNode extends Generic { node_id: string; } @@ -2515,6 +2549,7 @@ export interface SnapshotGet extends Generic { master_timeout?: string; ignore_unavailable?: boolean; index_details?: boolean; + include_repository?: boolean; verbose?: boolean; } @@ -2524,6 +2559,21 @@ export interface SnapshotGetRepository extends Generic { local?: boolean; } +export interface SnapshotRepositoryAnalyze extends Generic { + repository: string; + blob_count?: number; + concurrency?: number; + read_node_count?: number; + early_read_node_count?: number; + seed?: number; + rare_action_probability?: number; + max_blob_size?: string; + max_total_data_size?: string; + timeout?: string; + detailed?: boolean; + rarely_abort_writes?: boolean; +} + export interface SnapshotRestore extends Generic { repository: string; snapshot: string; @@ -2549,6 +2599,22 @@ export interface SqlClearCursor extends Generic { body: T; } +export interface SqlDeleteAsync extends Generic { + id: string; +} + +export interface SqlGetAsync extends Generic { + id: string; + delimiter?: string; + format?: string; + keep_alive?: string; + wait_for_completion_timeout?: string; +} + +export interface SqlGetAsyncStatus extends Generic { + id: string; +} + export interface SqlQuery extends Generic { format?: string; body: T; diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 28592627d..fe9418885 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -3648,6 +3648,27 @@ client.ilm.getStatus() link:{ref}/ilm-get-status.html[Documentation] + +[discrete] +=== ilm.migrateToDataTiers + +[source,ts] +---- +client.ilm.migrateToDataTiers({ + dry_run: boolean, + body: object +}) +---- +link:{ref}/ilm-migrate-to-data-tiers.html[Documentation] + +[cols=2*] +|=== +|`dry_run` or `dryRun` +|`boolean` - If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false + +|`body` +|`object` - Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") + +|=== + [discrete] === ilm.moveToStep @@ -7655,6 +7676,28 @@ link:{ref}/put-trained-models-aliases.html[Documentation] + |=== +[discrete] +=== ml.resetJob + +[source,ts] +---- +client.ml.resetJob({ + job_id: string, + wait_for_completion: boolean +}) +---- +link:{ref}/ml-reset-job.html[Documentation] + +[cols=2*] +|=== +|`job_id` or `jobId` +|`string` - The ID of the job to reset + +|`wait_for_completion` or `waitForCompletion` +|`boolean` - Should this request wait until the operation has completed before returning + +_Default:_ `true` + +|=== + [discrete] === ml.revertModelSnapshot @@ -8623,7 +8666,7 @@ client.renderSearchTemplate({ body: object }) ---- -link:{ref}/search-template.html#_validating_templates[Documentation] + +link:{ref}/render-search-template-api.html[Documentation] + [cols=2*] |=== |`id` @@ -8725,7 +8768,7 @@ link:{ref}/rollup-put-job.html[Documentation] + [discrete] === rollup.rollup - +*Stability:* experimental [source,ts] ---- client.rollup.rollup({ @@ -8734,7 +8777,7 @@ client.rollup.rollup({ body: object }) ---- -link:{ref}/rollup-api.html[Documentation] + +link:{ref}/xpack-rollup.html[Documentation] + [cols=2*] |=== |`index` @@ -10020,6 +10063,108 @@ link:{ref}/security-api-put-user.html[Documentation] + |=== +[discrete] +=== security.samlAuthenticate + +[source,ts] +---- +client.security.samlAuthenticate({ + body: object +}) +---- +link:{ref}/security-api-saml-authenticate.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - The SAML response to authenticate + +|=== + +[discrete] +=== security.samlCompleteLogout + +[source,ts] +---- +client.security.samlCompleteLogout({ + body: object +}) +---- +link:{ref}/security-api-saml-complete-logout.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - The logout response to verify + +|=== + +[discrete] +=== security.samlInvalidate + +[source,ts] +---- +client.security.samlInvalidate({ + body: object +}) +---- +link:{ref}/security-api-saml-invalidate.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - The LogoutRequest message + +|=== + +[discrete] +=== security.samlLogout + +[source,ts] +---- +client.security.samlLogout({ + body: object +}) +---- +link:{ref}/security-api-saml-logout.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - The tokens to invalidate + +|=== + +[discrete] +=== security.samlPrepareAuthentication + +[source,ts] +---- +client.security.samlPrepareAuthentication({ + body: object +}) +---- +link:{ref}/security-api-saml-prepare-authentication.html[Documentation] + +[cols=2*] +|=== +|`body` +|`object` - The realm for which to create the authentication request, identified by either its name or the ACS URL + +|=== + +[discrete] +=== security.samlServiceProviderMetadata + +[source,ts] +---- +client.security.samlServiceProviderMetadata({ + realm_name: string +}) +---- +link:{ref}/security-api-saml-sp-metadata.html[Documentation] + +[cols=2*] +|=== +|`realm_name` or `realmName` +|`string` - The name of the SAML realm to get the metadata for + +|=== + [discrete] === shutdown.deleteNode *Stability:* experimental @@ -10382,6 +10527,7 @@ client.snapshot.get({ master_timeout: string, ignore_unavailable: boolean, index_details: boolean, + include_repository: boolean, verbose: boolean }) ---- @@ -10403,6 +10549,9 @@ link:{ref}/modules-snapshots.html[Documentation] + |`index_details` or `indexDetails` |`boolean` - Whether to include details of each index in the snapshot, if those details are available. Defaults to false. +|`include_repository` or `includeRepository` +|`boolean` - Whether to include the repository name in the snapshot info. Defaults to true. + |`verbose` |`boolean` - Whether to show verbose snapshot info or only show the basic info found in the repository index blob @@ -10433,6 +10582,67 @@ link:{ref}/modules-snapshots.html[Documentation] + |=== +[discrete] +=== snapshot.repositoryAnalyze + +[source,ts] +---- +client.snapshot.repositoryAnalyze({ + repository: string, + blob_count: number, + concurrency: number, + read_node_count: number, + early_read_node_count: number, + seed: number, + rare_action_probability: number, + max_blob_size: string, + max_total_data_size: string, + timeout: string, + detailed: boolean, + rarely_abort_writes: boolean +}) +---- +link:{ref}/modules-snapshots.html[Documentation] + +[cols=2*] +|=== +|`repository` +|`string` - A repository name + +|`blob_count` or `blobCount` +|`number` - Number of blobs to create during the test. Defaults to 100. + +|`concurrency` +|`number` - Number of operations to run concurrently during the test. Defaults to 10. + +|`read_node_count` or `readNodeCount` +|`number` - Number of nodes on which to read a blob after writing. Defaults to 10. + +|`early_read_node_count` or `earlyReadNodeCount` +|`number` - Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. + +|`seed` +|`number` - Seed for the random number generator used to create the test workload. Defaults to a random value. + +|`rare_action_probability` or `rareActionProbability` +|`number` - Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. + +|`max_blob_size` or `maxBlobSize` +|`string` - Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. + +|`max_total_data_size` or `maxTotalDataSize` +|`string` - Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. + +|`timeout` +|`string` - Explicit operation timeout. Defaults to '30s'. + +|`detailed` +|`boolean` - Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. + +|`rarely_abort_writes` or `rarelyAbortWrites` +|`boolean` - Whether to rarely abort writes before they complete. Defaults to 'true'. + +|=== + [discrete] === snapshot.restore @@ -10537,6 +10747,75 @@ link:{ref}/sql-pagination.html[Documentation] + |=== +[discrete] +=== sql.deleteAsync + +[source,ts] +---- +client.sql.deleteAsync({ + id: string +}) +---- +link:{ref}/delete-async-sql-search-api.html[Documentation] + +[cols=2*] +|=== +|`id` +|`string` - The async search ID + +|=== + +[discrete] +=== sql.getAsync + +[source,ts] +---- +client.sql.getAsync({ + id: string, + delimiter: string, + format: string, + keep_alive: string, + wait_for_completion_timeout: string +}) +---- +link:{ref}/get-async-sql-search-api.html[Documentation] + +[cols=2*] +|=== +|`id` +|`string` - The async search ID + +|`delimiter` +|`string` - Separator for CSV results + +_Default:_ `,` + +|`format` +|`string` - Short version of the Accept header, e.g. json, yaml + +|`keep_alive` or `keepAlive` +|`string` - Retention period for the search and its results + +_Default:_ `5d` + +|`wait_for_completion_timeout` or `waitForCompletionTimeout` +|`string` - Duration to wait for complete results + +|=== + +[discrete] +=== sql.getAsyncStatus + +[source,ts] +---- +client.sql.getAsyncStatus({ + id: string +}) +---- +link:{ref}/get-async-sql-search-status-api.html[Documentation] + +[cols=2*] +|=== +|`id` +|`string` - The async search ID + +|=== + [discrete] === sql.query diff --git a/index.d.ts b/index.d.ts index 0ff290303..986194404 100644 --- a/index.d.ts +++ b/index.d.ts @@ -833,6 +833,14 @@ declare class Client { getStatus, TContext = Context>(callback: callbackFn): TransportRequestCallback getStatus, TContext = Context>(params: RequestParams.IlmGetStatus, callback: callbackFn): TransportRequestCallback getStatus, TContext = Context>(params: RequestParams.IlmGetStatus, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + migrate_to_data_tiers, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IlmMigrateToDataTiers, options?: TransportRequestOptions): TransportRequestPromise> + migrate_to_data_tiers, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + migrate_to_data_tiers, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers, callback: callbackFn): TransportRequestCallback + migrate_to_data_tiers, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + migrateToDataTiers, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IlmMigrateToDataTiers, options?: TransportRequestOptions): TransportRequestPromise> + migrateToDataTiers, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + migrateToDataTiers, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers, callback: callbackFn): TransportRequestCallback + migrateToDataTiers, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback move_to_step, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.IlmMoveToStep, options?: TransportRequestOptions): TransportRequestPromise> move_to_step, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback move_to_step, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.IlmMoveToStep, callback: callbackFn): TransportRequestCallback @@ -1761,6 +1769,14 @@ declare class Client { putTrainedModelAlias, TContext = Context>(callback: callbackFn): TransportRequestCallback putTrainedModelAlias, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, callback: callbackFn): TransportRequestCallback putTrainedModelAlias, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + reset_job, TContext = Context>(params?: RequestParams.MlResetJob, options?: TransportRequestOptions): TransportRequestPromise> + reset_job, TContext = Context>(callback: callbackFn): TransportRequestCallback + reset_job, TContext = Context>(params: RequestParams.MlResetJob, callback: callbackFn): TransportRequestCallback + reset_job, TContext = Context>(params: RequestParams.MlResetJob, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + resetJob, TContext = Context>(params?: RequestParams.MlResetJob, options?: TransportRequestOptions): TransportRequestPromise> + resetJob, TContext = Context>(callback: callbackFn): TransportRequestCallback + resetJob, TContext = Context>(params: RequestParams.MlResetJob, callback: callbackFn): TransportRequestCallback + resetJob, TContext = Context>(params: RequestParams.MlResetJob, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback revert_model_snapshot, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.MlRevertModelSnapshot, options?: TransportRequestOptions): TransportRequestPromise> revert_model_snapshot, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback revert_model_snapshot, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.MlRevertModelSnapshot, callback: callbackFn): TransportRequestCallback @@ -2409,6 +2425,54 @@ declare class Client { putUser, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback putUser, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityPutUser, callback: callbackFn): TransportRequestCallback putUser, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityPutUser, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlAuthenticate, options?: TransportRequestOptions): TransportRequestPromise> + saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate, callback: callbackFn): TransportRequestCallback + saml_authenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlAuthenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlAuthenticate, options?: TransportRequestOptions): TransportRequestPromise> + samlAuthenticate, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlAuthenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate, callback: callbackFn): TransportRequestCallback + samlAuthenticate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_complete_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlCompleteLogout, options?: TransportRequestOptions): TransportRequestPromise> + saml_complete_logout, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_complete_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout, callback: callbackFn): TransportRequestCallback + saml_complete_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlCompleteLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlCompleteLogout, options?: TransportRequestOptions): TransportRequestPromise> + samlCompleteLogout, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlCompleteLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout, callback: callbackFn): TransportRequestCallback + samlCompleteLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_invalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlInvalidate, options?: TransportRequestOptions): TransportRequestPromise> + saml_invalidate, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_invalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlInvalidate, callback: callbackFn): TransportRequestCallback + saml_invalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlInvalidate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlInvalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlInvalidate, options?: TransportRequestOptions): TransportRequestPromise> + samlInvalidate, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlInvalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlInvalidate, callback: callbackFn): TransportRequestCallback + samlInvalidate, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlInvalidate, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlLogout, options?: TransportRequestOptions): TransportRequestPromise> + saml_logout, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlLogout, callback: callbackFn): TransportRequestCallback + saml_logout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlLogout, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlLogout, options?: TransportRequestOptions): TransportRequestPromise> + samlLogout, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlLogout, callback: callbackFn): TransportRequestCallback + samlLogout, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlLogout, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_prepare_authentication, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlPrepareAuthentication, options?: TransportRequestOptions): TransportRequestPromise> + saml_prepare_authentication, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_prepare_authentication, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication, callback: callbackFn): TransportRequestCallback + saml_prepare_authentication, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlPrepareAuthentication, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecuritySamlPrepareAuthentication, options?: TransportRequestOptions): TransportRequestPromise> + samlPrepareAuthentication, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlPrepareAuthentication, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication, callback: callbackFn): TransportRequestCallback + samlPrepareAuthentication, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + saml_service_provider_metadata, TContext = Context>(params?: RequestParams.SecuritySamlServiceProviderMetadata, options?: TransportRequestOptions): TransportRequestPromise> + saml_service_provider_metadata, TContext = Context>(callback: callbackFn): TransportRequestCallback + saml_service_provider_metadata, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, callback: callbackFn): TransportRequestCallback + saml_service_provider_metadata, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + samlServiceProviderMetadata, TContext = Context>(params?: RequestParams.SecuritySamlServiceProviderMetadata, options?: TransportRequestOptions): TransportRequestPromise> + samlServiceProviderMetadata, TContext = Context>(callback: callbackFn): TransportRequestCallback + samlServiceProviderMetadata, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, callback: callbackFn): TransportRequestCallback + samlServiceProviderMetadata, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback } shutdown: { delete_node, TContext = Context>(params?: RequestParams.ShutdownDeleteNode, options?: TransportRequestOptions): TransportRequestPromise> @@ -2551,6 +2615,14 @@ declare class Client { getRepository, TContext = Context>(callback: callbackFn): TransportRequestCallback getRepository, TContext = Context>(params: RequestParams.SnapshotGetRepository, callback: callbackFn): TransportRequestCallback getRepository, TContext = Context>(params: RequestParams.SnapshotGetRepository, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + repository_analyze, TContext = Context>(params?: RequestParams.SnapshotRepositoryAnalyze, options?: TransportRequestOptions): TransportRequestPromise> + repository_analyze, TContext = Context>(callback: callbackFn): TransportRequestCallback + repository_analyze, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, callback: callbackFn): TransportRequestCallback + repository_analyze, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + repositoryAnalyze, TContext = Context>(params?: RequestParams.SnapshotRepositoryAnalyze, options?: TransportRequestOptions): TransportRequestPromise> + repositoryAnalyze, TContext = Context>(callback: callbackFn): TransportRequestCallback + repositoryAnalyze, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, callback: callbackFn): TransportRequestCallback + repositoryAnalyze, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback restore, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotRestore, options?: TransportRequestOptions): TransportRequestPromise> restore, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback restore, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SnapshotRestore, callback: callbackFn): TransportRequestCallback @@ -2577,6 +2649,30 @@ declare class Client { clearCursor, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback clearCursor, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SqlClearCursor, callback: callbackFn): TransportRequestCallback clearCursor, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SqlClearCursor, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + delete_async, TContext = Context>(params?: RequestParams.SqlDeleteAsync, options?: TransportRequestOptions): TransportRequestPromise> + delete_async, TContext = Context>(callback: callbackFn): TransportRequestCallback + delete_async, TContext = Context>(params: RequestParams.SqlDeleteAsync, callback: callbackFn): TransportRequestCallback + delete_async, TContext = Context>(params: RequestParams.SqlDeleteAsync, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + deleteAsync, TContext = Context>(params?: RequestParams.SqlDeleteAsync, options?: TransportRequestOptions): TransportRequestPromise> + deleteAsync, TContext = Context>(callback: callbackFn): TransportRequestCallback + deleteAsync, TContext = Context>(params: RequestParams.SqlDeleteAsync, callback: callbackFn): TransportRequestCallback + deleteAsync, TContext = Context>(params: RequestParams.SqlDeleteAsync, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + get_async, TContext = Context>(params?: RequestParams.SqlGetAsync, options?: TransportRequestOptions): TransportRequestPromise> + get_async, TContext = Context>(callback: callbackFn): TransportRequestCallback + get_async, TContext = Context>(params: RequestParams.SqlGetAsync, callback: callbackFn): TransportRequestCallback + get_async, TContext = Context>(params: RequestParams.SqlGetAsync, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + getAsync, TContext = Context>(params?: RequestParams.SqlGetAsync, options?: TransportRequestOptions): TransportRequestPromise> + getAsync, TContext = Context>(callback: callbackFn): TransportRequestCallback + getAsync, TContext = Context>(params: RequestParams.SqlGetAsync, callback: callbackFn): TransportRequestCallback + getAsync, TContext = Context>(params: RequestParams.SqlGetAsync, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + get_async_status, TContext = Context>(params?: RequestParams.SqlGetAsyncStatus, options?: TransportRequestOptions): TransportRequestPromise> + get_async_status, TContext = Context>(callback: callbackFn): TransportRequestCallback + get_async_status, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, callback: callbackFn): TransportRequestCallback + get_async_status, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + getAsyncStatus, TContext = Context>(params?: RequestParams.SqlGetAsyncStatus, options?: TransportRequestOptions): TransportRequestPromise> + getAsyncStatus, TContext = Context>(callback: callbackFn): TransportRequestCallback + getAsyncStatus, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, callback: callbackFn): TransportRequestCallback + getAsyncStatus, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback query, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SqlQuery, options?: TransportRequestOptions): TransportRequestPromise> query, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback query, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SqlQuery, callback: callbackFn): TransportRequestCallback