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
7 changes: 5 additions & 2 deletions docs/reference/api-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in docs/reference/api-reference.md

View workflow job for this annotation

GitHub Actions / docs-preview / build

Irregular space detected. Run 'docs-builder format --write' to automatically fix all instances.
mapped_pages:
- https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html
comment: |
Expand Down Expand Up @@ -10758,6 +10758,7 @@

#### Request (object) [_request_ml.stop_trained_model_deployment]
- **`model_id` (string)**: The unique identifier of the trained model.
- **`id` (Optional, string)**: If provided, must be the same identifier as in the path.
- **`allow_no_match` (Optional, boolean)**: Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
Expand Down Expand Up @@ -15304,9 +15305,11 @@
- **`timeout` (Optional, string \| -1 \| 0)**: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

## client.transform.getNodeStats [_transform.get_node_stats]
Retrieves transform usage information for transform nodes
Get node stats.

[Endpoint documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html)
Get per-node information about transform usage.

[Endpoint documentation](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats)

```ts
client.transform.getNodeStats()
Expand Down
91 changes: 72 additions & 19 deletions src/api/api/ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,11 @@ export default class Ml {
]
},
'ml.start_data_frame_analytics': {
path: [
'id'
path: [],
body: [
'id',
'timeout'
],
body: [],
query: [
'timeout'
]
Expand Down Expand Up @@ -808,10 +809,13 @@ export default class Ml {
]
},
'ml.stop_data_frame_analytics': {
path: [
'id'
path: [],
body: [
'id',
'allow_no_match',
'force',
'timeout'
],
body: [],
query: [
'allow_no_match',
'force',
Expand All @@ -837,7 +841,11 @@ export default class Ml {
path: [
'model_id'
],
body: [],
body: [
'id',
'allow_no_match',
'force'
],
query: [
'allow_no_match',
'force'
Expand Down Expand Up @@ -4519,7 +4527,9 @@ export default class Ml {
async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.MlStartDataFrameAnalyticsResponse>
async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
} = this[kAcceptedParams]['ml.start_data_frame_analytics']

const userQuery = params?.querystring
Expand All @@ -4536,11 +4546,21 @@ export default class Ml {
}

for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
// @ts-expect-error
querystring[key] = params[key]
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
}
}

Expand All @@ -4553,6 +4573,8 @@ export default class Ml {
},
acceptedParams: [
'id',
'id',
'timeout',
'timeout'
]
}
Expand Down Expand Up @@ -4703,7 +4725,9 @@ export default class Ml {
async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.MlStopDataFrameAnalyticsResponse>
async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
} = this[kAcceptedParams]['ml.stop_data_frame_analytics']

const userQuery = params?.querystring
Expand All @@ -4720,11 +4744,21 @@ export default class Ml {
}

for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
// @ts-expect-error
querystring[key] = params[key]
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
}
}

Expand All @@ -4736,9 +4770,13 @@ export default class Ml {
id: params.id
},
acceptedParams: [
'id',
'id',
'allow_no_match',
'force',
'timeout',
'allow_no_match',
'force',
'timeout'
]
}
Expand Down Expand Up @@ -4820,7 +4858,9 @@ export default class Ml {
async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<T.MlStopTrainedModelDeploymentResponse>
async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
path: acceptedPath,
body: acceptedBody,
query: acceptedQuery
} = this[kAcceptedParams]['ml.stop_trained_model_deployment']

const userQuery = params?.querystring
Expand All @@ -4837,11 +4877,21 @@ export default class Ml {
}

for (const key in params) {
if (acceptedPath.includes(key)) {
if (acceptedBody.includes(key)) {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
} else if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
// @ts-expect-error
querystring[key] = params[key]
if (acceptedQuery.includes(key) || commonQueryParams.includes(key)) {
// @ts-expect-error
querystring[key] = params[key]
} else {
body = body ?? {}
// @ts-expect-error
body[key] = params[key]
}
}
}

Expand All @@ -4854,6 +4904,9 @@ export default class Ml {
},
acceptedParams: [
'model_id',
'id',
'allow_no_match',
'force',
'allow_no_match',
'force'
]
Expand Down
13 changes: 7 additions & 6 deletions src/api/api/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ export default class Transform {
}

/**
* Retrieves transform usage information for transform nodes
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/9.2/get-transform-node-stats.html | Elasticsearch API documentation}
* Get node stats. Get per-node information about transform usage.
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-node-stats | Elasticsearch API documentation}
*/
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async getNodeStats (this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<any> {
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformGetNodeStatsResponse>
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformGetNodeStatsResponse, unknown>>
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptions): Promise<T.TransformGetNodeStatsResponse>
async getNodeStats (this: That, params?: T.TransformGetNodeStatsRequest, options?: TransportRequestOptions): Promise<any> {
const {
path: acceptedPath
} = this[kAcceptedParams]['transform.get_node_stats']
Expand All @@ -277,6 +277,7 @@ export default class Transform {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body' && key !== 'querystring') {
// @ts-expect-error
querystring[key] = params[key]
}
}
Expand Down
39 changes: 30 additions & 9 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19666,18 +19666,13 @@ export interface IndicesDataStreamLifecycle {
* Any time after this duration the document could be deleted.
* When empty, every document in this data stream will be stored indefinitely. */
data_retention?: Duration
/** The downsampling configuration to execute for the managed backing index after rollover. */
downsampling?: IndicesDataStreamLifecycleDownsampling
/** The list of downsampling rounds to execute as part of this downsampling configuration */
downsampling?: IndicesDownsamplingRound[]
/** If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
* that's disabled (enabled: `false`) will have no effect on the data stream. */
enabled?: boolean
}

export interface IndicesDataStreamLifecycleDownsampling {
/** The list of downsampling rounds to execute as part of this downsampling configuration */
rounds: IndicesDownsamplingRound[]
}

export interface IndicesDataStreamLifecycleRolloverConditions {
min_age?: Duration
max_age?: string
Expand Down Expand Up @@ -31127,6 +31122,8 @@ export interface MlStopDatafeedResponse {
export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
/** The unique identifier of the trained model. */
model_id: Id
/** If provided, must be the same identifier as in the path. */
id?: Id
/** Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
* contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
* there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
Expand All @@ -31136,9 +31133,9 @@ export interface MlStopTrainedModelDeploymentRequest extends RequestBase {
* restart the model deployment. */
force?: boolean
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
body?: string | { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any } & { model_id?: never, allow_no_match?: never, force?: never }
querystring?: { [key: string]: any } & { model_id?: never, id?: never, allow_no_match?: never, force?: never }
}

export interface MlStopTrainedModelDeploymentResponse {
Expand Down Expand Up @@ -38615,6 +38612,30 @@ export interface TransformDeleteTransformRequest extends RequestBase {

export type TransformDeleteTransformResponse = AcknowledgedResponseBase

export interface TransformGetNodeStatsRequest extends RequestBase {
/** All values in `body` will be added to the request body. */
body?: string | { [key: string]: any }
/** All values in `querystring` will be added to the request querystring. */
querystring?: { [key: string]: any }
}

export type TransformGetNodeStatsResponse = TransformGetNodeStatsTransformNodeFullStats

export interface TransformGetNodeStatsTransformNodeFullStatsKeys {
total: TransformGetNodeStatsTransformNodeStats
}
export type TransformGetNodeStatsTransformNodeFullStats = TransformGetNodeStatsTransformNodeFullStatsKeys
& { [property: string]: TransformGetNodeStatsTransformNodeStats }

export interface TransformGetNodeStatsTransformNodeStats {
scheduler: TransformGetNodeStatsTransformSchedulerStats
}

export interface TransformGetNodeStatsTransformSchedulerStats {
registered_transform_count: integer
peek_transform?: string
}

export interface TransformGetTransformRequest extends RequestBase {
/** Identifier for the transform. It can be a transform identifier or a
* wildcard expression. You can get information for all transforms by using
Expand Down
Loading