// 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.follow({
  index: "kibana_sample_data_ecommerce2",
  wait_for_active_shards: 1,
  remote_cluster: "clusterA",
  leader_index: "kibana_sample_data_ecommerce",
});
console.log(response);
----
