---
type: api
title: Pause an auto-follow pattern
description: Pause a cross-cluster replication auto-follow pattern.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-ccr-pause-auto-follow-pattern
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-ccr-pause-auto-follow-pattern
products:
  - Elasticsearch
---

# Pause an auto-follow pattern

Availability: 7.5+

## Paths

- `POST` `/_ccr/auto_follow/{name}/pause`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

#### Path Parameters

- `name` (string Name)
  The name of the auto-follow pattern to pause.

## Description

Pause a cross-cluster replication auto-follow pattern.
When the API returns, the auto-follow pattern is inactive.
New indices that are created on the remote cluster and match the auto-follow patterns are ignored.

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

## Required authorization

* Cluster privileges: `manage_ccr`

[Read the reference documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ccr-auto-follow.html)

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  The period to wait for a connection to the master node.
If the master node is not available before the timeout expires, the request fails and returns an error.
It can also be set to `-1` to indicate that the request should never timeout.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code Examples

#### Console

```console
POST /_ccr/auto_follow/my_auto_follow_pattern/pause
```

#### JavaScript

```javascript
const response = await client.ccr.pauseAutoFollowPattern({
  name: "my_auto_follow_pattern",
});
```

#### Python

```python
resp = client.ccr.pause_auto_follow_pattern(
    name="my_auto_follow_pattern",
)
```

#### curl

```curl
curl -X POST "$ELASTICSEARCH_URL/_ccr/auto_follow/my_auto_follow_pattern/pause" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.ccr().pauseAutoFollowPattern(p -> p
    .name("my_auto_follow_pattern")
);
```

#### C#

```c#
var response = await client.CrossClusterReplication.PauseAutoFollowPatternAsync(name: "my_auto_follow_pattern");
```

#### PHP

```php
$resp = $client->ccr()->pauseAutoFollowPattern([
    "name" => "my_auto_follow_pattern",
]);
```

#### Ruby

```ruby
response = client.ccr.pause_auto_follow_pattern(
  name: "my_auto_follow_pattern"
)
```

## Response Examples

#### Pause auto follow pattern response example1

A successful response from `POST /_ccr/auto_follow/my_auto_follow_pattern/pause`, which pauses an auto-follow pattern.

```json
{
  "acknowledged" : true
}
```

