From 8ec1321cfe8682febcb949c26870393d9ba97366 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Mon, 15 Apr 2024 16:24:27 +0200 Subject: [PATCH] Index settings lifecycle name should be optional, not ILM policy name (#2498) (#2500) See https://github.com/elastic/elasticsearch-java/issues/456 (cherry picked from commit c2b68f56ae269af4f8c68eb0077132e688914ed7) Co-authored-by: Josh Mock --- output/schema/schema.json | 4 ++-- output/typescript/types.ts | 4 ++-- specification/ilm/put_lifecycle/PutLifecycleRequest.ts | 2 +- specification/indices/_types/IndexSettings.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 930979dea9..9fcc8fe344 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -94724,7 +94724,7 @@ "codegenName": "name", "description": "Identifier for the policy.", "name": "policy", - "required": false, + "required": true, "type": { "kind": "instance_of", "type": { @@ -96768,7 +96768,7 @@ { "description": "The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates.", "name": "name", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index a3fd5ea70a..92ddde6b55 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9009,7 +9009,7 @@ export interface IlmMoveToStepStepKey { } export interface IlmPutLifecycleRequest extends RequestBase { - name?: Name + name: Name master_timeout?: Time timeout?: Time body?: { @@ -9203,7 +9203,7 @@ export interface IndicesIndexSettingsAnalysis { } export interface IndicesIndexSettingsLifecycle { - name: Name + name?: Name indexing_complete?: boolean origination_date?: long parse_origination_date?: boolean diff --git a/specification/ilm/put_lifecycle/PutLifecycleRequest.ts b/specification/ilm/put_lifecycle/PutLifecycleRequest.ts index a18b9d3129..b29341d99c 100644 --- a/specification/ilm/put_lifecycle/PutLifecycleRequest.ts +++ b/specification/ilm/put_lifecycle/PutLifecycleRequest.ts @@ -36,7 +36,7 @@ export interface Request extends RequestBase { * Identifier for the policy. * @codegen_name name */ - policy?: Name + policy: Name } query_parameters: { /** diff --git a/specification/indices/_types/IndexSettings.ts b/specification/indices/_types/IndexSettings.ts index ec10e55eb7..b1ef726916 100644 --- a/specification/indices/_types/IndexSettings.ts +++ b/specification/indices/_types/IndexSettings.ts @@ -401,7 +401,7 @@ export class IndexSettingsLifecycle { /** * The name of the policy to use to manage the index. For information about how Elasticsearch applies policy changes, see Policy updates. */ - name: Name + name?: Name /** * Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action. * You can explicitly set it to skip rollover.