Skip to content

Commit 0dd4817

Browse files
Auto-generated API code (#3003)
1 parent 8a6bcc5 commit 0dd4817

File tree

6 files changed

+84
-27
lines changed

6 files changed

+84
-27
lines changed

docs/reference/api-reference.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ Additionally, if you opt to count version conflicts, the operation could attempt
13431343

13441344
It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.
13451345
* When requested with `wait_for_completion=true` (default), the request fails if the node shuts down.
1346-
* When requested with `wait_for_completion=false`, a task id is returned, which can be used via the task management API to monitor, debug, or cancel the task. The task may disappear or fail if the node shuts down.
1346+
* When requested with `wait_for_completion=false`, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down.
13471347
When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index.
13481348
Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.
13491349

@@ -4718,6 +4718,9 @@ If `true`, the response will include an extra section under the name `all_column
47184718
## client.esql.getQuery [_esql.get_query]
47194719
Get a specific running ES|QL query information.
47204720
Returns an object extended information about a running ES|QL query.
4721+
4722+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query)
4723+
47214724
```ts
47224725
client.esql.getQuery({ id })
47234726
```
@@ -4730,6 +4733,9 @@ client.esql.getQuery({ id })
47304733
## client.esql.listQueries [_esql.list_queries]
47314734
Get running ES|QL queries information.
47324735
Returns an object containing IDs and other information about the running ES|QL queries.
4736+
4737+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries)
4738+
47334739
```ts
47344740
client.esql.listQueries()
47354741
```
@@ -5672,7 +5678,7 @@ client.indices.deleteDataStream({ name })
56725678
Delete data stream options.
56735679
Removes the data stream options from a data stream.
56745680

5675-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)
5681+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options)
56765682

56775683
```ts
56785684
client.indices.deleteDataStreamOptions({ name })
@@ -6144,7 +6150,7 @@ Get data stream options.
61446150

61456151
Get the data stream options configuration of one or more data streams.
61466152

6147-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)
6153+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options)
61486154

61496155
```ts
61506156
client.indices.getDataStreamOptions({ name })
@@ -6534,7 +6540,7 @@ If no response is received before the timeout expires, the request fails and ret
65346540
Update data stream options.
65356541
Update the data stream options of the specified data streams.
65366542

6537-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)
6543+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options)
65386544

65396545
```ts
65406546
client.indices.putDataStreamOptions({ name })
@@ -15232,14 +15238,33 @@ client.transform.scheduleNowTransform({ transform_id })
1523215238
- **`timeout` (Optional, string \| -1 \| 0)**: Controls the time to wait for the scheduling to take place
1523315239

1523415240
## client.transform.setUpgradeMode [_transform.set_upgrade_mode]
15235-
Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
15241+
Set upgrade_mode for transform indices.
15242+
Sets a cluster wide upgrade_mode setting that prepares transform
15243+
indices for an upgrade.
15244+
When upgrading your cluster, in some circumstances you must restart your
15245+
nodes and reindex your transform indices. In those circumstances,
15246+
there must be no transforms running. You can close the transforms,
15247+
do the upgrade, then open all the transforms again. Alternatively,
15248+
you can use this API to temporarily halt tasks associated with the transforms
15249+
and prevent new transforms from opening. You can also use this API
15250+
during upgrades that do not require you to reindex your transform
15251+
indices, though stopping transforms is not a requirement in that case.
15252+
You can see the current value for the upgrade_mode setting by using the get
15253+
transform info API.
1523615254

15237-
[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-set-upgrade-mode.html)
15255+
[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode)
1523815256

1523915257
```ts
15240-
client.transform.setUpgradeMode()
15258+
client.transform.setUpgradeMode({ ... })
1524115259
```
1524215260

15261+
### Arguments [_arguments_transform.set_upgrade_mode]
15262+
15263+
#### Request (object) [_request_transform.set_upgrade_mode]
15264+
- **`enabled` (Optional, boolean)**: When `true`, it enables `upgrade_mode` which temporarily halts all
15265+
transform tasks and prohibits new transform tasks from
15266+
starting.
15267+
- **`timeout` (Optional, string \| -1 \| 0)**: The time to wait for the request to be completed.
1524315268

1524415269
## client.transform.startTransform [_transform.start_transform]
1524515270
Start a transform.

