diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 2635ea9e0e..625d85a1b4 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -76393,6 +76393,18 @@ }, "deprecated": { "type": "boolean" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -86597,6 +86609,18 @@ }, "ignore_missing_component_templates": { "$ref": "#/components/schemas/_types.Names" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -91540,6 +91564,18 @@ }, "_meta": { "$ref": "#/components/schemas/_types.Metadata" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } } }, @@ -112338,6 +112374,12 @@ "required": [ "component_templates" ] + }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } } } } @@ -113039,6 +113081,12 @@ "required": [ "index_templates" ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } } } } @@ -113567,7 +113615,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } } } diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index f1d6fce20d..57ca1bc3c2 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -43616,6 +43616,18 @@ }, "deprecated": { "type": "boolean" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -55374,6 +55386,18 @@ }, "ignore_missing_component_templates": { "$ref": "#/components/schemas/_types.Names" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } }, "required": [ @@ -58557,6 +58581,18 @@ }, "_meta": { "$ref": "#/components/schemas/_types.Metadata" + }, + "created_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "created_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" + }, + "modified_date": { + "$ref": "#/components/schemas/_types.DateTime" + }, + "modified_date_millis": { + "$ref": "#/components/schemas/_types.EpochTimeUnitMillis" } } }, @@ -68381,6 +68417,12 @@ "required": [ "component_templates" ] + }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } } } } @@ -68747,6 +68789,12 @@ "required": [ "index_templates" ] + }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } } } } @@ -69002,7 +69050,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index b9d9af7fe4..4cdc3366eb 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -120652,7 +120652,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L28-L31" + "specLocation": "cluster/_types/ComponentTemplate.ts#L29-L32" }, { "kind": "interface", @@ -120706,9 +120706,99 @@ "namespace": "_builtins" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the component template was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L33-L42" + "specLocation": "cluster/_types/ComponentTemplate.ts#L34-L67" }, { "kind": "interface", @@ -120849,7 +120939,7 @@ } } ], - "specLocation": "cluster/_types/ComponentTemplate.ts#L44-L61" + "specLocation": "cluster/_types/ComponentTemplate.ts#L69-L86" }, { "kind": "interface", @@ -122674,6 +122764,12 @@ } ] }, + "examples": { + "GetComponentTemplateResponseExample1": { + "description": "A successful response for retrieving information about a component template.", + "value": "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom component template\"\n },\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "cluster.get_component_template" @@ -148109,9 +148205,99 @@ "namespace": "_types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the index template was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L29-L82" + "specLocation": "indices/_types/IndexTemplate.ts#L30-L107" }, { "kind": "interface", @@ -148147,7 +148333,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L84-L95" + "specLocation": "indices/_types/IndexTemplate.ts#L109-L120" }, { "kind": "interface", @@ -148256,7 +148442,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L97-L124" + "specLocation": "indices/_types/IndexTemplate.ts#L122-L149" }, { "kind": "interface", @@ -157320,6 +157506,12 @@ } ] }, + "examples": { + "GetIndexTemplateResponseExample1": { + "description": "A successful response for retrieving information about an index template.", + "value": "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n \"template\" : {\n \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n }\n },\n \"mappings\" : {\n \"properties\" : {\n \"@timestamp\" : {\n \"type\" : \"date\"\n },\n \"message\" : {\n \"type\" : \"text\"\n }\n }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" + } + }, "name": { "name": "Response", "namespace": "indices.get_index_template" @@ -182249,9 +182441,99 @@ "namespace": "_types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was created. Only returned if the `human` query parameter is `true`.", + "name": "created_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was created, in milliseconds since the epoch.", + "name": "created_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was last modified. Only returned if the `human` query parameter is `true`.", + "name": "modified_date", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DateTime", + "namespace": "_types" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "9.2.0" + } + }, + "description": "Date and time when the pipeline was last modified, in milliseconds since the epoch.", + "name": "modified_date_millis", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "EpochTime", + "namespace": "_types" + } + } } ], - "specLocation": "ingest/_types/Pipeline.ts#L23-L51" + "specLocation": "ingest/_types/Pipeline.ts#L24-L76" }, { "kind": "interface", @@ -182300,7 +182582,7 @@ } } ], - "specLocation": "ingest/_types/Pipeline.ts#L67-L81" + "specLocation": "ingest/_types/Pipeline.ts#L92-L106" }, { "kind": "interface", @@ -185354,7 +185636,7 @@ "examples": { "GetPipelineResponseExample1": { "description": "A successful response for retrieving information about an ingest pipeline.", - "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ]\n }\n}" + "value": "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\" : 1735732800000\n }\n}" } }, "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c2c3fc4919..4d329ebce9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9366,6 +9366,10 @@ export interface ClusterComponentTemplateNode { version?: VersionNumber _meta?: Metadata deprecated?: boolean + created_date?: DateTime + created_date_millis?: EpochTime + modified_date?: DateTime + modified_date_millis?: EpochTime } export interface ClusterComponentTemplateSummary { @@ -11931,6 +11935,10 @@ export interface IndicesIndexTemplate { data_stream?: IndicesIndexTemplateDataStreamConfiguration deprecated?: boolean ignore_missing_component_templates?: Names + created_date?: DateTime + created_date_millis?: EpochTime + modified_date?: DateTime + modified_date_millis?: EpochTime } export interface IndicesIndexTemplateDataStreamConfiguration { @@ -15118,6 +15126,10 @@ export interface IngestPipeline { version?: VersionNumber deprecated?: boolean _meta?: Metadata + created_date?: DateTime + created_date_millis?: EpochTime + modified_date?: DateTime + modified_date_millis?: EpochTime } export interface IngestPipelineConfig { diff --git a/specification/cluster/_types/ComponentTemplate.ts b/specification/cluster/_types/ComponentTemplate.ts index 2c9c497157..932a561ed2 100644 --- a/specification/cluster/_types/ComponentTemplate.ts +++ b/specification/cluster/_types/ComponentTemplate.ts @@ -19,6 +19,7 @@ import { IndexName, Metadata, Name, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { AliasDefinition } from '@indices/_types/AliasDefinition' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' @@ -39,6 +40,30 @@ export class ComponentTemplateNode { * @server_default false */ deprecated?: boolean + /** + * Date and time when the component template was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateTime + /** + * Date and time when the component template was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the component template was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateTime + /** + * Date and time when the component template was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } export class ComponentTemplateSummary { diff --git a/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml new file mode 100644 index 0000000000..0b7d54be28 --- /dev/null +++ b/specification/cluster/get_component_template/examples/200_response/GetComponentTemplateResponseExample1.yaml @@ -0,0 +1,15 @@ +# summary: +description: A successful response for retrieving information about a component template. +# type: response +# response_code: 200 +value: + "{\n \"component_templates\" : [\n {\n \"name\" : \"my-component-template\",\n\ + \ \"component_template\" : {\n \"version\" : 1,\n \"_meta\" : {\n\ + \ \"description\" : \"my custom component template\"\n },\n \"template\" : {\n\ + \ \"settings\" : {\n \"index\" : {\n \"number_of_shards\" : \"1\"\n\ + \ }\n },\n \"mappings\" : {\n \"properties\" : {\n\ + \ \"@timestamp\" : {\n \"type\" : \"date\"\n },\n\ + \ \"message\" : {\n \"type\" : \"text\"\n }\n\ + \ }\n }\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 11bc360164..b25a8a661c 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -20,6 +20,7 @@ import { IndexName, Metadata, Name, Names, VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' import { long } from '@_types/Numeric' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle' import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions' import { Dictionary } from '@spec_utils/Dictionary' @@ -79,6 +80,30 @@ export class IndexTemplate { * @availability serverless */ ignore_missing_component_templates?: Names + /** + * Date and time when the index template was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateTime + /** + * Date and time when the index template was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the index template was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateTime + /** + * Date and time when the index template was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } export class IndexTemplateDataStreamConfiguration { diff --git a/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml new file mode 100644 index 0000000000..172b384179 --- /dev/null +++ b/specification/indices/get_index_template/examples/200_response/GetIndexTemplateResponseExample1.yaml @@ -0,0 +1,17 @@ +# summary: +description: A successful response for retrieving information about an index template. +# type: response +# response_code: 200 +value: + "{\n \"index_templates\" : [\n {\n \"name\" : \"my-index-template\",\n\ + \ \"index_template\" : {\n \"index_patterns\" : [ \"logs-*\" ],\n\ + \ \"template\" : {\n \"settings\" : {\n \"index\" : {\n\ + \ \"number_of_shards\" : \"1\",\n \"number_of_replicas\" : \"1\"\n\ + \ }\n },\n \"mappings\" : {\n \"properties\" : {\n\ + \ \"@timestamp\" : {\n \"type\" : \"date\"\n },\n\ + \ \"message\" : {\n \"type\" : \"text\"\n }\n\ + \ }\n }\n },\n \"composed_of\" : [ \"my-component-template\" ],\n\ + \ \"priority\" : 200,\n \"version\" : 1,\n \"_meta\" : {\n\ + \ \"description\" : \"my custom index template\"\n },\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n\ + \ \"created_date_millis\" : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n\ + \ \"modified_date_millis\" : 1735732800000\n }\n }\n ]\n}" diff --git a/specification/ingest/_types/Pipeline.ts b/specification/ingest/_types/Pipeline.ts index f82aee8472..8b84a389c9 100644 --- a/specification/ingest/_types/Pipeline.ts +++ b/specification/ingest/_types/Pipeline.ts @@ -18,6 +18,7 @@ */ import { Metadata, VersionNumber } from '@_types/common' +import { DateTime, EpochTime, UnitMillis } from '@_types/Time' import { ProcessorContainer } from './Processors' export class Pipeline { @@ -48,6 +49,30 @@ export class Pipeline { * Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. */ _meta?: Metadata + /** + * Date and time when the pipeline was created. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date?: DateTime + /** + * Date and time when the pipeline was created, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + created_date_millis?: EpochTime + /** + * Date and time when the pipeline was last modified. Only returned if the `human` query parameter is `true`. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date?: DateTime + /** + * Date and time when the pipeline was last modified, in milliseconds since the epoch. + * @availability stack since=9.2.0 + * @availability serverless + */ + modified_date_millis?: EpochTime } // Unused .. but let's keep it for now diff --git a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml index 2cbf23f0df..bbdefadf87 100644 --- a/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml +++ b/specification/ingest/get_pipeline/examples/200_response/GetPipelineResponseExample1.yaml @@ -4,6 +4,8 @@ description: A successful response for retrieving information about an ingest pi # response_code: 200 value: "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n\ - \ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n\ - \ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n \ - \ }\n ]\n }\n}" + \ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n \ + \ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n }\n\ + \ ],\n \"created_date\" : \"2024-01-01T12:00:00.000Z\",\n \"created_date_millis\"\ + \ : 1704110400000,\n \"modified_date\" : \"2025-01-01T12:00:00.000Z\",\n \"modified_date_millis\"\ + \ : 1735732800000\n }\n}"