From 1b736c6ad35772654162f5731c2bb6b4614fae85 Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:28:26 +0200 Subject: [PATCH] Mapping ILM phases (#2737) * adding action types * order * no container --- output/openapi/elasticsearch-openapi.json | 228 +++++++-- output/schema/schema-serverless.json | 11 - output/schema/schema.json | 562 ++++++++++++++++++++-- output/typescript/types.ts | 76 ++- specification/ilm/_types/Phase.ts | 131 ++++- 5 files changed, 895 insertions(+), 113 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ca1c9e1a45..10476917a0 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -81690,72 +81690,151 @@ "type": "number" } ] - }, - "configurations": { - "$ref": "#/components/schemas/ilm._types:Configurations" } } }, "ilm._types:Actions": { - "type": "object" - }, - "ilm._types:Configurations": { "type": "object", "properties": { - "rollover": { - "$ref": "#/components/schemas/indices.rollover:RolloverConditions" + "allocate": { + "$ref": "#/components/schemas/ilm._types:AllocateAction" + }, + "delete": { + "$ref": "#/components/schemas/ilm._types:DeleteAction" + }, + "downsample": { + "$ref": "#/components/schemas/ilm._types:DownsampleAction" }, "forcemerge": { - "$ref": "#/components/schemas/ilm._types:ForceMergeConfiguration" + "$ref": "#/components/schemas/ilm._types:ForceMergeAction" + }, + "migrate": { + "$ref": "#/components/schemas/ilm._types:MigrateAction" + }, + "readonly": { + "$ref": "#/components/schemas/_types:EmptyObject" + }, + "rollover": { + "$ref": "#/components/schemas/ilm._types:RolloverAction" + }, + "set_priority": { + "$ref": "#/components/schemas/ilm._types:SetPriorityAction" + }, + "searchable_snapshot": { + "$ref": "#/components/schemas/ilm._types:SearchableSnapshotAction" }, "shrink": { - "$ref": "#/components/schemas/ilm._types:ShrinkConfiguration" + "$ref": "#/components/schemas/ilm._types:ShrinkAction" + }, + "unfollow": { + "$ref": "#/components/schemas/_types:EmptyObject" + }, + "wait_for_snapshot": { + "$ref": "#/components/schemas/ilm._types:WaitForSnapshotAction" } } }, - "indices.rollover:RolloverConditions": { + "ilm._types:AllocateAction": { "type": "object", "properties": { - "min_age": { - "$ref": "#/components/schemas/_types:Duration" + "number_of_replicas": { + "type": "number" }, - "max_age": { - "$ref": "#/components/schemas/_types:Duration" + "total_shards_per_node": { + "type": "number" }, - "max_age_millis": { - "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + "include": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "min_docs": { - "type": "number" + "exclude": { + "type": "object", + "additionalProperties": { + "type": "string" + } }, - "max_docs": { + "require": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ilm._types:DeleteAction": { + "type": "object", + "properties": { + "delete_searchable_snapshot": { + "type": "boolean" + } + } + }, + "ilm._types:DownsampleAction": { + "type": "object", + "properties": { + "fixed_interval": { + "$ref": "#/components/schemas/_types:DurationLarge" + }, + "wait_timeout": { + "$ref": "#/components/schemas/_types:Duration" + } + }, + "required": [ + "fixed_interval" + ] + }, + "ilm._types:ForceMergeAction": { + "type": "object", + "properties": { + "max_num_segments": { "type": "number" }, + "index_codec": { + "type": "string" + } + }, + "required": [ + "max_num_segments" + ] + }, + "ilm._types:MigrateAction": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "ilm._types:RolloverAction": { + "type": "object", + "properties": { "max_size": { "$ref": "#/components/schemas/_types:ByteSize" }, - "max_size_bytes": { - "type": "number" - }, - "min_size": { + "max_primary_shard_size": { "$ref": "#/components/schemas/_types:ByteSize" }, - "min_size_bytes": { - "type": "number" + "max_age": { + "$ref": "#/components/schemas/_types:Duration" }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types:ByteSize" + "max_docs": { + "type": "number" }, - "max_primary_shard_size_bytes": { + "max_primary_shard_docs": { "type": "number" }, + "min_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, "min_primary_shard_size": { "$ref": "#/components/schemas/_types:ByteSize" }, - "min_primary_shard_size_bytes": { - "type": "number" + "min_age": { + "$ref": "#/components/schemas/_types:Duration" }, - "max_primary_shard_docs": { + "min_docs": { "type": "number" }, "min_primary_shard_docs": { @@ -81763,26 +81842,51 @@ } } }, - "ilm._types:ForceMergeConfiguration": { + "ilm._types:SetPriorityAction": { "type": "object", "properties": { - "max_num_segments": { + "priority": { "type": "number" } + } + }, + "ilm._types:SearchableSnapshotAction": { + "type": "object", + "properties": { + "snapshot_repository": { + "type": "string" + }, + "force_merge_index": { + "type": "boolean" + } }, "required": [ - "max_num_segments" + "snapshot_repository" ] }, - "ilm._types:ShrinkConfiguration": { + "ilm._types:ShrinkAction": { "type": "object", "properties": { "number_of_shards": { "type": "number" + }, + "max_primary_shard_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "allow_write_after_shrink": { + "type": "boolean" + } + } + }, + "ilm._types:WaitForSnapshotAction": { + "type": "object", + "properties": { + "policy": { + "type": "string" } }, "required": [ - "number_of_shards" + "policy" ] }, "ilm.move_to_step:StepKey": { @@ -83035,6 +83139,56 @@ "backing_indices" ] }, + "indices.rollover:RolloverConditions": { + "type": "object", + "properties": { + "min_age": { + "$ref": "#/components/schemas/_types:Duration" + }, + "max_age": { + "$ref": "#/components/schemas/_types:Duration" + }, + "max_age_millis": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + }, + "min_docs": { + "type": "number" + }, + "max_docs": { + "type": "number" + }, + "max_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "max_size_bytes": { + "type": "number" + }, + "min_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "min_size_bytes": { + "type": "number" + }, + "max_primary_shard_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "max_primary_shard_size_bytes": { + "type": "number" + }, + "min_primary_shard_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "min_primary_shard_size_bytes": { + "type": "number" + }, + "max_primary_shard_docs": { + "type": "number" + }, + "min_primary_shard_docs": { + "type": "number" + } + } + }, "indices.segments:IndexSegment": { "type": "object", "properties": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 338a32ee5e..b67f02e969 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -89056,17 +89056,6 @@ } } }, - { - "kind": "type_alias", - "name": { - "name": "Actions", - "namespace": "ilm._types" - }, - "specLocation": "ilm/_types/Phase.ts#L48-L48", - "type": { - "kind": "user_defined_value" - } - }, { "kind": "type_alias", "name": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 3bc0c10b3e..04d497a975 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -115522,63 +115522,314 @@ "specLocation": "graph/explore/GraphExploreResponse.ts#L25-L33" }, { - "kind": "type_alias", + "kind": "interface", "name": { "name": "Actions", "namespace": "ilm._types" }, - "specLocation": "ilm/_types/Phase.ts#L48-L48", - "type": { - "kind": "user_defined_value" - } + "properties": [ + { + "description": "Phases allowed: warm, cold.", + "name": "allocate", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "AllocateAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: delete.", + "name": "delete", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DeleteAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm, cold.", + "name": "downsample", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "DownsampleAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm.", + "name": "forcemerge", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ForceMergeAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: warm, cold.", + "name": "migrate", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "MigrateAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm, cold.", + "name": "readonly", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "EmptyObject", + "namespace": "_types" + } + } + }, + { + "description": "Phases allowed: hot.", + "name": "rollover", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "RolloverAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm, cold.", + "name": "set_priority", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SetPriorityAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, cold, frozen.", + "name": "searchable_snapshot", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SearchableSnapshotAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm.", + "name": "shrink", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ShrinkAction", + "namespace": "ilm._types" + } + } + }, + { + "description": "Phases allowed: hot, warm, cold, frozen.", + "name": "unfollow", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "EmptyObject", + "namespace": "_types" + } + } + }, + { + "description": "Phases allowed: delete.", + "name": "wait_for_snapshot", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "WaitForSnapshotAction", + "namespace": "ilm._types" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L42-L91" }, { "kind": "interface", "name": { - "name": "Configurations", + "name": "AllocateAction", "namespace": "ilm._types" }, "properties": [ { - "name": "rollover", + "name": "number_of_replicas", "required": false, "type": { "kind": "instance_of", "type": { - "name": "RolloverConditions", - "namespace": "indices.rollover" + "name": "integer", + "namespace": "_types" } } }, { - "name": "forcemerge", + "name": "total_shards_per_node", "required": false, "type": { "kind": "instance_of", "type": { - "name": "ForceMergeConfiguration", - "namespace": "ilm._types" + "name": "integer", + "namespace": "_types" } } }, { - "name": "shrink", + "name": "include", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "exclude", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "require", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L132-L138" + }, + { + "kind": "interface", + "name": { + "name": "DeleteAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "delete_searchable_snapshot", "required": false, "type": { "kind": "instance_of", "type": { - "name": "ShrinkConfiguration", - "namespace": "ilm._types" + "name": "boolean", + "namespace": "_builtins" } } } ], - "specLocation": "ilm/_types/Phase.ts#L50-L54" + "specLocation": "ilm/_types/Phase.ts#L148-L150" }, { "kind": "interface", "name": { - "name": "ForceMergeConfiguration", + "name": "DownsampleAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "fixed_interval", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DurationLarge", + "namespace": "_types" + } + } + }, + { + "name": "wait_timeout", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L110-L113" + }, + { + "kind": "interface", + "name": { + "name": "ForceMergeAction", "namespace": "ilm._types" }, "properties": [ @@ -115592,9 +115843,41 @@ "namespace": "_types" } } + }, + { + "name": "index_codec", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "ilm/_types/Phase.ts#L56-L58" + "specLocation": "ilm/_types/Phase.ts#L122-L125" + }, + { + "kind": "interface", + "name": { + "name": "MigrateAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "enabled", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L140-L142" }, { "kind": "interface", @@ -115637,26 +115920,9 @@ ], "kind": "union_of" } - }, - { - "availability": { - "serverless": {}, - "stack": { - "since": "7.16.0" - } - }, - "name": "configurations", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Configurations", - "namespace": "ilm._types" - } - } } ], - "specLocation": "ilm/_types/Phase.ts#L25-L36" + "specLocation": "ilm/_types/Phase.ts#L26-L32" }, { "kind": "interface", @@ -115721,7 +115987,7 @@ } } ], - "specLocation": "ilm/_types/Phase.ts#L38-L44" + "specLocation": "ilm/_types/Phase.ts#L34-L40" }, { "kind": "interface", @@ -115758,13 +116024,186 @@ { "kind": "interface", "name": { - "name": "ShrinkConfiguration", + "name": "RolloverAction", "namespace": "ilm._types" }, "properties": [ { - "name": "number_of_shards", + "name": "max_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "max_primary_shard_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "max_age", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "name": "max_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "max_primary_shard_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "min_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "min_primary_shard_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "min_age", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "name": "min_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "min_primary_shard_docs", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L97-L108" + }, + { + "kind": "interface", + "name": { + "name": "SearchableSnapshotAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "snapshot_repository", "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "force_merge_index", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L127-L130" + }, + { + "kind": "interface", + "name": { + "name": "SetPriorityAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "priority", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L93-L95" + }, + { + "kind": "interface", + "name": { + "name": "ShrinkAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "number_of_shards", + "required": false, "type": { "kind": "instance_of", "type": { @@ -115772,9 +116211,52 @@ "namespace": "_types" } } + }, + { + "name": "max_primary_shard_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ByteSize", + "namespace": "_types" + } + } + }, + { + "name": "allow_write_after_shrink", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ilm/_types/Phase.ts#L116-L120" + }, + { + "kind": "interface", + "name": { + "name": "WaitForSnapshotAction", + "namespace": "ilm._types" + }, + "properties": [ + { + "name": "policy", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "ilm/_types/Phase.ts#L60-L62" + "specLocation": "ilm/_types/Phase.ts#L144-L146" }, { "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a47309e29f..178d11e415 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10149,22 +10149,50 @@ export interface GraphExploreResponse { vertices: GraphVertex[] } -export type IlmActions = any - -export interface IlmConfigurations { - rollover?: IndicesRolloverRolloverConditions - forcemerge?: IlmForceMergeConfiguration - shrink?: IlmShrinkConfiguration +export interface IlmActions { + allocate?: IlmAllocateAction + delete?: IlmDeleteAction + downsample?: IlmDownsampleAction + forcemerge?: IlmForceMergeAction + migrate?: IlmMigrateAction + readonly?: EmptyObject + rollover?: IlmRolloverAction + set_priority?: IlmSetPriorityAction + searchable_snapshot?: IlmSearchableSnapshotAction + shrink?: IlmShrinkAction + unfollow?: EmptyObject + wait_for_snapshot?: IlmWaitForSnapshotAction +} + +export interface IlmAllocateAction { + number_of_replicas?: integer + total_shards_per_node?: integer + include?: Record + exclude?: Record + require?: Record +} + +export interface IlmDeleteAction { + delete_searchable_snapshot?: boolean +} + +export interface IlmDownsampleAction { + fixed_interval: DurationLarge + wait_timeout?: Duration } -export interface IlmForceMergeConfiguration { +export interface IlmForceMergeAction { max_num_segments: integer + index_codec?: string +} + +export interface IlmMigrateAction { + enabled?: boolean } export interface IlmPhase { actions?: IlmActions min_age?: Duration | long - configurations?: IlmConfigurations } export interface IlmPhases { @@ -10180,8 +10208,36 @@ export interface IlmPolicy { _meta?: Metadata } -export interface IlmShrinkConfiguration { - number_of_shards: integer +export interface IlmRolloverAction { + max_size?: ByteSize + max_primary_shard_size?: ByteSize + max_age?: Duration + max_docs?: long + max_primary_shard_docs?: long + min_size?: ByteSize + min_primary_shard_size?: ByteSize + min_age?: Duration + min_docs?: long + min_primary_shard_docs?: long +} + +export interface IlmSearchableSnapshotAction { + snapshot_repository: string + force_merge_index?: boolean +} + +export interface IlmSetPriorityAction { + priority?: integer +} + +export interface IlmShrinkAction { + number_of_shards?: integer + max_primary_shard_size?: ByteSize + allow_write_after_shrink?: boolean +} + +export interface IlmWaitForSnapshotAction { + policy: string } export interface IlmDeleteLifecycleRequest extends RequestBase { diff --git a/specification/ilm/_types/Phase.ts b/specification/ilm/_types/Phase.ts index d8bc3f5e70..b8ad5b3454 100644 --- a/specification/ilm/_types/Phase.ts +++ b/specification/ilm/_types/Phase.ts @@ -17,10 +17,11 @@ * under the License. */ -import { Duration } from '@_types/Time' -import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { Duration, DurationLarge } from '@_types/Time' import { RolloverConditions } from '@indices/rollover/types' import { integer, long } from '@_types/Numeric' +import { ByteSize, EmptyObject } from '@_types/common' +import { Dictionary } from '@spec_utils/Dictionary' export class Phase { actions?: Actions @@ -28,11 +29,6 @@ export class Phase { * @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 - /** - * @availability stack since=7.16.0 - * @availability serverless - */ - configurations?: Configurations } export class Phases { @@ -43,20 +39,125 @@ export class Phases { warm?: Phase } -// TODO. This is a variants container. -// See https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-index-lifecycle.html#ilm-phase-actions -export type Actions = UserDefinedValue +export class Actions { + /** + * Phases allowed: warm, cold. + */ + allocate?: AllocateAction + /** + * Phases allowed: delete. + */ + delete?: DeleteAction + /** + * Phases allowed: hot, warm, cold. + */ + downsample?: DownsampleAction + /** + * Phases allowed: hot, warm. + */ + forcemerge?: ForceMergeAction + /** + * Phases allowed: warm, cold. + */ + migrate?: MigrateAction + /** + * Phases allowed: hot, warm, cold. + */ + readonly?: EmptyObject + /** + * Phases allowed: hot. + */ + rollover?: RolloverAction + /** + * Phases allowed: hot, warm, cold. + */ + set_priority?: SetPriorityAction + /** + * Phases allowed: hot, cold, frozen. + */ + searchable_snapshot?: SearchableSnapshotAction + /** + * Phases allowed: hot, warm. + */ + shrink?: ShrinkAction + /** + * Phases allowed: hot, warm, cold, frozen. + */ + unfollow?: EmptyObject + /** + * Phases allowed: delete. + */ + wait_for_snapshot?: WaitForSnapshotAction +} -export class Configurations { - rollover?: RolloverConditions - forcemerge?: ForceMergeConfiguration - shrink?: ShrinkConfiguration +export class SetPriorityAction { + priority?: integer } -export class ForceMergeConfiguration { +export class RolloverAction { + max_size?: ByteSize + max_primary_shard_size?: ByteSize + max_age?: Duration + max_docs?: long + max_primary_shard_docs?: long + min_size?: ByteSize + min_primary_shard_size?: ByteSize + min_age?: Duration + min_docs?: long + min_primary_shard_docs?: long +} + +export class DownsampleAction { + fixed_interval: DurationLarge + wait_timeout?: Duration +} + +export class ShrinkAction { + number_of_shards?: integer + max_primary_shard_size?: ByteSize + allow_write_after_shrink?: boolean +} + +export class ForceMergeAction { max_num_segments: integer + index_codec?: string +} + +export class SearchableSnapshotAction { + snapshot_repository: string + force_merge_index?: boolean +} + +export class AllocateAction { + number_of_replicas?: integer + total_shards_per_node?: integer + include?: Dictionary + exclude?: Dictionary + require?: Dictionary +} + +export class MigrateAction { + enabled?: boolean +} + +export class WaitForSnapshotAction { + policy: string +} + +export class DeleteAction { + delete_searchable_snapshot?: boolean } export class ShrinkConfiguration { number_of_shards: integer } + +export class ForceMergeConfiguration { + max_num_segments: integer +} + +export class Configurations { + rollover?: RolloverConditions + forcemerge?: ForceMergeConfiguration + shrink?: ShrinkConfiguration +}