Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3863,7 +3863,12 @@ client.cluster.getSettings({ ... })

* *Request (object):*
** *`flat_settings` (Optional, boolean)*: If `true`, returns settings in flat format.
** *`include_defaults` (Optional, boolean)*: If `true`, returns default cluster settings from the local node.
** *`include_defaults` (Optional, boolean)*: If `true`, also returns default values for all other cluster settings, reflecting the values
in the `elasticsearch.yml` file of one of the nodes in the cluster. If the nodes in your
cluster do not all have the same values in their `elasticsearch.yml` config files then the
values returned by this API may vary from invocation to invocation and may not reflect the
values that Elasticsearch uses in all situations. Use the `GET _nodes/settings` API to
fetch the settings for each individual node in your cluster.
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
If no response is received before the timeout expires, the request fails and returns an error.
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
Expand Down Expand Up @@ -4379,6 +4384,8 @@ It supports the implementation of services that utilize the connector protocol t

To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure.
This service runs automatically on Elastic Cloud for Elastic managed connectors.

{ref}/claim-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobClaim({ connector_sync_job_id, worker_hostname })
Expand Down Expand Up @@ -16177,6 +16184,15 @@ client.transform.scheduleNowTransform({ transform_id })
** *`transform_id` (string)*: Identifier for the transform.
** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the scheduling to take place

[discrete]
==== set_upgrade_mode
Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
[source,ts]
----
client.transform.setUpgradeMode()
----


[discrete]
==== start_transform
Start a transform.
Expand Down
29 changes: 29 additions & 0 deletions src/api/api/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,35 @@ export default class Transform {
return await this.transport.request({ path, method, querystring, body, meta }, options)
}

/**
* Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/transform-set-upgrade-mode.html | Elasticsearch API documentation}
*/
async setUpgradeMode (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async setUpgradeMode (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async setUpgradeMode (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async setUpgradeMode (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = []
const querystring: Record<string, any> = {}
const body = undefined

params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}

const method = 'POST'
const path = '/_transform/set_upgrade_mode'
const meta: TransportRequestMetadata = {
name: 'transform.set_upgrade_mode'
}
return await this.transport.request({ path, method, querystring, body, meta }, options)
}

/**
* Start a transform. When you start a transform, it creates the destination index if it does not already exist. The `number_of_shards` is set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping definitions for the destination index from the source indices and the transform aggregations. If fields in the destination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations), the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings in a pivot transform. When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you created the transform, they occur when you start the transform—with the exception of privilege checks. When Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the time of creation and uses those same roles. If those roles do not have the required privileges on the source and destination indices, the transform fails when it attempts unauthorized operations.
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/start-transform.html | Elasticsearch API documentation}
Expand Down
4 changes: 2 additions & 2 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3148,7 +3148,7 @@ export interface AggregationsAggregationRange {
}

export interface AggregationsArrayPercentilesItem {
key: string
key: double
value: double | null
value_as_string?: string
}
Expand Down Expand Up @@ -3792,7 +3792,7 @@ export interface AggregationsIpRangeBucketKeys extends AggregationsMultiBucketBa
export type AggregationsIpRangeBucket = AggregationsIpRangeBucketKeys
& { [property: string]: AggregationsAggregate | string | long }

export type AggregationsKeyedPercentiles = Record<string, string | long | null>
export type AggregationsKeyedPercentiles = Record<string, string | double | null>

export interface AggregationsLinearMovingAverageAggregation extends AggregationsMovingAverageAggregationBase {
model: 'linear'
Expand Down
4 changes: 2 additions & 2 deletions src/api/typesWithBodyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3225,7 +3225,7 @@ export interface AggregationsAggregationRange {
}

export interface AggregationsArrayPercentilesItem {
key: string
key: double
value: double | null
value_as_string?: string
}
Expand Down Expand Up @@ -3869,7 +3869,7 @@ export interface AggregationsIpRangeBucketKeys extends AggregationsMultiBucketBa
export type AggregationsIpRangeBucket = AggregationsIpRangeBucketKeys
& { [property: string]: AggregationsAggregate | string | long }

export type AggregationsKeyedPercentiles = Record<string, string | long | null>
export type AggregationsKeyedPercentiles = Record<string, string | double | null>

export interface AggregationsLinearMovingAverageAggregation extends AggregationsMovingAverageAggregationBase {
model: 'linear'
Expand Down
Loading