// This file is autogenerated, DO NOT EDIT
// ilm/actions/ilm-allocate.asciidoc:116

[source, python]
----
resp = client.ilm.put_lifecycle(
    name="my_policy",
    policy={
        "phases": {
            "cold": {
                "actions": {
                    "allocate": {
                        "require": {
                            "box_type": "cold",
                            "storage": "high"
                        }
                    }
                }
            }
        }
    },
)
print(resp)
----
