Pause auto-follow pattern API

edit

Pauses an auto-follow pattern.

Request

edit

POST /_ccr/auto_follow/<auto_follow_pattern_name>/pause

Prerequisites

edit
  • If the Elasticsearch security features are enabled, you must have manage_ccr cluster privileges on the cluster that contains the follower index. For more information, see Security privileges.

Description

edit

This API pauses an auto-follow pattern. When this API returns, the auto-follow pattern is inactive and ignores any new index created on the remote cluster that matches any of the auto-follow’s patterns. Paused auto-follow patterns appear with the active field set to false in the GET auto-follow patterns API.

You can resume auto-following with the resume auto-follow pattern API. Once resumed, the auto-follow pattern is active again and automatically configure follower indices for newly created indices on the remote cluster that match its patterns. Remote indices created while the pattern was paused will also be followed, unless they have been deleted or closed in the meantime.

Path parameters

edit
<auto_follow_pattern_name>
(Required, string) Name of the auto-follow pattern to pause.

Query parameters

edit
master_timeout
(Optional, time units) Period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. Defaults to 30s. Can also be set to -1 to indicate that the request should never timeout.

Examples

edit

This example pauses an auto-follow pattern named my_auto_follow_pattern:

response = client.ccr.pause_auto_follow_pattern(
  name: 'my_auto_follow_pattern'
)
puts response
POST /_ccr/auto_follow/my_auto_follow_pattern/pause

The API returns the following result:

{
  "acknowledged" : true
}