Skip to content

Commit bdca13f

Browse files
Auto-generated API code
1 parent 43dffaa commit bdca13f

7 files changed

Lines changed: 139 additions & 21 deletions

File tree

src/Endpoints/Esql.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Esql extends AbstractEndpoint
4343
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
4444
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
4545
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
46-
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer.. If body is a string must be a valid JSON.
46+
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer. Use the `settings` object to supply per-query settings (e.g. `time_zone`) — the request-body equivalent of in-query `SET`.. If body is a string must be a valid JSON.
4747
* } $params
4848
*
4949
* @throws NoNodeAvailableException if all the hosts are offline
@@ -570,7 +570,7 @@ public function putDataSource(?array $params = null)
570570
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
571571
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
572572
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
573-
* body: string|array<mixed>, // (REQUIRED) Dataset definition: parent data_source name, resource path, optional description, and type-specific settings.. If body is a string must be a valid JSON.
573+
* body: string|array<mixed>, // (REQUIRED) Dataset definition: parent data_source name, resource path, optional description, type-specific settings, and an optional mappings block (column types, path renames, format, _id).. If body is a string must be a valid JSON.
574574
* } $params
575575
*
576576
* @throws MissingParameterException if a required parameter is missing
@@ -656,7 +656,7 @@ public function putView(?array $params = null)
656656
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
657657
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
658658
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
659-
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer.. If body is a string must be a valid JSON.
659+
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer. Use the `settings` object to supply per-query settings (e.g. `time_zone`) — the request-body equivalent of in-query `SET`.. If body is a string must be a valid JSON.
660660
* } $params
661661
*
662662
* @throws NoNodeAvailableException if all the hosts are offline

src/Endpoints/Indices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ public function putAlias(?array $params = null)
20672067
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
20682068
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
20692069
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
2070-
* body: string|array<mixed>, // (REQUIRED) The data stream lifecycle configuration that consist of the data retention. If body is a string must be a valid JSON.
2070+
* body: string|array<mixed>, // (REQUIRED) The data stream lifecycle configuration, supporting fields: 'enabled', 'data_retention', 'downsampling', and 'frozen_after'. If body is a string must be a valid JSON.
20712071
* } $params
20722072
*
20732073
* @throws MissingParameterException if a required parameter is missing

src/Endpoints/Inference.php

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,42 @@ public function delete(?array $params = null)
158158
}
159159

160160

