Skip to content

Commit 6751482

Browse files
Auto-generated API code (#2734)
1 parent 1bb105a commit 6751482

10 files changed

+175
-46
lines changed

docs/reference.asciidoc

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,7 +3782,7 @@ If no response is received before the timeout expires, the request fails and ret
37823782
Clear cluster voting config exclusions.
37833783
Remove master-eligible nodes from the voting configuration exclusion list.
37843784

3785-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions[Endpoint documentation]
3785+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions[Endpoint documentation]
37863786
[source,ts]
37873787
----
37883788
client.cluster.deleteVotingConfigExclusions({ ... })
@@ -3968,7 +3968,7 @@ In that case, you may safely retry the call.
39683968
NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period.
39693969
They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.
39703970

3971-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions[Endpoint documentation]
3971+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions[Endpoint documentation]
39723972
[source,ts]
39733973
----
39743974
client.cluster.postVotingConfigExclusions({ ... })
@@ -8042,6 +8042,42 @@ client.inference.get({ ... })
80428042
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion" | "chat_completion"))*: The task type
80438043
** *`inference_id` (Optional, string)*: The inference Id
80448044

8045+
[discrete]
8046+
==== inference
8047+
Perform inference on the service.
8048+
8049+
This API enables you to use machine learning models to perform specific tasks on data that you provide as an input.
8050+
It returns a response with the results of the tasks.
8051+
The inference endpoint you use can perform one specific task that has been defined when the endpoint was created with the create inference API.
8052+
8053+
For details about using this API with a service, such as Amazon Bedrock, Anthropic, or HuggingFace, refer to the service-specific documentation.
8054+
8055+
> info
8056+
> The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
8057+
8058+
{ref}/post-inference-api.html[Endpoint documentation]
8059+
[source,ts]
8060+
----
8061+
client.inference.inference({ inference_id, input })
8062+
----
8063+
8064+
[discrete]
8065+
==== Arguments
8066+
8067+
* *Request (object):*
8068+
** *`inference_id` (string)*: The unique identifier for the inference endpoint.
8069+
** *`input` (string | string[])*: The text on which you want to perform the inference task.
8070+
It can be a single string or an array.
8071+
8072+
> info
8073+
> Inference endpoints for the `completion` task type currently only support a single string as input.
8074+
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion" | "chat_completion"))*: The type of inference task that the model performs.
8075+
** *`query` (Optional, string)*: The query input, which is required only for the `rerank` task.
8076+
It is not required for other tasks.
8077+
** *`task_settings` (Optional, User-defined value)*: Task settings for the individual inference request.
8078+
These settings are specific to the task type you specified and override the task settings specified when initializing the service.
8079+
** *`timeout` (Optional, string | -1 | 0)*: The amount of time to wait for the inference request to complete.
8080+
80458081
[discrete]
80468082
==== put
80478083
Create an inference endpoint.
@@ -9039,7 +9075,7 @@ You must then re-submit the API request with the acknowledge parameter set to tr
90399075
NOTE: If Elasticsearch security features are enabled and you are installing a gold or higher license, you must enable TLS on the transport networking layer before you install the license.
90409076
If the operator privileges feature is enabled, only operator users can use this API.
90419077

9042-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-post[Endpoint documentation]
9078+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-license-post[Endpoint documentation]
90439079
[source,ts]
90449080
----
90459081
client.license.post({ ... })
@@ -11073,7 +11109,7 @@ restart the model deployment.
1107311109
==== update_data_frame_analytics
1107411110
Update a data frame analytics job.
1107511111

11076-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics[Endpoint documentation]
11112+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-data-frame-analytics[Endpoint documentation]
1107711113
[source,ts]
1107811114
----
1107911115
client.ml.updateDataFrameAnalytics({ id })
@@ -11284,7 +11320,7 @@ snapshot will be deleted when the job is deleted.
1128411320
==== update_trained_model_deployment
1128511321
Update a trained model deployment.
1128611322

11287-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment[Endpoint documentation]
11323+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-ml-update-trained-model-deployment[Endpoint documentation]
1128811324
[source,ts]
1128911325
----
1129011326
client.ml.updateTrainedModelDeployment({ model_id })
@@ -16030,7 +16066,7 @@ privileges for the source indices. You must also have `index` and `read` privile
1603016066
Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
1603116067
time of update and runs with those privileges.
1603216068

16033-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-update-transform[Endpoint documentation]
16069+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-update-transform[Endpoint documentation]
1603416070
[source,ts]
1603516071
----
1603616072
client.transform.updateTransform({ transform_id })
@@ -16077,7 +16113,7 @@ A summary is returned when the upgrade is finished.
1607716113
To ensure continuous transforms remain running during a major version upgrade of the cluster – for example, from 7.16 to 8.0 – it is recommended to upgrade transforms before upgrading the cluster.
1607816114
You may want to perform a recent cluster backup prior to the upgrade.
1607916115

16080-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-upgrade-transforms[Endpoint documentation]
16116+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-transform-upgrade-transforms[Endpoint documentation]
1608116117
[source,ts]
1608216118
----
1608316119
client.transform.upgradeTransforms({ ... })
@@ -16106,7 +16142,7 @@ The reason for this behavior is to prevent overwriting the watch status from a w
1610616142
Acknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.
1610716143
This happens when the condition of the watch is not met (the condition evaluates to false).
1610816144

16109-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch[Endpoint documentation]
16145+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-ack-watch[Endpoint documentation]
1611016146
[source,ts]
1611116147
----
1611216148
client.watcher.ackWatch({ watch_id })
@@ -16125,7 +16161,7 @@ If you omit this parameter, all of the actions of the watch are acknowledged.
1612516161
Activate a watch.
1612616162
A watch can be either active or inactive.
1612716163

16128-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch[Endpoint documentation]
16164+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-activate-watch[Endpoint documentation]
1612916165
[source,ts]
1613016166
----
1613116167
client.watcher.activateWatch({ watch_id })
@@ -16142,7 +16178,7 @@ client.watcher.activateWatch({ watch_id })
1614216178
Deactivate a watch.
1614316179
A watch can be either active or inactive.
1614416180

16145-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch[Endpoint documentation]
16181+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-deactivate-watch[Endpoint documentation]
1614616182
[source,ts]
1614716183
----
1614816184
client.watcher.deactivateWatch({ watch_id })
@@ -16165,7 +16201,7 @@ IMPORTANT: Deleting a watch must be done by using only this API.
1616516201
Do not delete the watch directly from the `.watches` index using the Elasticsearch delete document API
1616616202
When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the `.watches` index.
1616716203

16168-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch[Endpoint documentation]
16204+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-delete-watch[Endpoint documentation]
1616916205
[source,ts]
1617016206
----
1617116207
client.watcher.deleteWatch({ id })
@@ -16194,7 +16230,7 @@ If your user is allowed to read index `a`, but not index `b`, then the exact sam
1619416230

1619516231
When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.
1619616232

16197-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch[Endpoint documentation]
16233+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-execute-watch[Endpoint documentation]
1619816234
[source,ts]
1619916235
----
1620016236
client.watcher.executeWatch({ ... })
@@ -16223,7 +16259,7 @@ Get Watcher index settings.
1622316259
Get settings for the Watcher internal index (`.watches`).
1622416260
Only a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
1622516261

16226-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings[Endpoint documentation]
16262+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-settings[Endpoint documentation]
1622716263
[source,ts]
1622816264
----
1622916265
client.watcher.getSettings({ ... })
@@ -16240,7 +16276,7 @@ If no response is received before the timeout expires, the request fails and ret
1624016276
==== get_watch
1624116277
Get a watch.
1624216278

16243-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch[Endpoint documentation]
16279+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-get-watch[Endpoint documentation]
1624416280
[source,ts]
1624516281
----
1624616282
client.watcher.getWatch({ id })
@@ -16267,7 +16303,7 @@ When you add a watch you can also define its initial active state by setting the
1626716303
When Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.
1626816304
If the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.
1626916305

16270-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch[Endpoint documentation]
16306+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-put-watch[Endpoint documentation]
1627116307
[source,ts]
1627216308
----
1627316309
client.watcher.putWatch({ id })
@@ -16302,7 +16338,7 @@ Get all registered watches in a paginated manner and optionally filter watches b
1630216338

1630316339
Note that only the `_id` and `metadata.*` fields are queryable or sortable.
1630416340

16305-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-query-watches[Endpoint documentation]
16341+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-query-watches[Endpoint documentation]
1630616342
[source,ts]
1630716343
----
1630816344
client.watcher.queryWatches({ ... })
@@ -16325,7 +16361,7 @@ It must be non-negative.
1632516361
Start the watch service.
1632616362
Start the Watcher service if it is not already running.
1632716363

16328-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start[Endpoint documentation]
16364+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-start[Endpoint documentation]
1632916365
[source,ts]
1633016366
----
1633116367
client.watcher.start({ ... })
@@ -16343,7 +16379,7 @@ Get Watcher statistics.
1634316379
This API always returns basic metrics.
1634416380
You retrieve more metrics by using the metric parameter.
1634516381

16346-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stats[Endpoint documentation]
16382+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stats[Endpoint documentation]
1634716383
[source,ts]
1634816384
----
1634916385
client.watcher.stats({ ... })
@@ -16361,7 +16397,7 @@ client.watcher.stats({ ... })
1636116397
Stop the watch service.
1636216398
Stop the Watcher service if it is running.
1636316399

16364-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop[Endpoint documentation]
16400+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-stop[Endpoint documentation]
1636516401
[source,ts]
1636616402
----
1636716403
client.watcher.stop({ ... })
@@ -16385,7 +16421,7 @@ This includes `index.auto_expand_replicas`, `index.number_of_replicas`, `index.r
1638516421
Modification of `index.routing.allocation.include._tier_preference` is an exception and is not allowed as the
1638616422
Watcher shards must always be in the `data_content` tier.
1638716423

16388-
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-update-settings[Endpoint documentation]
16424+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-watcher-update-settings[Endpoint documentation]
1638916425
[source,ts]
1639016426
----
1639116427
client.watcher.updateSettings({ ... })
@@ -16435,7 +16471,7 @@ Get usage information.
1643516471
Get information about the features that are currently enabled and available under the current license.
1643616472
The API also provides some usage statistics.
1643716473

16438-
https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-xpack[Endpoint documentation]
16474+
https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-xpack[Endpoint documentation]
1643916475
[source,ts]
1644016476
----
1644116477
client.xpack.usage({ ... })

src/api/api/cluster.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class Cluster {
120120

121121
/**
122122
* Clear cluster voting config exclusions. Remove master-eligible nodes from the voting configuration exclusion list.
123-
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions | Elasticsearch API documentation}
123+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions | Elasticsearch API documentation}
124124
*/
125125
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterDeleteVotingConfigExclusionsResponse>
126126
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterDeleteVotingConfigExclusionsResponse, unknown>>
@@ -354,7 +354,7 @@ export default class Cluster {
354354

355355
/**
356356
* Update voting configuration exclusions. Update the cluster voting config exclusions by node IDs or node names. By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks. If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually. The API adds an entry for each specified node to the cluster’s voting configuration exclusions list. It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes. Clusters should have no voting configuration exclusions in normal operation. Once the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`. This API waits for the nodes to be fully removed from the cluster before it returns. If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster. A response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`. If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration. In that case, you may safely retry the call. NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.
357-
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions | Elasticsearch API documentation}
357+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-cluster-post-voting-config-exclusions | Elasticsearch API documentation}
358358
*/
359359
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPostVotingConfigExclusionsResponse>
360360
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPostVotingConfigExclusionsResponse, unknown>>

0 commit comments

Comments
 (0)