diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 65b09f2c49..d2222fb720 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70657,14 +70657,7 @@ "$ref": "#/components/schemas/ilm._types:Actions" }, "min_age": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:Duration" - }, - { - "type": "number" - } - ] + "$ref": "#/components/schemas/_types:Duration" } } }, @@ -93117,7 +93110,7 @@ "type": "number" }, "phases": { - "$ref": "#/components/schemas/ilm._types:Phases" + "$ref": "#/components/schemas/xpack.usage:Phases" } }, "required": [ @@ -93125,6 +93118,44 @@ "phases" ] }, + "xpack.usage:Phases": { + "type": "object", + "properties": { + "cold": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "delete": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "frozen": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "hot": { + "$ref": "#/components/schemas/xpack.usage:Phase" + }, + "warm": { + "$ref": "#/components/schemas/xpack.usage:Phase" + } + } + }, + "xpack.usage:Phase": { + "type": "object", + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + } + }, + "min_age": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + } + }, + "required": [ + "actions", + "min_age" + ] + }, "xpack.usage:MachineLearning": { "allOf": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index dd062ded54..2ed134f86d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -124572,7 +124572,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L42-L96" + "specLocation": "ilm/_types/Phase.ts#L39-L93" }, { "kind": "interface", @@ -124670,7 +124670,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L136-L142" + "specLocation": "ilm/_types/Phase.ts#L133-L139" }, { "kind": "interface", @@ -124691,7 +124691,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L152-L154" + "specLocation": "ilm/_types/Phase.ts#L149-L151" }, { "kind": "interface", @@ -124723,7 +124723,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L115-L118" + "specLocation": "ilm/_types/Phase.ts#L112-L115" }, { "kind": "interface", @@ -124755,7 +124755,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L126-L129" + "specLocation": "ilm/_types/Phase.ts#L123-L126" }, { "kind": "interface", @@ -124776,7 +124776,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L144-L146" + "specLocation": "ilm/_types/Phase.ts#L141-L143" }, { "kind": "interface", @@ -124797,31 +124797,18 @@ } }, { - "esQuirk": "output as a millis number in XPack usage stats, which cannot roundtrip with a Duration as it requires a unit.", "name": "min_age", "required": false, "type": { - "kind": "union_of", - "items": [ - { - "kind": "instance_of", - "type": { - "name": "Duration", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - ] + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } } } ], - "specLocation": "ilm/_types/Phase.ts#L26-L32" + "specLocation": "ilm/_types/Phase.ts#L26-L29" }, { "kind": "interface", @@ -124886,7 +124873,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L34-L40" + "specLocation": "ilm/_types/Phase.ts#L31-L37" }, { "kind": "interface", @@ -125039,7 +125026,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L102-L113" + "specLocation": "ilm/_types/Phase.ts#L99-L110" }, { "kind": "interface", @@ -125071,7 +125058,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L131-L134" + "specLocation": "ilm/_types/Phase.ts#L128-L131" }, { "kind": "interface", @@ -125092,7 +125079,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L98-L100" + "specLocation": "ilm/_types/Phase.ts#L95-L97" }, { "kind": "interface", @@ -125135,7 +125122,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L120-L124" + "specLocation": "ilm/_types/Phase.ts#L117-L121" }, { "kind": "interface", @@ -125156,7 +125143,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L148-L150" + "specLocation": "ilm/_types/Phase.ts#L145-L147" }, { "kind": "request", @@ -227581,7 +227568,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L328-L330" + "specLocation": "xpack/usage/types.ts#L340-L342" }, { "kind": "interface", @@ -227690,7 +227677,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L59-L69" + "specLocation": "xpack/usage/types.ts#L58-L68" }, { "kind": "interface", @@ -227717,7 +227704,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L46-L48" + "specLocation": "xpack/usage/types.ts#L45-L47" }, { "kind": "interface", @@ -227747,7 +227734,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L71-L73" + "specLocation": "xpack/usage/types.ts#L70-L72" }, { "kind": "interface", @@ -227779,7 +227766,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L28-L31" + "specLocation": "xpack/usage/types.ts#L27-L30" }, { "kind": "interface", @@ -227817,7 +227804,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L332-L335" + "specLocation": "xpack/usage/types.ts#L344-L347" }, { "kind": "interface", @@ -227849,7 +227836,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L33-L36" + "specLocation": "xpack/usage/types.ts#L32-L35" }, { "kind": "interface", @@ -227887,7 +227874,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L79-L82" + "specLocation": "xpack/usage/types.ts#L78-L81" }, { "kind": "interface", @@ -228007,7 +227994,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L84-L95" + "specLocation": "xpack/usage/types.ts#L83-L94" }, { "kind": "interface", @@ -228084,7 +228071,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L337-L347" + "specLocation": "xpack/usage/types.ts#L349-L359" }, { "kind": "interface", @@ -228105,7 +228092,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L75-L77" + "specLocation": "xpack/usage/types.ts#L74-L76" }, { "kind": "interface", @@ -228154,7 +228141,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L349-L352" + "specLocation": "xpack/usage/types.ts#L361-L364" }, { "kind": "interface", @@ -228241,7 +228228,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L97-L105" + "specLocation": "xpack/usage/types.ts#L96-L104" }, { "kind": "interface", @@ -228306,7 +228293,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L107-L113" + "specLocation": "xpack/usage/types.ts#L106-L112" }, { "kind": "interface", @@ -228371,7 +228358,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L115-L121" + "specLocation": "xpack/usage/types.ts#L114-L120" }, { "kind": "interface", @@ -228403,7 +228390,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L123-L126" + "specLocation": "xpack/usage/types.ts#L122-L125" }, { "kind": "interface", @@ -228479,7 +228466,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L128-L135" + "specLocation": "xpack/usage/types.ts#L127-L134" }, { "kind": "interface", @@ -228500,7 +228487,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L38-L40" + "specLocation": "xpack/usage/types.ts#L37-L39" }, { "kind": "interface", @@ -228527,7 +228514,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L354-L356" + "specLocation": "xpack/usage/types.ts#L366-L368" }, { "kind": "interface", @@ -228554,7 +228541,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L358-L360" + "specLocation": "xpack/usage/types.ts#L370-L372" }, { "kind": "interface", @@ -228581,7 +228568,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L151-L153" + "specLocation": "xpack/usage/types.ts#L150-L152" }, { "kind": "interface", @@ -228616,7 +228603,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L160-L163" + "specLocation": "xpack/usage/types.ts#L172-L175" }, { "kind": "interface", @@ -228643,12 +228630,12 @@ "kind": "instance_of", "type": { "name": "Phases", - "namespace": "ilm._types" + "namespace": "xpack.usage" } } } ], - "specLocation": "xpack/usage/types.ts#L155-L158" + "specLocation": "xpack/usage/types.ts#L167-L170" }, { "kind": "interface", @@ -228669,7 +228656,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L42-L44" + "specLocation": "xpack/usage/types.ts#L41-L43" }, { "kind": "interface", @@ -228701,7 +228688,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L165-L168" + "specLocation": "xpack/usage/types.ts#L177-L180" }, { "kind": "interface", @@ -228777,7 +228764,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L362-L368" + "specLocation": "xpack/usage/types.ts#L374-L380" }, { "kind": "interface", @@ -228871,7 +228858,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L370-L377" + "specLocation": "xpack/usage/types.ts#L382-L389" }, { "kind": "interface", @@ -228892,7 +228879,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L253-L255" + "specLocation": "xpack/usage/types.ts#L265-L267" }, { "kind": "interface", @@ -228946,7 +228933,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L175-L180" + "specLocation": "xpack/usage/types.ts#L187-L192" }, { "kind": "interface", @@ -228989,7 +228976,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L182-L186" + "specLocation": "xpack/usage/types.ts#L194-L198" }, { "kind": "interface", @@ -229010,7 +228997,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L192-L194" + "specLocation": "xpack/usage/types.ts#L204-L206" }, { "kind": "interface", @@ -229031,7 +229018,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L188-L190" + "specLocation": "xpack/usage/types.ts#L200-L202" }, { "kind": "interface", @@ -229091,7 +229078,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L196-L204" + "specLocation": "xpack/usage/types.ts#L208-L216" }, { "kind": "interface", @@ -229145,7 +229132,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L225-L230" + "specLocation": "xpack/usage/types.ts#L237-L242" }, { "kind": "interface", @@ -229166,7 +229153,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L232-L234" + "specLocation": "xpack/usage/types.ts#L244-L246" }, { "kind": "interface", @@ -229220,7 +229207,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L206-L211" + "specLocation": "xpack/usage/types.ts#L218-L223" }, { "kind": "interface", @@ -229263,7 +229250,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L236-L240" + "specLocation": "xpack/usage/types.ts#L248-L252" }, { "kind": "interface", @@ -229334,7 +229321,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L213-L223" + "specLocation": "xpack/usage/types.ts#L225-L235" }, { "kind": "interface", @@ -229432,7 +229419,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L242-L251" + "specLocation": "xpack/usage/types.ts#L254-L263" }, { "kind": "interface", @@ -229464,7 +229451,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L170-L173" + "specLocation": "xpack/usage/types.ts#L182-L185" }, { "kind": "interface", @@ -229513,7 +229500,116 @@ } } ], - "specLocation": "xpack/usage/types.ts#L379-L382" + "specLocation": "xpack/usage/types.ts#L391-L394" + }, + { + "kind": "interface", + "name": { + "name": "Phase", + "namespace": "xpack.usage" + }, + "properties": [ + { + "name": "actions", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "min_age", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + } + ], + "specLocation": "xpack/usage/types.ts#L154-L157" + }, + { + "kind": "interface", + "name": { + "name": "Phases", + "namespace": "xpack.usage" + }, + "properties": [ + { + "name": "cold", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "delete", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "frozen", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "hot", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + }, + { + "name": "warm", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Phase", + "namespace": "xpack.usage" + } + } + } + ], + "specLocation": "xpack/usage/types.ts#L159-L165" }, { "kind": "interface", @@ -229567,7 +229663,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L257-L262" + "specLocation": "xpack/usage/types.ts#L269-L274" }, { "kind": "interface", @@ -229695,7 +229791,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L415-L424" + "specLocation": "xpack/usage/types.ts#L427-L436" }, { "kind": "interface", @@ -229716,7 +229812,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L264-L266" + "specLocation": "xpack/usage/types.ts#L276-L278" }, { "kind": "request", @@ -230123,7 +230219,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L268-L271" + "specLocation": "xpack/usage/types.ts#L280-L283" }, { "kind": "interface", @@ -230153,7 +230249,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L273-L275" + "specLocation": "xpack/usage/types.ts#L285-L287" }, { "kind": "interface", @@ -230320,7 +230416,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L277-L292" + "specLocation": "xpack/usage/types.ts#L289-L304" }, { "kind": "interface", @@ -230369,7 +230465,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L426-L430" + "specLocation": "xpack/usage/types.ts#L438-L442" }, { "kind": "interface", @@ -230539,7 +230635,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L432-L445" + "specLocation": "xpack/usage/types.ts#L444-L457" }, { "kind": "interface", @@ -230582,7 +230678,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L294-L298" + "specLocation": "xpack/usage/types.ts#L306-L310" }, { "kind": "interface", @@ -230603,7 +230699,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L306-L308" + "specLocation": "xpack/usage/types.ts#L318-L320" }, { "kind": "interface", @@ -230646,7 +230742,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L310-L314" + "specLocation": "xpack/usage/types.ts#L322-L326" }, { "kind": "interface", @@ -230689,7 +230785,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L316-L320" + "specLocation": "xpack/usage/types.ts#L328-L332" }, { "kind": "interface", @@ -230732,7 +230828,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L300-L304" + "specLocation": "xpack/usage/types.ts#L312-L316" }, { "kind": "interface", @@ -230770,7 +230866,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L447-L450" + "specLocation": "xpack/usage/types.ts#L459-L462" }, { "kind": "interface", @@ -230830,7 +230926,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L384-L387" + "specLocation": "xpack/usage/types.ts#L396-L399" }, { "kind": "interface", @@ -230862,7 +230958,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L389-L392" + "specLocation": "xpack/usage/types.ts#L401-L404" }, { "kind": "interface", @@ -230911,7 +231007,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L452-L456" + "specLocation": "xpack/usage/types.ts#L464-L468" }, { "kind": "interface", @@ -230960,7 +231056,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L458-L462" + "specLocation": "xpack/usage/types.ts#L470-L474" }, { "kind": "interface", @@ -231001,7 +231097,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L410-L413" + "specLocation": "xpack/usage/types.ts#L422-L425" }, { "kind": "interface", @@ -231033,7 +231129,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L394-L396" + "specLocation": "xpack/usage/types.ts#L406-L408" }, { "kind": "interface", @@ -231120,7 +231216,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L398-L403" + "specLocation": "xpack/usage/types.ts#L410-L415" }, { "kind": "interface", @@ -231152,7 +231248,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L405-L408" + "specLocation": "xpack/usage/types.ts#L417-L420" }, { "kind": "interface", @@ -231190,7 +231286,7 @@ } } ], - "specLocation": "xpack/usage/types.ts#L464-L467" + "specLocation": "xpack/usage/types.ts#L476-L479" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 077fc5c295..d0dda55c91 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10834,7 +10834,7 @@ export interface IlmMigrateAction { export interface IlmPhase { actions?: IlmActions - min_age?: Duration | long + min_age?: Duration } export interface IlmPhases { @@ -21737,7 +21737,7 @@ export interface XpackUsageIlm { export interface XpackUsageIlmPolicyStatistics { indices_managed: integer - phases: IlmPhases + phases: XpackUsagePhases } export interface XpackUsageInvocations { @@ -21849,6 +21849,19 @@ export interface XpackUsageMonitoring extends XpackUsageBase { enabled_exporters: Record } +export interface XpackUsagePhase { + actions: string[] + min_age: DurationValue +} + +export interface XpackUsagePhases { + cold?: XpackUsagePhase + delete?: XpackUsagePhase + frozen?: XpackUsagePhase + hot?: XpackUsagePhase + warm?: XpackUsagePhase +} + export interface XpackUsageQuery { count?: integer failed?: integer diff --git a/specification/ilm/_types/Phase.ts b/specification/ilm/_types/Phase.ts index 397a64d24d..2b8a36e016 100644 --- a/specification/ilm/_types/Phase.ts +++ b/specification/ilm/_types/Phase.ts @@ -25,10 +25,7 @@ import { Duration, DurationLarge } from '@_types/Time' export class Phase { actions?: Actions - /** - * @es_quirk output as a millis number in XPack usage stats, which cannot roundtrip with a Duration as it requires a unit. - */ - min_age?: Duration | long + min_age?: Duration } export class Phases { diff --git a/specification/xpack/usage/types.ts b/specification/xpack/usage/types.ts index 2e95bf7993..b7c1589268 100644 --- a/specification/xpack/usage/types.ts +++ b/specification/xpack/usage/types.ts @@ -17,7 +17,6 @@ * under the License. */ -import { Phases } from '@ilm/_types/Phase' import { JobStatistics } from '@ml/_types/Job' import { Statistics } from '@slm/_types/SnapshotLifecycle' import { Dictionary } from '@spec_utils/Dictionary' @@ -152,6 +151,19 @@ export class HealthStatistics extends Base { invocations: Invocations } +export class Phase { + actions: string[] + min_age: DurationValue +} + +export class Phases { + cold?: Phase + delete?: Phase + frozen?: Phase + hot?: Phase + warm?: Phase +} + export class IlmPolicyStatistics { indices_managed: integer phases: Phases