diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 0d7a5a3953..a267644669 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -17731,6 +17731,16 @@ "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { @@ -74085,7 +74095,7 @@ "$ref": "#/components/schemas/_types:Id" }, "node": { - "$ref": "#/components/schemas/ml._types:DiscoveryNode" + "$ref": "#/components/schemas/ml._types:DiscoveryNodeCompact" }, "state": { "$ref": "#/components/schemas/ml._types:DatafeedState" @@ -74102,7 +74112,7 @@ "state" ] }, - "ml._types:DiscoveryNode": { + "ml._types:DiscoveryNodeCompact": { "type": "object", "properties": { "name": { @@ -74117,33 +74127,17 @@ "transport_address": { "$ref": "#/components/schemas/_types:TransportAddress" }, - "external_id": { - "type": "string" - }, "attributes": { "type": "object", "additionalProperties": { "type": "string" } - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "$ref": "#/components/schemas/_types:VersionString" - }, - "min_index_version": { - "type": "number" - }, - "max_index_version": { - "type": "number" } }, "required": [ + "name", "ephemeral_id", + "id", "transport_address" ] }, @@ -74516,7 +74510,7 @@ "$ref": "#/components/schemas/ml._types:ModelSizeStats" }, "node": { - "$ref": "#/components/schemas/ml._types:DiscoveryNode" + "$ref": "#/components/schemas/ml._types:DiscoveryNodeCompact" }, "open_time": { "$ref": "#/components/schemas/_types:DateTime" @@ -75152,6 +75146,56 @@ "failed" ] }, + "ml._types:DiscoveryNode": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ml._types:DiscoveryNodeContent" + }, + "minProperties": 1, + "maxProperties": 1 + }, + "ml._types:DiscoveryNodeContent": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types:Name" + }, + "ephemeral_id": { + "$ref": "#/components/schemas/_types:Id" + }, + "transport_address": { + "$ref": "#/components/schemas/_types:TransportAddress" + }, + "external_id": { + "type": "string" + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "$ref": "#/components/schemas/_types:VersionString" + }, + "min_index_version": { + "type": "number" + }, + "max_index_version": { + "type": "number" + } + }, + "required": [ + "ephemeral_id", + "transport_address" + ] + }, "ml._types:ModelSnapshot": { "type": "object", "properties": { @@ -76363,11 +76407,7 @@ "type": "number" }, "node": { - "description": "Information pertaining to the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ml._types:DiscoveryNode" - } + "$ref": "#/components/schemas/ml._types:DiscoveryNode" }, "number_of_allocations": { "description": "The number of allocations assigned to this node.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 450cc833ba..ae4c9112f4 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -10542,6 +10542,16 @@ "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + }, + { + "in": "query", + "name": "ignore_throttled", + "description": "Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "requestBody": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index c5d26380ab..61b15eecdc 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -30410,8 +30410,21 @@ } } ], - "query": [], - "specLocation": "ml/put_job/MlPutJobRequest.ts#L30-L117" + "query": [ + { + "description": "Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.", + "name": "ignore_throttled", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ml/put_job/MlPutJobRequest.ts#L30-L120" }, { "body": { @@ -95139,6 +95152,155 @@ }, "specLocation": "ml/_types/TrainedModel.ts#L333-L350" }, + { + "kind": "type_alias", + "name": { + "name": "DiscoveryNode", + "namespace": "ml._types" + }, + "specLocation": "ml/_types/DiscoveryNode.ts#L25-L25", + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "DiscoveryNodeContent", + "namespace": "ml._types" + } + } + } + }, + { + "kind": "interface", + "name": { + "name": "DiscoveryNodeContent", + "namespace": "ml._types" + }, + "properties": [ + { + "name": "name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "name": "ephemeral_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "transport_address", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TransportAddress", + "namespace": "_types" + } + } + }, + { + "name": "external_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "attributes", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "roles", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "VersionString", + "namespace": "_types" + } + } + }, + { + "name": "min_index_version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "max_index_version", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "ml/_types/DiscoveryNode.ts#L27-L37" + }, { "kind": "enum", "members": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 3b8c23ec07..37abf16c40 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -152560,7 +152560,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DiscoveryNode", + "name": "DiscoveryNodeCompact", "namespace": "ml._types" } } @@ -155440,15 +155440,42 @@ "specLocation": "ml/_types/Detector.ts#L127-L143" }, { - "kind": "interface", + "kind": "type_alias", "name": { "name": "DiscoveryNode", "namespace": "ml._types" }, + "specLocation": "ml/_types/DiscoveryNode.ts#L25-L25", + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + }, + "singleKey": true, + "value": { + "kind": "instance_of", + "type": { + "name": "DiscoveryNodeContent", + "namespace": "ml._types" + } + } + } + }, + { + "kind": "interface", + "description": "Alternative representation of DiscoveryNode used in ml.get_job_stats and ml.get_datafeed_stats", + "name": { + "name": "DiscoveryNodeCompact", + "namespace": "ml._types" + }, "properties": [ { "name": "name", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -155470,7 +155497,72 @@ }, { "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "transport_address", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "TransportAddress", + "namespace": "_types" + } + } + }, + { + "name": "attributes", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + } + ], + "specLocation": "ml/_types/DiscoveryNode.ts#L39-L48" + }, + { + "kind": "interface", + "name": { + "name": "DiscoveryNodeContent", + "namespace": "ml._types" + }, + "properties": [ + { + "name": "name", "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Name", + "namespace": "_types" + } + } + }, + { + "name": "ephemeral_id", + "required": true, "type": { "kind": "instance_of", "type": { @@ -155571,7 +155663,7 @@ } } ], - "specLocation": "ml/_types/DiscoveryNode.ts#L25-L36" + "specLocation": "ml/_types/DiscoveryNode.ts#L27-L37" }, { "kind": "enum", @@ -157647,7 +157739,7 @@ "type": { "kind": "instance_of", "type": { - "name": "DiscoveryNode", + "name": "DiscoveryNodeCompact", "namespace": "ml._types" } } @@ -161093,21 +161185,10 @@ "name": "node", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "Id", - "namespace": "_types" - } - }, - "singleKey": false, - "value": { - "kind": "instance_of", - "type": { - "name": "DiscoveryNode", - "namespace": "ml._types" - } + "kind": "instance_of", + "type": { + "name": "DiscoveryNode", + "namespace": "ml._types" } } }, @@ -170593,8 +170674,21 @@ } } ], - "query": [], - "specLocation": "ml/put_job/MlPutJobRequest.ts#L30-L117" + "query": [ + { + "description": "Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided.", + "name": "ignore_throttled", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ml/put_job/MlPutJobRequest.ts#L30-L120" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index eb06a00fa9..55d021fff6 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -858,7 +858,6 @@ "request": [ "Request: missing json spec query parameter 'ignore_unavailable'", "Request: missing json spec query parameter 'allow_no_indices'", - "Request: missing json spec query parameter 'ignore_throttled'", "Request: missing json spec query parameter 'expand_wildcards'" ], "response": [] diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 577539dadb..97dc7875ec 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13905,7 +13905,7 @@ export type MlDatafeedState = 'started' | 'stopped' | 'starting' | 'stopping' export interface MlDatafeedStats { assignment_explanation?: string datafeed_id: Id - node?: MlDiscoveryNode + node?: MlDiscoveryNodeCompact state: MlDatafeedState timing_stats?: MlDatafeedTimingStats running_state?: MlDatafeedRunningState @@ -14218,10 +14218,19 @@ export interface MlDetectorUpdate { custom_rules?: MlDetectionRule[] } -export interface MlDiscoveryNode { +export type MlDiscoveryNode = Partial> + +export interface MlDiscoveryNodeCompact { + name: Name + ephemeral_id: Id + id: Id + transport_address: TransportAddress + attributes?: Record +} + +export interface MlDiscoveryNodeContent { name?: Name ephemeral_id: Id - id?: Id transport_address: TransportAddress external_id?: string attributes?: Record @@ -14432,7 +14441,7 @@ export interface MlJobStats { forecasts_stats: MlJobForecastStatistics job_id: string model_size_stats: MlModelSizeStats - node?: MlDiscoveryNode + node?: MlDiscoveryNodeCompact open_time?: DateTime state: MlJobState timing_stats: MlJobTimingStats @@ -14794,7 +14803,7 @@ export interface MlTrainedModelDeploymentNodesStats { inference_cache_hit_count?: long inference_cache_hit_count_last_minute?: long last_access?: long - node?: Record + node?: MlDiscoveryNode number_of_allocations?: integer number_of_pending_requests?: integer peak_throughput_per_minute: long @@ -15797,6 +15806,7 @@ export interface MlPutFilterResponse { export interface MlPutJobRequest extends RequestBase { job_id: Id + ignore_throttled?: boolean body?: { allow_lazy_open?: boolean analysis_config: MlAnalysisConfig diff --git a/specification/ml/_types/Datafeed.ts b/specification/ml/_types/Datafeed.ts index 77e1c8b7ac..07dc781843 100644 --- a/specification/ml/_types/Datafeed.ts +++ b/specification/ml/_types/Datafeed.ts @@ -32,7 +32,7 @@ import { UnitFloatMillis, UnitMillis } from '@_types/Time' -import { DiscoveryNode } from './DiscoveryNode' +import { DiscoveryNodeCompact } from './DiscoveryNode' export class Datafeed { /** @aliases aggs */ @@ -155,7 +155,7 @@ export class DatafeedStats { * For started datafeeds only, this information pertains to the node upon which the datafeed is started. * @availability stack */ - node?: DiscoveryNode + node?: DiscoveryNodeCompact /** * The status of the datafeed, which can be one of the following values: `starting`, `started`, `stopping`, `stopped`. */ diff --git a/specification/ml/_types/DiscoveryNode.ts b/specification/ml/_types/DiscoveryNode.ts index d548ad9dfa..86e64022d7 100644 --- a/specification/ml/_types/DiscoveryNode.ts +++ b/specification/ml/_types/DiscoveryNode.ts @@ -17,15 +17,16 @@ * under the License. */ -import { Dictionary } from '@spec_utils/Dictionary' +import { Dictionary, SingleKeyDictionary } from '@spec_utils/Dictionary' import { Id, Name, VersionString } from '@_types/common' import { TransportAddress } from '@_types/Networking' import { integer } from '@_types/Numeric' -export class DiscoveryNode { +export type DiscoveryNode = SingleKeyDictionary + +export class DiscoveryNodeContent { name?: Name ephemeral_id: Id - id?: Id transport_address: TransportAddress external_id?: string attributes?: Dictionary @@ -34,3 +35,14 @@ export class DiscoveryNode { min_index_version?: integer max_index_version?: integer } + +/** + * Alternative representation of DiscoveryNode used in ml.get_job_stats and ml.get_datafeed_stats + */ +export class DiscoveryNodeCompact { + name: Name + ephemeral_id: Id + id: Id + transport_address: TransportAddress + attributes?: Dictionary +} diff --git a/specification/ml/_types/Job.ts b/specification/ml/_types/Job.ts index b15656ac05..2eed0dcf4d 100644 --- a/specification/ml/_types/Job.ts +++ b/specification/ml/_types/Job.ts @@ -30,7 +30,7 @@ import { DurationValue, UnitFloatMillis } from '@_types/Time' -import { DiscoveryNode } from './DiscoveryNode' +import { DiscoveryNodeCompact } from './DiscoveryNode' import { ModelSizeStats } from './Model' export enum JobState { @@ -310,7 +310,7 @@ export class JobStats { * This information is available only for open jobs. * @availability stack */ - node?: DiscoveryNode + node?: DiscoveryNodeCompact /** * For open jobs only, the elapsed time for which the job has been open. */ diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index e62675deb1..574bea671c 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -165,7 +165,7 @@ export class TrainedModelDeploymentNodesStats { * Information pertaining to the node. * @availability stack */ - node?: Dictionary + node?: DiscoveryNode /** * The number of allocations assigned to this node. */ diff --git a/specification/ml/put_job/MlPutJobRequest.ts b/specification/ml/put_job/MlPutJobRequest.ts index 85c3f71164..269a6e57ca 100644 --- a/specification/ml/put_job/MlPutJobRequest.ts +++ b/specification/ml/put_job/MlPutJobRequest.ts @@ -44,6 +44,9 @@ export interface Request extends RequestBase { */ job_id: Id } + query_parameters: { + ignore_throttled?: boolean + } body: { /** * Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available.