IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Get auto-follow pattern API
editGet auto-follow pattern API
editGet auto-follow patterns.
Request
editresponse = client.ccr.get_auto_follow_pattern puts response
GET /_ccr/auto_follow/
GET /_ccr/auto_follow/<auto_follow_pattern_name>
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
editThis API gets configured auto-follow patterns. This API will return the specified auto-follow pattern collection.
Path parameters
edit-
<auto_follow_pattern_name>
- (Optional, string) Specifies the auto-follow pattern collection that you want to retrieve. If you do not specify a name, the API returns information for all collections.
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
editThis example retrieves information about an auto-follow pattern collection
named my_auto_follow_pattern
:
response = client.ccr.get_auto_follow_pattern( name: 'my_auto_follow_pattern' ) puts response
GET /_ccr/auto_follow/my_auto_follow_pattern
The API returns the following result:
{ "patterns": [ { "name": "my_auto_follow_pattern", "pattern": { "active": true, "remote_cluster" : "remote_cluster", "leader_index_patterns" : [ "leader_index*" ], "leader_index_exclusion_patterns": [ "leader_index_001" ], "follow_index_pattern" : "{{leader_index}}-follower" } } ] }