Skip to content

Commit

Permalink
Updated APIs for 8.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Jun 12, 2024
1 parent fd8aa92 commit 55ffae6
Show file tree
Hide file tree
Showing 12 changed files with 544 additions and 361 deletions.
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
final class Client implements ClientInterface
{
const CLIENT_NAME = 'es';
const VERSION = '8.13.0';
const VERSION = '8.14.0';
const API_COMPATIBILITY_HEADER = '%s/vnd.elasticsearch+%s; compatible-with=8';

use ClientEndpointsTrait;
Expand Down
40 changes: 27 additions & 13 deletions src/Endpoints/Ccr.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Ccr extends AbstractEndpoint
*
* @param array{
* name: string, // (REQUIRED) The name of the auto follow pattern.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -55,7 +56,7 @@ public function deleteAutoFollowPattern(array $params = [])
$url = '/_ccr/auto_follow/' . $this->encode($params['name']);
$method = 'DELETE';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -71,6 +72,7 @@ public function deleteAutoFollowPattern(array $params = [])
* @param array{
* index: string, // (REQUIRED) The name of the follower index
* wait_for_active_shards: string, // Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -92,7 +94,7 @@ public function follow(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/follow';
$method = 'PUT';

$url = $this->addQueryString($url, $params, ['wait_for_active_shards','pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['wait_for_active_shards','master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
Expand All @@ -108,6 +110,7 @@ public function follow(array $params = [])
*
* @param array{
* index: list, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -128,7 +131,7 @@ public function followInfo(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/info';
$method = 'GET';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -143,6 +146,7 @@ public function followInfo(array $params = [])
*
* @param array{
* index: list, // (REQUIRED) A comma-separated list of index patterns; use `_all` to perform the operation on all indices
* timeout: time, // Explicit operation timeout
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -163,7 +167,7 @@ public function followStats(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/stats';
$method = 'GET';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -178,6 +182,7 @@ public function followStats(array $params = [])
*
* @param array{
* index: string, // (REQUIRED) the name of the leader index for which specified follower retention leases should be removed
* timeout: time, // Explicit operation timeout
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -199,7 +204,7 @@ public function forgetFollower(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/forget_follower';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
Expand All @@ -215,6 +220,7 @@ public function forgetFollower(array $params = [])
*
* @param array{
* name: string, // The name of the auto follow pattern.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -237,7 +243,7 @@ public function getAutoFollowPattern(array $params = [])
$url = '/_ccr/auto_follow';
$method = 'GET';
}
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -252,6 +258,7 @@ public function getAutoFollowPattern(array $params = [])
*
* @param array{
* name: string, // (REQUIRED) The name of the auto follow pattern that should pause discovering new indices to follow.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -272,7 +279,7 @@ public function pauseAutoFollowPattern(array $params = [])
$url = '/_ccr/auto_follow/' . $this->encode($params['name']) . '/pause';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -287,6 +294,7 @@ public function pauseAutoFollowPattern(array $params = [])
*
* @param array{
* index: string, // (REQUIRED) The name of the follower index that should pause following its leader index.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -307,7 +315,7 @@ public function pauseFollow(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/pause_follow';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -322,6 +330,7 @@ public function pauseFollow(array $params = [])
*
* @param array{
* name: string, // (REQUIRED) The name of the auto follow pattern.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -343,7 +352,7 @@ public function putAutoFollowPattern(array $params = [])
$url = '/_ccr/auto_follow/' . $this->encode($params['name']);
$method = 'PUT';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
Expand All @@ -359,6 +368,7 @@ public function putAutoFollowPattern(array $params = [])
*
* @param array{
* name: string, // (REQUIRED) The name of the auto follow pattern to resume discovering new indices to follow.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -379,7 +389,7 @@ public function resumeAutoFollowPattern(array $params = [])
$url = '/_ccr/auto_follow/' . $this->encode($params['name']) . '/resume';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -394,6 +404,7 @@ public function resumeAutoFollowPattern(array $params = [])
*
* @param array{
* index: string, // (REQUIRED) The name of the follow index to resume following.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -415,7 +426,7 @@ public function resumeFollow(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/resume_follow';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
Expand All @@ -430,6 +441,8 @@ public function resumeFollow(array $params = [])
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html
*
* @param array{
* timeout: time, // Explicit operation timeout
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -448,7 +461,7 @@ public function stats(array $params = [])
$url = '/_ccr/stats';
$method = 'GET';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['timeout','master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand All @@ -463,6 +476,7 @@ public function stats(array $params = [])
*
* @param array{
* index: string, // (REQUIRED) The name of the follower index that should be turned into a regular index.
* master_timeout: time, // Explicit operation timeout for connection to master node
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
Expand All @@ -483,7 +497,7 @@ public function unfollow(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_ccr/unfollow';
$method = 'POST';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['master_timeout','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand Down
Loading

0 comments on commit 55ffae6

Please sign in to comment.