1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
// This file is autogenerated, DO NOT EDIT
// data-streams/lifecycle/tutorial-migrate-data-stream-from-ilm-to-dsl.asciidoc:192
[source, python]
----
resp = client.indices.put_index_template(
name="dsl-data-stream-template",
index_patterns=[
"dsl-data-stream*"
],
data_stream={},
priority=500,
template={
"settings": {
"index.lifecycle.name": "pre-dsl-ilm-policy",
"index.lifecycle.prefer_ilm": False
},
"lifecycle": {
"data_retention": "7d"
}
},
)
print(resp)
----
|