put-follow.asciidoc 2.4 KB

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