From 2c1779b2ebbc65565d1f0432cb4df89cb5e7ec0c Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 2 Jan 2025 09:41:41 -0800 Subject: [PATCH 1/7] Add indices.get_data_lifecycle_stats --- .../elasticsearch-openapi-overlays.yaml | 12 +- output/openapi/elasticsearch-openapi.json | 65 +++++++ output/schema/schema.json | 168 ++++++++++++++++++ output/typescript/types.ts | 16 ++ specification/_doc_ids/table.csv | 1 + .../indices.get_data_lifecycle_stats.json | 21 +++ .../IndicesGetDataLifecycleStatsRequest.ts | 31 ++++ .../IndicesGetDataLifecycleStatsResponse.ts | 58 ++++++ ...GetDataLifecycleStatsResponseExample1.yaml | 17 ++ 9 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 specification/_json_spec/indices.get_data_lifecycle_stats.json create mode 100644 specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts create mode 100644 specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts create mode 100644 specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 502b6d2a18..d228a8e9a8 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -391,4 +391,14 @@ actions: application/json: examples: indicesLegacyPutTemplateRequestExample1: - $ref: "../../specification/indices/put_template/indicesPutTemplateRequestExample1.yaml" \ No newline at end of file + $ref: "../../specification/indices/put_template/indicesPutTemplateRequestExample1.yaml" + - target: "$.paths['/_lifecycle/stats']['get']" + description: "Add examples for get features operation" + update: + responses: + 200: + content: + application/json: + examples: + dataStreamLifecycleStatsResponseExample1: + $ref: "../../specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml" \ No newline at end of file diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 2ed7300db4..50f73c3d17 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -13156,6 +13156,50 @@ } } }, + "/_lifecycle/stats": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get data stream lifecycle stats", + "description": "Get statistics about the data streams that are managed by a data stream lifecycle.", + "operationId": "indices-get-data-lifecycle-stats", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_stream_count": { + "description": "The count of data streams currently being managed by the data stream lifecycle.", + "type": "number" + }, + "data_streams": { + "$ref": "#/components/schemas/indices.get_data_lifecycle_stats:DataStreamStats" + }, + "last_run_duration_in_millis": { + "description": "The duration of the last data stream lifecycle execution.", + "type": "number" + }, + "time_between_starts_in_millis": { + "description": "The time that passed between the start of the last two data stream lifecycle executions.\nThis value should amount approximately to `data_streams.lifecycle.poll_interval`.", + "type": "number" + } + }, + "required": [ + "data_stream_count", + "data_streams" + ] + } + } + } + } + }, + "x-state": "Added in 8.12.0" + } + }, "/_data_stream": { "get": { "tags": [ @@ -68989,6 +69033,27 @@ "name" ] }, + "indices.get_data_lifecycle_stats:DataStreamStats": { + "type": "object", + "properties": { + "backing_indices_in_error": { + "description": "The count of the backing indices for the data stream.", + "type": "number" + }, + "backing_indices_in_total": { + "description": "The count of the backing indices for the data stream that have encountered an error.", + "type": "number" + }, + "name": { + "$ref": "#/components/schemas/_types:DataStreamName" + } + }, + "required": [ + "backing_indices_in_error", + "backing_indices_in_total", + "name" + ] + }, "indices._types:DataStream": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 2d27f3ccf1..c267afb1f5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7088,6 +7088,44 @@ } ] }, + { + "availability": { + "stack": { + "since": "8.12.0", + "stability": "stable" + } + }, + "description": "Get data stream lifecycle stats.\nGet statistics about the data streams that are managed by a data stream lifecycle.", + "docId": "data-stream-lifecycle-stats", + "docTag": "data stream", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams-get-lifecycle-stats.html", + "name": "indices.get_data_lifecycle_stats", + "privileges": { + "cluster": [ + "monitor" + ] + }, + "request": { + "name": "Request", + "namespace": "indices.get_data_lifecycle_stats" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "indices.get_data_lifecycle_stats" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_lifecycle/stats" + } + ] + }, { "availability": { "serverless": { @@ -133304,6 +133342,136 @@ }, "specLocation": "indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25" }, + { + "kind": "interface", + "name": { + "name": "DataStreamStats", + "namespace": "indices.get_data_lifecycle_stats" + }, + "properties": [ + { + "description": "The count of the backing indices for the data stream.", + "name": "backing_indices_in_error", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The count of the backing indices for the data stream that have encountered an error.", + "name": "backing_indices_in_total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The name of the data stream.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamName", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L45-L58" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get data stream lifecycle stats.\nGet statistics about the data streams that are managed by a data stream lifecycle.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.get_data_lifecycle_stats" + }, + "path": [], + "query": [], + "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts#L22-L31" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "description": "The count of data streams currently being managed by the data stream lifecycle.", + "name": "data_stream_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Information about the data streams that are managed by the data stream lifecycle.", + "name": "data_streams", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamStats", + "namespace": "indices.get_data_lifecycle_stats" + } + } + }, + { + "description": "The duration of the last data stream lifecycle execution.", + "name": "last_run_duration_in_millis", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "The time that passed between the start of the last two data stream lifecycle executions.\nThis value should amount approximately to `data_streams.lifecycle.poll_interval`.", + "name": "time_between_starts_in_millis", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "indices.get_data_lifecycle_stats" + }, + "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L23-L43" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c19bb268e1..95683b4a7b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11904,6 +11904,22 @@ export interface IndicesGetDataLifecycleResponse { data_streams: IndicesGetDataLifecycleDataStreamWithLifecycle[] } +export interface IndicesGetDataLifecycleStatsDataStreamStats { + backing_indices_in_error: integer + backing_indices_in_total: integer + name: DataStreamName +} + +export interface IndicesGetDataLifecycleStatsRequest extends RequestBase { +} + +export interface IndicesGetDataLifecycleStatsResponse { + data_stream_count: integer + data_streams: IndicesGetDataLifecycleStatsDataStreamStats + last_run_duration_in_millis?: long + time_between_starts_in_millis?: long +} + export interface IndicesGetDataStreamRequest extends RequestBase { name?: DataStreamNames expand_wildcards?: ExpandWildcards diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 3b057b40f6..5492b9828b 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -118,6 +118,7 @@ convert-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branc cron-expressions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#api-cron-expressions csv-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/csv-processor.html data-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/date-processor.html +data-stream-lifecycle-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams-get-lifecycle-stats.html data-stream-path-param,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/indices-create-data-stream.html#indices-create-data-stream-api-path-params data-streams,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams.html date-index-name-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/date-index-name-processor.html diff --git a/specification/_json_spec/indices.get_data_lifecycle_stats.json b/specification/_json_spec/indices.get_data_lifecycle_stats.json new file mode 100644 index 0000000000..8c9e947903 --- /dev/null +++ b/specification/_json_spec/indices.get_data_lifecycle_stats.json @@ -0,0 +1,21 @@ +{ + "indices.get_data_lifecycle_stats": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle-stats.html", + "description": "Get data stream lifecycle statistics." + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_lifecycle/stats", + "methods": ["GET"] + } + ] + } + } +} diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts new file mode 100644 index 0000000000..5cb0a33b7c --- /dev/null +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts @@ -0,0 +1,31 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' + +/** + * Get data stream lifecycle stats. + * Get statistics about the data streams that are managed by a data stream lifecycle. + * @rest_spec_name indices.get_data_lifecycle_stats + * @availability stack since=8.12.0 stability=stable + * @cluster_privileges monitor + * @doc_tag data stream + * @doc_id data-stream-lifecycle-stats + */ +export interface Request extends RequestBase {} diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts new file mode 100644 index 0000000000..a54d5ca379 --- /dev/null +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -0,0 +1,58 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { DataStreamName } from '@_types/common' +import { integer, long } from '@_types/Numeric' + +export class Response { + body: { + /** + * The count of data streams currently being managed by the data stream lifecycle. + */ + data_stream_count: integer + /** + * Information about the data streams that are managed by the data stream lifecycle. + */ + data_streams: DataStreamStats + /** + * The duration of the last data stream lifecycle execution. + */ + last_run_duration_in_millis?: long + /** + * The time that passed between the start of the last two data stream lifecycle executions. + * This value should amount approximately to `data_streams.lifecycle.poll_interval`. + */ + time_between_starts_in_millis?: long + } +} + +class DataStreamStats { + /** + * The count of the backing indices for the data stream. + */ + backing_indices_in_error: integer + /** + * The count of the backing indices for the data stream that have encountered an error. + */ + backing_indices_in_total: integer + /** + * The name of the data stream. + */ + name: DataStreamName +} diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml new file mode 100644 index 0000000000..04a9ff05ee --- /dev/null +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml @@ -0,0 +1,17 @@ +# summary: +description: A successful response for `GET _lifecycle/stats?human&pretty` +# type: response +# response_code: 200 +value: + last_run_duration_in_millis: 2 + last_run_duration: 2ms + time_between_starts_in_millis: 9998 + time_between_starts: 9.99s + data_streams_count: 2 + data_streams: + - name: my-data-stream + backing_indices_in_total: 2 + backing_indices_in_error: 0 + - name: my-other-stream + backing_indices_in_total: 2 + backing_indices_in_error: 1 From 92cb932cde86950b4f9f14eceaaeea286dc0a9d8 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Tue, 7 Jan 2025 14:41:08 -0800 Subject: [PATCH 2/7] Update specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts Co-authored-by: Josh Mock --- .../IndicesGetDataLifecycleStatsResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts index a54d5ca379..bd52a14401 100644 --- a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -29,7 +29,7 @@ export class Response { /** * Information about the data streams that are managed by the data stream lifecycle. */ - data_streams: DataStreamStats + data_streams: DataStreamStats[] /** * The duration of the last data stream lifecycle execution. */ From fcea5025c0608a45dc799f7b636a75b9da5572c1 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 7 Jan 2025 17:20:08 -0800 Subject: [PATCH 3/7] Add examples subfolder --- docs/overlays/elasticsearch-openapi-overlays.yaml | 2 +- output/openapi/elasticsearch-openapi.json | 6 +++++- output/schema/schema.json | 11 +++++++---- output/typescript/types.ts | 2 +- .../IndicesGetDataLifecycleStatsResponseExample1.yaml | 0 5 files changed, 14 insertions(+), 7 deletions(-) rename specification/indices/get_data_lifecycle_stats/{ => examples/response}/IndicesGetDataLifecycleStatsResponseExample1.yaml (100%) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 97bfe1629e..d87c583e32 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -413,7 +413,7 @@ actions: application/json: examples: dataStreamLifecycleStatsResponseExample1: - $ref: "../../specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml" + $ref: "../../specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml" ## Examples for licensing - target: "$.paths['/_license/basic_status']['get']" description: "Add example for get basic status response" diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 0ea2c9bc24..64279c42f2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -13270,7 +13270,11 @@ "type": "number" }, "data_streams": { - "$ref": "#/components/schemas/indices.get_data_lifecycle_stats:DataStreamStats" + "description": "Information about the data streams that are managed by the data stream lifecycle.", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_lifecycle_stats:DataStreamStats" + } }, "last_run_duration_in_millis": { "description": "The duration of the last data stream lifecycle execution.", diff --git a/output/schema/schema.json b/output/schema/schema.json index bfa6fdd843..cfa8e6d7a4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -133835,10 +133835,13 @@ "name": "data_streams", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "DataStreamStats", - "namespace": "indices.get_data_lifecycle_stats" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamStats", + "namespace": "indices.get_data_lifecycle_stats" + } } } }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 7ebcd9830c..b824cfc52a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11930,7 +11930,7 @@ export interface IndicesGetDataLifecycleStatsRequest extends RequestBase { export interface IndicesGetDataLifecycleStatsResponse { data_stream_count: integer - data_streams: IndicesGetDataLifecycleStatsDataStreamStats + data_streams: IndicesGetDataLifecycleStatsDataStreamStats[] last_run_duration_in_millis?: long time_between_starts_in_millis?: long } diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml b/specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml similarity index 100% rename from specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponseExample1.yaml rename to specification/indices/get_data_lifecycle_stats/examples/response/IndicesGetDataLifecycleStatsResponseExample1.yaml From 0a4f0c2678585436738af10929f30fee35286a40 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 8 Jan 2025 10:23:07 -0800 Subject: [PATCH 4/7] Update specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts Co-authored-by: Florian Bernd --- .../IndicesGetDataLifecycleStatsResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts index bd52a14401..581387e73c 100644 --- a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -33,7 +33,7 @@ export class Response { /** * The duration of the last data stream lifecycle execution. */ - last_run_duration_in_millis?: long + last_run_duration_in_millis?: DurationValue /** * The time that passed between the start of the last two data stream lifecycle executions. * This value should amount approximately to `data_streams.lifecycle.poll_interval`. From bbde615875d8963b08397b9fc5dfde2f4c460679 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 8 Jan 2025 10:23:16 -0800 Subject: [PATCH 5/7] Update specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts Co-authored-by: Florian Bernd --- .../IndicesGetDataLifecycleStatsResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts index 581387e73c..4511d53d16 100644 --- a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -38,7 +38,7 @@ export class Response { * The time that passed between the start of the last two data stream lifecycle executions. * This value should amount approximately to `data_streams.lifecycle.poll_interval`. */ - time_between_starts_in_millis?: long + time_between_starts_in_millis?: DurationValue } } From b77b3cbd88d395a2402ec15284915c0b1c8f1601 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 8 Jan 2025 10:26:43 -0800 Subject: [PATCH 6/7] Add duration imports --- output/openapi/elasticsearch-openapi.json | 6 ++--- output/schema/schema.json | 26 ++++++++++++++++--- output/typescript/types.ts | 4 +-- .../IndicesGetDataLifecycleStatsResponse.ts | 3 ++- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 64279c42f2..4e760d5fd3 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -13277,12 +13277,10 @@ } }, "last_run_duration_in_millis": { - "description": "The duration of the last data stream lifecycle execution.", - "type": "number" + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" }, "time_between_starts_in_millis": { - "description": "The time that passed between the start of the last two data stream lifecycle executions.\nThis value should amount approximately to `data_streams.lifecycle.poll_interval`.", - "type": "number" + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" } }, "required": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index cfa8e6d7a4..d4a4133026 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -133788,7 +133788,7 @@ } } ], - "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L45-L58" + "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59" }, { "kind": "request", @@ -133851,8 +133851,17 @@ "required": false, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], "type": { - "name": "long", + "name": "DurationValue", "namespace": "_types" } } @@ -133863,8 +133872,17 @@ "required": false, "type": { "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], "type": { - "name": "long", + "name": "DurationValue", "namespace": "_types" } } @@ -133875,7 +133893,7 @@ "name": "Response", "namespace": "indices.get_data_lifecycle_stats" }, - "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L23-L43" + "specLocation": "indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b824cfc52a..b92ff42867 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11931,8 +11931,8 @@ export interface IndicesGetDataLifecycleStatsRequest extends RequestBase { export interface IndicesGetDataLifecycleStatsResponse { data_stream_count: integer data_streams: IndicesGetDataLifecycleStatsDataStreamStats[] - last_run_duration_in_millis?: long - time_between_starts_in_millis?: long + last_run_duration_in_millis?: DurationValue + time_between_starts_in_millis?: DurationValue } export interface IndicesGetDataStreamRequest extends RequestBase { diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts index 4511d53d16..74f49d88e5 100644 --- a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -18,7 +18,8 @@ */ import { DataStreamName } from '@_types/common' -import { integer, long } from '@_types/Numeric' +import { DurationValue, UnitMillis } from '@_types/Time' +import { integer } from '@_types/Numeric' export class Response { body: { From f09b6d5c00117ef4da457d4b0bf6aa79032750cb Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 8 Jan 2025 12:04:10 -0800 Subject: [PATCH 7/7] Fix code style issue --- .../IndicesGetDataLifecycleStatsResponse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts index 74f49d88e5..54a43b7dd7 100644 --- a/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts +++ b/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts @@ -18,8 +18,8 @@ */ import { DataStreamName } from '@_types/common' -import { DurationValue, UnitMillis } from '@_types/Time' import { integer } from '@_types/Numeric' +import { DurationValue, UnitMillis } from '@_types/Time' export class Response { body: {