diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 758446e708..80436784a2 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -13787,7 +13787,7 @@ }, "examples": { "IndicesGetDataLifecycleResponseExample1": { - "description": "A successful response from `GET _lifecycle/stats?human&pretty`.", + "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" } } @@ -13970,6 +13970,221 @@ "x-state": "Added in 8.11.0" } }, + "/_data_stream/{name}/_options": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get data stream options", + "description": "Get the data stream options configuration of one or more data streams.", + "operationId": "indices-get-data-stream-options", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "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_options.DataStreamWithOptions" + } + } + }, + "required": [ + "data_streams" + ] + } + } + } + } + }, + "x-state": "Added in 8.19.0" + }, + "put": { + "tags": [ + "data stream" + ], + "summary": "Update data stream options", + "description": "Update the data stream options of the specified data streams.", + "operationId": "indices-put-data-stream-options", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "failure_store": { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Added in 8.19.0" + }, + "delete": { + "tags": [ + "indices" + ], + "summary": "Delete data stream options", + "description": "Removes the data stream options from a data stream.", + "operationId": "indices-delete-data-stream-options", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "A comma-separated list of data streams of which the data stream options will be deleted; use `*` to get all data streams", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "Specify timeout for connection to master", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Explicit timestamp for the document", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + }, + "examples": { + "IndicesDeleteDataStreamOptionsResponseExample1": { + "description": "A successful response for deleting data stream options.", + "value": "{\n \"acknowledged\": true\n}" + } + } + } + } + } + }, + "x-state": "Added in 8.19.0" + } + }, "/_index_template/{name}": { "get": { "tags": [ @@ -67911,6 +68126,18 @@ }, "lifecycle": { "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + }, + "data_stream_options": { + "x-state": "Added in 8.19.0", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } } }, @@ -70619,6 +70846,72 @@ "fixed_interval" ] }, + "indices._types.DataStreamOptionsTemplate": { + "type": "object", + "properties": { + "failure_store": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStoreTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "indices._types.DataStreamFailureStoreTemplate": { + "type": "object", + "properties": { + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "oneOf": [ + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lifecycle": { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycleTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "indices._types.FailureStoreLifecycleTemplate": { + "type": "object", + "properties": { + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "type": "boolean" + } + } + }, "_types.Level": { "type": "string", "enum": [ @@ -77196,6 +77489,52 @@ "name" ] }, + "indices.get_data_stream_options.DataStreamWithOptions": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.DataStreamName" + }, + "options": { + "$ref": "#/components/schemas/indices._types.DataStreamOptions" + } + }, + "required": [ + "name" + ] + }, + "indices._types.DataStreamOptions": { + "type": "object", + "properties": { + "failure_store": { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + } + }, + "indices._types.DataStreamFailureStore": { + "type": "object", + "properties": { + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "type": "boolean" + }, + "lifecycle": { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycle" + } + } + }, + "indices._types.FailureStoreLifecycle": { + "type": "object", + "properties": { + "data_retention": { + "$ref": "#/components/schemas/_types.Duration" + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "type": "boolean" + } + } + }, "indices.get_field_mapping.TypeFieldMappings": { "type": "object", "properties": { @@ -77308,6 +77647,18 @@ }, "lifecycle": { "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + }, + "data_stream_options": { + "x-state": "Added in 8.19.0", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } } }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index aea34d4d00..e3777ce67e 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -7921,7 +7921,7 @@ }, "examples": { "IndicesGetDataLifecycleResponseExample1": { - "description": "A successful response from `GET _lifecycle/stats?human&pretty`.", + "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" } } @@ -8064,6 +8064,151 @@ "x-state": "Added in 7.9.0" } }, + "/_data_stream/{name}/_options": { + "get": { + "tags": [ + "data stream" + ], + "summary": "Get data stream options", + "description": "Get the data stream options configuration of one or more data streams.", + "operationId": "indices-get-data-stream-options", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "description": "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.", + "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_options.DataStreamWithOptions" + } + } + }, + "required": [ + "data_streams" + ] + } + } + } + } + }, + "x-state": "Added in 8.19.0" + }, + "put": { + "tags": [ + "data stream" + ], + "summary": "Update data stream options", + "description": "Update the data stream options of the specified data streams.", + "operationId": "indices-put-data-stream-options", + "parameters": [ + { + "in": "path", + "name": "name", + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.DataStreamNames" + }, + "style": "simple" + }, + { + "in": "query", + "name": "expand_wildcards", + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.\n\nSupported values include:\n - `all`: Match any data stream or index, including hidden ones.\n - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.\n - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.\n - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.\n - `none`: Wildcard expressions are not accepted.\n\n", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.ExpandWildcards" + }, + "style": "form" + }, + { + "in": "query", + "name": "master_timeout", + "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.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types.Duration" + }, + "style": "form" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "failure_store": { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types.AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Added in 8.19.0" + } + }, "/_index_template": { "get": { "tags": [ @@ -38828,6 +38973,18 @@ }, "lifecycle": { "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + }, + "data_stream_options": { + "x-state": "Added in 8.19.0", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } } }, @@ -47326,6 +47483,72 @@ "fixed_interval" ] }, + "indices._types.DataStreamOptionsTemplate": { + "type": "object", + "properties": { + "failure_store": { + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStoreTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "indices._types.DataStreamFailureStoreTemplate": { + "type": "object", + "properties": { + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "oneOf": [ + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "lifecycle": { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycleTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] + } + } + }, + "indices._types.FailureStoreLifecycleTemplate": { + "type": "object", + "properties": { + "data_retention": { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "oneOf": [ + { + "$ref": "#/components/schemas/_types.Duration" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "type": "boolean" + } + } + }, "_types.ClusterInfoTargets": { "oneOf": [ { @@ -49924,6 +50147,52 @@ "name" ] }, + "indices.get_data_stream_options.DataStreamWithOptions": { + "type": "object", + "properties": { + "name": { + "$ref": "#/components/schemas/_types.DataStreamName" + }, + "options": { + "$ref": "#/components/schemas/indices._types.DataStreamOptions" + } + }, + "required": [ + "name" + ] + }, + "indices._types.DataStreamOptions": { + "type": "object", + "properties": { + "failure_store": { + "$ref": "#/components/schemas/indices._types.DataStreamFailureStore" + } + } + }, + "indices._types.DataStreamFailureStore": { + "type": "object", + "properties": { + "enabled": { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "type": "boolean" + }, + "lifecycle": { + "$ref": "#/components/schemas/indices._types.FailureStoreLifecycle" + } + } + }, + "indices._types.FailureStoreLifecycle": { + "type": "object", + "properties": { + "data_retention": { + "$ref": "#/components/schemas/_types.Duration" + }, + "enabled": { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "type": "boolean" + } + } + }, "indices.get_index_template.IndexTemplateItem": { "type": "object", "properties": { @@ -50002,6 +50271,18 @@ }, "lifecycle": { "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover" + }, + "data_stream_options": { + "x-state": "Added in 8.19.0", + "oneOf": [ + { + "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate" + }, + { + "nullable": true, + "type": "string" + } + ] } } }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 71fffc0362..ae4c9b2c06 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -3628,6 +3628,42 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "description": "Get data stream options.\n\nGet the data stream options configuration of one or more data streams.", + "docTag": "data stream", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", + "name": "indices.get_data_stream_options", + "request": { + "name": "Request", + "namespace": "indices.get_data_stream_options" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "indices.get_data_stream_options" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_data_stream/{name}/_options" + } + ] + }, { "availability": { "serverless": { @@ -3947,6 +3983,45 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "stable", + "visibility": "public" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "description": "Update data stream options.\nUpdate the data stream options of the specified data streams.", + "docTag": "data stream", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", + "name": "indices.put_data_stream_options", + "request": { + "name": "Request", + "namespace": "indices.put_data_stream_options" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "indices.put_data_stream_options" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_data_stream/{name}/_options" + } + ] + }, { "availability": { "serverless": { @@ -24345,7 +24420,7 @@ }, "examples": { "IndicesGetDataLifecycleResponseExample1": { - "description": "A successful response from `GET _lifecycle/stats?human&pretty`.", + "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" } }, @@ -24487,6 +24562,96 @@ }, "specLocation": "indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get data stream options.\n\nGet the data stream options configuration of one or more data streams.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "indices.get_data_stream_options" + }, + "path": [ + { + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamNames", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "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.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsRequest.ts#L24-L62" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "data_streams", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamWithOptions", + "namespace": "indices.get_data_stream_options" + } + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "indices.get_data_stream_options" + }, + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L23-L25" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -25373,6 +25538,115 @@ }, "specLocation": "indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "If defined, it will update the failure store configuration of every data stream resolved by the name expression.", + "name": "failure_store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + } + } + } + ] + }, + "description": "Update data stream options.\nUpdate the data stream options of the specified data streams.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "indices.put_data_stream_options" + }, + "path": [ + { + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamNames", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "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.\nIf no response is received before the 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_options/IndicesPutDataStreamOptionsRequest.ts#L25-L80" + }, + { + "body": { + "codegenName": "result", + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "indices.put_data_stream_options" + }, + "specLocation": "indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts#L22-L25" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -116430,7 +116704,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L27-L30" + "specLocation": "cluster/_types/ComponentTemplate.ts#L28-L31" }, { "kind": "interface", @@ -116486,7 +116760,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L32-L41" + "specLocation": "cluster/_types/ComponentTemplate.ts#L33-L42" }, { "kind": "interface", @@ -116593,9 +116867,41 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "name": "data_stream_options", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L43-L55" + "specLocation": "cluster/_types/ComponentTemplate.ts#L44-L61" }, { "attachedBehaviors": [ @@ -120232,6 +120538,148 @@ ], "specLocation": "indices/_types/DataStreamLifecycle.ts#L60-L72" }, + { + "description": "Data stream options template contains the same information as DataStreamOptions but allows them to be set explicitly to null.", + "kind": "interface", + "name": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "name": "failure_store", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStoreTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ], + "specLocation": "indices/_types/DataStreamOptions.ts#L36-L41" + }, + { + "description": "Template equivalent of DataStreamFailureStore that allows nullable values.", + "kind": "interface", + "name": { + "name": "DataStreamFailureStoreTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "name": "enabled", + "required": false, + "serverDefault": "true", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "name": "lifecycle", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "FailureStoreLifecycleTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L39-L54" + }, + { + "description": "Template equivalent of FailureStoreLifecycle that allows nullable values.", + "kind": "interface", + "name": { + "name": "FailureStoreLifecycleTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "name": "data_retention", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L74-L90" + }, { "kind": "interface", "name": { @@ -125278,6 +125726,133 @@ ], "specLocation": "indices/_types/DataStream.ts#L141-L146" }, + { + "kind": "interface", + "name": { + "name": "DataStreamWithOptions", + "namespace": "indices.get_data_stream_options" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamName", + "namespace": "_types" + } + } + }, + { + "name": "options", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamOptions", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L27-L30" + }, + { + "description": "Data stream options contain the configuration of data stream level features for a given data stream, for example,\nthe failure store configuration.", + "kind": "interface", + "name": { + "name": "DataStreamOptions", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it specifies configuration for the failure store of this data stream.", + "name": "failure_store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/_types/DataStreamOptions.ts#L25-L34" + }, + { + "description": "Data stream failure store contains the configuration of the failure store for a given data stream.", + "kind": "interface", + "name": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "name": "lifecycle", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FailureStoreLifecycle", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L22-L37" + }, + { + "description": "The failure store lifecycle configures the data stream lifecycle configuration for failure indices.", + "kind": "interface", + "name": { + "name": "FailureStoreLifecycle", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "name": "data_retention", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L56-L72" + }, { "kind": "interface", "name": { @@ -125454,7 +126029,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" + "specLocation": "indices/_types/IndexTemplate.ts#L29-L82" }, { "kind": "interface", @@ -125529,9 +126104,41 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "name": "data_stream_options", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" + "specLocation": "indices/_types/IndexTemplate.ts#L97-L124" }, { "kind": "interface", @@ -125567,7 +126174,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" + "specLocation": "indices/_types/IndexTemplate.ts#L84-L95" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 7f06a39e4a..4e383d9c38 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7007,17 +7007,27 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "stable", - "visibility": "public" + "visibility": "private" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" } }, - "description": "Deletes the data stream options of the selected data streams.", + "description": "Delete data stream options.\nRemoves the data stream options from a data stream.", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "name": "indices.delete_data_stream_options", - "request": null, + "request": { + "name": "Request", + "namespace": "indices.delete_data_stream_options" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "indices.delete_data_stream_options" + }, "responseMediaType": [ "application/json" ], @@ -7735,17 +7745,28 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "stable", "visibility": "public" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" } }, - "description": "Returns the data stream options of the selected data streams.", + "description": "Get data stream options.\n\nGet the data stream options configuration of one or more data streams.", + "docTag": "data stream", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "name": "indices.get_data_stream_options", - "request": null, + "request": { + "name": "Request", + "namespace": "indices.get_data_stream_options" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "indices.get_data_stream_options" + }, "responseMediaType": [ "application/json" ], @@ -8344,20 +8365,31 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "stable", "visibility": "public" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" } }, - "description": "Updates the data stream options of the selected data streams.", + "description": "Update data stream options.\nUpdate the data stream options of the specified data streams.", + "docTag": "data stream", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html", "name": "indices.put_data_stream_options", - "request": null, + "request": { + "name": "Request", + "namespace": "indices.put_data_stream_options" + }, "requestBodyRequired": false, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "indices.put_data_stream_options" + }, "responseMediaType": [ "application/json" ], @@ -112611,7 +112643,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L27-L30" + "specLocation": "cluster/_types/ComponentTemplate.ts#L28-L31" }, { "kind": "interface", @@ -112667,7 +112699,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L32-L41" + "specLocation": "cluster/_types/ComponentTemplate.ts#L33-L42" }, { "kind": "interface", @@ -112774,9 +112806,41 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "name": "data_stream_options", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L43-L55" + "specLocation": "cluster/_types/ComponentTemplate.ts#L44-L61" }, { "kind": "interface", @@ -133939,6 +134003,102 @@ ], "specLocation": "indices/_types/DataStream.ts#L53-L139" }, + { + "kind": "interface", + "description": "Data stream failure store contains the configuration of the failure store for a given data stream.", + "name": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "name": "lifecycle", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FailureStoreLifecycle", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L22-L37" + }, + { + "kind": "interface", + "description": "Template equivalent of DataStreamFailureStore that allows nullable values.", + "name": { + "name": "DataStreamFailureStoreTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store\nthat's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will\nnot remove any existing data from the failure store.", + "name": "enabled", + "required": false, + "serverDefault": "true", + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } + }, + { + "description": "If defined, it specifies the lifecycle configuration for the failure store of this data stream.", + "name": "lifecycle", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "FailureStoreLifecycleTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L39-L54" + }, { "kind": "interface", "name": { @@ -134243,6 +134403,63 @@ ], "specLocation": "indices/_types/DataStreamLifecycle.ts#L47-L58" }, + { + "kind": "interface", + "description": "Data stream options contain the configuration of data stream level features for a given data stream, for example,\nthe failure store configuration.", + "name": { + "name": "DataStreamOptions", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, it specifies configuration for the failure store of this data stream.", + "name": "failure_store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/_types/DataStreamOptions.ts#L25-L34" + }, + { + "kind": "interface", + "description": "Data stream options template contains the same information as DataStreamOptions but allows them to be set explicitly to null.", + "name": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "name": "failure_store", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStoreTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } + } + ], + "specLocation": "indices/_types/DataStreamOptions.ts#L36-L41" + }, { "kind": "interface", "name": { @@ -134399,6 +134616,90 @@ ], "specLocation": "indices/_types/DataStream.ts#L47-L51" }, + { + "kind": "interface", + "description": "The failure store lifecycle configures the data stream lifecycle configuration for failure indices.", + "name": { + "name": "FailureStoreLifecycle", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "name": "data_retention", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L56-L72" + }, + { + "kind": "interface", + "description": "Template equivalent of FailureStoreLifecycle that allows nullable values.", + "name": { + "name": "FailureStoreLifecycleTemplate", + "namespace": "indices._types" + }, + "properties": [ + { + "description": "If defined, every document added to this data stream will be stored at least for this time frame.\nAny time after this duration the document could be deleted.\nWhen empty, every document in this data stream will be stored indefinitely.", + "name": "data_retention", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } + }, + { + "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", + "name": "enabled", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "indices/_types/DataStreamFailureStore.ts#L74-L90" + }, { "kind": "interface", "name": { @@ -136285,7 +136586,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" + "specLocation": "indices/_types/IndexTemplate.ts#L29-L82" }, { "kind": "interface", @@ -136321,7 +136622,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" + "specLocation": "indices/_types/IndexTemplate.ts#L84-L95" }, { "kind": "interface", @@ -136396,9 +136697,41 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": { + "stability": "stable" + }, + "stack": { + "since": "8.19.0", + "stability": "stable" + } + }, + "name": "data_stream_options", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "DataStreamOptionsTemplate", + "namespace": "indices._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" + "specLocation": "indices/_types/IndexTemplate.ts#L97-L124" }, { "kind": "interface", @@ -140677,6 +141010,104 @@ }, "specLocation": "indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L25" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Delete data stream options.\nRemoves the data stream options from a data stream.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.delete_data_stream_options" + }, + "path": [ + { + "description": "A comma-separated list of data streams of which the data stream options will be deleted; use `*` to get all data streams", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamNames", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)", + "name": "expand_wildcards", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "Specify timeout for connection to master", + "name": "master_timeout", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "Explicit timestamp for the document", + "name": "timeout", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsRequest.ts#L24-L46" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "examples": { + "IndicesDeleteDataStreamOptionsResponseExample1": { + "description": "A successful response for deleting data stream options.", + "value": "{\n \"acknowledged\": true\n}" + } + }, + "name": { + "name": "Response", + "namespace": "indices.delete_data_stream_options" + }, + "specLocation": "indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts#L22-L25" + }, { "kind": "request", "attachedBehaviors": [ @@ -143001,7 +143432,7 @@ }, "examples": { "IndicesGetDataLifecycleResponseExample1": { - "description": "A successful response from `GET _lifecycle/stats?human&pretty`.", + "description": "A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`.", "value": "{\n \"data_streams\": [\n {\n \"name\": \"my-data-stream-1\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n },\n {\n \"name\": \"my-data-stream-2\",\n \"lifecycle\": {\n \"enabled\": true,\n \"data_retention\": \"7d\"\n }\n }\n ]\n}" } }, @@ -143299,6 +143730,128 @@ }, "specLocation": "indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24" }, + { + "kind": "interface", + "name": { + "name": "DataStreamWithOptions", + "namespace": "indices.get_data_stream_options" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamName", + "namespace": "_types" + } + } + }, + { + "name": "options", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamOptions", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L27-L30" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Get data stream options.\n\nGet the data stream options configuration of one or more data streams.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.get_data_stream_options" + }, + "path": [ + { + "description": "Comma-separated list of data streams to limit the request.\nSupports wildcards (`*`).\nTo target all data streams, omit this parameter or use `*` or `_all`.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamNames", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `open`, `closed`, `hidden`, `none`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "description": "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.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsRequest.ts#L24-L62" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "data_streams", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DataStreamWithOptions", + "namespace": "indices.get_data_stream_options" + } + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "indices.get_data_stream_options" + }, + "specLocation": "indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L23-L25" + }, { "kind": "request", "attachedBehaviors": [ @@ -145200,6 +145753,115 @@ }, "specLocation": "indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "description": "If defined, it will update the failure store configuration of every data stream resolved by the name expression.", + "name": "failure_store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamFailureStore", + "namespace": "indices._types" + } + } + } + ] + }, + "description": "Update data stream options.\nUpdate the data stream options of the specified data streams.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "indices.put_data_stream_options" + }, + "path": [ + { + "description": "Comma-separated list of data streams used to limit the request.\nSupports wildcards (`*`).\nTo target all data streams use `*` or `_all`.", + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DataStreamNames", + "namespace": "_types" + } + } + } + ], + "query": [ + { + "description": "Type of data stream that wildcard patterns can match.\nSupports comma-separated values, such as `open,hidden`.\nValid values are: `all`, `hidden`, `open`, `closed`, `none`.", + "name": "expand_wildcards", + "required": false, + "serverDefault": "open", + "type": { + "kind": "instance_of", + "type": { + "name": "ExpandWildcards", + "namespace": "_types" + } + } + }, + { + "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.\nIf no response is received before the 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_options/IndicesPutDataStreamOptionsRequest.ts#L25-L80" + }, + { + "kind": "response", + "body": { + "kind": "value", + "codegenName": "result", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "indices.put_data_stream_options" + }, + "specLocation": "indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts#L22-L25" + }, { "kind": "interface", "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f66f4284c3..2a1f764299 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9189,6 +9189,7 @@ export interface ClusterComponentTemplateSummary { mappings?: MappingTypeMapping aliases?: Record lifecycle?: IndicesDataStreamLifecycleWithRollover + data_stream_options?: IndicesDataStreamOptionsTemplate | null } export interface ClusterAllocationExplainAllocationDecision { @@ -11388,6 +11389,16 @@ export interface IndicesDataStream { index_mode?: IndicesIndexMode } +export interface IndicesDataStreamFailureStore { + enabled?: boolean + lifecycle?: IndicesFailureStoreLifecycle +} + +export interface IndicesDataStreamFailureStoreTemplate { + enabled?: boolean | null + lifecycle?: IndicesFailureStoreLifecycleTemplate | null +} + export interface IndicesDataStreamIndex { index_name: IndexName index_uuid: Uuid @@ -11424,6 +11435,14 @@ export interface IndicesDataStreamLifecycleWithRollover extends IndicesDataStrea rollover?: IndicesDataStreamLifecycleRolloverConditions } +export interface IndicesDataStreamOptions { + failure_store?: IndicesDataStreamFailureStore +} + +export interface IndicesDataStreamOptionsTemplate { + failure_store?: IndicesDataStreamFailureStoreTemplate | null +} + export interface IndicesDataStreamTimestampField { name: Field } @@ -11448,6 +11467,16 @@ export interface IndicesFailureStore { rollover_on_write: boolean } +export interface IndicesFailureStoreLifecycle { + data_retention?: Duration + enabled?: boolean +} + +export interface IndicesFailureStoreLifecycleTemplate { + data_retention?: Duration | null + enabled?: boolean +} + export interface IndicesFielddataFrequencyFilter { max: double min: double @@ -11626,6 +11655,7 @@ export interface IndicesIndexTemplateSummary { mappings?: MappingTypeMapping settings?: IndicesIndexSettings lifecycle?: IndicesDataStreamLifecycleWithRollover + data_stream_options?: IndicesDataStreamOptionsTemplate | null } export interface IndicesIndexVersioning { @@ -12105,6 +12135,15 @@ export interface IndicesDeleteDataStreamRequest extends RequestBase { export type IndicesDeleteDataStreamResponse = AcknowledgedResponseBase +export interface IndicesDeleteDataStreamOptionsRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration +} + +export type IndicesDeleteDataStreamOptionsResponse = AcknowledgedResponseBase + export interface IndicesDeleteIndexTemplateRequest extends RequestBase { name: Names master_timeout?: Duration @@ -12361,6 +12400,21 @@ export interface IndicesGetDataStreamResponse { data_streams: IndicesDataStream[] } +export interface IndicesGetDataStreamOptionsDataStreamWithOptions { + name: DataStreamName + options?: IndicesDataStreamOptions +} + +export interface IndicesGetDataStreamOptionsRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration +} + +export interface IndicesGetDataStreamOptionsResponse { + data_streams: IndicesGetDataStreamOptionsDataStreamWithOptions[] +} + export interface IndicesGetFieldMappingRequest extends RequestBase { fields: Fields index?: Indices @@ -12555,6 +12609,18 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase { export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase +export interface IndicesPutDataStreamOptionsRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration + body?: { + failure_store?: IndicesDataStreamFailureStore + } +} + +export type IndicesPutDataStreamOptionsResponse = AcknowledgedResponseBase + export interface IndicesPutIndexTemplateIndexTemplateMapping { aliases?: Record mappings?: MappingTypeMapping diff --git a/specification/_json_spec/indices.get_data_stream_options.json b/specification/_json_spec/indices.get_data_stream_options.json index ef010d1df6..6145b9c11f 100644 --- a/specification/_json_spec/indices.get_data_stream_options.json +++ b/specification/_json_spec/indices.get_data_stream_options.json @@ -30,10 +30,6 @@ "default": "open", "description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)" }, - "include_defaults": { - "type": "boolean", - "description": "Return all relevant default configurations for the data stream (default: false)" - }, "master_timeout": { "type": "time", "description": "Specify timeout for connection to master" diff --git a/specification/cluster/_types/ComponentTemplate.ts b/specification/cluster/_types/ComponentTemplate.ts index 016ca325ce..bf67ef6e83 100644 --- a/specification/cluster/_types/ComponentTemplate.ts +++ b/specification/cluster/_types/ComponentTemplate.ts @@ -19,6 +19,7 @@ import { AliasDefinition } from '@indices/_types/AliasDefinition' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' +import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' import { IndexSettings } from '@indices/_types/IndexSettings' import { Dictionary } from '@spec_utils/Dictionary' import { IndexName, Metadata, Name, VersionNumber } from '@_types/common' @@ -52,4 +53,9 @@ export class ComponentTemplateSummary { * @availability serverless stability=stable */ lifecycle?: DataStreamLifecycleWithRollover + /** + * @availability stack since=8.19.0 stability=stable + * @availability serverless stability=stable + */ + data_stream_options?: DataStreamOptionsTemplate | null } diff --git a/specification/indices/_types/DataStreamFailureStore.ts b/specification/indices/_types/DataStreamFailureStore.ts new file mode 100644 index 0000000000..a60f0ceb08 --- /dev/null +++ b/specification/indices/_types/DataStreamFailureStore.ts @@ -0,0 +1,90 @@ +/* + * 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 { Duration } from '@_types/Time' + +/** + * Data stream failure store contains the configuration of the failure store for a given data stream. + */ +export class DataStreamFailureStore { + /** + * If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store + * that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will + * not remove any existing data from the failure store. + * @server_default true + */ + enabled?: boolean + /** + * If defined, it specifies the lifecycle configuration for the failure store of this data stream. + */ + lifecycle?: FailureStoreLifecycle +} + +/** + * Template equivalent of DataStreamFailureStore that allows nullable values. + */ +export class DataStreamFailureStoreTemplate { + /** + * If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store + * that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will + * not remove any existing data from the failure store. + * @server_default true + */ + enabled?: boolean | null + /** + * If defined, it specifies the lifecycle configuration for the failure store of this data stream. + */ + lifecycle?: FailureStoreLifecycleTemplate | null +} + +/** + * The failure store lifecycle configures the data stream lifecycle configuration for failure indices. + */ +export class FailureStoreLifecycle { + /** + * If defined, every document added to this data stream will be stored at least for this time frame. + * Any time after this duration the document could be deleted. + * When empty, every document in this data stream will be stored indefinitely. + */ + data_retention?: Duration + /** + * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle + * that's disabled (enabled: `false`) will have no effect on the data stream. + * @server_default true + */ + enabled?: boolean +} + +/** + * Template equivalent of FailureStoreLifecycle that allows nullable values. + */ +export class FailureStoreLifecycleTemplate { + /** + * If defined, every document added to this data stream will be stored at least for this time frame. + * Any time after this duration the document could be deleted. + * When empty, every document in this data stream will be stored indefinitely. + */ + data_retention?: Duration | null + /** + * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle + * that's disabled (enabled: `false`) will have no effect on the data stream. + * @server_default true + */ + enabled?: boolean +} diff --git a/specification/indices/_types/DataStreamOptions.ts b/specification/indices/_types/DataStreamOptions.ts new file mode 100644 index 0000000000..43aece3a35 --- /dev/null +++ b/specification/indices/_types/DataStreamOptions.ts @@ -0,0 +1,41 @@ +/* + * 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 { + DataStreamFailureStore, + DataStreamFailureStoreTemplate +} from '@indices/_types/DataStreamFailureStore' + +/** + * Data stream options contain the configuration of data stream level features for a given data stream, for example, + * the failure store configuration. + */ +export class DataStreamOptions { + /** + * If defined, it specifies configuration for the failure store of this data stream. + */ + failure_store?: DataStreamFailureStore +} + +/** + * Data stream options template contains the same information as DataStreamOptions but allows them to be set explicitly to null. + */ +export class DataStreamOptionsTemplate { + failure_store?: DataStreamFailureStoreTemplate | null +} diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index f0fe9dad47..abafdcbeab 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -18,6 +18,7 @@ */ import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' +import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' import { Dictionary } from '@spec_utils/Dictionary' import { IndexName, Metadata, Name, Names, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' @@ -115,4 +116,9 @@ export class IndexTemplateSummary { * @availability serverless stability=stable */ lifecycle?: DataStreamLifecycleWithRollover + /** + * @availability stack since=8.19.0 stability=stable + * @availability serverless stability=stable + */ + data_stream_options?: DataStreamOptionsTemplate | null } diff --git a/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsRequest.ts b/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsRequest.ts new file mode 100644 index 0000000000..27e860f0a7 --- /dev/null +++ b/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsRequest.ts @@ -0,0 +1,46 @@ +/* + * 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 { DataStreamNames, ExpandWildcards } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Delete data stream options. + * Removes the data stream options from a data stream. + * @rest_spec_name indices.delete_data_stream_options + * @availability stack since=8.19.0 stability=stable + * @availability serverless stability=stable visibility=private + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_data_stream/{name}/_options' + methods: ['DELETE'] + } + ] + path_parts: { + name: DataStreamNames + } + query_parameters: { + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration + } +} diff --git a/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts b/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts new file mode 100644 index 0000000000..9e7bdb91cd --- /dev/null +++ b/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + /** @codegen_name result */ + body: AcknowledgedResponseBase +} diff --git a/specification/indices/delete_data_stream_options/examples/200_response/IndicesDeleteDataStreamOptionsResponseExample1.yaml b/specification/indices/delete_data_stream_options/examples/200_response/IndicesDeleteDataStreamOptionsResponseExample1.yaml new file mode 100644 index 0000000000..f0575c2b4c --- /dev/null +++ b/specification/indices/delete_data_stream_options/examples/200_response/IndicesDeleteDataStreamOptionsResponseExample1.yaml @@ -0,0 +1,5 @@ +# summary: '' +description: A successful response for deleting data stream options. +# type: response +# response_code: 200 +value: "{\n \"acknowledged\": true\n}" diff --git a/specification/indices/get_data_lifecycle/examples/response/IndicesGetDataLifecycleResponseExample1.yaml b/specification/indices/get_data_lifecycle/examples/response/IndicesGetDataLifecycleResponseExample1.yaml index 135c33c797..91f15d2d16 100644 --- a/specification/indices/get_data_lifecycle/examples/response/IndicesGetDataLifecycleResponseExample1.yaml +++ b/specification/indices/get_data_lifecycle/examples/response/IndicesGetDataLifecycleResponseExample1.yaml @@ -1,5 +1,5 @@ # summary: -description: A successful response from `GET _lifecycle/stats?human&pretty`. +description: A successful response from `GET /_data_stream/{name}/_lifecycle?human&pretty`. # type: response # response_code: 200 value: diff --git a/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsRequest.ts b/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsRequest.ts new file mode 100644 index 0000000000..d5af5ee518 --- /dev/null +++ b/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsRequest.ts @@ -0,0 +1,62 @@ +/* + * 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 { DataStreamNames, ExpandWildcards } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Get data stream options. + * + * Get the data stream options configuration of one or more data streams. + * @rest_spec_name indices.get_data_stream_options + * @availability stack since=8.19.0 stability=stable + * @availability serverless stability=stable visibility=public + * @doc_tag data stream + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_data_stream/{name}/_options' + methods: ['GET'] + } + ] + path_parts: { + /** + * Comma-separated list of data streams to limit the request. + * Supports wildcards (`*`). + * To target all data streams, omit this parameter or use `*` or `_all`. + */ + name: DataStreamNames + } + query_parameters: { + /** + * Type of data stream that wildcard patterns can match. + * Supports comma-separated values, such as `open,hidden`. + * Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @server_default open + */ + expand_wildcards?: ExpandWildcards + /** + * 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_options/IndicesGetDataStreamOptionsResponse.ts b/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts new file mode 100644 index 0000000000..091e0e8366 --- /dev/null +++ b/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts @@ -0,0 +1,30 @@ +/* + * 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 { DataStreamOptions } from '@indices/_types/DataStreamOptions' +import { DataStreamName } from '@_types/common' + +export class Response { + body: { data_streams: DataStreamWithOptions[] } +} + +class DataStreamWithOptions { + name: DataStreamName + options?: DataStreamOptions +} diff --git a/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts b/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts new file mode 100644 index 0000000000..0eb782a977 --- /dev/null +++ b/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts @@ -0,0 +1,80 @@ +/* + * 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 { DataStreamFailureStore } from '@indices/_types/DataStreamFailureStore' +import { RequestBase } from '@_types/Base' +import { DataStreamNames, ExpandWildcards } from '@_types/common' +import { Duration } from '@_types/Time' + +/** + * Update data stream options. + * Update the data stream options of the specified data streams. + * @rest_spec_name indices.put_data_stream_options + * @availability stack since=8.19.0 stability=stable + * @availability serverless stability=stable visibility=public + * @doc_tag data stream + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_data_stream/{name}/_options' + methods: ['PUT'] + } + ] + path_parts: { + /** + * Comma-separated list of data streams used to limit the request. + * Supports wildcards (`*`). + * To target all data streams use `*` or `_all`. + */ + name: DataStreamNames + } + query_parameters: { + /** + * Type of data stream that wildcard patterns can match. + * Supports comma-separated values, such as `open,hidden`. + * Valid values are: `all`, `hidden`, `open`, `closed`, `none`. + * @server_default open + */ + expand_wildcards?: ExpandWildcards + /** + * 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 + } + /* + * This is DataStreamOptions from @indices/_types/DataStreamOptions.ts, + * but kept as a properties body to avoid a breaking change + */ + body: { + /** + * If defined, it will update the failure store configuration of every data stream resolved by the name expression. + */ + failure_store?: DataStreamFailureStore + } +} diff --git a/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts b/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts new file mode 100644 index 0000000000..9e7bdb91cd --- /dev/null +++ b/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts @@ -0,0 +1,25 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + /** @codegen_name result */ + body: AcknowledgedResponseBase +}