161+
/**
162+
* Delete the inference region policy
163+
*
164+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete-region-policy
165+
* @group serverless
166+
*
167+
* @param array{
168+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
169+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
170+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
171+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
172+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
173+
* } $params
174+
*
175+
* @throws NoNodeAvailableException if all the hosts are offline
176+
* @throws ClientResponseException if the status code of response is 4xx
177+
* @throws ServerResponseException if the status code of response is 5xx
178+
*
179+
* @return Elasticsearch|Promise
180+
*/
181+
public function deleteRegionPolicy(?array $params = null)
182+
{
183+
$params = $params ?? [];
184+
$url = '/_inference/_region_policy';
185+
$method = 'DELETE';
186+
187+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
188+
$headers = [
189+
'Accept' => 'application/json',
190+
];
191+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
192+
$request = $this->addOtelAttributes($params, [], $request, 'inference.delete_region_policy');
193+
return $this->client->sendRequest($request);
194+
}
195+
196+
161197
/**
162198
* Perform embedding inference on the service
163199
*
@@ -246,6 +282,42 @@ public function get(?array $params = null)
246282
}
247283

248284

285+
/**
286+
* Get the inference region policy
287+
*
288+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get-region-policy
289+
* @group serverless
290+
*
291+
* @param array{
292+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
293+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
294+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
295+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
296+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
297+
* } $params
298+
*
299+
* @throws NoNodeAvailableException if all the hosts are offline
300+
* @throws ClientResponseException if the status code of response is 4xx
301+
* @throws ServerResponseException if the status code of response is 5xx
302+
*
303+
* @return Elasticsearch|Promise
304+
*/
305+
public function getRegionPolicy(?array $params = null)
306+
{
307+
$params = $params ?? [];
308+
$url = '/_inference/_region_policy';
309+
$method = 'GET';
310+
311+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
312+
$headers = [
313+
'Accept' => 'application/json',
314+
];
315+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
316+
$request = $this->addOtelAttributes($params, [], $request, 'inference.get_region_policy');
317+
return $this->client->sendRequest($request);
318+
}
319+
320+
249321
/**
250322
* Perform inference on the service
251323
*
@@ -302,7 +374,7 @@ public function inference(?array $params = null)
302374
* @param array{
303375
* inference_id: string, // (REQUIRED) The inference Id
304376
* task_type?: string, // The task type
305-
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. (DEFAULT: 30s)
377+
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. The default depends on the task type: 120s for `completion` and `chat_completion`, and 30s for all other task types. (DEFAULT: 30s)
306378
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
307379
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
308380
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1371,6 +1443,46 @@ public function putOpenshiftAi(?array $params = null)
13711443
}
13721444

13731445

1446+
/**
1447+
* Create or update the inference region policy
1448+
*
1449+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-region-policy
1450+
* @group serverless
1451+
*
1452+
* @param array{
1453+
* force?: bool, // If `true`, the region policy is applied even if it would deny access to inference endpoints that are currently in use by ingest pipeline or indices.
1454+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
1455+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
1456+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
1457+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1458+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
1459+
* body: string|array<mixed>, // (REQUIRED) The region policy configuration. If body is a string must be a valid JSON.
1460+
* } $params
1461+
*
1462+
* @throws NoNodeAvailableException if all the hosts are offline
1463+
* @throws ClientResponseException if the status code of response is 4xx
1464+
* @throws ServerResponseException if the status code of response is 5xx
1465+
*
1466+
* @return Elasticsearch|Promise
1467+
*/
1468+
public function putRegionPolicy(?array $params = null)
1469+
{
1470+
$params = $params ?? [];
1471+
$this->checkRequiredParameters(['body'], $params);
1472+
$url = '/_inference/_region_policy';
1473+
$method = 'PUT';
1474+
1475+
$url = $this->addQueryString($url, $params, ['force','pretty','human','error_trace','source','filter_path']);
1476+
$headers = [
1477+
'Accept' => 'application/json',
1478+
'Content-Type' => 'application/json',
1479+
];
1480+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1481+
$request = $this->addOtelAttributes($params, [], $request, 'inference.put_region_policy');
1482+
return $this->client->sendRequest($request);
1483+
}
1484+
1485+
13741486
/**
13751487
* Create a VoyageAI inference endpoint
13761488
*
@@ -1634,6 +1746,7 @@ public function textEmbedding(?array $params = null)
16341746
* @param array{
16351747
* inference_id: string, // (REQUIRED) The inference Id
16361748
* task_type?: string, // The task type
1749+
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be updated. The default depends on the task type: 120s for `completion` and `chat_completion`, and 30s for all other task types.
16371750
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
16381751
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
16391752
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1660,7 +1773,7 @@ public function update(?array $params = null)
16601773
$url = '/_inference/' . $this->encode($params['inference_id']) . '/_update';
16611774
$method = 'PUT';
16621775
}
1663-
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
1776+
$url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']);
16641777
$headers = [
16651778
'Accept' => 'application/json',
16661779
'Content-Type' => 'application/json',

src/Endpoints/Ingest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function deletePipeline(?array $params = null)
152152
/**
153153
* Get GeoIP statistics
154154
*
155-
* @link https://www.elastic.co/docs/reference/enrich-processor/geoip-processor
155+
* @link https://www.elastic.co/docs/reference/ingest-processor/geoip-processor
156156
*
157157
* @param array{
158158
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
@@ -310,7 +310,7 @@ public function getPipeline(?array $params = null)
310310
/**
311311
* Run a grok processor
312312
*
313-
* @link https://www.elastic.co/docs/reference/enrich-processor/grok-processor
313+
* @link https://www.elastic.co/docs/reference/ingest-processor/grok-processor
314314
* @group serverless
315315
*
316316
* @param array{

src/Endpoints/Ml.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ public function flushJob(?array $params = null)
772772
* Predict future behavior of a time series
773773
*
774774
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-forecast
775+
* @group serverless
775776
*
776777
* @param array{
777778
* job_id: string, // (REQUIRED) The ID of the job to forecast for

src/Endpoints/Synonyms.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public function deleteSynonymRule(?array $params = null)
117117
*
118118
* @param array{
119119
* id: string, // (REQUIRED) The name of the synonyms set to be retrieved
120-
* from?: int, // The starting offset for query rules to retrieve.
121-
* size?: int, // The max number of query rules to retrieve. (DEFAULT: 10)
122-
* search_after?: string, // The rule ID of the last result from the previous page, for cursor-based pagination
120+
* from?: int, // The starting offset for synonym rules to retrieve.
121+
* size?: int, // The max number of synonym rules to retrieve. (DEFAULT: 10)
122+
* search_after?: string, // The synonym rule ID to use as a cursor for pagination. The next page of results will start after this rule ID. This parameter cannot be used with `from`.
123123
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
124124
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
125125
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -239,6 +239,7 @@ public function getSynonymsSets(?array $params = null)
239239
* @param array{
240240
* id: string, // (REQUIRED) The id of the synonyms set to be created or updated
241241
* refresh?: bool, // If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning. If `false`, analyzers will not be reloaded with the new synonym set (DEFAULT: 1)
242+
* append?: bool, // If `true`, the provided synonym rules are appended to the existing set, with matching IDs overwriting existing rules. If `false`, the entire synonyms set is replaced with the new synonym rules definitions.
242243
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
243244
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
244245
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -261,7 +262,7 @@ public function putSynonym(?array $params = null)
261262
$url = '/_synonyms/' . $this->encode($params['id']);
262263
$method = 'PUT';
263264

264-
$url = $this->addQueryString($url, $params, ['refresh','pretty','human','error_trace','source','filter_path']);
265+
$url = $this->addQueryString($url, $params, ['refresh','append','pretty','human','error_trace','source','filter_path']);
265266
$headers = [
266267
'Accept' => 'application/json',
267268
'Content-Type' => 'application/json',

0 commit comments

Comments
 (0)