put-auto-follow-pattern.asciidoc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-put-auto-follow-pattern]]
  4. === Create Auto-Follow Pattern API
  5. ++++
  6. <titleabbrev>Create Auto-Follow Pattern</titleabbrev>
  7. ++++
  8. beta[]
  9. Creates an auto-follow pattern.
  10. ==== Description
  11. This API creates a new named collection of auto-follow patterns against the
  12. remote cluster specified in the request body. Newly created indices on the
  13. remote cluster matching any of the specified patterns will be automatically
  14. configured as follower indices.
  15. ==== Request
  16. [source,js]
  17. --------------------------------------------------
  18. PUT /_ccr/auto_follow/<auto_follow_pattern_name>
  19. {
  20. "remote_cluster" : "<remote_cluster>",
  21. "leader_index_patterns" :
  22. [
  23. "<leader_index_pattern>"
  24. ],
  25. "follow_index_pattern" : "<follow_index_pattern>"
  26. }
  27. --------------------------------------------------
  28. // CONSOLE
  29. // TEST[setup:remote_cluster]
  30. // TEST[s/<auto_follow_pattern_name>/auto_follow_pattern_name/]
  31. // TEST[s/<remote_cluster>/remote_cluster/]
  32. // TEST[s/<leader_index_patterns>/leader_index*/]
  33. // TEST[s/<follow_index_pattern>/{{leader_index}}-follower/]
  34. //////////////////////////
  35. [source,js]
  36. --------------------------------------------------
  37. DELETE /_ccr/auto_follow/auto_follow_pattern_name
  38. --------------------------------------------------
  39. // CONSOLE
  40. // TEST[continued]
  41. //////////////////////////
  42. ==== Path Parameters
  43. `auto_follow_pattern_name` (required)::
  44. (string) name of the collection of auto-follow patterns
  45. ==== Request Body
  46. `remote_cluster`::
  47. (required string) the <<modules-remote-clusters,remote cluster>> containing the
  48. leader indices to match against
  49. `leader_index_patterns`::
  50. (array) an array of simple index patterns to match against indices in the
  51. remote cluster specified by the `remote_cluster` field
  52. `follow_index_pattern`::
  53. (string) the name of follower index; the template `{{leader_index}}` can be
  54. used to derive the name of the follower index from the name of the leader
  55. index
  56. include::../follow-request-body.asciidoc[]
  57. ==== Example
  58. This example creates an auto-follow pattern named `my_auto_follow_pattern`:
  59. [source,js]
  60. --------------------------------------------------
  61. PUT /_ccr/auto_follow/my_auto_follow_pattern
  62. {
  63. "remote_cluster" : "remote_cluster",
  64. "leader_index_patterns" :
  65. [
  66. "leader_index*"
  67. ],
  68. "follow_index_pattern" : "{{leader_index}}-follower",
  69. "max_read_request_operation_count" : 1024,
  70. "max_outstanding_read_requests" : 16,
  71. "max_read_request_size" : "1024k",
  72. "max_write_request_operation_count" : 32768,
  73. "max_write_request_size" : "16k",
  74. "max_outstanding_write_requests" : 8,
  75. "max_write_buffer_count" : 512,
  76. "max_write_buffer_size" : "512k",
  77. "max_retry_delay" : "10s",
  78. "read_poll_timeout" : "30s"
  79. }
  80. --------------------------------------------------
  81. // CONSOLE
  82. // TEST[setup:remote_cluster]
  83. The API returns the following result:
  84. [source,js]
  85. --------------------------------------------------
  86. {
  87. "acknowledged" : true
  88. }
  89. --------------------------------------------------
  90. // TESTRESPONSE
  91. //////////////////////////
  92. [source,js]
  93. --------------------------------------------------
  94. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  95. --------------------------------------------------
  96. // CONSOLE
  97. // TEST[continued]
  98. //////////////////////////