Read only
Read only
Phases allowed: hot, warm, cold.
Makes the index data read-only; disables data write operations against the index.
To use the readonly
action in the hot
phase, the rollover
action must be present. If no rollover action is configured, ILM will reject the policy.
Options
None.
Example
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" : { }
}
}
}
}
}
当前内容版权归 elasticsearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 elasticsearch .