// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.ccr.putAutoFollowPattern({
  name: "beats",
  remote_cluster: "leader",
  leader_index_patterns: ["metricbeat-*", "packetbeat-*"],
  follow_index_pattern: "{{leader_index}}-copy",
});
console.log(response);
----
