Skip to content

Commit

Permalink
Merge branch 'main' into 8.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Sep 28, 2023
2 parents e4b2540 + 8372de2 commit bfe35a2
Show file tree
Hide file tree
Showing 9 changed files with 297 additions and 181 deletions.
13 changes: 7 additions & 6 deletions src/Endpoints/Indices.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,13 @@ public function deleteAlias(array $params = [])


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


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


/**
* Updates the data lifecycle of the selected data streams.
* Updates the data stream lifecycle of the selected data streams.
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-put-lifecycle.html
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
Expand All @@ -1567,7 +1567,7 @@ public function putAlias(array $params = [])
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
* filter_path: list, // A comma-separated list of filters used to reduce the response.
* body: array, // The data lifecycle configuration that consist of the data retention
* body: array, // The data stream lifecycle configuration that consist of the data retention
* } $params
*
* @throws MissingParameterException if a required parameter is missing
Expand Down Expand Up @@ -1850,6 +1850,7 @@ public function refresh(array $params = [])
* ignore_unavailable: boolean, // Whether specified concrete indices should be ignored when unavailable (missing or closed)
* 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)
* expand_wildcards: enum, // Whether to expand wildcard expression to concrete indices that are open, closed or both.
* resource: string, // changed resource to reload analyzers from if applicable
* 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 @@ -1870,7 +1871,7 @@ public function reloadSearchAnalyzers(array $params = [])
$url = '/' . $this->encode($params['index']) . '/_reload_search_analyzers';
$method = empty($params['body']) ? 'GET' : 'POST';

$url = $this->addQueryString($url, $params, ['ignore_unavailable','allow_no_indices','expand_wildcards','pretty','human','error_trace','source','filter_path']);
$url = $this->addQueryString($url, $params, ['ignore_unavailable','allow_no_indices','expand_wildcards','resource','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
Expand Down
35 changes: 35 additions & 0 deletions src/Endpoints/QueryRuleset.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,41 @@ public function get(array $params = [])
}


/**
* Lists query rulesets.
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-query-rulesets.html
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
*
* @param array{
* from: int, // Starting offset (default: 0)
* size: int, // specifies a max number of results to get (default: 100)
* 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)
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
* filter_path: list, // A comma-separated list of filters used to reduce the response.
* } $params
*
* @throws NoNodeAvailableException if all the hosts are offline
* @throws ClientResponseException if the status code of response is 4xx
* @throws ServerResponseException if the status code of response is 5xx
*
* @return Elasticsearch|Promise
*/
public function list(array $params = [])
{
$url = '/_query_rules';
$method = 'GET';

$url = $this->addQueryString($url, $params, ['from','size','pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
];
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
}


/**
* Creates or updates a query ruleset.
*
Expand Down
70 changes: 68 additions & 2 deletions src/Endpoints/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ public function createApiKey(array $params = [])
* Creates a cross-cluster API key for API key based remote cluster access.
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
*
* @param array{
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
Expand Down Expand Up @@ -1118,6 +1117,39 @@ public function getServiceCredentials(array $params = [])
}


/**
* Retrieve settings for the security system indices
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-settings.html
*
* @param array{
* 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)
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
* filter_path: list, // A comma-separated list of filters used to reduce the response.
* } $params
*
* @throws NoNodeAvailableException if all the hosts are offline
* @throws ClientResponseException if the status code of response is 4xx
* @throws ServerResponseException if the status code of response is 5xx
*
* @return Elasticsearch|Promise
*/
public function getSettings(array $params = [])
{
$url = '/_security/settings';
$method = 'GET';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
];
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
}


/**
* Creates a bearer token for access without requiring basic authentication.
*
Expand Down Expand Up @@ -2017,7 +2049,6 @@ public function updateApiKey(array $params = [])
* Updates attributes of an existing cross-cluster API key.
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html
* @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
*
* @param array{
* id: string, // (REQUIRED) The ID of the cross-cluster API key to update
Expand Down Expand Up @@ -2051,6 +2082,41 @@ public function updateCrossClusterApiKey(array $params = [])
}


/**
* Update settings for the security system index
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-settings.html
*
* @param array{
* 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)
* source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
* filter_path: list, // A comma-separated list of filters used to reduce the response.
* body: array, // (REQUIRED) An object with the new settings for each index, if any
* } $params
*
* @throws NoNodeAvailableException if all the hosts are offline
* @throws ClientResponseException if the status code of response is 4xx
* @throws ServerResponseException if the status code of response is 5xx
*
* @return Elasticsearch|Promise
*/
public function updateSettings(array $params = [])
{
$this->checkRequiredParameters(['body'], $params);
$url = '/_security/settings';
$method = 'PUT';

$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
$headers = [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
];
return $this->client->sendRequest($this->createRequest($method, $url, $headers, $params['body'] ?? null));
}


/**
* Update application specific data for the user profile of the given unique ID.
*
Expand Down
68 changes: 0 additions & 68 deletions src/Endpoints/SynonymRule.php

This file was deleted.

Loading

0 comments on commit bfe35a2

Please sign in to comment.