// This file is autogenerated, DO NOT EDIT
// indices/shrink-index.asciidoc:125

[source, python]
----
resp = client.indices.shrink(
    index="my_source_index",
    target="my_target_index",
    settings={
        "index.routing.allocation.require._name": None,
        "index.blocks.write": None
    },
)
print(resp)
----
