How to link a policy to an existing index

Prior to ODFE 1.13.0, I can link/apply a policy to an existing index by updating the settings for that index e.g by running the command below:

curl -H "Content-Type: application/json" -X PUT http://localhost:9200/alt_write_once-000001/_settings -d '{ "opendistro.index_state_management.rollover_alias":"write_once_write", "opendistro.index_state_management.policy_id":"write_once_policy"}'

With the deprecation of opendistro.index_state_management.policy_id, how can I achieve this now?

Hi @ykoasanto,

If you want to manually apply a policy to an existing index you can use the Add Policy API. And if you want to set it up so future indices will automatically have the policy applied you can use the ISM Template.

Thanks @dbbaughe! That works! Appreciate the help!