I have a simple rotating policy and I want to add a deletion phase. This is not available in the UI, however I have done by creating a policy directly with PUT, including the delete section.
My question is if it is possible to update an existing policy
I tried to PUT only the delete part, but it was rejected.
In Create or update lifecycle policy API | Elasticsearch Guide [8.6] | Elastic I see that the whole policy is given - is it not possible to only PUT the new part?
Here is my policy:
{
"testindexpolicy" : {
"version" : 1,
"modified_date" : "2023-03-17T12:08:04.639Z",
"policy" : {
"phases" : {
"hot" : {
"min_age" : "0ms",
"actions" : {
"set_priority" : {
"priority" : 100
},
"rollover" : {
"max_primary_shard_size" : "1gb",
"max_age" : "1d"
}
}
}
}
},
"in_use_by" : {
"indices" : [index_from_logstash_test_alias-000002 ],
"data_streams" : [ ],
"composable_templates" : [
"test_template"
]
}