// This file is autogenerated, DO NOT EDIT
// alias.asciidoc:329

[source, python]
----
resp = client.indices.update_aliases(
    actions=[
        {
            "add": {
                "index": "my-index-2099.05.06-000001",
                "alias": "my-alias",
                "filter": {
                    "bool": {
                        "filter": [
                            {
                                "range": {
                                    "@timestamp": {
                                        "gte": "now-1d/d",
                                        "lt": "now/d"
                                    }
                                }
                            },
                            {
                                "term": {
                                    "user.id": "kimchy"
                                }
                            }
                        ]
                    }
                }
            }
        }
    ],
)
print(resp)
----
