// This file is autogenerated, DO NOT EDIT
// tab-widgets/troubleshooting/data/total-shards-per-node.asciidoc:78

[source, python]
----
resp = client.indices.put_settings(
    index="my-index-000001",
    settings={
        "index": {
            "routing.allocation.total_shards_per_node": "2"
        }
    },
)
print(resp)
----
