// This file is autogenerated, DO NOT EDIT
// ilm/actions/ilm-rollover.asciidoc:245

[source, python]
----
resp = client.ilm.put_lifecycle(
    name="my_policy",
    policy={
        "phases": {
            "hot": {
                "actions": {
                    "rollover": {
                        "max_age": "7d"
                    }
                }
            }
        }
    },
)
print(resp)
----
