Elasticsearch allocation settings

Allocation setting example, work both for cluster setting or index settings

PUT /index_name-2020.08.05-000049/_settings
{
"settings": {
"index.routing.allocation.require._name": "elasticsearch-warm3", # index shard will be allocated on on node with name elasticsearch-warm3
"index.routing.allocation.require.data": "warm", # index shard will be allocated on on node data string warm (defined in elasticseach.yml node.attr.data=hot)
"index.blocks.write": true
}
}

Similar story with excluding index shards from one of hosts
PUT _cluster/settings
{
"transient" : {
"cluster.routing.allocation.exclude._ip" : "10.0.0.1"
}
}

Reset with null:
PUT _cluster/settings
{
"transient" : {
"cluster.routing.allocation.exclude._ip" : "null"
}
}