ISM policy configuration to exclude specific index deletion which is attached to alias

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.18.0

Describe the issue:
We are using ISM based policies to address the index housekeeping and periodic deletion based on index age.
We are trying to configure ISM policy to exclude specific index deletion which is attached to alias.
If index age is greater than 3 mins, I need ISM policy to delete all indices which is having index name pattern as on-top-data* except on-top-data-1739778842 even though this index age is more than 3 mins (because I want to exclude the index which is having alias as on-core-data)

Please suggest ISM policy to achieve this (exclude any specific index which is attached to alias)

Example:
Assume there are 3 indices, all older than 3 minutes:
on-top-data-1740074403
on-top-data-1740072063
on-to-data-1740072184

If the index on-top-data-1740074403 is associated with the alias on-core-data

Then, Index Management (ISM) should delete all indices in the example except on-top-data-1740074403, as it is associated with the alias on-core-data.

The below is the ISM sample policy which I use to delete all the indices based on age, but can someone please suggest the appropriate way to exclude the deletion of particular index, which was having alias

index_management:
enabled: true
job_interval_in_minutes: 1
policies:
- description: “delete the index starting with the name on-top-data when the index age is older than 3 minutes”
indices:
- on-top-data*
priority: 2
states:
- name: init
transitions:
- condition: min_index_age=3m
destination_state: delete
- name: delete
actions:
- delete

Configuration:

Relevant Logs or Screenshots:

Hi,
Can someone please help us on this issue.

TIA&Regards

Hi,
Any updates?

Regards
Chiranjeevi

You can use the index._name pattern matching for on-top-data* while also filtering out indices that have the alias on-core-data.