// This file is autogenerated, DO NOT EDIT
// ccr/getting-started.asciidoc:288

[source, python]
----
resp = client.ccr.put_auto_follow_pattern(
    name="beats",
    remote_cluster="leader",
    leader_index_patterns=[
        "metricbeat-*",
        "packetbeat-*"
    ],
    follow_index_pattern="{{leader_index}}-copy",
)
print(resp)
----
