// This file is autogenerated, DO NOT EDIT
// ml/anomaly-detection/apis/put-datafeed.asciidoc:168

[source, python]
----
resp = client.ml.put_datafeed(
    datafeed_id="datafeed-test-job",
    pretty=True,
    indices=[
        "kibana_sample_data_logs"
    ],
    query={
        "bool": {
            "must": [
                {
                    "match_all": {}
                }
            ]
        }
    },
    job_id="test-job",
)
print(resp)
----