src/api/api/esql.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ export default class Esql {
310310

311311
/**
312312
* Get a specific running ES|QL query information. Returns an object extended information about a running ES|QL query.
313+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query | Elasticsearch API documentation}
313314
*/
314315
async getQuery (this: That, params: T.EsqlGetQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlGetQueryResponse>
315316
async getQuery (this: That, params: T.EsqlGetQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlGetQueryResponse, unknown>>
@@ -354,6 +355,7 @@ export default class Esql {
354355

355356
/**
356357
* Get running ES|QL queries information. Returns an object containing IDs and other information about the running ES|QL queries.
358+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries | Elasticsearch API documentation}
357359
*/
358360
async listQueries (this: That, params?: T.EsqlListQueriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlListQueriesResponse>
359361
async listQueries (this: That, params?: T.EsqlListQueriesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlListQueriesResponse, unknown>>

src/api/api/indices.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ export default class Indices {
16391639

16401640
/**
16411641
* Delete data stream options. Removes the data stream options from a data stream.
1642-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html | Elasticsearch API documentation}
1642+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options | Elasticsearch API documentation}
16431643
*/
16441644
async deleteDataStreamOptions (this: That, params: T.IndicesDeleteDataStreamOptionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteDataStreamOptionsResponse>
16451645
async deleteDataStreamOptions (this: That, params: T.IndicesDeleteDataStreamOptionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteDataStreamOptionsResponse, unknown>>
@@ -2497,7 +2497,7 @@ export default class Indices {
24972497

24982498
/**
24992499
* Get data stream options. Get the data stream options configuration of one or more data streams.
2500-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html | Elasticsearch API documentation}
2500+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options | Elasticsearch API documentation}
25012501
*/
25022502
async getDataStreamOptions (this: That, params: T.IndicesGetDataStreamOptionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetDataStreamOptionsResponse>
25032503
async getDataStreamOptions (this: That, params: T.IndicesGetDataStreamOptionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetDataStreamOptionsResponse, unknown>>
@@ -3259,7 +3259,7 @@ export default class Indices {
32593259

32603260
/**
32613261
* Update data stream options. Update the data stream options of the specified data streams.
3262-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.1/index.html | Elasticsearch API documentation}
3262+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options | Elasticsearch API documentation}
32633263
*/
32643264
async putDataStreamOptions (this: That, params: T.IndicesPutDataStreamOptionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutDataStreamOptionsResponse>
32653265
async putDataStreamOptions (this: That, params: T.IndicesPutDataStreamOptionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutDataStreamOptionsResponse, unknown>>

src/api/api/reindex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const acceptedParams: Record<string, { path: string[], body: string[], query: st
5454
}
5555

5656
/**
57-
* Reindex documents. Copy documents from a source to a destination. You can copy all documents to the destination index or reindex a subset of the documents. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. IMPORTANT: Reindex requires `_source` to be enabled for all documents in the source. The destination should be configured as wanted before calling the reindex API. Reindex does not copy the settings from the source or its associated template. Mappings, shard counts, and replicas, for example, must be configured ahead of time. If the Elasticsearch security features are enabled, you must have the following security privileges: * The `read` index privilege for the source data stream, index, or alias. * The `write` index privilege for the destination data stream, index, or index alias. * To automatically create a data stream or index with a reindex API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege for the destination data stream, index, or alias. * If reindexing from a remote cluster, the `source.remote.user` must have the `monitor` cluster privilege and the `read` index privilege for the source data stream, index, or alias. If reindexing from a remote cluster, you must explicitly allow the remote host in the `reindex.remote.whitelist` setting. Automatic data stream creation requires a matching index template with data stream enabled. The `dest` element can be configured like the index API to control optimistic concurrency control. Omitting `version_type` or setting it to `internal` causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID. Setting `version_type` to `external` causes Elasticsearch to preserve the `version` from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source. Setting `op_type` to `create` causes the reindex API to create only missing documents in the destination. All existing documents will cause a version conflict. IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an `op_type` of `create`. A reindex can only add new documents to a destination data stream. It cannot update existing documents in a destination data stream. By default, version conflicts abort the reindex process. To continue reindexing if there are conflicts, set the `conflicts` request body property to `proceed`. In this case, the response includes a count of the version conflicts that were encountered. Note that the handling of other error types is unaffected by the `conflicts` property. Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query. It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes. * When requested with `wait_for_completion=true` (default), the request fails if the node shuts down. * When requested with `wait_for_completion=false`, a task id is returned, which can be used via the task management API to monitor, debug, or cancel the task. The task may disappear or fail if the node shuts down. When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index. Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. Refer to the linked documentation for examples of how to reindex documents.
57+
* Reindex documents. Copy documents from a source to a destination. You can copy all documents to the destination index or reindex a subset of the documents. The source can be any existing index, alias, or data stream. The destination must differ from the source. For example, you cannot reindex a data stream into itself. IMPORTANT: Reindex requires `_source` to be enabled for all documents in the source. The destination should be configured as wanted before calling the reindex API. Reindex does not copy the settings from the source or its associated template. Mappings, shard counts, and replicas, for example, must be configured ahead of time. If the Elasticsearch security features are enabled, you must have the following security privileges: * The `read` index privilege for the source data stream, index, or alias. * The `write` index privilege for the destination data stream, index, or index alias. * To automatically create a data stream or index with a reindex API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege for the destination data stream, index, or alias. * If reindexing from a remote cluster, the `source.remote.user` must have the `monitor` cluster privilege and the `read` index privilege for the source data stream, index, or alias. If reindexing from a remote cluster, you must explicitly allow the remote host in the `reindex.remote.whitelist` setting. Automatic data stream creation requires a matching index template with data stream enabled. The `dest` element can be configured like the index API to control optimistic concurrency control. Omitting `version_type` or setting it to `internal` causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID. Setting `version_type` to `external` causes Elasticsearch to preserve the `version` from the source, create any documents that are missing, and update any documents that have an older version in the destination than they do in the source. Setting `op_type` to `create` causes the reindex API to create only missing documents in the destination. All existing documents will cause a version conflict. IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an `op_type` of `create`. A reindex can only add new documents to a destination data stream. It cannot update existing documents in a destination data stream. By default, version conflicts abort the reindex process. To continue reindexing if there are conflicts, set the `conflicts` request body property to `proceed`. In this case, the response includes a count of the version conflicts that were encountered. Note that the handling of other error types is unaffected by the `conflicts` property. Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query. It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes. * When requested with `wait_for_completion=true` (default), the request fails if the node shuts down. * When requested with `wait_for_completion=false`, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down. When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index. Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. Refer to the linked documentation for examples of how to reindex documents.
5858
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex | Elasticsearch API documentation}
5959
*/
6060
export default async function ReindexApi (this: That, params: T.ReindexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ReindexResponse>

src/api/api/transform.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ export default class Transform {
137137
'transform.set_upgrade_mode': {
138138
path: [],
139139
body: [],
140-
query: []
140+
query: [
141+
'enabled',
142+
'timeout'
143+
]
141144
},
142145
'transform.start_transform': {
143146
path: [
@@ -590,13 +593,13 @@ export default class Transform {
590593
}
591594

592595
/**
593-
* Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
594-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.1/transform-set-upgrade-mode.html | Elasticsearch API documentation}
596+
* Set upgrade_mode for transform indices. Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade. When upgrading your cluster, in some circumstances you must restart your nodes and reindex your transform indices. In those circumstances, there must be no transforms running. You can close the transforms, do the upgrade, then open all the transforms again. Alternatively, you can use this API to temporarily halt tasks associated with the transforms and prevent new transforms from opening. You can also use this API during upgrades that do not require you to reindex your transform indices, though stopping transforms is not a requirement in that case. You can see the current value for the upgrade_mode setting by using the get transform info API.
597+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode | Elasticsearch API documentation}
595598
*/
596-
async setUpgradeMode (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
597-
async setUpgradeMode (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
598-
async setUpgradeMode (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
599-
async setUpgradeMode (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
599+
async setUpgradeMode (this: That, params?: T.TransformSetUpgradeModeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformSetUpgradeModeResponse>
600+
async setUpgradeMode (this: That, params?: T.TransformSetUpgradeModeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformSetUpgradeModeResponse, unknown>>
601+
async setUpgradeMode (this: That, params?: T.TransformSetUpgradeModeRequest, options?: TransportRequestOptions): Promise<T.TransformSetUpgradeModeResponse>
602+
async setUpgradeMode (this: That, params?: T.TransformSetUpgradeModeRequest, options?: TransportRequestOptions): Promise<any> {
600603
const {
601604
path: acceptedPath
602605
} = this.acceptedParams['transform.set_upgrade_mode']
@@ -619,6 +622,7 @@ export default class Transform {
619622
if (acceptedPath.includes(key)) {
620623
continue
621624
} else if (key !== 'body' && key !== 'querystring') {
625+
// @ts-expect-error
622626
querystring[key] = params[key]
623627
}
624628
}

0 commit comments

Comments
 (0)