Skip to content

Commit bfe35a2

Browse files
committed
Merge branch 'main' into 8.10
2 parents e4b2540 + 8372de2 commit bfe35a2

File tree

9 files changed

+297
-181
lines changed

9 files changed

+297
-181
lines changed

src/Endpoints/Indices.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,13 @@ public function deleteAlias(array $params = [])
425425

426426

427427
/**
428-
* Deletes the data lifecycle of the selected data streams.
428+
* Deletes the data stream lifecycle of the selected data streams.
429429
*
430430
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html
431431
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
432432
*
433433
* @param array{
434-
* name: list, // (REQUIRED) A comma-separated list of data streams of which the data lifecycle will be deleted; use `*` to get all data streams
434+
* name: list, // (REQUIRED) A comma-separated list of data streams of which the data stream lifecycle will be deleted; use `*` to get all data streams
435435
* expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
436436
* timeout: time, // Explicit timestamp for the document
437437
* master_timeout: time, // Specify timeout for connection to master
@@ -1070,7 +1070,7 @@ public function getAlias(array $params = [])
10701070

10711071

10721072
/**
1073-
* Returns the data lifecycle of the selected data streams.
1073+
* Returns the data stream lifecycle of the selected data streams.
10741074
*
10751075
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html
10761076
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
@@ -1552,7 +1552,7 @@ public function putAlias(array $params = [])
15521552

15531553

15541554
/**
1555-
* Updates the data lifecycle of the selected data streams.
1555+
* Updates the data stream lifecycle of the selected data streams.
15561556
*
15571557
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
15581558
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
@@ -1567,7 +1567,7 @@ public function putAlias(array $params = [])
15671567
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
15681568
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
15691569
* filter_path: list, // A comma-separated list of filters used to reduce the response.
1570-
* body: array, // The data lifecycle configuration that consist of the data retention
1570+
* body: array, // The data stream lifecycle configuration that consist of the data retention
15711571
* } $params
15721572
*
15731573
* @throws MissingParameterException if a required parameter is missing
@@ -1850,6 +1850,7 @@ public function refresh(array $params = [])
18501850
* ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
18511851
* allow_no_indices: boolean, // Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
18521852
* expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
1853+
* resource: string, // changed resource to reload analyzers from if applicable
18531854
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
18541855
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
18551856
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1870,7 +1871,7 @@ public function reloadSearchAnalyzers(array $params = [])
18701871
$url = '/' . $this->encode($params['index']) . '/_reload_search_analyzers';
18711872
$method = empty($params['body']) ? 'GET' : 'POST';
18721873

1873-
$url = $this->addQueryString($url, $params, ['ignore_unavailable','allow_no_indices','expand_wildcards','pretty','human','error_trace','source','filter_path']);
1874+
$url = $this->addQueryString($url, $params, ['ignore_unavailable','allow_no_indices','expand_wildcards','resource','pretty','human','error_trace','source','filter_path']);
18741875
$headers = [
18751876
'Accept' => 'application/json',
18761877
];

src/Endpoints/QueryRuleset.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,41 @@ public function get(array $params = [])
100100
}
101101

102102

103+
/**
104+
* Lists query rulesets.
105+
*
106+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html
107+
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
108+
*
109+
* @param array{
110+
* from: int, // Starting offset (default: 0)
111+
* size: int, // specifies a max number of results to get (default: 100)
112+
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
113+
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
114+
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
115+
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
116+
* filter_path: list, // A comma-separated list of filters used to reduce the response.
117+
* } $params
118+
*
119+
* @throws NoNodeAvailableException if all the hosts are offline
120+
* @throws ClientResponseException if the status code of response is 4xx
121+
* @throws ServerResponseException if the status code of response is 5xx
122+
*
123+
* @return Elasticsearch|Promise
124+
*/
125+
public function list(array $params = [])
126+
{
127+
$url = '/_query_rules';
128+
$method = 'GET';
129+
130+
$url = $this->addQueryString($url, $params, ['from','size','pretty','human','error_trace','source','filter_path']);
131+
$headers = [
132+
'Accept' => 'application/json',
133+
];
134+
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
135+
}
136+
137+
103138
/**
104139
* Creates or updates a query ruleset.
105140
*

src/Endpoints/Security.php

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ public function createApiKey(array $params = [])
389389
* Creates a cross-cluster API key for API key based remote cluster access.
390390
*
391391
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html
392-
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
393392
*
394393
* @param array{
395394
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
@@ -1118,6 +1117,39 @@ public function getServiceCredentials(array $params = [])
11181117
}
11191118

11201119

1120+
/**
1121+
* Retrieve settings for the security system indices
1122+
*
1123+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html
1124+
*
1125+
* @param array{
1126+
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1127+
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1128+
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1129+
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1130+
* filter_path: list, // A comma-separated list of filters used to reduce the response.
1131+
* } $params
1132+
*
1133+
* @throws NoNodeAvailableException if all the hosts are offline
1134+
* @throws ClientResponseException if the status code of response is 4xx
1135+
* @throws ServerResponseException if the status code of response is 5xx
1136+
*
1137+
* @return Elasticsearch|Promise
1138+
*/
1139+
public function getSettings(array $params = [])
1140+
{
1141+
$url = '/_security/settings';
1142+
$method = 'GET';
1143+
1144+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
1145+
$headers = [
1146+
'Accept' => 'application/json',
1147+
'Content-Type' => 'application/json',
1148+
];
1149+
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
1150+
}
1151+
1152+
11211153
/**
11221154
* Creates a bearer token for access without requiring basic authentication.
11231155
*
@@ -2017,7 +2049,6 @@ public function updateApiKey(array $params = [])
20172049
* Updates attributes of an existing cross-cluster API key.
20182050
*
20192051
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html
2020-
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
20212052
*
20222053
* @param array{
20232054
* id: string, // (REQUIRED) The ID of the cross-cluster API key to update
@@ -2051,6 +2082,41 @@ public function updateCrossClusterApiKey(array $params = [])
20512082
}
20522083

20532084

2085+
/**
2086+
* Update settings for the security system index
2087+
*
2088+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html
2089+
*
2090+
* @param array{
2091+
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
2092+
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
2093+
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
2094+
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
2095+
* filter_path: list, // A comma-separated list of filters used to reduce the response.
2096+
* body: array, // (REQUIRED) An object with the new settings for each index, if any
2097+
* } $params
2098+
*
2099+
* @throws NoNodeAvailableException if all the hosts are offline
2100+
* @throws ClientResponseException if the status code of response is 4xx
2101+
* @throws ServerResponseException if the status code of response is 5xx
2102+
*
2103+
* @return Elasticsearch|Promise
2104+
*/
2105+
public function updateSettings(array $params = [])
2106+
{
2107+
$this->checkRequiredParameters(['body'], $params);
2108+
$url = '/_security/settings';
2109+
$method = 'PUT';
2110+
2111+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
2112+
$headers = [
2113+
'Accept' => 'application/json',
2114+
'Content-Type' => 'application/json',
2115+
];
2116+
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
2117+
}
2118+
2119+
20542120
/**
20552121
* Update application specific data for the user profile of the given unique ID.
20562122
*

src/Endpoints/SynonymRule.php

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)