// This file is autogenerated, DO NOT EDIT
// data-streams/change-mappings-and-settings.asciidoc:351

[source, python]
----
resp = client.indices.put_index_template(
    name="my-data-stream-template",
    index_patterns=[
        "my-data-stream*"
    ],
    data_stream={},
    priority=500,
    template={
        "settings": {
            "sort.field": [
                "@timestamp"
            ],
            "sort.order": [
                "desc"
            ]
        }
    },
)
print(resp)
----
