Только чтение
Разрешенные фазы: hot, warm, cold.
Делает данные индекса только для чтения; отключает операции записи данных в индекс.
Чтобы использовать действие readonly в фазе hot, действие rollover должно быть присутствовать. Если действие переноса не настроено, ILM отклонит политику.
Параметры
Нет.
Пример
resp = client.ilm.put_lifecycle(
name="my_policy",
policy={
"phases": {
"warm": {
"actions": {
"readonly": {}
}
}
}
},
)
print(resp) response = client.ilm.put_lifecycle(
policy: 'my_policy',
body: {
policy: {
phases: {
warm: {
actions: {
readonly: {}
}
}
}
}
}
)
puts response const response = await client.ilm.putLifecycle({
name: "my_policy",
policy: {
phases: {
warm: {
actions: {
readonly: {},
},
},
},
},
});
console.log(response); PUT _ilm/policy/my_policy
{
"policy": {
"phases": {
"warm": {
"actions": {
"readonly" : { }
}
}
}
}
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/ilm-readonly.html