// This file is autogenerated, DO NOT EDIT
// ilm/actions/ilm-migrate.asciidoc:57

[source, python]
----
resp = client.ilm.put_lifecycle(
    name="my_policy",
    policy={
        "phases": {
            "warm": {
                "actions": {
                    "migrate": {},
                    "allocate": {
                        "number_of_replicas": 1
                    }
                }
            }
        }
    },
)
print(resp)
----
