// This file is autogenerated, DO NOT EDIT
// data-streams/lifecycle/tutorial-migrate-data-stream-from-ilm-to-dsl.asciidoc:60

[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"
        }
    },
)
print(resp)
----
