put-follow.asciidoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-put-follow]]
  4. === Create Follower API
  5. ++++
  6. <titleabbrev>Create Follower</titleabbrev>
  7. ++++
  8. Creates a follower index.
  9. ==== Description
  10. This API creates a new follower index that is configured to follow the
  11. referenced leader index. When this API returns, the follower index exists, and
  12. {ccr} starts replicating operations from the leader index to the follower index.
  13. ==== Request
  14. //////////////////////////
  15. [source,js]
  16. --------------------------------------------------
  17. POST /follower_index/_ccr/pause_follow
  18. --------------------------------------------------
  19. // CONSOLE
  20. // TEARDOWN
  21. //////////////////////////
  22. [source,js]
  23. --------------------------------------------------
  24. PUT /<follower_index>/_ccr/follow
  25. {
  26. "remote_cluster" : "<remote_cluster>",
  27. "leader_index" : "<leader_index>"
  28. }
  29. --------------------------------------------------
  30. // CONSOLE
  31. // TEST[setup:remote_cluster_and_leader_index]
  32. // TEST[s/<follower_index>/follower_index/]
  33. // TEST[s/<remote_cluster>/remote_cluster/]
  34. // TEST[s/<leader_index>/leader_index/]
  35. ==== Path Parameters
  36. `follower_index` (required)::
  37. (string) the name of the follower index
  38. ==== Request Body
  39. `remote_cluster` (required)::
  40. (string) the <<modules-remote-clusters,remote cluster>> containing the leader
  41. index
  42. `leader_index` (required)::
  43. (string) the name of the index in the leader cluster to follow
  44. include::../follow-request-body.asciidoc[]
  45. ==== Example
  46. This example creates a follower index named `follower_index`:
  47. [source,js]
  48. --------------------------------------------------
  49. PUT /follower_index/_ccr/follow
  50. {
  51. "remote_cluster" : "remote_cluster",
  52. "leader_index" : "leader_index",
  53. "max_read_request_operation_count" : 1024,
  54. "max_outstanding_read_requests" : 16,
  55. "max_read_request_size" : "1024k",
  56. "max_write_request_operation_count" : 32768,
  57. "max_write_request_size" : "16k",
  58. "max_outstanding_write_requests" : 8,
  59. "max_write_buffer_count" : 512,
  60. "max_write_buffer_size" : "512k",
  61. "max_retry_delay" : "10s",
  62. "read_poll_timeout" : "30s"
  63. }
  64. --------------------------------------------------
  65. // CONSOLE
  66. // TEST[setup:remote_cluster_and_leader_index]
  67. The API returns the following result:
  68. [source,js]
  69. --------------------------------------------------
  70. {
  71. "follow_index_created" : true,
  72. "follow_index_shards_acked" : true,
  73. "index_following_started" : true
  74. }
  75. --------------------------------------------------
  76. // TESTRESPONSE