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

[source, python]
----
resp = client.ilm.put_lifecycle(
    name="rollover_policy",
    policy={
        "phases": {
            "hot": {
                "actions": {
                    "rollover": {
                        "max_size": "50gb"
                    }
                }
            },
            "delete": {
                "min_age": "1d",
                "actions": {
                    "delete": {}
                }
            }
        }
    },
)
print(resp)
----
