From f7b5d2830d8ff9441ccb9e1b25e69e34b32c78e9 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 27 May 2025 13:43:56 -0500 Subject: [PATCH 01/15] Adding specification for the new data stream settings APIs --- output/schema/schema.json | 460 +++++++++++++++++- output/schema/validation-errors.json | 4 +- output/typescript/types.ts | 47 ++ package-lock.json | 143 +++--- package.json | 2 +- specification/_doc_ids/table.csv | 2 + .../indices.get_data_stream_settings.json | 9 +- .../indices.put_data_stream_settings.json | 13 +- specification/indices/_types/DataStream.ts | 6 + .../IndicesGetDataStreamSettingsRequest.ts | 55 +++ .../IndicesGetDataStreamSettingsResponse.ts | 33 ++ .../IndicesPutDataStreamSettingsRequest.ts | 75 +++ .../IndicesPutDataStreamSettingsResponse.ts | 76 +++ 13 files changed, 825 insertions(+), 100 deletions(-) create mode 100644 specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts create mode 100644 specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts create mode 100644 specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts create mode 100644 specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts diff --git a/output/schema/schema.json b/output/schema/schema.json index b7a4242e0d..2b81bf5210 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7760,18 +7760,35 @@ }, { "availability": { + "serverless": { + "featureFlag": "logs_stream", + "stability": "stable", + "visibility": "feature_flag" + }, "stack": { "featureFlag": "logs_stream", "stability": "stable", "visibility": "feature_flag" } }, - "description": "Gets a data stream's settings", + "description": "Get data stream settings.\nGet setting information for one or more data streams.", + "docId": "indices-get-data-stream-settings", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "name": "indices.get_data_stream_settings", - "request": null, + "privileges": { + "index": [ + "view_index_metadata" + ] + }, + "request": { + "name": "Request", + "namespace": "indices.get_data_stream_settings" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "indices.get_data_stream_settings" + }, "responseMediaType": [ "application/json" ], @@ -8372,18 +8389,35 @@ }, { "availability": { + "serverless": { + "featureFlag": "logs_stream", + "stability": "stable", + "visibility": "feature_flag" + }, "stack": { "featureFlag": "logs_stream", "stability": "stable", "visibility": "feature_flag" } }, - "description": "Updates a data stream's settings", + "description": "Update data stream settings.\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent users from getting into an invalid state,\nonly certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all\nbacking indices. Otherwise, it will be applied only whenever the data stream is next rolled over.", + "docId": "indices-put-data-stream-settings", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", "name": "indices.put_data_stream_settings", - "request": null, + "privileges": { + "index": [ + "manage" + ] + }, + "request": { + "name": "Request", + "namespace": "indices.put_data_stream_settings" + }, "requestBodyRequired": true, - "response": null, + "response": { + "name": "Response", + "namespace": "indices.put_data_stream_settings" + }, "responseMediaType": [ "application/json" ], @@ -133870,6 +133904,18 @@ } } }, + { + "description": "The settings specific to this data stream that will take precedence over the settings in the matching index\ntemplate.", + "name": "settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, { "description": "Health status of the data stream.\nThis health status is based on the state of the primary and replica shards of the stream’s backing indices.", "name": "status", @@ -133937,7 +133983,7 @@ } } ], - "specLocation": "indices/_types/DataStream.ts#L53-L139" + "specLocation": "indices/_types/DataStream.ts#L54-L145" }, { "kind": "interface", @@ -134019,7 +134065,7 @@ } } ], - "specLocation": "indices/_types/DataStream.ts#L148-L173" + "specLocation": "indices/_types/DataStream.ts#L154-L179" }, { "kind": "interface", @@ -134263,7 +134309,7 @@ } } ], - "specLocation": "indices/_types/DataStream.ts#L141-L146" + "specLocation": "indices/_types/DataStream.ts#L147-L152" }, { "kind": "interface", @@ -134295,7 +134341,7 @@ } } ], - "specLocation": "indices/_types/DataStream.ts#L175-L178" + "specLocation": "indices/_types/DataStream.ts#L181-L184" }, { "kind": "interface", @@ -134397,7 +134443,7 @@ } } ], - "specLocation": "indices/_types/DataStream.ts#L47-L51" + "specLocation": "indices/_types/DataStream.ts#L48-L52" }, { "kind": "interface", @@ -134482,7 +134528,7 @@ "name": "IndexMode", "namespace": "indices._types" }, - "specLocation": "indices/_types/DataStream.ts#L40-L45" + "specLocation": "indices/_types/DataStream.ts#L41-L46" }, { "kind": "interface", @@ -136573,7 +136619,7 @@ "name": "ManagedBy", "namespace": "indices._types" }, - "specLocation": "indices/_types/DataStream.ts#L32-L37" + "specLocation": "indices/_types/DataStream.ts#L33-L38" }, { "kind": "interface", @@ -143299,6 +143345,115 @@ }, "specLocation": "indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24" }, + { + "kind": "interface", + "name": { + "name": "DataStreamSettings", + "namespace": "indices.get_data_stream_settings" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L30-L33" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get data stream settings.\nGet setting information for one or more data streams.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.get_data_stream_settings" + }, + "path": [ + { + "description": "Comma-separated list of data streams or data stream patterns, used to limit\nthe request. Supports wildcards (`*`).", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L56" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "data_streams", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamSettings", + "namespace": "indices.get_data_stream_settings" + } + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "indices.get_data_stream_settings" + }, + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L23-L28" + }, { "kind": "request", "attachedBehaviors": [ @@ -145200,6 +145355,285 @@ }, "specLocation": "indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25" }, + { + "kind": "interface", + "name": { + "name": "DataStreamSettings", + "namespace": "indices.put_data_stream_settings" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "description": "True if the settings were successfully applied to the data stream (or would have been, if running in dry_run\nmode). False if an error occurred.", + "name": "applied_to_data_stream", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "A message explaining why the settings could not be applied to the data stream.", + "name": "error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The settings that are specfic to this data stream that will override any settings from the matching index template.", + "name": "settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, + { + "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specfic to this data stream.", + "name": "effective_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, + { + "description": "Information about whether and where each setting was applied.", + "name": "index_settings_results", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettingResults", + "namespace": "indices.put_data_stream_settings" + } + } + } + ], + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L54" + }, + { + "kind": "interface", + "name": { + "name": "DataStreamSettingsError", + "namespace": "indices.put_data_stream_settings" + }, + "properties": [ + { + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "description": "A message explaining why the settings could not be applied to specific indices.", + "name": "error", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L70-L76" + }, + { + "kind": "interface", + "name": { + "name": "IndexSettingResults", + "namespace": "indices.put_data_stream_settings" + }, + "properties": [ + { + "description": "The list of settings that were applied to the data stream but not to backing indices. These will be applied to\nthe write index the next time the data stream is rolled over.", + "name": "applied_to_data_stream_only", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "The list of settings that were applied to the data stream and to all of its backing indices. These settings will\nalso be applied to the write index the next time the data stream is rolled over.", + "name": "applied_to_data_stream_and_backing_indices", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "errors", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamSettingsError", + "namespace": "indices.put_data_stream_settings" + } + } + } + } + ], + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L56-L68" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "settings", + "value": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, + "description": "Update data stream settings.\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent users from getting into an invalid state,\nonly certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all\nbacking indices. Otherwise, it will be applied only whenever the data stream is next rolled over.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.put_data_stream_settings" + }, + "path": [ + { + "description": "Comma-separated list of data streams or data stream patterns", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "If `true`, the request does not actually change the settings on any data streams or indices. Instead, it\nsimulates changing the settings and reports back to the user what would have happened had these settings\nactually been applied.", + "name": "dry_run", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "Period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L75" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "data_streams", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamSettings", + "namespace": "indices.put_data_stream_settings" + } + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "indices.put_data_stream_settings" + }, + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L23-L28" + }, { "kind": "interface", "name": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index e8e97c27e8..e925ce3912 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -155,5 +155,7 @@ "response": [] } }, - "generalErrors": [] + "generalErrors": [ + "DataStreamSettings is present in multiple namespaces: indices.get_data_stream_settings and indices.put_data_stream_settings" + ] } \ No newline at end of file diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a9edfbc717..cf5225a932 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11381,6 +11381,7 @@ export interface IndicesDataStream { name: DataStreamName replicated?: boolean rollover_on_write: boolean + settings: IndicesIndexSettings status: HealthStatus system?: boolean template: Name @@ -12361,6 +12362,20 @@ export interface IndicesGetDataStreamResponse { data_streams: IndicesDataStream[] } +export interface IndicesGetDataStreamSettingsDataStreamSettings { + name: string + settings: IndicesIndexSettings +} + +export interface IndicesGetDataStreamSettingsRequest extends RequestBase { + name: Indices + master_timeout?: Duration +} + +export interface IndicesGetDataStreamSettingsResponse { + data_streams: IndicesGetDataStreamSettingsDataStreamSettings[] +} + export interface IndicesGetFieldMappingRequest extends RequestBase { fields: Fields index?: Indices @@ -12555,6 +12570,38 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase { export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase +export interface IndicesPutDataStreamSettingsDataStreamSettings { + name: IndexName + applied_to_data_stream: boolean + error?: string + settings: IndicesIndexSettings + effective_settings: IndicesIndexSettings + index_settings_results: IndicesPutDataStreamSettingsIndexSettingResults +} + +export interface IndicesPutDataStreamSettingsDataStreamSettingsError { + index: IndexName + error: string +} + +export interface IndicesPutDataStreamSettingsIndexSettingResults { + applied_to_data_stream_only: string[] + applied_to_data_stream_and_backing_indices: string[] + errors?: IndicesPutDataStreamSettingsDataStreamSettingsError[] +} + +export interface IndicesPutDataStreamSettingsRequest extends RequestBase { + name: Indices + dry_run?: boolean + master_timeout?: Duration + timeout?: Duration + body?: IndicesIndexSettings +} + +export interface IndicesPutDataStreamSettingsResponse { + data_streams: IndicesPutDataStreamSettingsDataStreamSettings[] +} + export interface IndicesPutIndexTemplateIndexTemplateMapping { aliases?: Record mappings?: MappingTypeMapping diff --git a/package-lock.json b/package-lock.json index 407084b9a7..3f400aa677 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@redocly/cli": "^1.34.1", + "@redocly/cli": "^1.34.3", "@stoplight/spectral-cli": "^6.14.2" } }, @@ -19,36 +19,33 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz", + "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/runtime": { - "version": "7.26.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz", - "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.3.tgz", + "integrity": "sha512-7EYtGezsdiDMyY80+65EzwiGmcJqpmcZCojSXaRgdrBaGtWTgDZKq69cPIVped6MkIM78cTQ2GOiEYjwOlG4xw==", "license": "MIT", - "dependencies": { - "regenerator-runtime": "^0.14.0" - }, "engines": { "node": ">=6.9.0" } @@ -486,9 +483,9 @@ } }, "node_modules/@redocly/cli": { - "version": "1.34.1", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.1.tgz", - "integrity": "sha512-12aTw7A/0n+8T7yKM1E8qlFRFPZnm2i1me0sZ1WOAiGT4I2j4iUcCp+93B0nrjIs1ZdNmrT0TTrMYLhsMJYjaQ==", + "version": "1.34.3", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.34.3.tgz", + "integrity": "sha512-GJNBTMfm5wTCtH6K+RtPQZuGbqflMclXqAZ5My12tfux6xFDMW1l0MNd5RMpnIS1aeFcDX++P1gnnROWlesj4w==", "license": "MIT", "dependencies": { "@opentelemetry/api": "1.9.0", @@ -497,8 +494,8 @@ "@opentelemetry/sdk-trace-node": "1.26.0", "@opentelemetry/semantic-conventions": "1.27.0", "@redocly/config": "^0.22.0", - "@redocly/openapi-core": "1.34.1", - "@redocly/respect-core": "1.34.1", + "@redocly/openapi-core": "1.34.3", + "@redocly/respect-core": "1.34.3", "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", @@ -512,7 +509,7 @@ "pluralize": "^8.0.0", "react": "^17.0.0 || ^18.2.0 || ^19.0.0", "react-dom": "^17.0.0 || ^18.2.0 || ^19.0.0", - "redoc": "2.4.0", + "redoc": "2.5.0", "semver": "^7.5.2", "simple-websocket": "^9.0.0", "styled-components": "^6.0.7", @@ -555,15 +552,15 @@ } }, "node_modules/@redocly/config": { - "version": "0.22.1", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.1.tgz", - "integrity": "sha512-1CqQfiG456v9ZgYBG9xRQHnpXjt8WoSnDwdkX6gxktuK69v2037hTAR1eh0DGIqpZ1p4k82cGH8yTNwt7/pI9g==", + "version": "0.22.2", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.2.tgz", + "integrity": "sha512-roRDai8/zr2S9YfmzUfNhKjOF0NdcOIqF7bhf4MVC5UxpjIysDjyudvlAiVbpPHp3eDRWbdzUgtkK1a7YiDNyQ==", "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.34.1", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.1.tgz", - "integrity": "sha512-KI1QOGvDk6oREbTu0JORxZX1NBxraXUbXczv0LYDs9EPp06coq874hQORqSHGEUV/DX2A6gjv4Ax33g/LFJBww==", + "version": "1.34.3", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.3.tgz", + "integrity": "sha512-3arRdUp1fNx55itnjKiUhO6t4Mf91TsrTIYINDNLAZPS0TPd5YpiXRctwjel0qqWoOOhjA34cZ3m4dksLDFUYg==", "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", @@ -603,14 +600,14 @@ } }, "node_modules/@redocly/respect-core": { - "version": "1.34.1", - "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.1.tgz", - "integrity": "sha512-Lzea25WqwxVK5+aCiq/pr7lUFdsZPYSqNzl05Z4jEtuP1DEIxJNG31ID75dZt30pPtyxjaa/dBuccruYlYflzw==", + "version": "1.34.3", + "resolved": "https://registry.npmjs.org/@redocly/respect-core/-/respect-core-1.34.3.tgz", + "integrity": "sha512-vo/gu7dRGwTVsRueVSjVk04jOQuL0w22RBJRdRUWkfyse791tYXgMCOx35ijKekL83Q/7Okxf/YX6UY1v5CAug==", "license": "MIT", "dependencies": { "@faker-js/faker": "^7.6.0", "@redocly/ajv": "8.11.2", - "@redocly/openapi-core": "1.34.1", + "@redocly/openapi-core": "1.34.3", "better-ajv-errors": "^1.2.0", "colorette": "^2.0.20", "concat-stream": "^2.0.0", @@ -1669,9 +1666,9 @@ } }, "node_modules/core-js": { - "version": "3.41.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.41.0.tgz", - "integrity": "sha512-SJ4/EHwS36QMJd6h/Rg+GyR4A5xE0FSI3eZ+iBVpfqf1x0eTSg1smWLHrA+2jQThZSh97fmSgFSU8B61nxosxA==", + "version": "3.42.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.42.0.tgz", + "integrity": "sha512-Sz4PP4ZA+Rq4II21qkNqOEDTDrCvcANId3xpIgB34NDkWc3UduWj2dqEtN9yZIq8Dk3HyPI33x9sqqU5C8sr0g==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -1879,9 +1876,9 @@ } }, "node_modules/dompurify": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.4.tgz", - "integrity": "sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.6.tgz", + "integrity": "sha512-/2GogDQlohXPZe6D6NOgQvXLPSYBqIWMnZ8zzOhn09REE4eyAzb+Hed3jhoM9OkuaJ8P6ZGTTVWQKAi8ieIzfQ==", "license": "(MPL-2.0 OR Apache-2.0)", "optionalDependencies": { "@types/trusted-types": "^2.0.7" @@ -3154,9 +3151,9 @@ } }, "node_modules/mobx": { - "version": "6.13.6", - "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.13.6.tgz", - "integrity": "sha512-r19KNV0uBN4b+ER8Z0gA4y+MzDYIQ2SvOmn3fUrqPnWXdQfakd9yfbPBDBF/p5I+bd3N5Rk1fHONIvMay+bJGA==", + "version": "6.13.7", + "resolved": "https://registry.npmjs.org/mobx/-/mobx-6.13.7.tgz", + "integrity": "sha512-aChaVU/DO5aRPmk1GX8L+whocagUUpBQqoPtJk+cm7UOXUk87J4PeWCh6nNmTTIfEhiR9DI/+FnA8dln/hTK7g==", "license": "MIT", "funding": { "type": "opencollective", @@ -3220,9 +3217,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.9", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.9.tgz", - "integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "funding": [ { "type": "github", @@ -3445,9 +3442,9 @@ } }, "node_modules/open": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", - "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", + "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", "license": "MIT", "dependencies": { "default-browser": "^5.2.1", @@ -3704,24 +3701,24 @@ } }, "node_modules/react": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", - "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz", + "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", - "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "version": "19.1.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz", + "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", "license": "MIT", "dependencies": { - "scheduler": "^0.25.0" + "scheduler": "^0.26.0" }, "peerDependencies": { - "react": "^19.0.0" + "react": "^19.1.0" } }, "node_modules/react-is": { @@ -3770,15 +3767,15 @@ } }, "node_modules/redoc": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.4.0.tgz", - "integrity": "sha512-rFlfzFVWS9XJ6aYAs/bHnLhHP5FQEhwAHDBVgwb9L2FqDQ8Hu8rQ1G84iwaWXxZfPP9UWn7JdWkxI6MXr2ZDjw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.5.0.tgz", + "integrity": "sha512-NpYsOZ1PD9qFdjbLVBZJWptqE+4Y6TkUuvEOqPUmoH7AKOmPcE+hYjotLxQNTqVoWL4z0T2uxILmcc8JGDci+Q==", "license": "MIT", "dependencies": { "@redocly/openapi-core": "^1.4.0", "classnames": "^2.3.2", "decko": "^1.2.0", - "dompurify": "^3.0.6", + "dompurify": "^3.2.4", "eventemitter3": "^5.0.1", "json-pointer": "^0.6.2", "lunr": "^2.3.9", @@ -3818,12 +3815,6 @@ "url": "https://github.com/Mermade/oas-kit?sponsor=1" } }, - "node_modules/regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "license": "MIT" - }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -3998,9 +3989,9 @@ "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" }, "node_modules/scheduler": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", - "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", "license": "MIT" }, "node_modules/semver": { @@ -4305,9 +4296,9 @@ "license": "MIT" }, "node_modules/styled-components": { - "version": "6.1.15", - "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.15.tgz", - "integrity": "sha512-PpOTEztW87Ua2xbmLa7yssjNyUF9vE7wdldRfn1I2E6RTkqknkBYpj771OxM/xrvRGinLy2oysa7GOd7NcZZIA==", + "version": "6.1.18", + "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.1.18.tgz", + "integrity": "sha512-Mvf3gJFzZCkhjY2Y/Fx9z1m3dxbza0uI9H1CbNZm/jSHCojzJhQ0R7bByrlFJINnMzz/gPulpoFFGymNwrsMcw==", "license": "MIT", "dependencies": { "@emotion/is-prop-valid": "1.2.2", @@ -4526,9 +4517,9 @@ } }, "node_modules/undici": { - "version": "6.21.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.2.tgz", - "integrity": "sha512-uROZWze0R0itiAKVPsYhFov9LxrPMHLMEQFszeI2gCN6bnIIZ8twzBCJcN2LJrBBLfrP0t1FW0g+JmKVl8Vk1g==", + "version": "6.21.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", + "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", "license": "MIT", "engines": { "node": ">=18.17" @@ -4566,9 +4557,9 @@ "license": "BSD" }, "node_modules/use-sync-external-store": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz", - "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", + "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", "license": "MIT", "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" diff --git a/package.json b/package.json index 65aafaa259..3284efbed5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@redocly/cli": "^1.34.1", + "@redocly/cli": "^1.34.3", "@stoplight/spectral-cli": "^6.14.2" } } diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index bc6ca26e6a..ac2952751d 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -305,6 +305,7 @@ indices-exists,https://www.elastic.co/docs/api/doc/elasticsearch/operation/opera indices-flush,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush indices-forcemerge,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge indices-get-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias +indices-get-data-stream-settings,https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html indices-get-field-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping indices-get-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get indices-get-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping @@ -312,6 +313,7 @@ indices-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation indices-get-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template indices-get-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template indices-open-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open +indices-put-data-stream-settings,https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html indices-put-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping indices-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery indices-refresh,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh diff --git a/specification/_json_spec/indices.get_data_stream_settings.json b/specification/_json_spec/indices.get_data_stream_settings.json index 856a2a2aca..6043aa225b 100644 --- a/specification/_json_spec/indices.get_data_stream_settings.json +++ b/specification/_json_spec/indices.get_data_stream_settings.json @@ -18,20 +18,17 @@ "parts": { "name": { "type": "string", - "description": "The name of the data stream or data stream pattern" + "description": "Comma-separated list of data streams or data stream patterns" } } } ] }, "params": { - "timeout": { - "type": "time", - "description": "Specify timeout for acknowledging the cluster state update" - }, "master_timeout": { "type": "time", - "description": "Specify timeout for connection to master" + "description": "Specify timeout for connection to master", + "default": "30s" } } } diff --git a/specification/_json_spec/indices.put_data_stream_settings.json b/specification/_json_spec/indices.put_data_stream_settings.json index 567842eb5d..121e57b8ae 100644 --- a/specification/_json_spec/indices.put_data_stream_settings.json +++ b/specification/_json_spec/indices.put_data_stream_settings.json @@ -18,20 +18,27 @@ "parts": { "name": { "type": "string", - "description": "The name of the data stream or data stream pattern" + "description": "Comma-separated list of data streams or data stream patterns" } } } ] }, "params": { + "dry_run": { + "type": "boolean", + "description": "Whether this request should only be a dry run rather than actually applying settings", + "default": false + }, "timeout": { "type": "time", - "description": "Specify timeout for acknowledging the cluster state update" + "description": "Period to wait for a response", + "default": "30s" }, "master_timeout": { "type": "time", - "description": "Specify timeout for connection to master" + "description": "Period to wait for a connection to the master node", + "default": "30s" } }, "body": { diff --git a/specification/indices/_types/DataStream.ts b/specification/indices/_types/DataStream.ts index 4c9e8e223f..7fd666c6fe 100644 --- a/specification/indices/_types/DataStream.ts +++ b/specification/indices/_types/DataStream.ts @@ -27,6 +27,7 @@ import { Name, Uuid } from '@_types/common' +import { IndexSettings } from '@indices/_types/IndexSettings' import { integer } from '@_types/Numeric' enum ManagedBy { @@ -112,6 +113,11 @@ export class DataStream { * If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too. */ rollover_on_write: boolean + /** + * The settings specific to this data stream that will take precedence over the settings in the matching index + * template. + */ + settings: IndexSettings /** * Health status of the data stream. * This health status is based on the state of the primary and replica shards of the stream’s backing indices. diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts new file mode 100644 index 0000000000..b050b8ad5e --- /dev/null +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -0,0 +1,55 @@ +/* + * 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' +import { ExpandWildcards, Indices, Names } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Get data stream settings. + * Get setting information for one or more data streams. + * @rest_spec_name indices.get_data_stream_settings + * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream + * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream + * @index_privileges view_index_metadata + * @doc_id indices-get-data-stream-settings + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_data_stream/{name}/_settings' + methods: ['GET'] + } + ] + path_parts: { + /** + * Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). + */ + name: Indices + } + query_parameters: { + /** + * 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. + * @server_default 30s + */ + master_timeout?: Duration + } +} diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts new file mode 100644 index 0000000000..cdb6699af3 --- /dev/null +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts @@ -0,0 +1,33 @@ +/* + * 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 { IndexName } from '@_types/common' +import { IndexSettings } from '@indices/_types/IndexSettings' + +export class Response { + /** @codegen_name data_stream_settings */ + body: { + data_streams: Array + } +} + +export class DataStreamSettings { + name: string + settings: IndexSettings +} diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts new file mode 100644 index 0000000000..7d4bf3f4a8 --- /dev/null +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -0,0 +1,75 @@ +/* + * 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 { IndexSettings } from '@indices/_types/IndexSettings' +import { RequestBase } from '@_types/Base' +import { ExpandWildcards, Indices } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Update data stream settings. + * This API can be used to override settings on specific data streams. These overrides will take precedence over what + * is specified in the template that the data stream matches. To prevent users from getting into an invalid state, + * only certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all + * backing indices. Otherwise, it will be applied only whenever the data stream is next rolled over. + * @rest_spec_name indices.put_data_stream_settings + * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream + * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream + * @index_privileges manage + * @doc_id indices-put-data-stream-settings + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_data_stream/{name}/_settings' + methods: ['PUT'] + } + ] + path_parts: { + /** + * Comma-separated list of data streams or data stream patterns + */ + name: Indices + } + query_parameters: { + /** + * If `true`, the request does not actually change the settings on any data streams or indices. Instead, it + * simulates changing the settings and reports back to the user what would have happened had these settings + * actually been applied. + * @server_default false + */ + dry_run?: boolean + /** + * 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. + * @server_default 30s + */ + master_timeout?: Duration + /** + * Period to wait for a response. If no response is received before the + * timeout expires, the request fails and returns an error. + * @server_default 30s + */ + timeout?: Duration + } + /** Settings to be applied to the data stream. + * @codegen_name settings */ + body: IndexSettings +} diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts new file mode 100644 index 0000000000..b458cb3b09 --- /dev/null +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -0,0 +1,76 @@ +/* + * 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 { IndexName } from '@_types/common' +import { IndexSettings } from '@indices/_types/IndexSettings' + +export class Response { + /** @codegen_name data_stream_settings_results */ + body: { + data_streams: Array + } +} + +export class DataStreamSettings { + name: IndexName + /** + * True if the settings were successfully applied to the data stream (or would have been, if running in dry_run + * mode). False if an error occurred. + */ + applied_to_data_stream: boolean + /** + * A message explaining why the settings could not be applied to the data stream. + */ + error?: string + /** + * The settings that are specfic to this data stream that will override any settings from the matching index template. + */ + settings: IndexSettings + /** + * The settings that are effective on this data stream, taking into account the settings from the matching index + * template and the settings specfic to this data stream. + */ + effective_settings: IndexSettings + /** + * Information about whether and where each setting was applied. + */ + index_settings_results: IndexSettingResults +} + +export class IndexSettingResults { + /** + * The list of settings that were applied to the data stream but not to backing indices. These will be applied to + * the write index the next time the data stream is rolled over. + */ + applied_to_data_stream_only: Array + /** + * The list of settings that were applied to the data stream and to all of its backing indices. These settings will + * also be applied to the write index the next time the data stream is rolled over. + */ + applied_to_data_stream_and_backing_indices: Array + errors?: Array +} + +export class DataStreamSettingsError { + index: IndexName + /** + * A message explaining why the settings could not be applied to specific indices. + */ + error: string +} \ No newline at end of file From 2aeb4cbd3aa8dc7a2a635d9640e5a3f9a2b13074 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 27 May 2025 13:57:35 -0500 Subject: [PATCH 02/15] formatting --- output/schema/schema.json | 4 +- specification/indices/_types/DataStream.ts | 80 +++++++++---------- .../IndicesGetDataStreamSettingsRequest.ts | 22 ++--- .../IndicesGetDataStreamSettingsResponse.ts | 12 +-- .../IndicesPutDataStreamSettingsRequest.ts | 30 +++---- .../IndicesPutDataStreamSettingsResponse.ts | 58 +++++++------- 6 files changed, 103 insertions(+), 103 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 2b81bf5210..eaff67a2fa 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143398,7 +143398,7 @@ }, "path": [ { - "description": "Comma-separated list of data streams or data stream patterns, used to limit\nthe request. Supports wildcards (`*`).", + "description": "Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", "name": "name", "required": true, "type": { @@ -143425,7 +143425,7 @@ } } ], - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L56" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L55" }, { "kind": "response", diff --git a/specification/indices/_types/DataStream.ts b/specification/indices/_types/DataStream.ts index 7fd666c6fe..a737beace8 100644 --- a/specification/indices/_types/DataStream.ts +++ b/specification/indices/_types/DataStream.ts @@ -17,7 +17,7 @@ * under the License. */ -import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' +import { DataStreamLifecycleWithRollover } from "@indices/_types/DataStreamLifecycle"; import { DataStreamName, Field, @@ -25,16 +25,16 @@ import { IndexName, Metadata, Name, - Uuid -} from '@_types/common' -import { IndexSettings } from '@indices/_types/IndexSettings' -import { integer } from '@_types/Numeric' + Uuid, +} from "@_types/common"; +import { IndexSettings } from "@indices/_types/IndexSettings"; +import { integer } from "@_types/Numeric"; enum ManagedBy { - ilm = 'Index Lifecycle Management', + ilm = "Index Lifecycle Management", // This should have been written with capital letters, it's a known typo and should not be corrected. - datastream = 'Data stream lifecycle', - unmanaged = 'Unmanaged' + datastream = "Data stream lifecycle", + unmanaged = "Unmanaged", } // Available index modes (for the `index.mode` setting) See the `IndexMode` class in Elasticsearch for the options. @@ -42,13 +42,13 @@ export enum IndexMode { standard, time_series, logsdb, - lookup + lookup, } export class FailureStore { - enabled: boolean - indices: DataStreamIndex[] - rollover_on_write: boolean + enabled: boolean; + indices: DataStreamIndex[]; + rollover_on_write: boolean; } export class DataStream { @@ -57,128 +57,128 @@ export class DataStream { * If empty, the response omits this property. * @doc_id mapping-meta-field */ - _meta?: Metadata + _meta?: Metadata; /** * If `true`, the data stream allows custom routing on write request. */ - allow_custom_routing?: boolean + allow_custom_routing?: boolean; /** * Information about failure store backing indices * */ - failure_store?: FailureStore + failure_store?: FailureStore; /** * Current generation for the data stream. This number acts as a cumulative count of the stream’s rollovers, starting at 1. */ - generation: integer + generation: integer; /** * If `true`, the data stream is hidden. */ - hidden: boolean + hidden: boolean; /** * Name of the current ILM lifecycle policy in the stream’s matching index template. * This lifecycle policy is set in the `index.lifecycle.name` setting. * If the template does not include a lifecycle policy, this property is not included in the response. * NOTE: A data stream’s backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the get index settings API. */ - ilm_policy?: Name + ilm_policy?: Name; /** * Name of the lifecycle system that'll manage the next generation of the data stream. */ - next_generation_managed_by: ManagedBy + next_generation_managed_by: ManagedBy; /** * Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream. */ - prefer_ilm: boolean + prefer_ilm: boolean; /** * Array of objects containing information about the data stream’s backing indices. * The last item in this array contains information about the stream’s current write index. */ - indices: DataStreamIndex[] + indices: DataStreamIndex[]; /** * Contains the configuration for the data stream lifecycle of this data stream. * @availability stack since=8.11.0 stability=stable * @availability serverless stability=stable */ - lifecycle?: DataStreamLifecycleWithRollover + lifecycle?: DataStreamLifecycleWithRollover; /** * Name of the data stream. */ - name: DataStreamName + name: DataStreamName; /** * If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings. */ - replicated?: boolean + replicated?: boolean; /** * If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too. */ - rollover_on_write: boolean + rollover_on_write: boolean; /** * The settings specific to this data stream that will take precedence over the settings in the matching index * template. */ - settings: IndexSettings + settings: IndexSettings; /** * Health status of the data stream. * This health status is based on the state of the primary and replica shards of the stream’s backing indices. */ - status: HealthStatus + status: HealthStatus; /** * If `true`, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction. * @availability stack since=7.10.0 * @availability serverless */ - system?: boolean + system?: boolean; /** * Name of the index template used to create the data stream’s backing indices. * The template’s index pattern must match the name of this data stream. */ - template: Name + template: Name; /** * Information about the `@timestamp` field in the data stream. */ - timestamp_field: DataStreamTimestampField + timestamp_field: DataStreamTimestampField; /** * The index mode for the data stream that will be used for newly created backing indices. */ - index_mode?: IndexMode + index_mode?: IndexMode; } export class DataStreamTimestampField { /** * Name of the timestamp field for the data stream, which must be `@timestamp`. The `@timestamp` field must be included in every document indexed to the data stream. */ - name: Field + name: Field; } export class DataStreamIndex { /** * Name of the backing index. */ - index_name: IndexName + index_name: IndexName; /** * Universally unique identifier (UUID) for the index. */ - index_uuid: Uuid + index_uuid: Uuid; /** * Name of the current ILM lifecycle policy configured for this backing index. */ - ilm_policy?: Name + ilm_policy?: Name; /** * Name of the lifecycle system that's currently managing this backing index. */ - managed_by?: ManagedBy + managed_by?: ManagedBy; /** * Indicates if ILM should take precedence over DSL in case both are configured to manage this index. */ - prefer_ilm?: boolean + prefer_ilm?: boolean; /** * The index mode of this backing index of the data stream. */ - index_mode?: IndexMode + index_mode?: IndexMode; } export class DataStreamVisibility { - hidden?: boolean - allow_custom_routing?: boolean + hidden?: boolean; + allow_custom_routing?: boolean; } diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts index b050b8ad5e..43f1dc3d09 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -17,9 +17,9 @@ * under the License. */ -import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Indices, Names } from '@_types/common' -import { Duration } from '@_types/Time' +import { RequestBase } from "@_types/Base"; +import { ExpandWildcards, Indices, Names } from "@_types/common"; +import { Duration } from "@_types/Time"; /** * Get data stream settings. @@ -33,16 +33,16 @@ import { Duration } from '@_types/Time' export interface Request extends RequestBase { urls: [ { - path: '/_data_stream/{name}/_settings' - methods: ['GET'] - } - ] + path: "/_data_stream/{name}/_settings"; + methods: ["GET"]; + }, + ]; path_parts: { /** * Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). */ - name: Indices - } + name: Indices; + }; query_parameters: { /** * Period to wait for a connection to the master node. If no response is @@ -50,6 +50,6 @@ export interface Request extends RequestBase { * error. * @server_default 30s */ - master_timeout?: Duration - } + master_timeout?: Duration; + }; } diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts index cdb6699af3..250e193d66 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts @@ -17,17 +17,17 @@ * under the License. */ -import { IndexName } from '@_types/common' -import { IndexSettings } from '@indices/_types/IndexSettings' +import { IndexName } from "@_types/common"; +import { IndexSettings } from "@indices/_types/IndexSettings"; export class Response { /** @codegen_name data_stream_settings */ body: { - data_streams: Array - } + data_streams: Array; + }; } export class DataStreamSettings { - name: string - settings: IndexSettings + name: string; + settings: IndexSettings; } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index 7d4bf3f4a8..cedbb92ed7 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -17,10 +17,10 @@ * under the License. */ -import { IndexSettings } from '@indices/_types/IndexSettings' -import { RequestBase } from '@_types/Base' -import { ExpandWildcards, Indices } from '@_types/common' -import { Duration } from '@_types/Time' +import { IndexSettings } from "@indices/_types/IndexSettings"; +import { RequestBase } from "@_types/Base"; +import { ExpandWildcards, Indices } from "@_types/common"; +import { Duration } from "@_types/Time"; /** * Update data stream settings. @@ -37,16 +37,16 @@ import { Duration } from '@_types/Time' export interface Request extends RequestBase { urls: [ { - path: '/_data_stream/{name}/_settings' - methods: ['PUT'] - } - ] + path: "/_data_stream/{name}/_settings"; + methods: ["PUT"]; + }, + ]; path_parts: { /** * Comma-separated list of data streams or data stream patterns */ - name: Indices - } + name: Indices; + }; query_parameters: { /** * If `true`, the request does not actually change the settings on any data streams or indices. Instead, it @@ -54,22 +54,22 @@ export interface Request extends RequestBase { * actually been applied. * @server_default false */ - dry_run?: boolean + dry_run?: boolean; /** * 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. * @server_default 30s */ - master_timeout?: Duration + master_timeout?: Duration; /** * Period to wait for a response. If no response is received before the * timeout expires, the request fails and returns an error. * @server_default 30s */ - timeout?: Duration - } + timeout?: Duration; + }; /** Settings to be applied to the data stream. * @codegen_name settings */ - body: IndexSettings + body: IndexSettings; } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts index b458cb3b09..4e7f79b42d 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -17,60 +17,60 @@ * under the License. */ -import { IndexName } from '@_types/common' -import { IndexSettings } from '@indices/_types/IndexSettings' +import { IndexName } from "@_types/common"; +import { IndexSettings } from "@indices/_types/IndexSettings"; export class Response { /** @codegen_name data_stream_settings_results */ body: { - data_streams: Array - } + data_streams: Array; + }; } export class DataStreamSettings { - name: IndexName + name: IndexName; /** * True if the settings were successfully applied to the data stream (or would have been, if running in dry_run * mode). False if an error occurred. */ - applied_to_data_stream: boolean + applied_to_data_stream: boolean; /** * A message explaining why the settings could not be applied to the data stream. */ - error?: string + error?: string; /** * The settings that are specfic to this data stream that will override any settings from the matching index template. */ - settings: IndexSettings + settings: IndexSettings; /** * The settings that are effective on this data stream, taking into account the settings from the matching index * template and the settings specfic to this data stream. */ - effective_settings: IndexSettings + effective_settings: IndexSettings; /** - * Information about whether and where each setting was applied. - */ - index_settings_results: IndexSettingResults + * Information about whether and where each setting was applied. + */ + index_settings_results: IndexSettingResults; } export class IndexSettingResults { - /** - * The list of settings that were applied to the data stream but not to backing indices. These will be applied to - * the write index the next time the data stream is rolled over. - */ - applied_to_data_stream_only: Array - /** - * The list of settings that were applied to the data stream and to all of its backing indices. These settings will - * also be applied to the write index the next time the data stream is rolled over. - */ - applied_to_data_stream_and_backing_indices: Array - errors?: Array + /** + * The list of settings that were applied to the data stream but not to backing indices. These will be applied to + * the write index the next time the data stream is rolled over. + */ + applied_to_data_stream_only: Array; + /** + * The list of settings that were applied to the data stream and to all of its backing indices. These settings will + * also be applied to the write index the next time the data stream is rolled over. + */ + applied_to_data_stream_and_backing_indices: Array; + errors?: Array; } export class DataStreamSettingsError { - index: IndexName - /** - * A message explaining why the settings could not be applied to specific indices. - */ - error: string -} \ No newline at end of file + index: IndexName; + /** + * A message explaining why the settings could not be applied to specific indices. + */ + error: string; +} From 9901f873d906a73583523da34d4c770e4db70617 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 27 May 2025 14:11:55 -0500 Subject: [PATCH 03/15] reformatting --- output/schema/schema.json | 4 +- specification/indices/_types/DataStream.ts | 80 +++++++++---------- .../IndicesGetDataStreamSettingsRequest.ts | 22 ++--- .../IndicesGetDataStreamSettingsResponse.ts | 11 ++- .../IndicesPutDataStreamSettingsRequest.ts | 30 +++---- .../IndicesPutDataStreamSettingsResponse.ts | 30 +++---- 6 files changed, 88 insertions(+), 89 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index eaff67a2fa..5e20d65561 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143375,7 +143375,7 @@ } } ], - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L30-L33" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L32" }, { "kind": "request", @@ -143452,7 +143452,7 @@ "name": "Response", "namespace": "indices.get_data_stream_settings" }, - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L23-L28" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L22-L27" }, { "kind": "request", diff --git a/specification/indices/_types/DataStream.ts b/specification/indices/_types/DataStream.ts index a737beace8..7906739f62 100644 --- a/specification/indices/_types/DataStream.ts +++ b/specification/indices/_types/DataStream.ts @@ -17,7 +17,8 @@ * under the License. */ -import { DataStreamLifecycleWithRollover } from "@indices/_types/DataStreamLifecycle"; +import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' +import { IndexSettings } from '@indices/_types/IndexSettings' import { DataStreamName, Field, @@ -25,16 +26,15 @@ import { IndexName, Metadata, Name, - Uuid, -} from "@_types/common"; -import { IndexSettings } from "@indices/_types/IndexSettings"; -import { integer } from "@_types/Numeric"; + Uuid +} from '@_types/common' +import { integer } from '@_types/Numeric' enum ManagedBy { - ilm = "Index Lifecycle Management", + ilm = 'Index Lifecycle Management', // This should have been written with capital letters, it's a known typo and should not be corrected. - datastream = "Data stream lifecycle", - unmanaged = "Unmanaged", + datastream = 'Data stream lifecycle', + unmanaged = 'Unmanaged' } // Available index modes (for the `index.mode` setting) See the `IndexMode` class in Elasticsearch for the options. @@ -42,13 +42,13 @@ export enum IndexMode { standard, time_series, logsdb, - lookup, + lookup } export class FailureStore { - enabled: boolean; - indices: DataStreamIndex[]; - rollover_on_write: boolean; + enabled: boolean + indices: DataStreamIndex[] + rollover_on_write: boolean } export class DataStream { @@ -57,128 +57,128 @@ export class DataStream { * If empty, the response omits this property. * @doc_id mapping-meta-field */ - _meta?: Metadata; + _meta?: Metadata /** * If `true`, the data stream allows custom routing on write request. */ - allow_custom_routing?: boolean; + allow_custom_routing?: boolean /** * Information about failure store backing indices * */ - failure_store?: FailureStore; + failure_store?: FailureStore /** * Current generation for the data stream. This number acts as a cumulative count of the stream’s rollovers, starting at 1. */ - generation: integer; + generation: integer /** * If `true`, the data stream is hidden. */ - hidden: boolean; + hidden: boolean /** * Name of the current ILM lifecycle policy in the stream’s matching index template. * This lifecycle policy is set in the `index.lifecycle.name` setting. * If the template does not include a lifecycle policy, this property is not included in the response. * NOTE: A data stream’s backing indices may be assigned different lifecycle policies. To retrieve the lifecycle policy for individual backing indices, use the get index settings API. */ - ilm_policy?: Name; + ilm_policy?: Name /** * Name of the lifecycle system that'll manage the next generation of the data stream. */ - next_generation_managed_by: ManagedBy; + next_generation_managed_by: ManagedBy /** * Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream. */ - prefer_ilm: boolean; + prefer_ilm: boolean /** * Array of objects containing information about the data stream’s backing indices. * The last item in this array contains information about the stream’s current write index. */ - indices: DataStreamIndex[]; + indices: DataStreamIndex[] /** * Contains the configuration for the data stream lifecycle of this data stream. * @availability stack since=8.11.0 stability=stable * @availability serverless stability=stable */ - lifecycle?: DataStreamLifecycleWithRollover; + lifecycle?: DataStreamLifecycleWithRollover /** * Name of the data stream. */ - name: DataStreamName; + name: DataStreamName /** * If `true`, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings. */ - replicated?: boolean; + replicated?: boolean /** * If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too. */ - rollover_on_write: boolean; + rollover_on_write: boolean /** * The settings specific to this data stream that will take precedence over the settings in the matching index * template. */ - settings: IndexSettings; + settings: IndexSettings /** * Health status of the data stream. * This health status is based on the state of the primary and replica shards of the stream’s backing indices. */ - status: HealthStatus; + status: HealthStatus /** * If `true`, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction. * @availability stack since=7.10.0 * @availability serverless */ - system?: boolean; + system?: boolean /** * Name of the index template used to create the data stream’s backing indices. * The template’s index pattern must match the name of this data stream. */ - template: Name; + template: Name /** * Information about the `@timestamp` field in the data stream. */ - timestamp_field: DataStreamTimestampField; + timestamp_field: DataStreamTimestampField /** * The index mode for the data stream that will be used for newly created backing indices. */ - index_mode?: IndexMode; + index_mode?: IndexMode } export class DataStreamTimestampField { /** * Name of the timestamp field for the data stream, which must be `@timestamp`. The `@timestamp` field must be included in every document indexed to the data stream. */ - name: Field; + name: Field } export class DataStreamIndex { /** * Name of the backing index. */ - index_name: IndexName; + index_name: IndexName /** * Universally unique identifier (UUID) for the index. */ - index_uuid: Uuid; + index_uuid: Uuid /** * Name of the current ILM lifecycle policy configured for this backing index. */ - ilm_policy?: Name; + ilm_policy?: Name /** * Name of the lifecycle system that's currently managing this backing index. */ - managed_by?: ManagedBy; + managed_by?: ManagedBy /** * Indicates if ILM should take precedence over DSL in case both are configured to manage this index. */ - prefer_ilm?: boolean; + prefer_ilm?: boolean /** * The index mode of this backing index of the data stream. */ - index_mode?: IndexMode; + index_mode?: IndexMode } export class DataStreamVisibility { - hidden?: boolean; - allow_custom_routing?: boolean; + hidden?: boolean + allow_custom_routing?: boolean } diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts index 43f1dc3d09..defcd3fd49 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -17,9 +17,9 @@ * under the License. */ -import { RequestBase } from "@_types/Base"; -import { ExpandWildcards, Indices, Names } from "@_types/common"; -import { Duration } from "@_types/Time"; +import { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' +import { Duration } from '@_types/Time' /** * Get data stream settings. @@ -33,16 +33,16 @@ import { Duration } from "@_types/Time"; export interface Request extends RequestBase { urls: [ { - path: "/_data_stream/{name}/_settings"; - methods: ["GET"]; - }, - ]; + path: '/_data_stream/{name}/_settings' + methods: ['GET'] + } + ] path_parts: { /** * Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). */ - name: Indices; - }; + name: Indices + } query_parameters: { /** * Period to wait for a connection to the master node. If no response is @@ -50,6 +50,6 @@ export interface Request extends RequestBase { * error. * @server_default 30s */ - master_timeout?: Duration; - }; + master_timeout?: Duration + } } diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts index 250e193d66..cd3139f9ab 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts @@ -17,17 +17,16 @@ * under the License. */ -import { IndexName } from "@_types/common"; -import { IndexSettings } from "@indices/_types/IndexSettings"; +import { IndexSettings } from '@indices/_types/IndexSettings' export class Response { /** @codegen_name data_stream_settings */ body: { - data_streams: Array; - }; + data_streams: Array + } } export class DataStreamSettings { - name: string; - settings: IndexSettings; + name: string + settings: IndexSettings } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index cedbb92ed7..b097659f70 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -17,10 +17,10 @@ * under the License. */ -import { IndexSettings } from "@indices/_types/IndexSettings"; -import { RequestBase } from "@_types/Base"; -import { ExpandWildcards, Indices } from "@_types/common"; -import { Duration } from "@_types/Time"; +import { IndexSettings } from '@indices/_types/IndexSettings' +import { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' +import { Duration } from '@_types/Time' /** * Update data stream settings. @@ -37,16 +37,16 @@ import { Duration } from "@_types/Time"; export interface Request extends RequestBase { urls: [ { - path: "/_data_stream/{name}/_settings"; - methods: ["PUT"]; - }, - ]; + path: '/_data_stream/{name}/_settings' + methods: ['PUT'] + } + ] path_parts: { /** * Comma-separated list of data streams or data stream patterns */ - name: Indices; - }; + name: Indices + } query_parameters: { /** * If `true`, the request does not actually change the settings on any data streams or indices. Instead, it @@ -54,22 +54,22 @@ export interface Request extends RequestBase { * actually been applied. * @server_default false */ - dry_run?: boolean; + dry_run?: boolean /** * 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. * @server_default 30s */ - master_timeout?: Duration; + master_timeout?: Duration /** * Period to wait for a response. If no response is received before the * timeout expires, the request fails and returns an error. * @server_default 30s */ - timeout?: Duration; - }; + timeout?: Duration + } /** Settings to be applied to the data stream. * @codegen_name settings */ - body: IndexSettings; + body: IndexSettings } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts index 4e7f79b42d..d8426caaed 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -17,40 +17,40 @@ * under the License. */ -import { IndexName } from "@_types/common"; -import { IndexSettings } from "@indices/_types/IndexSettings"; +import { IndexSettings } from '@indices/_types/IndexSettings' +import { IndexName } from '@_types/common' export class Response { /** @codegen_name data_stream_settings_results */ body: { - data_streams: Array; - }; + data_streams: Array + } } export class DataStreamSettings { - name: IndexName; + name: IndexName /** * True if the settings were successfully applied to the data stream (or would have been, if running in dry_run * mode). False if an error occurred. */ - applied_to_data_stream: boolean; + applied_to_data_stream: boolean /** * A message explaining why the settings could not be applied to the data stream. */ - error?: string; + error?: string /** * The settings that are specfic to this data stream that will override any settings from the matching index template. */ - settings: IndexSettings; + settings: IndexSettings /** * The settings that are effective on this data stream, taking into account the settings from the matching index * template and the settings specfic to this data stream. */ - effective_settings: IndexSettings; + effective_settings: IndexSettings /** * Information about whether and where each setting was applied. */ - index_settings_results: IndexSettingResults; + index_settings_results: IndexSettingResults } export class IndexSettingResults { @@ -58,19 +58,19 @@ export class IndexSettingResults { * The list of settings that were applied to the data stream but not to backing indices. These will be applied to * the write index the next time the data stream is rolled over. */ - applied_to_data_stream_only: Array; + applied_to_data_stream_only: Array /** * The list of settings that were applied to the data stream and to all of its backing indices. These settings will * also be applied to the write index the next time the data stream is rolled over. */ - applied_to_data_stream_and_backing_indices: Array; - errors?: Array; + applied_to_data_stream_and_backing_indices: Array + errors?: Array } export class DataStreamSettingsError { - index: IndexName; + index: IndexName /** * A message explaining why the settings could not be applied to specific indices. */ - error: string; + error: string } From f4983d4e9af7a4fbafe48a7eb42d65e7ab73649c Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 27 May 2025 14:48:49 -0500 Subject: [PATCH 04/15] changing doc URLs --- output/schema/schema.json | 4 ++-- specification/_doc_ids/table.csv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 5e20d65561..30c24fc253 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7773,7 +7773,7 @@ }, "description": "Get data stream settings.\nGet setting information for one or more data streams.", "docId": "indices-get-data-stream-settings", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-data-stream-settings", "name": "indices.get_data_stream_settings", "privileges": { "index": [ @@ -8402,7 +8402,7 @@ }, "description": "Update data stream settings.\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent users from getting into an invalid state,\nonly certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all\nbacking indices. Otherwise, it will be applied only whenever the data stream is next rolled over.", "docId": "indices-put-data-stream-settings", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-data-stream-settings", "name": "indices.put_data_stream_settings", "privileges": { "index": [ diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index ac2952751d..5f11c1e3a9 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -305,7 +305,7 @@ indices-exists,https://www.elastic.co/docs/api/doc/elasticsearch/operation/opera indices-flush,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush indices-forcemerge,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge indices-get-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias -indices-get-data-stream-settings,https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html +indices-get-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-data-stream-settings indices-get-field-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping indices-get-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get indices-get-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping @@ -313,7 +313,7 @@ indices-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation indices-get-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template indices-get-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template indices-open-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open -indices-put-data-stream-settings,https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html +indices-put-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-data-stream-settings indices-put-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping indices-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery indices-refresh,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh From 00ac16cfbd65eb7eb5ca2e58f88e8246b96515c3 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 27 May 2025 16:10:59 -0500 Subject: [PATCH 05/15] making master_timeout wording consistent between get/set apis --- specification/_json_spec/indices.get_data_stream_settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/_json_spec/indices.get_data_stream_settings.json b/specification/_json_spec/indices.get_data_stream_settings.json index 6043aa225b..7150717317 100644 --- a/specification/_json_spec/indices.get_data_stream_settings.json +++ b/specification/_json_spec/indices.get_data_stream_settings.json @@ -27,7 +27,7 @@ "params": { "master_timeout": { "type": "time", - "description": "Specify timeout for connection to master", + "description": "Period to wait for a connection to the master node", "default": "30s" } } From 8ac05188302c007358248ca3fc03eb86474e2372 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Wed, 28 May 2025 09:57:12 -0500 Subject: [PATCH 06/15] Apply suggestions from code review Co-authored-by: Lisa Cawley --- .../IndicesGetDataStreamSettingsRequest.ts | 6 ++++-- .../IndicesGetDataStreamSettingsResponse.ts | 1 + .../IndicesPutDataStreamSettingsRequest.ts | 14 ++++++++------ .../IndicesPutDataStreamSettingsResponse.ts | 5 +++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts index defcd3fd49..c84fccf3e3 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -23,12 +23,14 @@ import { Duration } from '@_types/Time' /** * Get data stream settings. + * * Get setting information for one or more data streams. * @rest_spec_name indices.get_data_stream_settings * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream * @index_privileges view_index_metadata * @doc_id indices-get-data-stream-settings + * @doc_tag data stream */ export interface Request extends RequestBase { urls: [ @@ -39,13 +41,13 @@ export interface Request extends RequestBase { ] path_parts: { /** - * Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). + * A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`). */ name: Indices } query_parameters: { /** - * Period to wait for a connection to the master node. If no response is + * The 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. * @server_default 30s diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts index cd3139f9ab..e8deb2a8b7 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts @@ -27,6 +27,7 @@ export class Response { } export class DataStreamSettings { + /** The name of the data stream. */ name: string settings: IndexSettings } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index b097659f70..5937f98821 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -24,15 +24,17 @@ import { Duration } from '@_types/Time' /** * Update data stream settings. + * * This API can be used to override settings on specific data streams. These overrides will take precedence over what - * is specified in the template that the data stream matches. To prevent users from getting into an invalid state, - * only certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all - * backing indices. Otherwise, it will be applied only whenever the data stream is next rolled over. + * is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state, + * only certain settings are allowed. If possible, the setting change is applied to all + * backing indices. Otherwise, it will be applied when the data stream is next rolled over. * @rest_spec_name indices.put_data_stream_settings * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream * @index_privileges manage * @doc_id indices-put-data-stream-settings + * @doc_tag data stream */ export interface Request extends RequestBase { urls: [ @@ -43,7 +45,7 @@ export interface Request extends RequestBase { ] path_parts: { /** - * Comma-separated list of data streams or data stream patterns + * A comma-separated list of data streams or data stream patterns. */ name: Indices } @@ -56,14 +58,14 @@ export interface Request extends RequestBase { */ dry_run?: boolean /** - * Period to wait for a connection to the master node. If no response is + * The 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. * @server_default 30s */ master_timeout?: Duration /** - * Period to wait for a response. If no response is received before the + * The period to wait for a response. If no response is received before the * timeout expires, the request fails and returns an error. * @server_default 30s */ diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts index d8426caaed..99702e7e39 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -28,10 +28,11 @@ export class Response { } export class DataStreamSettings { + /** The data stream name. */ name: IndexName /** - * True if the settings were successfully applied to the data stream (or would have been, if running in dry_run - * mode). False if an error occurred. + * If the settings were successfully applied to the data stream (or would have been, if running in `dry_run` + * mode), it is `true`. If an error occurred, it is `false`. */ applied_to_data_stream: boolean /** From d3170118eed5c342835c288ffdf643f932481971 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Wed, 28 May 2025 10:11:09 -0500 Subject: [PATCH 07/15] formatting --- output/schema/schema.json | 36 ++++++++++--------- .../IndicesPutDataStreamSettingsRequest.ts | 2 +- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 30c24fc253..b954fcc9cd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7771,8 +7771,9 @@ "visibility": "feature_flag" } }, - "description": "Get data stream settings.\nGet setting information for one or more data streams.", + "description": "Get data stream settings.\n\nGet setting information for one or more data streams.", "docId": "indices-get-data-stream-settings", + "docTag": "data stream", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-data-stream-settings", "name": "indices.get_data_stream_settings", "privileges": { @@ -8400,8 +8401,9 @@ "visibility": "feature_flag" } }, - "description": "Update data stream settings.\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent users from getting into an invalid state,\nonly certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all\nbacking indices. Otherwise, it will be applied only whenever the data stream is next rolled over.", + "description": "Update data stream settings.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", "docId": "indices-put-data-stream-settings", + "docTag": "data stream", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-data-stream-settings", "name": "indices.put_data_stream_settings", "privileges": { @@ -143353,6 +143355,7 @@ }, "properties": [ { + "description": "The name of the data stream.", "name": "name", "required": true, "type": { @@ -143375,7 +143378,7 @@ } } ], - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L32" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L33" }, { "kind": "request", @@ -143385,7 +143388,7 @@ "body": { "kind": "no_body" }, - "description": "Get data stream settings.\nGet setting information for one or more data streams.", + "description": "Get data stream settings.\n\nGet setting information for one or more data streams.", "inherits": { "type": { "name": "RequestBase", @@ -143398,7 +143401,7 @@ }, "path": [ { - "description": "Comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", + "description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", "name": "name", "required": true, "type": { @@ -143412,7 +143415,7 @@ ], "query": [ { - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", "name": "master_timeout", "required": false, "serverDefault": "30s", @@ -143425,7 +143428,7 @@ } } ], - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L55" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L57" }, { "kind": "response", @@ -145363,6 +145366,7 @@ }, "properties": [ { + "description": "The data stream name.", "name": "name", "required": true, "type": { @@ -145374,7 +145378,7 @@ } }, { - "description": "True if the settings were successfully applied to the data stream (or would have been, if running in dry_run\nmode). False if an error occurred.", + "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", "name": "applied_to_data_stream", "required": true, "type": { @@ -145434,7 +145438,7 @@ } } ], - "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L54" + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55" }, { "kind": "interface", @@ -145467,7 +145471,7 @@ } } ], - "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L70-L76" + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L71-L77" }, { "kind": "interface", @@ -145521,7 +145525,7 @@ } } ], - "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L56-L68" + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L57-L69" }, { "kind": "request", @@ -145539,7 +145543,7 @@ } } }, - "description": "Update data stream settings.\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent users from getting into an invalid state,\nonly certain settings are allowed. If the can reasonably be applied to all backing indices, it is applied to all\nbacking indices. Otherwise, it will be applied only whenever the data stream is next rolled over.", + "description": "Update data stream settings.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", "inherits": { "type": { "name": "RequestBase", @@ -145552,7 +145556,7 @@ }, "path": [ { - "description": "Comma-separated list of data streams or data stream patterns", + "description": "A comma-separated list of data streams or data stream patterns.", "name": "name", "required": true, "type": { @@ -145579,7 +145583,7 @@ } }, { - "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", "name": "master_timeout", "required": false, "serverDefault": "30s", @@ -145592,7 +145596,7 @@ } }, { - "description": "Period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "description": "The period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", "name": "timeout", "required": false, "serverDefault": "30s", @@ -145605,7 +145609,7 @@ } } ], - "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L75" + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L77" }, { "kind": "response", diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index 5937f98821..ccb7d632c3 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -24,7 +24,7 @@ import { Duration } from '@_types/Time' /** * Update data stream settings. - * + * * This API can be used to override settings on specific data streams. These overrides will take precedence over what * is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state, * only certain settings are allowed. If possible, the setting change is applied to all From 9b9b141abfbb193ba912b57c983f5083a069daac Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Wed, 28 May 2025 14:22:16 -0500 Subject: [PATCH 08/15] Adding examples --- output/schema/schema.json | 31 ++++++++++++ ...GetDataStreamSettingsResponseExample1.yaml | 32 +++++++++++++ ...PutDataStreamSettingsResponseExample1.yaml | 42 ++++++++++++++++ ...PutDataStreamSettingsResponseExample2.yaml | 48 +++++++++++++++++++ ...PutDataStreamSettingsResponseExample3.yaml | 22 +++++++++ ...sPutDataStreamSettingsRequestExample1.yaml | 10 ++++ 6 files changed, 185 insertions(+) create mode 100644 specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml create mode 100644 specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml create mode 100644 specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml create mode 100644 specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml create mode 100644 specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml diff --git a/output/schema/schema.json b/output/schema/schema.json index 563b891099..be2574515f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143451,6 +143451,13 @@ } ] }, + "examples": { + "IndicesGetDataStreamSettingsResponseExample1": { + "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "summary": "Get data stream settings on a data stream", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "indices.get_data_stream_settings" @@ -145544,6 +145551,13 @@ } }, "description": "Update data stream settings.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", + "examples": { + "IndicesPutDataStreamSettingsRequestExample1": { + "description": "This is a request to change two settings on a data stream.\n", + "summary": "Change a data stream setting", + "value": "{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + }, "inherits": { "type": { "name": "RequestBase", @@ -145632,6 +145646,23 @@ } ] }, + "examples": { + "IndicesPutDataStreamSettingsResponseExample1": { + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "summary": "Change data stream settings on a data stream", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample2": { + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", + "summary": "Change data stream settings on a data stream that has an index with a metadata block", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample3": { + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "summary": "Attempt to change a data stream setting that is not allowed", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "indices.put_data_stream_settings" diff --git a/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml new file mode 100644 index 0000000000..242ca1c231 --- /dev/null +++ b/specification/indices/get_data_stream_settings/examples/200_response/IndicesGetDataStreamSettingsResponseExample1.yaml @@ -0,0 +1,32 @@ +summary: Get data stream settings on a data stream +description: > + This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The + `effective_settings` field shows additional settings that are pulled from its template. +# type: response +# response_code: 200 +value: |- + { + "data_streams": [ + { + "name": "my-data-stream", + "settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "number_of_shards": "11" + } + }, + "effective_settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "mode": "standard", + "number_of_shards": "11", + "number_of_replicas": "0" + } + } + } + ] + } diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml new file mode 100644 index 0000000000..5a64c1bc15 --- /dev/null +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample1.yaml @@ -0,0 +1,42 @@ +summary: Change data stream settings on a data stream +description: > + This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on + the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to + the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices. +# type: response +# response_code: 200 +value: |- + { + "data_streams": [ + { + "name": "my-data-stream", + "applied_to_data_stream": true, + "settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "number_of_shards": "11" + } + }, + "effective_settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "mode": "standard", + "number_of_shards": "11", + "number_of_replicas": "0" + } + }, + "index_settings_results": { + "applied_to_data_stream_only": [ + "index.number_of_shards" + ], + "applied_to_data_stream_and_backing_indices": [ + "index.lifecycle.name" + ] + } + } + ] + } diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml new file mode 100644 index 0000000000..e2f3a5408e --- /dev/null +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample2.yaml @@ -0,0 +1,48 @@ +summary: Change data stream settings on a data stream that has an index with a metadata block +description: > + This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the + data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response + reports that the setting was not successfully applied to that index. +# type: response +# response_code: 200 +value: |- + { + "data_streams": [ + { + "name": "my-data-stream", + "applied_to_data_stream": true, + "settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "number_of_shards": "11" + } + }, + "effective_settings": { + "index": { + "lifecycle": { + "name": "new-test-policy" + }, + "mode": "standard", + "number_of_shards": "11", + "number_of_replicas": "0" + } + }, + "index_settings_results": { + "applied_to_data_stream_only": [ + "index.number_of_shards" + ], + "applied_to_data_stream_and_backing_indices": [ + "index.lifecycle.name" + ], + "errors": [ + { + "index": ".ds-my-data-stream-2025.05.28-000001", + "error": "index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];" + } + ] + } + } + ] + } diff --git a/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml new file mode 100644 index 0000000000..aa84c40da1 --- /dev/null +++ b/specification/indices/put_data_stream_settings/examples/200_response/IndicesPutDataStreamSettingsResponseExample3.yaml @@ -0,0 +1,22 @@ +summary: Attempt to change a data stream setting that is not allowed +description: > + This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is + not allowed on a data stream. As a result, no change was applied to the data stream. +# type: response +# response_code: 200 +value: |- + { + "data_streams": [ + { + "name": "my-data-stream", + "applied_to_data_stream": false, + "error": "Cannot set the following settings on a data stream: [index.number_of_replicas]", + "settings": {}, + "effective_settings": {}, + "index_settings_results": { + "applied_to_data_stream_only": [], + "applied_to_data_stream_and_backing_indices": [] + } + } + ] + } diff --git a/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml new file mode 100644 index 0000000000..15331dc534 --- /dev/null +++ b/specification/indices/put_data_stream_settings/examples/request/IndicesPutDataStreamSettingsRequestExample1.yaml @@ -0,0 +1,10 @@ +summary: Change a data stream setting +# method_request: PUT /_data_stream/my-data-stream/_settings +description: > + This is a request to change two settings on a data stream. +# type: request +value: |- + { + "index.lifecycle.name" : "new-test-policy", + "index.number_of_shards": 11 + } From f827513511ba27103672ee74a664ff912bc52487 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 08:42:22 -0500 Subject: [PATCH 09/15] adding effective_settings --- .../IndicesGetDataStreamSettingsResponse.ts | 6 ++++++ .../IndicesPutDataStreamSettingsResponse.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts index e8deb2a8b7..76febd1458 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts @@ -29,5 +29,11 @@ export class Response { export class DataStreamSettings { /** The name of the data stream. */ name: string + /** The settings specific to this data stream */ settings: IndexSettings + /** + * The settings specific to this data stream merged with the settings from its template. These `effective_settings` + * are the settings that will be used when a new index is created for this data stream. + */ + effective_settings: IndexSettings } diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts index 99702e7e39..bb10b4001b 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -45,7 +45,7 @@ export class DataStreamSettings { settings: IndexSettings /** * The settings that are effective on this data stream, taking into account the settings from the matching index - * template and the settings specfic to this data stream. + * template and the settings specific to this data stream. */ effective_settings: IndexSettings /** From 1b9182f6592d5c1f5e32e0756f764cbe7de694b1 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 08:42:42 -0500 Subject: [PATCH 10/15] adding effective_settings --- output/schema/schema.json | 17 +++++++++++++++-- output/typescript/types.ts | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index be2574515f..48aa5d8390 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -143367,6 +143367,7 @@ } }, { + "description": "The settings specific to this data stream", "name": "settings", "required": true, "type": { @@ -143376,9 +143377,21 @@ "namespace": "indices._types" } } + }, + { + "description": "The settings specific to this data stream merged with the settings from its template. These `effective_settings`\nare the settings that will be used when a new index is created for this data stream.", + "name": "effective_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } } ], - "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L33" + "specLocation": "indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L39" }, { "kind": "request", @@ -145421,7 +145434,7 @@ } }, { - "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specfic to this data stream.", + "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specific to this data stream.", "name": "effective_settings", "required": true, "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 06b91e7a92..ff098a1a8e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12365,6 +12365,7 @@ export interface IndicesGetDataStreamResponse { export interface IndicesGetDataStreamSettingsDataStreamSettings { name: string settings: IndicesIndexSettings + effective_settings: IndicesIndexSettings } export interface IndicesGetDataStreamSettingsRequest extends RequestBase { From 57d84fcf592097448dc79886d686d024e9e212f2 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 08:44:10 -0500 Subject: [PATCH 11/15] Apply suggestions from code review Co-authored-by: Lisa Cawley --- specification/_doc_ids/table.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 5f11c1e3a9..8eb11be923 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -305,7 +305,7 @@ indices-exists,https://www.elastic.co/docs/api/doc/elasticsearch/operation/opera indices-flush,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-flush indices-forcemerge,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge indices-get-alias,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias -indices-get-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-data-stream-settings +indices-get-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings indices-get-field-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping indices-get-index,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get indices-get-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping @@ -313,7 +313,7 @@ indices-get-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation indices-get-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template indices-get-template-v1,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-template indices-open-close,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-open -indices-put-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-data-stream-settings +indices-put-data-stream-settings,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings indices-put-mapping,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping indices-recovery,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-recovery indices-refresh,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-refresh From 5a8ec543227cfb00440377c673b118e82b682c47 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 09:46:46 -0500 Subject: [PATCH 12/15] running make transform-to-openapi --- output/openapi/elasticsearch-openapi.json | 4 ++++ output/openapi/elasticsearch-serverless-openapi.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 168720dcd3..f8ea4e36fb 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -77088,6 +77088,9 @@ "description": "If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too.", "type": "boolean" }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, "status": { "$ref": "#/components/schemas/_types.HealthStatus" }, @@ -77113,6 +77116,7 @@ "indices", "name", "rollover_on_write", + "settings", "status", "template", "timestamp_field" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index bf79b4694e..43dd8f126d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -49816,6 +49816,9 @@ "description": "If `true`, the next write to this data stream will trigger a rollover first and the document will be indexed in the new backing index. If the rollover fails the indexing request will fail too.", "type": "boolean" }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, "status": { "$ref": "#/components/schemas/_types.HealthStatus" }, @@ -49841,6 +49844,7 @@ "indices", "name", "rollover_on_write", + "settings", "status", "template", "timestamp_field" From 2600b33491ee296741e8be492ec8d03d86b80e3a Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 11:19:29 -0500 Subject: [PATCH 13/15] make generate --- output/schema/schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 48aa5d8390..bb3dd99847 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7774,7 +7774,7 @@ "description": "Get data stream settings.\n\nGet setting information for one or more data streams.", "docId": "indices-get-data-stream-settings", "docTag": "data stream", - "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-data-stream-settings", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings", "name": "indices.get_data_stream_settings", "privileges": { "index": [ @@ -8404,7 +8404,7 @@ "description": "Update data stream settings.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", "docId": "indices-put-data-stream-settings", "docTag": "data stream", - "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-data-stream-settings", + "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings", "name": "indices.put_data_stream_settings", "privileges": { "index": [ From b8cbc974bbc714ca1832b7c1bb34ad10c01bca60 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 11:30:01 -0500 Subject: [PATCH 14/15] removing a validation error --- output/schema/schema.json | 166 +++++++++--------- output/schema/validation-errors.json | 4 +- output/typescript/types.ts | 20 +-- .../IndicesPutDataStreamSettingsResponse.ts | 4 +- 4 files changed, 96 insertions(+), 98 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index bb3dd99847..730677add2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -145378,88 +145378,6 @@ }, "specLocation": "indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25" }, - { - "kind": "interface", - "name": { - "name": "DataStreamSettings", - "namespace": "indices.put_data_stream_settings" - }, - "properties": [ - { - "description": "The data stream name.", - "name": "name", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - }, - { - "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", - "name": "applied_to_data_stream", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "description": "A message explaining why the settings could not be applied to the data stream.", - "name": "error", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "The settings that are specfic to this data stream that will override any settings from the matching index template.", - "name": "settings", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexSettings", - "namespace": "indices._types" - } - } - }, - { - "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specific to this data stream.", - "name": "effective_settings", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexSettings", - "namespace": "indices._types" - } - } - }, - { - "description": "Information about whether and where each setting was applied.", - "name": "index_settings_results", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "IndexSettingResults", - "namespace": "indices.put_data_stream_settings" - } - } - } - ], - "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55" - }, { "kind": "interface", "name": { @@ -145651,7 +145569,7 @@ "value": { "kind": "instance_of", "type": { - "name": "DataStreamSettings", + "name": "UpdatedDataStreamSettings", "namespace": "indices.put_data_stream_settings" } } @@ -145682,6 +145600,88 @@ }, "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L23-L28" }, + { + "kind": "interface", + "name": { + "name": "UpdatedDataStreamSettings", + "namespace": "indices.put_data_stream_settings" + }, + "properties": [ + { + "description": "The data stream name.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", + "name": "applied_to_data_stream", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "A message explaining why the settings could not be applied to the data stream.", + "name": "error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The settings that are specfic to this data stream that will override any settings from the matching index template.", + "name": "settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, + { + "description": "The settings that are effective on this data stream, taking into account the settings from the matching index\ntemplate and the settings specific to this data stream.", + "name": "effective_settings", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + }, + { + "description": "Information about whether and where each setting was applied.", + "name": "index_settings_results", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettingResults", + "namespace": "indices.put_data_stream_settings" + } + } + } + ], + "specLocation": "indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55" + }, { "kind": "interface", "name": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index e925ce3912..e8e97c27e8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -155,7 +155,5 @@ "response": [] } }, - "generalErrors": [ - "DataStreamSettings is present in multiple namespaces: indices.get_data_stream_settings and indices.put_data_stream_settings" - ] + "generalErrors": [] } \ No newline at end of file diff --git a/output/typescript/types.ts b/output/typescript/types.ts index ff098a1a8e..ba2f69eddf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12571,15 +12571,6 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase { export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase -export interface IndicesPutDataStreamSettingsDataStreamSettings { - name: IndexName - applied_to_data_stream: boolean - error?: string - settings: IndicesIndexSettings - effective_settings: IndicesIndexSettings - index_settings_results: IndicesPutDataStreamSettingsIndexSettingResults -} - export interface IndicesPutDataStreamSettingsDataStreamSettingsError { index: IndexName error: string @@ -12600,7 +12591,16 @@ export interface IndicesPutDataStreamSettingsRequest extends RequestBase { } export interface IndicesPutDataStreamSettingsResponse { - data_streams: IndicesPutDataStreamSettingsDataStreamSettings[] + data_streams: IndicesPutDataStreamSettingsUpdatedDataStreamSettings[] +} + +export interface IndicesPutDataStreamSettingsUpdatedDataStreamSettings { + name: IndexName + applied_to_data_stream: boolean + error?: string + settings: IndicesIndexSettings + effective_settings: IndicesIndexSettings + index_settings_results: IndicesPutDataStreamSettingsIndexSettingResults } export interface IndicesPutIndexTemplateIndexTemplateMapping { diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts index bb10b4001b..3202646e5e 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts @@ -23,11 +23,11 @@ import { IndexName } from '@_types/common' export class Response { /** @codegen_name data_stream_settings_results */ body: { - data_streams: Array + data_streams: Array } } -export class DataStreamSettings { +export class UpdatedDataStreamSettings { /** The data stream name. */ name: IndexName /** From 780598be5ad261e276f0b4de42cc886c43e7fda2 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Thu, 29 May 2025 11:34:46 -0500 Subject: [PATCH 15/15] marking as public --- output/openapi/elasticsearch-openapi.json | 268 ++++++++++++++++++ .../elasticsearch-serverless-openapi.json | 268 ++++++++++++++++++ output/schema/schema.json | 12 +- .../indices.get_data_stream_settings.json | 3 +- .../indices.put_data_stream_settings.json | 3 +- .../IndicesGetDataStreamSettingsRequest.ts | 4 +- .../IndicesPutDataStreamSettingsRequest.ts | 4 +- 7 files changed, 546 insertions(+), 16 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f8ea4e36fb..ca5dd7fbee 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15132,6 +15132,177 @@ "x-state": "Added in 7.9.0" } }, + "/_data_stream/{name}/_settings": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get data stream settings", + "description": "Get setting information for one or more data streams.", + "operationId": "indices-get-data-stream-settings", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_stream_settings.DataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesGetDataStreamSettingsResponseExample1": { + "summary": "Get data stream settings on a data stream", + "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" + } + } + } + } + } + } + }, + "put": { + "tags": [ + "data stream" + ], + "summary": "Update data stream settings", + "description": "This API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", + "operationId": "indices-put-data-stream-settings", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "dry_run", + "description": "If `true`, the request does not actually change the settings on any data streams or indices. Instead, it\nsimulates changing the settings and reports back to the user what would have happened had these settings\nactually been applied.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "examples": { + "IndicesPutDataStreamSettingsRequestExample1": { + "summary": "Change a data stream setting", + "description": "This is a request to change two settings on a data stream.\n", + "value": "{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.UpdatedDataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesPutDataStreamSettingsResponseExample1": { + "summary": "Change data stream settings on a data stream", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample2": { + "summary": "Change data stream settings on a data stream that has an index with a metadata block", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample3": { + "summary": "Attempt to change a data stream setting that is not allowed", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" + } + } + } + } + } + } + } + }, "/_mapping/field/{fields}": { "get": { "tags": [ @@ -77200,6 +77371,26 @@ "name" ] }, + "indices.get_data_stream_settings.DataStreamSettings": { + "type": "object", + "properties": { + "name": { + "description": "The name of the data stream.", + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "effective_settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + }, + "required": [ + "name", + "settings", + "effective_settings" + ] + }, "indices.get_field_mapping.TypeFieldMappings": { "type": "object", "properties": { @@ -77475,6 +77666,83 @@ "index" ] }, + "indices.put_data_stream_settings.UpdatedDataStreamSettings": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "applied_to_data_stream": { + "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", + "type": "boolean" + }, + "error": { + "description": "A message explaining why the settings could not be applied to the data stream.", + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "effective_settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "index_settings_results": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.IndexSettingResults" + } + }, + "required": [ + "name", + "applied_to_data_stream", + "settings", + "effective_settings", + "index_settings_results" + ] + }, + "indices.put_data_stream_settings.IndexSettingResults": { + "type": "object", + "properties": { + "applied_to_data_stream_only": { + "description": "The list of settings that were applied to the data stream but not to backing indices. These will be applied to\nthe write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } + }, + "applied_to_data_stream_and_backing_indices": { + "description": "The list of settings that were applied to the data stream and to all of its backing indices. These settings will\nalso be applied to the write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.DataStreamSettingsError" + } + } + }, + "required": [ + "applied_to_data_stream_only", + "applied_to_data_stream_and_backing_indices" + ] + }, + "indices.put_data_stream_settings.DataStreamSettingsError": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "error": { + "description": "A message explaining why the settings could not be applied to specific indices.", + "type": "string" + } + }, + "required": [ + "index", + "error" + ] + }, "indices.put_index_template.IndexTemplateMapping": { "type": "object", "properties": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 43dd8f126d..344988db7e 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -8064,6 +8064,177 @@ "x-state": "Added in 7.9.0" } }, + "/_data_stream/{name}/_settings": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get data stream settings", + "description": "Get setting information for one or more data streams.", + "operationId": "indices-get-data-stream-settings", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns. Supports wildcards (`*`).", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.get_data_stream_settings.DataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesGetDataStreamSettingsResponseExample1": { + "summary": "Get data stream settings on a data stream", + "description": "This is a response to `GET /_data_stream/my-data-stream/_settings` where my-data-stream that has two settings set. The `effective_settings` field shows additional settings that are pulled from its template.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n }\n }\n ]\n}" + } + } + } + } + } + } + }, + "put": { + "tags": [ + "data stream" + ], + "summary": "Update data stream settings", + "description": "This API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", + "operationId": "indices-put-data-stream-settings", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams or data stream patterns.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Indices" + }, + "style": "simple" + }, + { + "in": "query", + "name": "dry_run", + "description": "If `true`, the request does not actually change the settings on any data streams or indices. Instead, it\nsimulates changing the settings and reports back to the user what would have happened had these settings\nactually been applied.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "The period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an\nerror.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "The period to wait for a response. If no response is received before the\n timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "examples": { + "IndicesPutDataStreamSettingsRequestExample1": { + "summary": "Change a data stream setting", + "description": "This is a request to change two settings on a data stream.\n", + "value": "{\n \"index.lifecycle.name\" : \"new-test-policy\",\n \"index.number_of_shards\": 11\n}" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data_streams": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.UpdatedDataStreamSettings" + } + } + }, + "required": [ + "data_streams" + ] + }, + "examples": { + "IndicesPutDataStreamSettingsResponseExample1": { + "summary": "Change data stream settings on a data stream", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when two settings are successfully updated on the data stream. In this case, `index.number_of_shards` is only applied to the data stream -- it will be applied to the write index on rollover. The setting `index.lifecycle.name` is applied to the data stream and all backing indices.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample2": { + "summary": "Change data stream settings on a data stream that has an index with a metadata block", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a setting is successfully applied to the data stream, but one of the backing indices, `.ds-my-data-stream-2025.05.28-000001`, has a write block. The response reports that the setting was not successfully applied to that index.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": true,\n \"settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"number_of_shards\": \"11\"\n }\n },\n \"effective_settings\": {\n \"index\": {\n \"lifecycle\": {\n \"name\": \"new-test-policy\"\n },\n \"mode\": \"standard\",\n \"number_of_shards\": \"11\",\n \"number_of_replicas\": \"0\"\n }\n },\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [\n \"index.number_of_shards\"\n ],\n \"applied_to_data_stream_and_backing_indices\": [\n \"index.lifecycle.name\"\n ],\n \"errors\": [\n {\n \"index\": \".ds-my-data-stream-2025.05.28-000001\",\n \"error\": \"index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];\"\n }\n ]\n }\n }\n ]\n}" + }, + "IndicesPutDataStreamSettingsResponseExample3": { + "summary": "Attempt to change a data stream setting that is not allowed", + "description": "This shows a response to `PUT /_data_stream/my-data-stream/_settings` when a user attempts to set a setting that is not allowed on a data stream. As a result, no change was applied to the data stream.\n", + "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream\",\n \"applied_to_data_stream\": false,\n \"error\": \"Cannot set the following settings on a data stream: [index.number_of_replicas]\",\n \"settings\": {},\n \"effective_settings\": {},\n \"index_settings_results\": {\n \"applied_to_data_stream_only\": [],\n \"applied_to_data_stream_and_backing_indices\": []\n }\n }\n ]\n}" + } + } + } + } + } + } + } + }, "/_index_template": { "get": { "tags": [ @@ -49928,6 +50099,26 @@ "name" ] }, + "indices.get_data_stream_settings.DataStreamSettings": { + "type": "object", + "properties": { + "name": { + "description": "The name of the data stream.", + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "effective_settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + } + }, + "required": [ + "name", + "settings", + "effective_settings" + ] + }, "indices.get_index_template.IndexTemplateItem": { "type": "object", "properties": { @@ -50064,6 +50255,83 @@ "index" ] }, + "indices.put_data_stream_settings.UpdatedDataStreamSettings": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "applied_to_data_stream": { + "description": "If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`\nmode), it is `true`. If an error occurred, it is `false`.", + "type": "boolean" + }, + "error": { + "description": "A message explaining why the settings could not be applied to the data stream.", + "type": "string" + }, + "settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "effective_settings": { + "$ref": "#/components/schemas/indices._types.IndexSettings" + }, + "index_settings_results": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.IndexSettingResults" + } + }, + "required": [ + "name", + "applied_to_data_stream", + "settings", + "effective_settings", + "index_settings_results" + ] + }, + "indices.put_data_stream_settings.IndexSettingResults": { + "type": "object", + "properties": { + "applied_to_data_stream_only": { + "description": "The list of settings that were applied to the data stream but not to backing indices. These will be applied to\nthe write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } + }, + "applied_to_data_stream_and_backing_indices": { + "description": "The list of settings that were applied to the data stream and to all of its backing indices. These settings will\nalso be applied to the write index the next time the data stream is rolled over.", + "type": "array", + "items": { + "type": "string" + } + }, + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/indices.put_data_stream_settings.DataStreamSettingsError" + } + } + }, + "required": [ + "applied_to_data_stream_only", + "applied_to_data_stream_and_backing_indices" + ] + }, + "indices.put_data_stream_settings.DataStreamSettingsError": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types.IndexName" + }, + "error": { + "description": "A message explaining why the settings could not be applied to specific indices.", + "type": "string" + } + }, + "required": [ + "index", + "error" + ] + }, "indices.put_index_template.IndexTemplateMapping": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 730677add2..28cb4404f1 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7761,14 +7761,12 @@ { "availability": { "serverless": { - "featureFlag": "logs_stream", "stability": "stable", - "visibility": "feature_flag" + "visibility": "public" }, "stack": { - "featureFlag": "logs_stream", "stability": "stable", - "visibility": "feature_flag" + "visibility": "public" } }, "description": "Get data stream settings.\n\nGet setting information for one or more data streams.", @@ -8391,14 +8389,12 @@ { "availability": { "serverless": { - "featureFlag": "logs_stream", "stability": "stable", - "visibility": "feature_flag" + "visibility": "public" }, "stack": { - "featureFlag": "logs_stream", "stability": "stable", - "visibility": "feature_flag" + "visibility": "public" } }, "description": "Update data stream settings.\n\nThis API can be used to override settings on specific data streams. These overrides will take precedence over what\nis specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,\nonly certain settings are allowed. If possible, the setting change is applied to all\nbacking indices. Otherwise, it will be applied when the data stream is next rolled over.", diff --git a/specification/_json_spec/indices.get_data_stream_settings.json b/specification/_json_spec/indices.get_data_stream_settings.json index 7150717317..c71529e785 100644 --- a/specification/_json_spec/indices.get_data_stream_settings.json +++ b/specification/_json_spec/indices.get_data_stream_settings.json @@ -5,8 +5,7 @@ "description": "Gets a data stream's settings" }, "stability": "stable", - "visibility": "feature_flag", - "feature_flag": "logs_stream", + "visibility": "public", "headers": { "accept": ["application/json"] }, diff --git a/specification/_json_spec/indices.put_data_stream_settings.json b/specification/_json_spec/indices.put_data_stream_settings.json index 121e57b8ae..67207e0e5d 100644 --- a/specification/_json_spec/indices.put_data_stream_settings.json +++ b/specification/_json_spec/indices.put_data_stream_settings.json @@ -5,8 +5,7 @@ "description": "Updates a data stream's settings" }, "stability": "stable", - "visibility": "feature_flag", - "feature_flag": "logs_stream", + "visibility": "public", "headers": { "accept": ["application/json"] }, diff --git a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts index c84fccf3e3..ed09b3bd04 100644 --- a/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts +++ b/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts @@ -26,8 +26,8 @@ import { Duration } from '@_types/Time' * * Get setting information for one or more data streams. * @rest_spec_name indices.get_data_stream_settings - * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream - * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream + * @availability stack stability=stable visibility=public + * @availability serverless stability=stable visibility=public * @index_privileges view_index_metadata * @doc_id indices-get-data-stream-settings * @doc_tag data stream diff --git a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts index ccb7d632c3..3c36eb4d06 100644 --- a/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts +++ b/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts @@ -30,8 +30,8 @@ import { Duration } from '@_types/Time' * only certain settings are allowed. If possible, the setting change is applied to all * backing indices. Otherwise, it will be applied when the data stream is next rolled over. * @rest_spec_name indices.put_data_stream_settings - * @availability stack stability=stable visibility=feature_flag feature_flag=logs_stream - * @availability serverless stability=stable visibility=feature_flag feature_flag=logs_stream + * @availability stack stability=stable visibility=public + * @availability serverless stability=stable visibility=public * @index_privileges manage * @doc_id indices-put-data-stream-settings * @doc_tag data stream