From af5ead8205b1c45a708da5927862fb78281f3d35 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Mon, 16 May 2022 10:19:05 -0700 Subject: [PATCH] snapshot config Signed-off-by: bowenlan-amzn --- .../indexmanagement/snapshotmanagement/model/SMPolicy.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt b/src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt index 1275eb44f..7681c2955 100644 --- a/src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt +++ b/src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt @@ -49,10 +49,9 @@ data class SMPolicy( ) : ScheduledJobParameter, Writeable { init { - // TODO validate snapshotConfig - require(snapshotConfig["repository"] != null) { "Must provide a repository." } - // indices, partial, include_global_state, ignore_unavailable, metadata - // TODO validate date_format is of right format + require(snapshotConfig["repository"] != null) { "Must provide the repository in snapshot config." } + // Other fields in snapshotConfig: date_expression, indices, partial, include_global_state, ignore_unavailable, metadata + // TODO SM validate date_format is of right format } override fun getName() = policyName