I'm using 7.17 client and I'd like to build ILM from java.
This is what I've tried:
final RolloverConditions rollover = new RolloverConditions.Builder() .maxSize("4GB") .maxAge(t -> t.time("1D")) .build(); PutLifecycleRequest.of(it -> it.name("ILM") .policy(policy -> policy.phases( phases -> phases.hot(hot -> hot.actions(JsonData.of(rollover))) )));
However it fails because the rollover isn't properly serialised. What is the proper way to add one or more actions to ILM phases?