diff --git a/.ci/Dockerfile b/.ci/Dockerfile index 451830524..271de124d 100644 --- a/.ci/Dockerfile +++ b/.ci/Dockerfile @@ -34,7 +34,4 @@ RUN composer install COPY . . -# Updating elasticsearch submodule -RUN git submodule update --init --recursive - CMD ["bash", ".ci/yaml-tests.sh"] \ No newline at end of file diff --git a/.ci/functions/imports.sh b/.ci/functions/imports.sh index 3fb28cc38..c05f36826 100644 --- a/.ci/functions/imports.sh +++ b/.ci/functions/imports.sh @@ -26,10 +26,11 @@ if [[ -z $es_node_name ]]; then export es_node_name=instance export elastic_password=changeme export elasticsearch_image=elasticsearch - export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200 + export elasticsearch_scheme="https" if [[ $TEST_SUITE != "platinum" ]]; then - export elasticsearch_url=http://${es_node_name}:9200 + export elasticsearch_scheme="http" fi + export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200 export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost} export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}" diff --git a/.ci/jobs/elastic+elasticsearch-php+7.10.yml b/.ci/jobs/elastic+elasticsearch-php+7.10.yml deleted file mode 100644 index 847fbed1a..000000000 --- a/.ci/jobs/elastic+elasticsearch-php+7.10.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- job: - name: elastic+elasticsearch-php+7.10 - display-name: 'elastic / elasticsearch-php # 7.10' - description: Testing the elasticsearch-php 7.10 branch. - parameters: - - string: - name: branch_specifier - default: refs/heads/7.10 - description: the Git branch specifier to build (<branchName>, <tagName>, - <commitId>, etc.) - triggers: - - github - - timed: 'H */12 * * *' diff --git a/.ci/jobs/elastic+elasticsearch-php+7.9.yml b/.ci/jobs/elastic+elasticsearch-php+7.9.yml deleted file mode 100644 index 441c47422..000000000 --- a/.ci/jobs/elastic+elasticsearch-php+7.9.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- job: - name: elastic+elasticsearch-php+7.9 - display-name: 'elastic / elasticsearch-php # 7.9' - description: Testing the elasticsearch-php 7.9 branch. - parameters: - - string: - name: branch_specifier - default: refs/heads/7.9 - description: the Git branch specifier to build (<branchName>, <tagName>, - <commitId>, etc.) - triggers: - - github - - timed: 'H */12 * * *' diff --git a/.ci/make.sh b/.ci/make.sh new file mode 100755 index 000000000..db8a784b2 --- /dev/null +++ b/.ci/make.sh @@ -0,0 +1,179 @@ +#!/usr/bin/env bash + +# ------------------------------------------------------- # +# +# Skeleton for common build entry script for all elastic +# clients. Needs to be adapted to individual client usage. +# +# Must be called: ./.ci/make.sh +# +# Version: 1.1.0 +# +# Targets: +# --------------------------- +# assemble : build client artefacts with version +# bump : bump client internals to version +# codegen : generate endpoints +# docsgen : generate documentation +# examplegen : generate the doc examples +# clean : clean workspace +# +# ------------------------------------------------------- # + +# ------------------------------------------------------- # +# Bootstrap +# ------------------------------------------------------- # + +script_path=$(dirname "$(realpath -s "$0")") +repo=$(realpath "$script_path/../") + +# shellcheck disable=SC1090 +CMD=$1 +TASK=$1 +TASK_ARGS=() +VERSION=$2 +STACK_VERSION=$VERSION +set -euo pipefail + +product="elastic/elasticsearch-php" +output_folder=".ci/output" +codegen_folder=".ci/output" +OUTPUT_DIR="$repo/${output_folder}" +REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}" +mkdir -p "$OUTPUT_DIR" + +echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m" +echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m" +echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m" + +# ------------------------------------------------------- # +# Parse Command +# ------------------------------------------------------- # + +case $CMD in + clean) + echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m" + rm -rfv "$output_folder" + echo -e "\033[32;1mTARGET: clean - done.\033[0m" + exit 0 + ;; + assemble) + if [ -v $VERSION ]; then + echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m" + exit 1 + fi + echo -e "\033[36;1mTARGET: assemble artefact $VERSION\033[0m" + TASK=release + TASK_ARGS=("$VERSION" "$output_folder") + ;; + codegen) + if [ -v $VERSION ]; then + echo -e "\033[31;1mTARGET: codegen -> missing version parameter\033[0m" + exit 1 + fi + echo -e "\033[36;1mTARGET: codegen API v$VERSION\033[0m" + TASK=codegen + # VERSION is BRANCH here for now + TASK_ARGS=("$VERSION" "$codegen_folder") + ;; + docsgen) + if [ -v $VERSION ]; then + echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m" + exit 1 + fi + echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m" + TASK=codegen + # VERSION is BRANCH here for now + TASK_ARGS=("$VERSION" "$codegen_folder") + ;; + examplesgen) + echo -e "\033[36;1mTARGET: generate examples\033[0m" + TASK=codegen + # VERSION is BRANCH here for now + TASK_ARGS=("$VERSION" "$codegen_folder") + ;; + bump) + if [ -v $VERSION ]; then + echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m" + exit 1 + fi + echo -e "\033[36;1mTARGET: bump to version $VERSION\033[0m" + TASK=bump + # VERSION is BRANCH here for now + TASK_ARGS=("$VERSION") + ;; + *) + echo -e "\nUsage:\n\t $CMD is not supported right now\n" + exit 1 +esac + + +# ------------------------------------------------------- # +# Build Container +# ------------------------------------------------------- # + +#echo -e "\033[34;1mINFO: building $product container\033[0m" + +#docker build --file .ci/Dockerfile --tag ${product} \ +# --build-arg USER_ID="$(id -u)" \ +# --build-arg GROUP_ID="$(id -g)" . + + +# ------------------------------------------------------- # +# Run the Container +# ------------------------------------------------------- # + +#echo -e "\033[34;1mINFO: running $product container\033[0m" + +#docker run \ +# --env "DOTNET_VERSION" \ +# --name test-runner \ +# --volume $REPO_BINDING \ +# --rm \ +# $product \ +# /bin/bash -c "./build.sh $TASK ${TASK_ARGS[*]} && chown -R $(id -u):$(id -g) ." + +# ------------------------------------------------------- # +# Post Command tasks & checks +# ------------------------------------------------------- # + +if [[ "$CMD" == "assemble" ]]; then + artefact_name="elasticsearch-php-${VERSION}" + echo -e "\033[34;1mINFO: copy artefacts\033[0m" + rsync -arv --exclude=.ci --exclude=.git --filter=':- .gitignore' "$PWD" "${output_folder}/." + + echo -e "\033[34;1mINFO: rename artefacts\033[0m" + mv -v "${output_folder}/elasticsearch-php" "${output_folder}/${artefact_name}" + + echo -e "\033[34;1mINFO: build artefacts\033[0m" + cd ./.ci/output && tar -czvf ${artefact_name}.tar.gz "${artefact_name}/." && cd - + + echo -e "\033[34;1mINFO: cleanup\033[0m" + rm -Rf "${output_folder}/${artefact_name}" + + echo -e "\033[34;1mINFO: validate artefact\033[0m" + proof=`ls ${output_folder}` + + if [ $proof == "${artefact_name}.tar.gz" ]; then + echo -e "\033[32;1mTARGET: assemble - success: $artefact_name.tar.gz\033[0m" + else + echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m" + exit 1 + fi +fi + +if [[ "$CMD" == "bump" ]]; then + echo "TODO" +fi + +if [[ "$CMD" == "codegen" ]]; then + echo "TODO" +fi + +if [[ "$CMD" == "docsgen" ]]; then + echo "TODO" +fi + +if [[ "$CMD" == "examplesgen" ]]; then + echo "TODO" +fi \ No newline at end of file diff --git a/.ci/run-elasticsearch.sh b/.ci/run-elasticsearch.sh index 3f3796fb6..22e16b845 100755 --- a/.ci/run-elasticsearch.sh +++ b/.ci/run-elasticsearch.sh @@ -7,7 +7,7 @@ # Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'. # Export the NUMBER_OF_NODES variable to start more than 1 node -# Version 1.3.0 +# Version 1.6.1 # - Initial version of the run-elasticsearch.sh script # - Deleting the volume should not dependent on the container still running # - Fixed `ES_JAVA_OPTS` config @@ -17,6 +17,10 @@ # - Added 5 retries on docker pull for fixing transient network errors # - Added flags to make local CCR configurations work # - Added action.destructive_requires_name=false as the default will be true in v8 +# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing +# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default" +# - Use https only when TEST_SUITE is "platinum", when "free" use http +# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum" script_path=$(dirname $(realpath -s $0)) source $script_path/functions/imports.sh @@ -30,6 +34,7 @@ cluster_name=${moniker}${suffix} declare -a volumes environment=($(cat <<-END + --env ELASTIC_PASSWORD=$elastic_password --env node.name=$es_node_name --env cluster.name=$cluster_name --env cluster.initial_master_nodes=$master_node_name @@ -40,13 +45,14 @@ environment=($(cat <<-END --env path.repo=/tmp --env repositories.url.allowed_urls=http://snapshot.test* --env action.destructive_requires_name=false + --env ingest.geoip.downloader.enabled=false + --env cluster.deprecation_indexing.enabled=false END )) if [[ "$TEST_SUITE" == "platinum" ]]; then environment+=($(cat <<-END - --env ELASTIC_PASSWORD=$elastic_password - --env xpack.license.self_generated.type=trial --env xpack.security.enabled=true + --env xpack.license.self_generated.type=trial --env xpack.security.http.ssl.enabled=true --env xpack.security.http.ssl.verification_mode=certificate --env xpack.security.http.ssl.key=certs/testnode.key @@ -57,6 +63,8 @@ if [[ "$TEST_SUITE" == "platinum" ]]; then --env xpack.security.transport.ssl.key=certs/testnode.key --env xpack.security.transport.ssl.certificate=certs/testnode.crt --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt + --env xpack.ml.max_machine_memory_percent=50 + --env xpack.ml.node_concurrent_job_allocations=50 END )) volumes+=($(cat <<-END @@ -65,6 +73,12 @@ END --volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt END )) +else + environment+=($(cat <<-END + --env xpack.security.enabled=false + --env xpack.security.http.ssl.enabled=false +END +)) fi cert_validation_flags="" diff --git a/.ci/run-repository.sh b/.ci/run-repository.sh index 9a2bf4d4c..157c3b59a 100644 --- a/.ci/run-repository.sh +++ b/.ci/run-repository.sh @@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0)) source $script_path/functions/imports.sh set -euo pipefail -PHP_VERSION=${PHP_VERSION-7.4-cli} +PHP_VERSION=${PHP_VERSION-8.0-cli} ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"} elasticsearch_container=${elasticsearch_container-} diff --git a/.ci/test-matrix.yml b/.ci/test-matrix.yml index 0bec1291b..b9248f190 100644 --- a/.ci/test-matrix.yml +++ b/.ci/test-matrix.yml @@ -1,8 +1,10 @@ --- STACK_VERSION: - - 7.x-SNAPSHOT + - 7.17-SNAPSHOT PHP_VERSION: + - 8.2-cli + - 8.1-cli - 8.0-cli - 7.4-cli - 7.3-cli diff --git a/.github/check-license-headers.sh b/.github/check-license-headers.sh new file mode 100755 index 000000000..0b6a77fb7 --- /dev/null +++ b/.github/check-license-headers.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Check that source code files in this repo have the appropriate license +# header. + +if [ "$TRACE" != "" ]; then + export PS4='${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }' + set -o xtrace +fi +set -o errexit +set -o pipefail + +TOP=$(cd "$(dirname "$0")/.." >/dev/null && pwd) + +NLINES1=$(($(wc -l .github/license-header.txt | awk '{print $1}')+1)) +NLINES2=$((NLINES1 + 1)) + +function check_license_header { + local f + f=$1 + + if ! diff -w .github/license-header.txt <(head -$NLINES2 "$f" | tail -$NLINES1) >/dev/null; then + echo "check-license-headers: error: '$f' does not have required license header, see 'diff -w .github/license-header.txt <(head -$NLINES2 $f | tail -$NLINES1)'" + return 1 + else + return 0 + fi +} + + +cd "$TOP" +nErrors=0 +for f in $(git ls-files | grep '\.php$'); do + if ! check_license_header $f; then + nErrors=$((nErrors+1)) + fi +done + +if [[ $nErrors -eq 0 ]]; then + exit 0 +else + exit 1 +fi diff --git a/.github/license-header.txt b/.github/license-header.txt new file mode 100644 index 000000000..9af1e76de --- /dev/null +++ b/.github/license-header.txt @@ -0,0 +1,13 @@ +/** + * Elasticsearch PHP client + * + * @link https://github.com/elastic/elasticsearch-php/ + * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 + * @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1 + * + * Licensed to Elasticsearch B.V under one or more agreements. + * Elasticsearch B.V licenses this file to you under the Apache 2.0 License or + * the GNU Lesser General Public License, Version 2.1, at your option. + * See the LICENSE file in the project root for more information. + */ \ No newline at end of file diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml new file mode 100644 index 000000000..8583ee456 --- /dev/null +++ b/.github/workflows/license.yml @@ -0,0 +1,15 @@ +name: License headers + +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Check license headers + run: | + ./.github/check-license-headers.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1a7c5b41..a4704fb5f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,43 +9,38 @@ jobs: strategy: matrix: - php-version: [7.3, 7.4, 8.0] + php-version: [7.3, 7.4, 8.0, 8.1, 8.2] os: [ubuntu-latest] - es-version: [7.x-SNAPSHOT] + es-version: [7.17-SNAPSHOT] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - extensions: yaml + extensions: yaml, zip, curl + coverage: none env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + - name: Get composer cache directory id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}- - name: Install dependencies - if: ${{ matrix.php-version != '8.0' }} run: | composer install --prefer-dist - - name: ignore ignore-platform-reqs if it is using php 8 - if: ${{ matrix.php-version == '8.0' }} - run: | - composer install --prefer-dist --ignore-platform-reqs - - name: PHP Coding Standards run: | composer run-script phpcs @@ -68,7 +63,7 @@ jobs: sudo sysctl -w vm.max_map_count=262144 - name: Runs Elasticsearch ${{ matrix.es-version }} - uses: elastic/elastic-github-actions/elasticsearch@master + uses: elastic/elastic-github-actions/elasticsearch@trial-license with: stack-version: ${{ matrix.es-version }} @@ -76,4 +71,5 @@ jobs: run: | vendor/bin/phpunit -c phpunit-integration-tests.xml env: - TEST_SUITE: free + ELASTICSEARCH_URL: http://localhost:9200 + diff --git a/.gitignore b/.gitignore index 7b422fe68..66e90c5da 100755 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,7 @@ build tests/*-junit.xml # YAML tests -tests/Elasticsearch/Tests/Yaml \ No newline at end of file +tests/Elasticsearch/Tests/Yaml + +# Exclude .ci/make.sh artifcats +.ci/output diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 52a3baa20..d162adc7d 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -1,3 +1,8 @@ +# 7.17 + +- We changed the signature of `Elasticsearch\Common\EmptyLogger::log` adding the `void` return type. + This change has been needed to support psr/log v3. + # 7.4 - Using a deprecated parameter is notified triggering a [E_USER_DEPRECATED](https://www.php.net/manual/en/errorfunc.constants.php) @@ -19,6 +24,10 @@ - Added type hints and return type declarations where possible [#897](https://github.com/elastic/elasticsearch-php/pull/897) +# 6.8 + +- Method taskList() renamed to list() in TasksNamespace + # 6.7 - `{type}` part in `indices.put_mapping` API is not required anymore, see new specification [here](https://github.com/elastic/elasticsearch/blob/v6.7.0/rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c8ff1d6..d9f772b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,44 @@ +## Release 7.16.0 + +- Added support of includePortInHostHeader in ClientBuilder::fromConfig + [#1181](https://github.com/elastic/elasticsearch-php/pull/1181) +- Fixed UTF-16 issue in SmartSerializer with single unpaired surrogate in unicode escape + [#1179](https://github.com/elastic/elasticsearch-php/pull/1179) +- Replace trait with abstract class to avoid Deprecated Functionality issue in PHP 8.1 + [#1175](https://github.com/elastic/elasticsearch-php/pull/1175) + +## Release 7.15.0 + +- Updated endpoints for Elasticsearch 7.15.0 + [995f6d4](https://github.com/elastic/elasticsearch-php/commit/995f6d4bde7de76004e95d7a434b1d59da7a7e75) + +## Release 7.14.0 + +- Usage of psr/log version 2 + [#1154](https://github.com/elastic/elasticsearch-php/pull/1154) +- Update search iterators to send `scroll_id` inside the request body + [#1134](https://github.com/elastic/elasticsearch-php/pull/1134) +- Added the `ingest.geoip.downloader.enabled=false` setting for ES + [5867351](https://github.com/elastic/elasticsearch-php/commit/586735109dc18f22bfdf3b73ab0621b37e857be1) +- Removed phpcs for autogenerated files (endpoints) + [651c57b](https://github.com/elastic/elasticsearch-php/commit/651c57b2e6bf98a0fd48220949966e630e5a804a) + +## Release 7.13.1 + +- Added port in url for trace and logger messages + [#1126](https://github.com/elastic/elasticsearch-php/pull/1126) +## Release 7.13.0 + +- (DOCS) Added the HTTP meta data section + [#1143](https://github.com/elastic/elasticsearch-php/pull/1143) +- Added support for API Compatibility Header + [#1142](https://github.com/elastic/elasticsearch-php/pull/1142) +- (DOCS) Added Helpers section to PHP book + [#1129](https://github.com/elastic/elasticsearch-php/pull/1129) +- Added the API description in phpdoc section for each endpoint + [9e05c81](https://github.com/elastic/elasticsearch-php/commit/9e05c8108b638b60cc676b6a4f4be97c7df9eb64) +- Usage of PHPUnit 9 only + migrated xml configurations + [038b5dd](https://github.com/elastic/elasticsearch-php/commit/038b5dd043dc76b20b9f5f265ea914a38d33568d) ## Release 7.12.0 - Updated the endpoints for ES 7.12 + removed cpliakas/git-wrapper diff --git a/README.md b/README.md index 7da624d98..d0030923a 100755 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ Table of Contents - [elasticsearch-php](#elasticsearch-php) * [Features](#features) * [Version Matrix](#version-matrix) + * [Compatibility](#compatibility) * [Documentation](#documentation) * [Installation via Composer](#installation-via-composer) * [PHP Version Requirement](#php-version-requirement) @@ -69,24 +70,31 @@ Features Version Matrix -------------- -| Elasticsearch Version | Elasticsearch-PHP Branch | -| --------------------- | ------------------------ | -| >= 7.x | 7.x | -| >= 6.6, < 7.0 | 6.7.x | -| >= 6.0, < 6.6 | 6.5.x | -| >= 5.0, < 6.0 | 5.0 | -| >= 2.0, < 5.0 | 1.0 or 2.0 | -| >= 1.0, < 2.0 | 1.0 or 2.0 | -| <= 0.90.x | 0.4 | - - - If you are using Elasticsearch 7.x you can use Elasticsearch-PHP 7.x branch - - If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch. - - If you are using Elasticsearch 6.0 to 6.5, use Elasticsearch-PHP 6.5.x branch. - - If you are using Elasticsearch 5.x, use Elasticsearch-PHP 5.0 branch. +| Elasticsearch-PHP Branch | PHP Version | +| ----------- | ------------------------ | +| >= 7.16.0, < 8.0.0 | >= 7.3.0, <= 8.1.99 | +| >= 7.12.0, < 8.0.0 | >= 7.3.0, <= 8.0.99 | +| >= 7.11.0, < 8.0.0 | >= 7.1.0, <= 8.0.99 | +| >= 7.0.0, < 7.11.0 | >= 7.1.0, < 8.0.0 | +| 6.x | >= 7.0.0, < 8.0.0 | +| 5.x | >= 5.6.6, < 8.0.0 | +| 2.x | >= 5.4.0, < 7.0.0 | +| 0.4, 1.x | >= 5.3.9, < 7.0.0 | + + - If you are using Elasticsearch 7.x, you can use Elasticsearch-PHP 7.x branch. + - If you are using Elasticsearch 6.x, you can use Elasticsearch-PHP 6.x branch. + - If you are using Elasticsearch 5.x, you can use Elasticsearch-PHP 6.x branch. - If you are using Elasticsearch 1.x or 2.x, prefer using the Elasticsearch-PHP 2.0 branch. The 1.0 branch is compatible however. - If you are using a version older than 1.0, you must install the `0.4` Elasticsearch-PHP branch. Since ES 0.90.x and below is now EOL, the corresponding `0.4` branch will not receive any more development or bugfixes. Please upgrade. - You should never use Elasticsearch-PHP Master branch, as it tracks Elasticsearch master and may contain incomplete features or breaks in backwards compatibility. Only use ES-PHP master if you are developing against ES master for some reason. +Compatibility +------------- + +Language clients are forward compatible; meaning that clients support communicating +with greater minor versions of Elasticsearch. Elastic language clients are also backwards +compatible with lesser supported minor Elasticsearch versions. + Documentation -------------- [Full documentation can be found here.](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html) Docs are stored within the repo under /docs/, so if you see a typo or problem, please submit a PR to fix it! diff --git a/composer.json b/composer.json index 83cd0e1c5..db3830754 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,10 @@ "description": "PHP Client for Elasticsearch", "keywords": ["search","client", "elasticsearch"], "type": "library", - "license": "Apache-2.0", + "license": [ + "Apache-2.0", + "LGPL-2.1-only" + ], "authors": [ { "name": "Zachary Tong" @@ -16,18 +19,16 @@ "php": "^7.3 || ^8.0", "ext-json": ">=1.3.7", "ezimuel/ringphp": "^1.1.2", - "psr/log": "~1.0" + "psr/log": "^1|^2|^3" }, "require-dev": { "ext-yaml": "*", "ext-zip": "*", - "doctrine/inflector": "^1.3", "mockery/mockery": "^1.2", - "phpstan/phpstan": "^0.12", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.3", "squizlabs/php_codesniffer": "^3.4", - "symfony/finder": "~4.0", - "symfony/yaml": "~4.0" + "symfony/finder": "~4.0" }, "suggest": { "ext-curl": "*", @@ -49,11 +50,14 @@ } }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "php-http/discovery": true + } }, "scripts": { "phpcs": [ - "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src", + "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp src --ignore=src/Elasticsearch/Endpoints", "phpcs --standard=ruleset.xml --extensions=php --encoding=utf-8 --tab-width=4 -sp tests --ignore=tests/Elasticsearch/Tests/Yaml" ], "phpstan": [ diff --git a/docs/breaking-changes.asciidoc b/docs/breaking-changes.asciidoc index ff9a190bd..844a85906 100644 --- a/docs/breaking-changes.asciidoc +++ b/docs/breaking-changes.asciidoc @@ -1,8 +1,8 @@ [[breaking_changes]] -== Breaking changes from 6.x +=== Breaking changes from 6.x [discrete] -=== E_USER_DEPRECATED notice when using deprecated parameters +==== E_USER_DEPRECATED notice when using deprecated parameters Starting from elasticsearch-php 7.4.0, we generate a PHP https://www.php.net/manual/en/errorfunc.constants.php[E_USER_DEPRECATED] notice @@ -25,7 +25,7 @@ set_error_handler(function ($errno, $errstr) { ---- [discrete] -=== Moving from types to typeless APIs in {es} 7.0 +==== Moving from types to typeless APIs in {es} 7.0 {es} 7.0 deprecated APIs that accept types, introduced new typeless APIs, and removed support for the _default_ mapping. Read @@ -33,13 +33,13 @@ https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch- blog post for more information. [discrete] -=== Type hint and return type +==== Type hint and return type Added type hints and return type declarations in all the code base where possible. See PR https://github.com/elastic/elasticsearch-php/pull/897[#897]. [discrete] -=== PHP 7.1+ Requirement +==== PHP 7.1+ Requirement We require using PHP 7.1+ for elasticsearch-php. PHP 7.0 is not supported since 1st Jan 2019. Refer diff --git a/docs/build/Elasticsearch/Client.asciidoc b/docs/build/Elasticsearch/Client.asciidoc index 30143ca58..21dfde481 100644 --- a/docs/build/Elasticsearch/Client.asciidoc +++ b/docs/build/Elasticsearch/Client.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Client]] === Elasticsearch\Client Class Client -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -14,6 +20,7 @@ The class defines the following methods: * <> * <> +* <> * <> * <> * <> @@ -35,6 +42,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -50,32 +58,35 @@ The class defines the following methods: * <> * <> * <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> * <> * <> +* <> * <> +* <> +* <> * <> * <> * <> +* <> * <> * <> +* <> +* <> * <> +* <> * <> * <> * <> +* <> * <> * <> * <> * <> +* <> * <> * <> +* <> +* <> * <> * <> * <> @@ -86,7 +97,7 @@ The class defines the following methods: [[Elasticsearch_Clientbulk_bulk]] -.`bulk()` +.`bulk(array $params = [])` **** [source,php] ---- @@ -101,22 +112,16 @@ $params['_source'] = (list) True or false to return the _source f $params['_source_excludes'] = (list) Default list of fields to exclude from the returned _source field, can be overridden on each sub-request $params['_source_includes'] = (list) Default list of fields to extract and return from the _source field, can be overridden on each sub-request $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with +$params['require_alias'] = (boolean) Sets require_alias for all incoming documents. Defaults to unset (false) $params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->bulk($params); ---- **** [[Elasticsearch_ClientclearScroll_clearScroll]] -.`clearScroll()` +.`clearScroll(array $params = [])` **** [source,php] ---- @@ -124,20 +129,26 @@ $response = $client->bulk($params); $params['scroll_id'] = DEPRECATED (list) A comma-separated list of scroll IDs to clear $params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->clearScroll($params); + +[[Elasticsearch_ClientclosePointInTime_closePointInTime]] +.`closePointInTime(array $params = [])` +**** +[source,php] +---- +/* +$params['body'] = (array) a point-in-time id to close +*/ ---- **** [[Elasticsearch_Clientcount_count]] -.`count()` +.`count(array $params = [])` **** [source,php] ---- @@ -160,20 +171,13 @@ $params['lenient'] = (boolean) Specify whether format-based query fai $params['terminate_after'] = (number) The maximum count for each shard, upon reaching which the query execution will terminate early $params['body'] = (array) A query to restrict the results specified with the Query DSL (optional) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->count($params); ---- **** [[Elasticsearch_Clientcreate_create]] -.`create()` +.`create(array $params = [])` **** [source,php] ---- @@ -190,20 +194,13 @@ $params['version_type'] = (enum) Specific version type (Options = inte $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with $params['body'] = (array) The document (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->create($params); ---- **** [[Elasticsearch_Clientdelete_delete]] -.`delete()` +.`delete(array $params = [])` **** [source,php] ---- @@ -220,20 +217,13 @@ $params['if_primary_term'] = (number) only perform the delete operation i $params['version'] = (number) Explicit version number for concurrency control $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->delete($params); ---- **** [[Elasticsearch_ClientdeleteByQuery_deleteByQuery]] -.`deleteByQuery()` +.`deleteByQuery(array $params = [])` **** [source,php] ---- @@ -257,20 +247,13 @@ $params['scroll'] = (time) Specify how long a consistent view of $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->deleteByQuery($params); ---- **** [[Elasticsearch_ClientdeleteByQueryRethrottle_deleteByQueryRethrottle]] -.`deleteByQueryRethrottle()` +.`deleteByQueryRethrottle(array $params = [])` **** [source,php] ---- @@ -278,20 +261,13 @@ $response = $client->deleteByQuery($params); $params['task_id'] = (string) The task id to rethrottle $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->deleteByQueryRethrottle($params); ---- **** [[Elasticsearch_ClientdeleteScript_deleteScript]] -.`deleteScript()` +.`deleteScript(array $params = [])` **** [source,php] ---- @@ -300,20 +276,13 @@ $params['id'] = (string) Script ID $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->deleteScript($params); ---- **** [[Elasticsearch_Clientexists_exists]] -.`exists()` +.`exists(array $params = [])` **** [source,php] ---- @@ -332,20 +301,13 @@ $params['_source_includes'] = (list) A list of fields to extract and return from $params['version'] = (number) Explicit version number for concurrency control $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->exists($params); ---- **** [[Elasticsearch_ClientexistsSource_existsSource]] -.`existsSource()` +.`existsSource(array $params = [])` **** [source,php] ---- @@ -363,20 +325,13 @@ $params['_source_includes'] = (list) A list of fields to extract and return from $params['version'] = (number) Explicit version number for concurrency control $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->existsSource($params); ---- **** [[Elasticsearch_Clientexplain_explain]] -.`explain()` +.`explain(array $params = [])` **** [source,php] ---- @@ -398,20 +353,13 @@ $params['_source_excludes'] = (list) A list of fields to exclude from the return $params['_source_includes'] = (list) A list of fields to extract and return from the _source field $params['body'] = (array) The query definition using the Query DSL */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->explain($params); ---- **** [[Elasticsearch_ClientfieldCaps_fieldCaps]] -.`fieldCaps()` +.`fieldCaps(array $params = [])` **** [source,php] ---- @@ -424,20 +372,13 @@ $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to $params['include_unmapped'] = (boolean) Indicates whether unmapped fields should be included in the response. (Default = false) $params['body'] = (array) An index filter specified with the Query DSL */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->fieldCaps($params); ---- **** [[Elasticsearch_Clientget_get]] -.`get()` +.`get(array $params = [])` **** [source,php] ---- @@ -456,20 +397,13 @@ $params['_source_includes'] = (list) A list of fields to extract and return from $params['version'] = (number) Explicit version number for concurrency control $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->get($params); ---- **** [[Elasticsearch_ClientgetScript_getScript]] -.`getScript()` +.`getScript(array $params = [])` **** [source,php] ---- @@ -477,60 +411,39 @@ $response = $client->get($params); $params['id'] = (string) Script ID $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->getScript($params); ---- **** [[Elasticsearch_ClientgetScriptContext_getScriptContext]] -.`getScriptContext()` +.`getScriptContext(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->getScriptContext($params); ---- **** [[Elasticsearch_ClientgetScriptLanguages_getScriptLanguages]] -.`getScriptLanguages()` +.`getScriptLanguages(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->getScriptLanguages($params); ---- **** [[Elasticsearch_ClientgetSource_getSource]] -.`getSource()` +.`getSource(array $params = [])` **** [source,php] ---- @@ -548,20 +461,13 @@ $params['_source_includes'] = (list) A list of fields to extract and return from $params['version'] = (number) Explicit version number for concurrency control $params['version_type'] = (enum) Specific version type (Options = internal,external,external_gte,force) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->getSource($params); ---- **** [[Elasticsearch_Clientindex_index]] -.`index()` +.`index(array $params = [])` **** [source,php] ---- @@ -579,41 +485,28 @@ $params['version_type'] = (enum) Specific version type (Options = inte $params['if_seq_no'] = (number) only perform the index operation if the last operation that has changed the document has the specified sequence number $params['if_primary_term'] = (number) only perform the index operation if the last operation that has changed the document has the specified primary term $params['pipeline'] = (string) The pipeline id to preprocess incoming documents with +$params['require_alias'] = (boolean) When true, requires destination to be an alias. Default is false $params['body'] = (array) The document (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->index($params); ---- **** [[Elasticsearch_Clientinfo_info]] -.`info()` +.`info(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->info($params); ---- **** [[Elasticsearch_Clientmget_mget]] -.`mget()` +.`mget(array $params = [])` **** [source,php] ---- @@ -630,20 +523,13 @@ $params['_source_excludes'] = (list) A list of fields to exclude from the return $params['_source_includes'] = (list) A list of fields to extract and return from the _source field $params['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->mget($params); ---- **** [[Elasticsearch_Clientmsearch_msearch]] -.`msearch()` +.`msearch(array $params = [])` **** [source,php] ---- @@ -655,20 +541,13 @@ $params['max_concurrent_searches'] = (number) Controls the maximum number $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->msearch($params); ---- **** [[Elasticsearch_ClientmsearchTemplate_msearchTemplate]] -.`msearchTemplate()` +.`msearchTemplate(array $params = [])` **** [source,php] ---- @@ -682,59 +561,56 @@ $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total shou $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true) $params['body'] = (array) The request definitions (metadata-search request definition pairs), separated by newlines (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->msearchTemplate($params); ---- **** [[Elasticsearch_Clientmtermvectors_mtermvectors]] -.`mtermvectors()` +.`mtermvectors(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The index in which the document resides. */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->mtermvectors($params); + +[[Elasticsearch_ClientopenPointInTime_openPointInTime]] +.`openPointInTime(array $params = [])` +**** +[source,php] +---- +/* +$params['index'] = (list) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices +$params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) +$params['routing'] = (string) Specific routing value +$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) +$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) +$params['keep_alive'] = (string) Specific the time to live for the point in time +*/ ---- **** [[Elasticsearch_Clientping_ping]] -.`ping()` +.`ping(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ping($params); ---- **** [[Elasticsearch_ClientputScript_putScript]] -.`putScript()` +.`putScript(array $params = [])` **** [source,php] ---- @@ -745,20 +621,13 @@ $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) The document (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->putScript($params); ---- **** [[Elasticsearch_ClientrankEval_rankEval]] -.`rankEval()` +.`rankEval(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -771,20 +640,13 @@ $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) $params['body'] = (array) The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rankEval($params); ---- **** [[Elasticsearch_Clientreindex_reindex]] -.`reindex()` +.`reindex(array $params = [])` **** [source,php] ---- @@ -799,20 +661,13 @@ $params['slices'] = (number|string) The number of slices this ta $params['max_docs'] = (number) Maximum number of documents to process (default: all documents) $params['body'] = (array) The search definition using the Query DSL and the prototype for the index request. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->reindex($params); ---- **** [[Elasticsearch_ClientreindexRethrottle_reindexRethrottle]] -.`reindexRethrottle()` +.`reindexRethrottle(array $params = [])` **** [source,php] ---- @@ -820,20 +675,13 @@ $response = $client->reindex($params); $params['task_id'] = (string) The task id to rethrottle $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->reindexRethrottle($params); ---- **** [[Elasticsearch_ClientrenderSearchTemplate_renderSearchTemplate]] -.`renderSearchTemplate()` +.`renderSearchTemplate(array $params = [])` **** [source,php] ---- @@ -841,20 +689,13 @@ $response = $client->reindexRethrottle($params); $params['id'] = (string) The id of the stored search template $params['body'] = (array) The search definition template and its params */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->renderSearchTemplate($params); ---- **** [[Elasticsearch_ClientscriptsPainlessExecute_scriptsPainlessExecute]] -.`scriptsPainlessExecute()` +.`scriptsPainlessExecute(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -862,20 +703,13 @@ $response = $client->renderSearchTemplate($params); /* $params['body'] = (array) The script to execute */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->scriptsPainlessExecute($params); ---- **** [[Elasticsearch_Clientscroll_scroll]] -.`scroll()` +.`scroll(array $params = [])` **** [source,php] ---- @@ -885,20 +719,13 @@ $params['scroll'] = (time) Specify how long a consistent view of $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false) $params['body'] = (array) The scroll ID if not passed by URL or query parameter. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->scroll($params); ---- **** [[Elasticsearch_Clientsearch_search]] -.`search()` +.`search(array $params = [])` **** [source,php] ---- @@ -931,20 +758,13 @@ $params['_source_excludes'] = (list) A list of fields to exclude fr $params['_source_includes'] = (list) A list of fields to extract and return from the _source field $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->search($params); ---- **** [[Elasticsearch_ClientsearchShards_searchShards]] -.`searchShards()` +.`searchShards(array $params = [])` **** [source,php] ---- @@ -957,20 +777,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchShards($params); ---- **** [[Elasticsearch_ClientsearchTemplate_searchTemplate]] -.`searchTemplate()` +.`searchTemplate(array $params = [])` **** [source,php] ---- @@ -992,20 +805,13 @@ $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total shou $params['ccs_minimize_roundtrips'] = (boolean) Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution (Default = true) $params['body'] = (array) The search definition template and its params (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchTemplate($params); ---- **** [[Elasticsearch_Clienttermvectors_termvectors]] -.`termvectors()` +.`termvectors(array $params = [])` **** [source,php] ---- @@ -1013,20 +819,13 @@ $response = $client->searchTemplate($params); $params['index'] = (string) The index in which the document resides. (Required) $params['id'] = (string) The id of the document, when not specified a doc param should be supplied. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->termvectors($params); ---- **** [[Elasticsearch_Clientupdate_update]] -.`update()` +.`update(array $params = [])` **** [source,php] ---- @@ -1045,22 +844,16 @@ $params['routing'] = (string) Specific routing value $params['timeout'] = (time) Explicit operation timeout $params['if_seq_no'] = (number) only perform the update operation if the last operation that has changed the document has the specified sequence number $params['if_primary_term'] = (number) only perform the update operation if the last operation that has changed the document has the specified primary term +$params['require_alias'] = (boolean) When true, requires destination is an alias. Default is false $params['body'] = (array) The request definition requires either `script` or partial `doc` (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->update($params); ---- **** [[Elasticsearch_ClientupdateByQuery_updateByQuery]] -.`updateByQuery()` +.`updateByQuery(array $params = [])` **** [source,php] ---- @@ -1085,20 +878,13 @@ $params['scroll'] = (time) Specify how long a consistent view of $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) $params['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->updateByQuery($params); ---- **** [[Elasticsearch_ClientupdateByQueryRethrottle_updateByQueryRethrottle]] -.`updateByQueryRethrottle()` +.`updateByQueryRethrottle(array $params = [])` **** [source,php] ---- @@ -1106,393 +892,266 @@ $response = $client->updateByQuery($params); $params['task_id'] = (string) The task id to rethrottle $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->updateByQueryRethrottle($params); ---- **** -[[Elasticsearch_Clientcat_cat]] -.`cat()` +[[Elasticsearch_ClientasyncSearch_asyncSearch]] +.`asyncSearch()` **** [source,php] ---- /* +Returns the asyncSearch namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat(); ---- **** -[[Elasticsearch_Clientcluster_cluster]] -.`cluster()` +[[Elasticsearch_Clientautoscaling_autoscaling]] +.`autoscaling()` **** [source,php] ---- /* +Returns the autoscaling namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster(); ---- **** -[[Elasticsearch_ClientdanglingIndices_danglingIndices]] -.`danglingIndices()` +[[Elasticsearch_Clientcat_cat]] +.`cat()` **** [source,php] ---- /* +Returns the cat namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->danglingIndices(); ---- **** -[[Elasticsearch_Clientindices_indices]] -.`indices()` +[[Elasticsearch_Clientccr_ccr]] +.`ccr()` **** [source,php] ---- /* +Returns the ccr namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices(); ---- **** -[[Elasticsearch_Clientingest_ingest]] -.`ingest()` +[[Elasticsearch_Clientcluster_cluster]] +.`cluster()` **** [source,php] ---- /* +Returns the cluster namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest(); ---- **** -[[Elasticsearch_Clientnodes_nodes]] -.`nodes()` +[[Elasticsearch_ClientdanglingIndices_danglingIndices]] +.`danglingIndices()` **** [source,php] ---- /* +Returns the danglingIndices namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes(); ---- **** -[[Elasticsearch_Clientsnapshot_snapshot]] -.`snapshot()` +[[Elasticsearch_ClientdataFrameTransformDeprecated_dataFrameTransformDeprecated]] +.`dataFrameTransformDeprecated()` **** [source,php] ---- /* +Returns the dataFrameTransformDeprecated namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot(); ---- **** -[[Elasticsearch_Clienttasks_tasks]] -.`tasks()` +[[Elasticsearch_Clientenrich_enrich]] +.`enrich()` **** [source,php] ---- /* +Returns the enrich namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->tasks(); ---- **** -[[Elasticsearch_ClientasyncSearch_asyncSearch]] -.`asyncSearch()` +[[Elasticsearch_Clienteql_eql]] +.`eql()` **** [source,php] ---- /* +Returns the eql namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->asyncSearch(); ---- **** -[[Elasticsearch_Clientautoscaling_autoscaling]] -.`autoscaling()` +[[Elasticsearch_Clientfeatures_features]] +.`features()` **** [source,php] ---- /* +Returns the features namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->autoscaling(); ---- **** -[[Elasticsearch_Clientccr_ccr]] -.`ccr()` +[[Elasticsearch_Clientgraph_graph]] +.`graph()` **** [source,php] ---- /* +Returns the graph namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr(); ---- **** -[[Elasticsearch_ClientdataFrameTransformDeprecated_dataFrameTransformDeprecated]] -.`dataFrameTransformDeprecated()` +[[Elasticsearch_Clientilm_ilm]] +.`ilm()` **** [source,php] ---- /* +Returns the ilm namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataFrameTransformDeprecated(); ---- **** -[[Elasticsearch_Clientenrich_enrich]] -.`enrich()` +[[Elasticsearch_Clientindices_indices]] +.`indices()` **** [source,php] ---- /* +Returns the indices namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich(); ---- **** -[[Elasticsearch_Clienteql_eql]] -.`eql()` +[[Elasticsearch_Clientingest_ingest]] +.`ingest()` **** [source,php] ---- /* +Returns the ingest namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->eql(); ---- **** -[[Elasticsearch_Clientgraph_graph]] -.`graph()` +[[Elasticsearch_Clientlicense_license]] +.`license()` **** [source,php] ---- /* +Returns the license namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->graph(); ---- **** -[[Elasticsearch_Clientilm_ilm]] -.`ilm()` +[[Elasticsearch_Clientlogstash_logstash]] +.`logstash()` **** [source,php] ---- /* +Returns the logstash namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm(); ---- **** -[[Elasticsearch_Clientlicense_license]] -.`license()` +[[Elasticsearch_Clientmigration_migration]] +.`migration()` **** [source,php] ---- /* +Returns the migration namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license(); ---- **** -[[Elasticsearch_Clientmigration_migration]] -.`migration()` +[[Elasticsearch_Clientml_ml]] +.`ml()` **** [source,php] ---- /* +Returns the ml namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->migration(); ---- **** -[[Elasticsearch_Clientml_ml]] -.`ml()` +[[Elasticsearch_Clientmonitoring_monitoring]] +.`monitoring()` **** [source,php] ---- /* +Returns the monitoring namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml(); ---- **** -[[Elasticsearch_Clientmonitoring_monitoring]] -.`monitoring()` +[[Elasticsearch_Clientnodes_nodes]] +.`nodes()` **** [source,php] ---- /* +Returns the nodes namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->monitoring(); ---- **** @@ -1504,14 +1163,8 @@ $response = $client->monitoring(); [source,php] ---- /* +Returns the rollup namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup(); ---- **** @@ -1523,14 +1176,8 @@ $response = $client->rollup(); [source,php] ---- /* +Returns the searchableSnapshots namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchableSnapshots(); ---- **** @@ -1542,14 +1189,8 @@ $response = $client->searchableSnapshots(); [source,php] ---- /* +Returns the security namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security(); ---- **** @@ -1561,14 +1202,21 @@ $response = $client->security(); [source,php] ---- /* +Returns the slm namespace */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->slm(); + +[[Elasticsearch_Clientsnapshot_snapshot]] +.`snapshot()` +**** +[source,php] +---- +/* +Returns the snapshot namespace +*/ ---- **** @@ -1580,14 +1228,8 @@ $response = $client->slm(); [source,php] ---- /* +Returns the sql namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->sql(); ---- **** @@ -1599,33 +1241,47 @@ $response = $client->sql(); [source,php] ---- /* +Returns the ssl namespace */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->ssl(); +[[Elasticsearch_Clienttasks_tasks]] +.`tasks()` +**** +[source,php] +---- +/* +Returns the tasks namespace +*/ ---- **** -[[Elasticsearch_Clienttransform_transform]] -.`transform()` +[[Elasticsearch_ClienttextStructure_textStructure]] +.`textStructure()` **** [source,php] ---- /* +Returns the textStructure namespace */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->transform(); +[[Elasticsearch_Clienttransform_transform]] +.`transform()` +**** +[source,php] +---- +/* +Returns the transform namespace +*/ ---- **** @@ -1637,14 +1293,8 @@ $response = $client->transform(); [source,php] ---- /* +Returns the watcher namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher(); ---- **** @@ -1656,53 +1306,34 @@ $response = $client->watcher(); [source,php] ---- /* +Returns the xpack namespace */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->xpack(); ---- **** [[Elasticsearch_Client-call-_call]] -.`__call()` +.`__call(string $name, array $arguments)` **** [source,php] ---- /* Catchall for registered namespaces */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->__call($name,$arguments); ---- **** [[Elasticsearch_ClientextractArgument_extractArgument]] -.`extractArgument()` +.`extractArgument(array $params, string $arg)` **** [source,php] ---- /* +Extract an argument from the array of parameters */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->extractArgument($params,$arg); ---- **** diff --git a/docs/build/Elasticsearch/ClientBuilder.asciidoc b/docs/build/Elasticsearch/ClientBuilder.asciidoc index 82084cdc3..a27b7cd03 100644 --- a/docs/build/Elasticsearch/ClientBuilder.asciidoc +++ b/docs/build/Elasticsearch/ClientBuilder.asciidoc @@ -1,4 +1,5 @@ -[discrete] + + [[Elasticsearch_ClientBuilder]] === Elasticsearch\ClientBuilder @@ -37,6 +38,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -49,8 +51,8 @@ The class defines the following methods: [source,php] ---- /* +Create an instance of ClientBuilder */ - ---- **** @@ -62,9 +64,8 @@ The class defines the following methods: [source,php] ---- /* - Can supply first parm to Client::__construct() when invoking manually or with dependency injection +Can supply first parm to Client::__construct() when invoking manually or with dependency injection */ - ---- **** @@ -76,9 +77,8 @@ The class defines the following methods: [source,php] ---- /* - Can supply second parm to Client::__construct() when invoking manually or with dependency injection +Can supply second parm to Client::__construct() when invoking manually or with dependency injection */ - ---- **** @@ -90,51 +90,49 @@ The class defines the following methods: [source,php] ---- /* - Can supply third parm to Client::__construct() when invoking manually or with dependency injection +Can supply third parm to Client::__construct() when invoking manually or with dependency injection */ - ---- **** [[Elasticsearch_ClientBuilderfromConfig_fromConfig]] -.`fromConfig()` +.`fromConfig(array $config, bool $quiet = false)` **** [source,php] ---- /* - Build a new client from the provided config. Hash keys +Build a new client from the provided config. Hash keys should correspond to the method name e.g. ['connectionPool'] corresponds to setConnectionPool(). */ - ---- **** [[Elasticsearch_ClientBuilderdefaultHandler_defaultHandler]] -.`defaultHandler()` +.`defaultHandler(array $multiParams = [], array $singleParams = [])` **** [source,php] ---- /* +Get the default handler */ - ---- **** [[Elasticsearch_ClientBuildermultiHandler_multiHandler]] -.`multiHandler()` +.`multiHandler(array $params = [])` **** [source,php] ---- /* +Get the multi handler for async (CurlMultiHandler) */ - ---- **** @@ -146,285 +144,294 @@ corresponds to setConnectionPool(). [source,php] ---- /* +Get the handler instance (CurlHandler) */ - ---- **** [[Elasticsearch_ClientBuildersetConnectionFactory_setConnectionFactory]] -.`setConnectionFactory()` +.`setConnectionFactory(Elasticsearch\Connections\ConnectionFactoryInterface $connectionFactory)` **** [source,php] ---- /* +Set connection Factory */ - ---- **** [[Elasticsearch_ClientBuildersetConnectionPool_setConnectionPool]] -.`setConnectionPool()` +.`setConnectionPool(AbstractConnectionPool|string $connectionPool, array $args = [])` **** [source,php] ---- /* +Set the connection pool (default is StaticNoPingConnectionPool) */ - ---- **** [[Elasticsearch_ClientBuildersetEndpoint_setEndpoint]] -.`setEndpoint()` +.`setEndpoint(callable $endpoint)` **** [source,php] ---- /* +Set the endpoint */ - ---- **** [[Elasticsearch_ClientBuilderregisterNamespace_registerNamespace]] -.`registerNamespace()` +.`registerNamespace(Elasticsearch\Namespaces\NamespaceBuilderInterface $namespaceBuilder)` **** [source,php] ---- /* +Register namespace */ - ---- **** [[Elasticsearch_ClientBuildersetTransport_setTransport]] -.`setTransport()` +.`setTransport(Elasticsearch\Transport $transport)` **** [source,php] ---- /* +Set the transport */ - ---- **** [[Elasticsearch_ClientBuildersetHandler_setHandler]] -.`setHandler()` +.`setHandler(mixed $handler)` **** [source,php] ---- /* +Set the HTTP handler (cURL is default) */ - ---- **** [[Elasticsearch_ClientBuildersetLogger_setLogger]] -.`setLogger()` +.`setLogger(Psr\Log\LoggerInterface $logger)` **** [source,php] ---- /* +Set the PSR-3 Logger */ - ---- **** [[Elasticsearch_ClientBuildersetTracer_setTracer]] -.`setTracer()` +.`setTracer(Psr\Log\LoggerInterface $tracer)` **** [source,php] ---- /* +Set the PSR-3 tracer */ - ---- **** [[Elasticsearch_ClientBuildersetSerializer_setSerializer]] -.`setSerializer()` +.`setSerializer(Elasticsearch\Serializers\SerializerInterface|string $serializer)` **** [source,php] ---- /* +Set the serializer */ - ---- **** [[Elasticsearch_ClientBuildersetHosts_setHosts]] -.`setHosts()` +.`setHosts(array $hosts)` **** [source,php] ---- /* +Set the hosts (nodes) */ - ---- **** [[Elasticsearch_ClientBuildersetApiKey_setApiKey]] -.`setApiKey()` +.`setApiKey(string $id, string $apiKey)` **** [source,php] ---- /* - Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key +Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key */ - ---- **** [[Elasticsearch_ClientBuildersetBasicAuthentication_setBasicAuthentication]] -.`setBasicAuthentication()` +.`setBasicAuthentication(string $username, string $password)` **** [source,php] ---- /* - Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key +Set Basic access authentication */ - ---- **** [[Elasticsearch_ClientBuildersetElasticCloudId_setElasticCloudId]] -.`setElasticCloudId()` +.`setElasticCloudId(string $cloudId)` **** [source,php] ---- /* - Set Elastic Cloud ID to connect to Elastic Cloud +Set Elastic Cloud ID to connect to Elastic Cloud */ - ---- **** [[Elasticsearch_ClientBuildersetConnectionParams_setConnectionParams]] -.`setConnectionParams()` +.`setConnectionParams(array $params)` **** [source,php] ---- /* +Set connection parameters */ - ---- **** [[Elasticsearch_ClientBuildersetRetries_setRetries]] -.`setRetries()` +.`setRetries(int $retries)` **** [source,php] ---- /* +Set number or retries (default is equal to number of nodes) */ - ---- **** [[Elasticsearch_ClientBuildersetSelector_setSelector]] -.`setSelector()` +.`setSelector(Elasticsearch\ConnectionPool\Selectors\SelectorInterface|string $selector)` **** [source,php] ---- /* +Set the selector algorithm */ - ---- **** [[Elasticsearch_ClientBuildersetSniffOnStart_setSniffOnStart]] -.`setSniffOnStart()` +.`setSniffOnStart(bool $sniffOnStart)` **** [source,php] ---- /* +Set sniff on start */ - ---- **** [[Elasticsearch_ClientBuildersetSSLCert_setSSLCert]] -.`setSSLCert()` +.`setSSLCert(string $cert, string $password = null)` **** [source,php] ---- /* +Set SSL certificate */ - ---- **** [[Elasticsearch_ClientBuildersetSSLKey_setSSLKey]] -.`setSSLKey()` +.`setSSLKey(string $key, string $password = null)` **** [source,php] ---- /* +Set SSL key */ - ---- **** [[Elasticsearch_ClientBuildersetSSLVerification_setSSLVerification]] -.`setSSLVerification()` +.`setSSLVerification(bool|string $value = true)` **** [source,php] ---- /* +Set SSL verification */ +---- +**** + + +[[Elasticsearch_ClientBuildersetElasticMetaHeader_setElasticMetaHeader]] +.`setElasticMetaHeader($value = true)` +**** +[source,php] +---- +/* +Set or disable the x-elastic-client-meta header +*/ ---- **** [[Elasticsearch_ClientBuilderincludePortInHostHeader_includePortInHostHeader]] -.`includePortInHostHeader()` +.`includePortInHostHeader(bool $enable)` **** [source,php] ---- /* - Include the port in Host header +Include the port in Host header */ - ---- **** @@ -436,21 +443,20 @@ corresponds to setConnectionPool(). [source,php] ---- /* +Build and returns the Client object */ - ---- **** [[Elasticsearch_ClientBuilderinstantiate_instantiate]] -.`instantiate()` +.`instantiate(Elasticsearch\Transport $transport, callable $endpoint, array $registeredNamespaces)` **** [source,php] ---- /* */ - ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc index 2bb5a3896..54344a4ed 100644 --- a/docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/AsyncSearchNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_AsyncSearchNamespace]] === Elasticsearch\Namespaces\AsyncSearchNamespace Class AsyncSearchNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -15,32 +20,26 @@ The class defines the following methods: * <> * <> +* <> * <> [[Elasticsearch_Namespaces_AsyncSearchNamespacedelete_delete]] -.`delete()` +.`delete(array $params = [])` **** [source,php] ---- /* $params['id'] = (string) The async search ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->asyncsearch()->delete($params); ---- **** [[Elasticsearch_Namespaces_AsyncSearchNamespaceget_get]] -.`get()` +.`get(array $params = [])` **** [source,php] ---- @@ -50,20 +49,26 @@ $params['wait_for_completion_timeout'] = (time) Specify the time that the reques $params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->asyncsearch()->get($params); +[[Elasticsearch_Namespaces_AsyncSearchNamespacestatus_status]] +.`status(array $params = [])` +**** +[source,php] +---- +/* +$params['id'] = (string) The async search ID +*/ ---- **** [[Elasticsearch_Namespaces_AsyncSearchNamespacesubmit_submit]] -.`submit()` +.`submit(array $params = [])` **** [source,php] ---- @@ -98,13 +103,6 @@ $params['_source_excludes'] = (list) A list of fields to exclude fr $params['_source_includes'] = (list) A list of fields to extract and return from the _source field $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->asyncsearch()->submit($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc index d7f1f46b4..869cb6106 100644 --- a/docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/AutoscalingNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_AutoscalingNamespace]] === Elasticsearch\Namespaces\AutoscalingNamespace Class AutoscalingNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -14,76 +19,52 @@ Generated running $ php util/GenerateEndpoints.php 7.9 The class defines the following methods: * <> -* <> +* <> * <> * <> [[Elasticsearch_Namespaces_AutoscalingNamespacedeleteAutoscalingPolicy_deleteAutoscalingPolicy]] -.`deleteAutoscalingPolicy()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`deleteAutoscalingPolicy(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) the name of the autoscaling policy */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->autoscaling()->deleteAutoscalingPolicy($params); ---- **** -[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingDecision_getAutoscalingDecision]] -.`getAutoscalingDecision()` +[[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingCapacity_getAutoscalingCapacity]] +.`getAutoscalingCapacity(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->autoscaling()->getAutoscalingDecision($params); ---- **** [[Elasticsearch_Namespaces_AutoscalingNamespacegetAutoscalingPolicy_getAutoscalingPolicy]] -.`getAutoscalingPolicy()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getAutoscalingPolicy(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) the name of the autoscaling policy */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->autoscaling()->getAutoscalingPolicy($params); ---- **** [[Elasticsearch_Namespaces_AutoscalingNamespaceputAutoscalingPolicy_putAutoscalingPolicy]] -.`putAutoscalingPolicy()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`putAutoscalingPolicy(array $params = [])` **** [source,php] ---- @@ -91,13 +72,6 @@ $response = $client->autoscaling()->getAutoscalingPolicy($params); $params['name'] = (string) the name of the autoscaling policy $params['body'] = (array) the specification of the autoscaling policy (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->autoscaling()->putAutoscalingPolicy($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/CatNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/CatNamespace.asciidoc index b53d13c5f..81a1f6e45 100644 --- a/docs/build/Elasticsearch/Namespaces/CatNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/CatNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_CatNamespace]] === Elasticsearch\Namespaces\CatNamespace Class CatNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -20,6 +26,10 @@ The class defines the following methods: * <> * <> * <> +* <> +* <> +* <> +* <> * <> * <> * <> @@ -32,16 +42,12 @@ The class defines the following methods: * <> * <> * <> -* <> -* <> -* <> -* <> * <> [[Elasticsearch_Namespaces_CatNamespacealiases_aliases]] -.`aliases()` +.`aliases(array $params = [])` **** [source,php] ---- @@ -55,20 +61,13 @@ $params['s'] = (list) Comma-separated list of column names or col $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->aliases($params); ---- **** [[Elasticsearch_Namespaces_CatNamespaceallocation_allocation]] -.`allocation()` +.`allocation(array $params = [])` **** [source,php] ---- @@ -83,20 +82,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->allocation($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacecount_count]] -.`count()` +.`count(array $params = [])` **** [source,php] ---- @@ -108,20 +100,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->count($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacefielddata_fielddata]] -.`fielddata()` +.`fielddata(array $params = [])` **** [source,php] ---- @@ -134,20 +119,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->fielddata($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacehealth_health]] -.`health()` +.`health(array $params = [])` **** [source,php] ---- @@ -160,20 +138,13 @@ $params['time'] = (enum) The unit in which to display time values (Options = d $params['ts'] = (boolean) Set to false to disable timestamping (Default = true) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->health($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacehelp_help]] -.`help()` +.`help(array $params = [])` **** [source,php] ---- @@ -181,20 +152,13 @@ $response = $client->cat()->health($params); $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->help($params); ---- **** [[Elasticsearch_Namespaces_CatNamespaceindices_indices]] -.`indices()` +.`indices(array $params = [])` **** [source,php] ---- @@ -214,20 +178,13 @@ $params['v'] = (boolean) Verbose mode. Display column he $params['include_unloaded_segments'] = (boolean) If set to true segment stats will include stats for segments that are not currently loaded into memory (Default = false) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->indices($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacemaster_master]] -.`master()` +.`master(array $params = [])` **** [source,php] ---- @@ -240,75 +197,100 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->master($params); ---- **** -[[Elasticsearch_Namespaces_CatNamespacenodeattrs_nodeattrs]] -.`nodeattrs()` +[[Elasticsearch_Namespaces_CatNamespacemlDataFrameAnalytics_mlDataFrameAnalytics]] +.`mlDataFrameAnalytics(array $params = [])` **** [source,php] ---- /* +$params['id'] = (string) The ID of the data frame analytics to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) +$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) $params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) -$params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['h'] = (list) Comma-separated list of column names to display $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->cat()->nodeattrs($params); +[[Elasticsearch_Namespaces_CatNamespacemlDatafeeds_mlDatafeeds]] +.`mlDatafeeds(array $params = [])` +**** +[source,php] +---- +/* +$params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +$params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +$params['format'] = (string) a short version of the Accept header, e.g. json, yaml +$params['h'] = (list) Comma-separated list of column names to display +$params['help'] = (boolean) Return help information (Default = false) +$params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) +$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) +*/ ---- **** -[[Elasticsearch_Namespaces_CatNamespacenodes_nodes]] -.`nodes()` +[[Elasticsearch_Namespaces_CatNamespacemlJobs_mlJobs]] +.`mlJobs(array $params = [])` **** [source,php] ---- /* +$params['job_id'] = (string) The ID of the jobs stats to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) $params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false) -$params['local'] = (boolean) Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) -$params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['h'] = (list) Comma-separated list of column names to display $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->cat()->nodes($params); + +[[Elasticsearch_Namespaces_CatNamespacemlTrainedModels_mlTrainedModels]] +.`mlTrainedModels(array $params = [])` +**** +[source,php] +---- +/* +$params['model_id'] = (string) The ID of the trained models stats to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) +$params['from'] = (int) skips a number of trained models (Default = 0) +$params['size'] = (int) specifies a max number of trained models to get (Default = 100) +$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) +$params['format'] = (string) a short version of the Accept header, e.g. json, yaml +$params['h'] = (list) Comma-separated list of column names to display +$params['help'] = (boolean) Return help information (Default = false) +$params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) +$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) +*/ ---- **** -[[Elasticsearch_Namespaces_CatNamespacependingTasks_pendingTasks]] -.`pendingTasks()` +[[Elasticsearch_Namespaces_CatNamespacenodeattrs_nodeattrs]] +.`nodeattrs(array $params = [])` **** [source,php] ---- @@ -319,23 +301,37 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection to $params['h'] = (list) Comma-separated list of column names to display $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by -$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->cat()->pendingTasks($params); +[[Elasticsearch_Namespaces_CatNamespacenodes_nodes]] +.`nodes(array $params = [])` +**** +[source,php] +---- +/* +$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) +$params['format'] = (string) a short version of the Accept header, e.g. json, yaml +$params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false) +$params['local'] = (boolean) Calculate the selected nodes using the local cluster state rather than the state from master node (default: false) +$params['master_timeout'] = (time) Explicit operation timeout for connection to master node +$params['h'] = (list) Comma-separated list of column names to display +$params['help'] = (boolean) Return help information (Default = false) +$params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) +$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) +*/ ---- **** -[[Elasticsearch_Namespaces_CatNamespaceplugins_plugins]] -.`plugins()` +[[Elasticsearch_Namespaces_CatNamespacependingTasks_pendingTasks]] +.`pendingTasks(array $params = [])` **** [source,php] ---- @@ -346,22 +342,36 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection to $params['h'] = (list) Comma-separated list of column names to display $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->cat()->plugins($params); +[[Elasticsearch_Namespaces_CatNamespaceplugins_plugins]] +.`plugins(array $params = [])` +**** +[source,php] +---- +/* +$params['format'] = (string) a short version of the Accept header, e.g. json, yaml +$params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) +$params['master_timeout'] = (time) Explicit operation timeout for connection to master node +$params['h'] = (list) Comma-separated list of column names to display +$params['help'] = (boolean) Return help information (Default = false) +$params['include_bootstrap'] = (boolean) Include bootstrap plugins in the response (Default = false) +$params['s'] = (list) Comma-separated list of column names or column aliases to sort by +$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) +*/ ---- **** [[Elasticsearch_Namespaces_CatNamespacerecovery_recovery]] -.`recovery()` +.`recovery(array $params = [])` **** [source,php] ---- @@ -377,20 +387,13 @@ $params['s'] = (list) Comma-separated list of column names or column a $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->recovery($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacerepositories_repositories]] -.`repositories()` +.`repositories(array $params = [])` **** [source,php] ---- @@ -403,20 +406,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->repositories($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacesegments_segments]] -.`segments()` +.`segments(array $params = [])` **** [source,php] ---- @@ -429,20 +425,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->segments($params); ---- **** [[Elasticsearch_Namespaces_CatNamespaceshards_shards]] -.`shards()` +.`shards(array $params = [])` **** [source,php] ---- @@ -458,20 +447,13 @@ $params['s'] = (list) Comma-separated list of column names or colum $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->shards($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacesnapshots_snapshots]] -.`snapshots()` +.`snapshots(array $params = [])` **** [source,php] ---- @@ -486,42 +468,28 @@ $params['s'] = (list) Comma-separated list of column names or c $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->snapshots($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacetasks_tasks]] -.`tasks()` +.`tasks(array $params = [])` **** [source,php] ---- /* -$params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes -$params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. +$params['format'] = (string) a short version of the Accept header, e.g. json, yaml +$params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +$params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->tasks($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacetemplates_templates]] -.`templates()` +.`templates(array $params = [])` **** [source,php] ---- @@ -535,20 +503,13 @@ $params['help'] = (boolean) Return help information (Default = false) $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->templates($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacethreadPool_threadPool]] -.`threadPool()` +.`threadPool(array $params = [])` **** [source,php] ---- @@ -563,133 +524,13 @@ $params['help'] = (boolean) Return help information (Default = f $params['s'] = (list) Comma-separated list of column names or column aliases to sort by $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->threadPool($params); ----- -**** - - - -[[Elasticsearch_Namespaces_CatNamespacemlDataFrameAnalytics_mlDataFrameAnalytics]] -.`mlDataFrameAnalytics()` -**** -[source,php] ----- -/* -$params['id'] = (string) The ID of the data frame analytics to fetch -$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) -$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) -$params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['h'] = (list) Comma-separated list of column names to display -$params['help'] = (boolean) Return help information (Default = false) -$params['s'] = (list) Comma-separated list of column names or column aliases to sort by -$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) -$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->mlDataFrameAnalytics($params); ----- -**** - - - -[[Elasticsearch_Namespaces_CatNamespacemlDatafeeds_mlDatafeeds]] -.`mlDatafeeds()` -**** -[source,php] ----- -/* -$params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch -$params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) -$params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['h'] = (list) Comma-separated list of column names to display -$params['help'] = (boolean) Return help information (Default = false) -$params['s'] = (list) Comma-separated list of column names or column aliases to sort by -$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) -$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->mlDatafeeds($params); ----- -**** - - - -[[Elasticsearch_Namespaces_CatNamespacemlJobs_mlJobs]] -.`mlJobs()` -**** -[source,php] ----- -/* -$params['job_id'] = (string) The ID of the jobs stats to fetch -$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) -$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) -$params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['h'] = (list) Comma-separated list of column names to display -$params['help'] = (boolean) Return help information (Default = false) -$params['s'] = (list) Comma-separated list of column names or column aliases to sort by -$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) -$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->mlJobs($params); ----- -**** - - - -[[Elasticsearch_Namespaces_CatNamespacemlTrainedModels_mlTrainedModels]] -.`mlTrainedModels()` -**** -[source,php] ----- -/* -$params['model_id'] = (string) The ID of the trained models stats to fetch -$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) -$params['from'] = (int) skips a number of trained models (Default = 0) -$params['size'] = (int) specifies a max number of trained models to get (Default = 100) -$params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) -$params['format'] = (string) a short version of the Accept header, e.g. json, yaml -$params['h'] = (list) Comma-separated list of column names to display -$params['help'] = (boolean) Return help information (Default = false) -$params['s'] = (list) Comma-separated list of column names or column aliases to sort by -$params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) -$params['v'] = (boolean) Verbose mode. Display column headers (Default = false) -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->mlTrainedModels($params); ---- **** [[Elasticsearch_Namespaces_CatNamespacetransforms_transforms]] -.`transforms()` +.`transforms(array $params = [])` **** [source,php] ---- @@ -705,13 +546,6 @@ $params['s'] = (list) Comma-separated list of column names or colum $params['time'] = (enum) The unit in which to display time values (Options = d,h,m,s,ms,micros,nanos) $params['v'] = (boolean) Verbose mode. Display column headers (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cat()->transforms($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/CcrNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/CcrNamespace.asciidoc index d5405e80e..7003c839b 100644 --- a/docs/build/Elasticsearch/Namespaces/CcrNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/CcrNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_CcrNamespace]] === Elasticsearch\Namespaces\CcrNamespace Class CcrNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -30,27 +35,20 @@ The class defines the following methods: [[Elasticsearch_Namespaces_CcrNamespacedeleteAutoFollowPattern_deleteAutoFollowPattern]] -.`deleteAutoFollowPattern()` +.`deleteAutoFollowPattern(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the auto follow pattern. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->deleteAutoFollowPattern($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacefollow_follow]] -.`follow()` +.`follow(array $params = [])` **** [source,php] ---- @@ -59,60 +57,39 @@ $params['index'] = (string) The name of the follower index $params['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) (Default = 0) $params['body'] = (array) The name of the leader index and other optional ccr related parameters (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->follow($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacefollowInfo_followInfo]] -.`followInfo()` +.`followInfo(array $params = [])` **** [source,php] ---- /* $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->followInfo($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacefollowStats_followStats]] -.`followStats()` +.`followStats(array $params = [])` **** [source,php] ---- /* $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->followStats($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespaceforgetFollower_forgetFollower]] -.`forgetFollower()` +.`forgetFollower(array $params = [])` **** [source,php] ---- @@ -120,172 +97,109 @@ $response = $client->ccr()->followStats($params); $params['index'] = (string) the name of the leader index for which specified follower retention leases should be removed $params['body'] = (array) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->forgetFollower($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacegetAutoFollowPattern_getAutoFollowPattern]] -.`getAutoFollowPattern()` +.`getAutoFollowPattern(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the auto follow pattern. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->getAutoFollowPattern($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacepauseAutoFollowPattern_pauseAutoFollowPattern]] -.`pauseAutoFollowPattern()` +.`pauseAutoFollowPattern(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the auto follow pattern that should pause discovering new indices to follow. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->pauseAutoFollowPattern($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacepauseFollow_pauseFollow]] -.`pauseFollow()` +.`pauseFollow(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The name of the follower index that should pause following its leader index. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->pauseFollow($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespaceputAutoFollowPattern_putAutoFollowPattern]] -.`putAutoFollowPattern()` +.`putAutoFollowPattern(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the auto follow pattern. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->putAutoFollowPattern($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespaceresumeAutoFollowPattern_resumeAutoFollowPattern]] -.`resumeAutoFollowPattern()` +.`resumeAutoFollowPattern(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the auto follow pattern to resume discovering new indices to follow. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->resumeAutoFollowPattern($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespaceresumeFollow_resumeFollow]] -.`resumeFollow()` +.`resumeFollow(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The name of the follow index to resume following. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->resumeFollow($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->stats($params); ---- **** [[Elasticsearch_Namespaces_CcrNamespaceunfollow_unfollow]] -.`unfollow()` +.`unfollow(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The name of the follower index that should be turned into a regular index. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ccr()->unfollow($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/ClusterNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/ClusterNamespace.asciidoc index 75c5526fb..a4a954800 100644 --- a/docs/build/Elasticsearch/Namespaces/ClusterNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/ClusterNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_ClusterNamespace]] === Elasticsearch\Namespaces\ClusterNamespace Class ClusterNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -31,7 +37,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_ClusterNamespaceallocationExplain_allocationExplain]] -.`allocationExplain()` +.`allocationExplain(array $params = [])` **** [source,php] ---- @@ -40,21 +46,13 @@ $params['include_yes_decisions'] = (boolean) Return 'YES' decisions in explanati $params['include_disk_info'] = (boolean) Return information about disk usage and shard sizes (default: false) $params['body'] = (array) The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->allocationExplain($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacedeleteComponentTemplate_deleteComponentTemplate]] -.`deleteComponentTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`deleteComponentTemplate(array $params = [])` **** [source,php] ---- @@ -63,41 +61,26 @@ $params['name'] = (string) The name of the template $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->deleteComponentTemplate($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacedeleteVotingConfigExclusions_deleteVotingConfigExclusions]] -.`deleteVotingConfigExclusions()` +.`deleteVotingConfigExclusions(array $params = [])` **** [source,php] ---- /* $params['wait_for_removal'] = (boolean) Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. (Default = true) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->deleteVotingConfigExclusions($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespaceexistsComponentTemplate_existsComponentTemplate]] -.`existsComponentTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`existsComponentTemplate(array $params = [])` **** [source,php] ---- @@ -106,21 +89,13 @@ $params['name'] = (string) The name of the template $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->existsComponentTemplate($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacegetComponentTemplate_getComponentTemplate]] -.`getComponentTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getComponentTemplate(array $params = [])` **** [source,php] ---- @@ -129,20 +104,13 @@ $params['name'] = (list) The comma separated names of the component te $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->getComponentTemplate($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacegetSettings_getSettings]] -.`getSettings()` +.`getSettings(array $params = [])` **** [source,php] ---- @@ -152,20 +120,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection t $params['timeout'] = (time) Explicit operation timeout $params['include_defaults'] = (boolean) Whether to return all default clusters setting. (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->getSettings($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacehealth_health]] -.`health()` +.`health(array $params = [])` **** [source,php] ---- @@ -183,20 +144,13 @@ $params['wait_for_no_relocating_shards'] = (boolean) Whether to wait until the $params['wait_for_no_initializing_shards'] = (boolean) Whether to wait until there are no initializing shards in the cluster $params['wait_for_status'] = (enum) Wait until cluster is in a specific state (Options = green,yellow,red) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->health($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacependingTasks_pendingTasks]] -.`pendingTasks()` +.`pendingTasks(array $params = [])` **** [source,php] ---- @@ -204,41 +158,26 @@ $response = $client->cluster()->health($params); $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->pendingTasks($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacepostVotingConfigExclusions_postVotingConfigExclusions]] -.`postVotingConfigExclusions()` +.`postVotingConfigExclusions(array $params = [])` **** [source,php] ---- /* $params['node_ids'] = (string) A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->postVotingConfigExclusions($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespaceputComponentTemplate_putComponentTemplate]] -.`putComponentTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`putComponentTemplate(array $params = [])` **** [source,php] ---- @@ -249,20 +188,13 @@ $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) The template definition (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->putComponentTemplate($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespaceputSettings_putSettings]] -.`putSettings()` +.`putSettings(array $params = [])` **** [source,php] ---- @@ -272,39 +204,25 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection to $params['timeout'] = (time) Explicit operation timeout $params['body'] = (array) The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->putSettings($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespaceremoteInfo_remoteInfo]] -.`remoteInfo()` +.`remoteInfo(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->remoteInfo($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacereroute_reroute]] -.`reroute()` +.`reroute(array $params = [])` **** [source,php] ---- @@ -317,20 +235,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection to $params['timeout'] = (time) Explicit operation timeout $params['body'] = (array) The definition of `commands` to perform (`move`, `cancel`, `allocate`) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->reroute($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacestate_state]] -.`state()` +.`state(array $params = [])` **** [source,php] ---- @@ -346,20 +257,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indi $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->state($params); ---- **** [[Elasticsearch_Namespaces_ClusterNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- @@ -368,13 +272,6 @@ $params['node_id'] = (list) A comma-separated list of node IDs or names to $params['flat_settings'] = (boolean) Return settings in flat format (default: false) $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->cluster()->stats($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc index 14a630b11..15976aa09 100644 --- a/docs/build/Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_DanglingIndicesNamespace]] === Elasticsearch\Namespaces\DanglingIndicesNamespace Class DanglingIndicesNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -20,7 +25,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_DanglingIndicesNamespacedeleteDanglingIndex_deleteDanglingIndex]] -.`deleteDanglingIndex()` +.`deleteDanglingIndex(array $params = [])` **** [source,php] ---- @@ -30,20 +35,13 @@ $params['accept_data_loss'] = (boolean) Must be set to true in order to delete t $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->danglingindices()->deleteDanglingIndex($params); ---- **** [[Elasticsearch_Namespaces_DanglingIndicesNamespaceimportDanglingIndex_importDanglingIndex]] -.`importDanglingIndex()` +.`importDanglingIndex(array $params = [])` **** [source,php] ---- @@ -53,32 +51,18 @@ $params['accept_data_loss'] = (boolean) Must be set to true in order to import t $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->danglingindices()->importDanglingIndex($params); ---- **** [[Elasticsearch_Namespaces_DanglingIndicesNamespacelistDanglingIndices_listDanglingIndices]] -.`listDanglingIndices()` +.`listDanglingIndices(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->danglingindices()->listDanglingIndices($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc index 9324a071b..d0fe2f51f 100644 --- a/docs/build/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespace]] === Elasticsearch\Namespaces\DataFrameTransformDeprecatedNamespace Class DataFrameTransformDeprecatedNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -25,7 +30,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacedeleteTransform_deleteTransform]] -.`deleteTransform()` +.`deleteTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -34,44 +39,31 @@ The class defines the following methods: $params['transform_id'] = (string) The id of the transform to delete $params['force'] = (boolean) When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->deleteTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacegetTransform_getTransform]] -.`getTransform()` +.`getTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- /* -$params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms -$params['from'] = (int) skips a number of transform configs, defaults to 0 -$params['size'] = (int) specifies a max number of transforms to get, defaults to 100 -$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) +$params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms +$params['from'] = (int) skips a number of transform configs, defaults to 0 +$params['size'] = (int) specifies a max number of transforms to get, defaults to 100 +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) +$params['exclude_generated'] = (boolean) Omits generated fields. Allows transform configurations to be easily copied between clusters and within the same cluster (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->getTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacegetTransformStats_getTransformStats]] -.`getTransformStats()` +.`getTransformStats(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -82,39 +74,25 @@ $params['from'] = (number) skips a number of transform stats, defaults $params['size'] = (number) specifies a max number of transform stats to get, defaults to 100 $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->getTransformStats($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacepreviewTransform_previewTransform]] -.`previewTransform()` +.`previewTransform(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->previewTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespaceputTransform_putTransform]] -.`putTransform()` +.`putTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -122,20 +100,13 @@ $response = $client->dataframetransformdeprecated()->previewTransform($params); /* $params['transform_id'] = (string) The id of the new transform. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->putTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacestartTransform_startTransform]] -.`startTransform()` +.`startTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -144,20 +115,13 @@ $response = $client->dataframetransformdeprecated()->putTransform($params); $params['transform_id'] = (string) The id of the transform to start $params['timeout'] = (time) Controls the time to wait for the transform to start */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->startTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespacestopTransform_stopTransform]] -.`stopTransform()` +.`stopTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -168,20 +132,13 @@ $params['wait_for_completion'] = (boolean) Whether to wait for the transform to $params['timeout'] = (time) Controls the time to wait until the transform has stopped. Default to 30 seconds $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->stopTransform($params); ---- **** [[Elasticsearch_Namespaces_DataFrameTransformDeprecatedNamespaceupdateTransform_updateTransform]] -.`updateTransform()` +.`updateTransform(array $params = [])` *NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] @@ -189,13 +146,6 @@ $response = $client->dataframetransformdeprecated()->stopTransform($params); /* $params['transform_id'] = (string) The id of the transform. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->dataframetransformdeprecated()->updateTransform($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/EnrichNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/EnrichNamespace.asciidoc index 8e7020545..3af256826 100644 --- a/docs/build/Elasticsearch/Namespaces/EnrichNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/EnrichNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_EnrichNamespace]] === Elasticsearch\Namespaces\EnrichNamespace Class EnrichNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -22,27 +27,20 @@ The class defines the following methods: [[Elasticsearch_Namespaces_EnrichNamespacedeletePolicy_deletePolicy]] -.`deletePolicy()` +.`deletePolicy(array $params = [])` **** [source,php] ---- /* $params['name'] = (string) The name of the enrich policy */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich()->deletePolicy($params); ---- **** [[Elasticsearch_Namespaces_EnrichNamespaceexecutePolicy_executePolicy]] -.`executePolicy()` +.`executePolicy(array $params = [])` **** [source,php] ---- @@ -50,40 +48,26 @@ $response = $client->enrich()->deletePolicy($params); $params['name'] = (string) The name of the enrich policy $params['wait_for_completion'] = (boolean) Should the request should block until the execution is complete. (Default = true) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich()->executePolicy($params); ---- **** [[Elasticsearch_Namespaces_EnrichNamespacegetPolicy_getPolicy]] -.`getPolicy()` +.`getPolicy(array $params = [])` **** [source,php] ---- /* $params['name'] = (list) A comma-separated list of enrich policy names */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich()->getPolicy($params); ---- **** [[Elasticsearch_Namespaces_EnrichNamespaceputPolicy_putPolicy]] -.`putPolicy()` +.`putPolicy(array $params = [])` **** [source,php] ---- @@ -91,32 +75,18 @@ $response = $client->enrich()->getPolicy($params); $params['name'] = (string) The name of the enrich policy $params['body'] = (array) The enrich policy to register (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich()->putPolicy($params); ---- **** [[Elasticsearch_Namespaces_EnrichNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->enrich()->stats($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/EqlNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/EqlNamespace.asciidoc index 0ef84ef86..9db0d2926 100644 --- a/docs/build/Elasticsearch/Namespaces/EqlNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/EqlNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_EqlNamespace]] === Elasticsearch\Namespaces\EqlNamespace Class EqlNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -15,34 +20,26 @@ The class defines the following methods: * <> * <> +* <> * <> [[Elasticsearch_Namespaces_EqlNamespacedelete_delete]] -.`delete()` -*NOTE:* This API is BETA and may change in ways that are not backwards compatible +.`delete(array $params = [])` **** [source,php] ---- /* $params['id'] = (string) The async search ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->eql()->delete($params); ---- **** [[Elasticsearch_Namespaces_EqlNamespaceget_get]] -.`get()` -*NOTE:* This API is BETA and may change in ways that are not backwards compatible +.`get(array $params = [])` **** [source,php] ---- @@ -51,21 +48,26 @@ $params['id'] = (string) The async search ID $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->eql()->get($params); +[[Elasticsearch_Namespaces_EqlNamespacegetStatus_getStatus]] +.`getStatus(array $params = [])` +**** +[source,php] +---- +/* +$params['id'] = (string) The async search ID +*/ ---- **** [[Elasticsearch_Namespaces_EqlNamespacesearch_search]] -.`search()` -*NOTE:* This API is BETA and may change in ways that are not backwards compatible +.`search(array $params = [])` **** [source,php] ---- @@ -76,13 +78,6 @@ $params['keep_on_completion'] = (boolean) Control whether the response $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d) $params['body'] = (array) Eql request body. Use the `query` to limit the query scope. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->eql()->search($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/FeaturesNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/FeaturesNamespace.asciidoc new file mode 100644 index 000000000..b71fc6ee2 --- /dev/null +++ b/docs/build/Elasticsearch/Namespaces/FeaturesNamespace.asciidoc @@ -0,0 +1,36 @@ + + +[[Elasticsearch_Namespaces_FeaturesNamespace]] +=== Elasticsearch\Namespaces\FeaturesNamespace + + + +Class FeaturesNamespace + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) + + +*Methods* + +The class defines the following methods: + +* <> + + + +[[Elasticsearch_Namespaces_FeaturesNamespacegetFeatures_getFeatures]] +.`getFeatures(array $params = [])` +**** +[source,php] +---- +/* +$params['master_timeout'] = (time) Explicit operation timeout for connection to master node +*/ +---- +**** + + diff --git a/docs/build/Elasticsearch/Namespaces/GraphNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/GraphNamespace.asciidoc index eadaeec6c..a2163dc27 100644 --- a/docs/build/Elasticsearch/Namespaces/GraphNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/GraphNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_GraphNamespace]] === Elasticsearch\Namespaces\GraphNamespace Class GraphNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,7 +23,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_GraphNamespaceexplore_explore]] -.`explore()` +.`explore(array $params = [])` **** [source,php] ---- @@ -29,13 +34,6 @@ $params['routing'] = (string) Specific routing value $params['timeout'] = (time) Explicit operation timeout $params['body'] = (array) Graph Query DSL */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->graph()->explore($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/IlmNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/IlmNamespace.asciidoc index 0cc0cdbf0..deb627e56 100644 --- a/docs/build/Elasticsearch/Namespaces/IlmNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/IlmNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_IlmNamespace]] === Elasticsearch\Namespaces\IlmNamespace Class IlmNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -27,27 +32,20 @@ The class defines the following methods: [[Elasticsearch_Namespaces_IlmNamespacedeleteLifecycle_deleteLifecycle]] -.`deleteLifecycle()` +.`deleteLifecycle(array $params = [])` **** [source,php] ---- /* $params['policy'] = (string) The name of the index lifecycle policy */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->deleteLifecycle($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespaceexplainLifecycle_explainLifecycle]] -.`explainLifecycle()` +.`explainLifecycle(array $params = [])` **** [source,php] ---- @@ -56,59 +54,38 @@ $params['index'] = (string) The name of the index to explain $params['only_managed'] = (boolean) filters the indices included in the response to ones managed by ILM $params['only_errors'] = (boolean) filters the indices included in the response to ones in an ILM error state, implies only_managed */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->explainLifecycle($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespacegetLifecycle_getLifecycle]] -.`getLifecycle()` +.`getLifecycle(array $params = [])` **** [source,php] ---- /* $params['policy'] = (string) The name of the index lifecycle policy */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->getLifecycle($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespacegetStatus_getStatus]] -.`getStatus()` +.`getStatus(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->getStatus($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespacemoveToStep_moveToStep]] -.`moveToStep()` +.`moveToStep(array $params = [])` **** [source,php] ---- @@ -116,20 +93,13 @@ $response = $client->ilm()->getStatus($params); $params['index'] = (string) The name of the index whose lifecycle step is to change $params['body'] = (array) The new lifecycle step to move to */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->moveToStep($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespaceputLifecycle_putLifecycle]] -.`putLifecycle()` +.`putLifecycle(array $params = [])` **** [source,php] ---- @@ -137,91 +107,56 @@ $response = $client->ilm()->moveToStep($params); $params['policy'] = (string) The name of the index lifecycle policy $params['body'] = (array) The lifecycle policy definition to register */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->putLifecycle($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespaceremovePolicy_removePolicy]] -.`removePolicy()` +.`removePolicy(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The name of the index to remove policy on */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->removePolicy($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespaceretry_retry]] -.`retry()` +.`retry(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) The name of the indices (comma-separated) whose failed lifecycle step is to be retry */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->retry($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespacestart_start]] -.`start()` +.`start(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->start($params); ---- **** [[Elasticsearch_Namespaces_IlmNamespacestop_stop]] -.`stop()` +.`stop(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ilm()->stop($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/IndicesNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/IndicesNamespace.asciidoc index e6e947ce0..74d02f75f 100644 --- a/docs/build/Elasticsearch/Namespaces/IndicesNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/IndicesNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_IndicesNamespace]] === Elasticsearch\Namespaces\IndicesNamespace Class IndicesNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,8 +24,11 @@ The class defines the following methods: * <> * <> * <> +* <> +* <> * <> * <> +* <> * <> * <> * <> @@ -30,15 +39,19 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> +* <> * <> * <> * <> * <> * <> * <> +* <> * <> +* <> * <> * <> * <> @@ -46,6 +59,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -55,22 +69,16 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> -* <> -* <> -* <> -* <> -* <> -* <> -* <> * <> [[Elasticsearch_Namespaces_IndicesNamespaceaddBlock_addBlock]] -.`addBlock()` +.`addBlock(array $params = [])` **** [source,php] ---- @@ -83,20 +91,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->addBlock($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceanalyze_analyze]] -.`analyze()` +.`analyze(array $params = [])` **** [source,php] ---- @@ -104,20 +105,13 @@ $response = $client->indices()->addBlock($params); $params['index'] = (string) The name of the index to scope the operation $params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->analyze($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceclearCache_clearCache]] -.`clearCache()` +.`clearCache(array $params = [])` **** [source,php] ---- @@ -131,20 +125,13 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indice $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) $params['request'] = (boolean) Clear request cache */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->clearCache($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceclone_clone]] -.`clone()` +.`clone(array $params = [])` **** [source,php] ---- @@ -155,20 +142,13 @@ $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the cloned index before the operation returns. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->clone($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceclose_close]] -.`close()` +.`close(array $params = [])` **** [source,php] ---- @@ -179,22 +159,15 @@ $params['master_timeout'] = (time) Specify timeout for connection to mas $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) -$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. +$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->close($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacecreate_create]] -.`create()` +.`create(array $params = [])` **** [source,php] ---- @@ -202,20 +175,39 @@ $response = $client->indices()->close($params); $params['index'] = (string) The name of the index $params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings. */ +---- +**** + + + +[[Elasticsearch_Namespaces_IndicesNamespacecreateDataStream_createDataStream]] +.`createDataStream(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (string) The name of the data stream +*/ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->create($params); +[[Elasticsearch_Namespaces_IndicesNamespacedataStreamsStats_dataStreamsStats]] +.`dataStreamsStats(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (list) A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespacedelete_delete]] -.`delete()` +.`delete(array $params = [])` **** [source,php] ---- @@ -227,20 +219,13 @@ $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: f $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false) $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->delete($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacedeleteAlias_deleteAlias]] -.`deleteAlias()` +.`deleteAlias(array $params = [])` **** [source,php] ---- @@ -250,21 +235,27 @@ $params['name'] = (list) A comma-separated list of aliases to delete ( $params['timeout'] = (time) Explicit timestamp for the document $params['master_timeout'] = (time) Specify timeout for connection to master */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->deleteAlias($params); +[[Elasticsearch_Namespaces_IndicesNamespacedeleteDataStream_deleteDataStream]] +.`deleteDataStream(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (list) A comma-separated list of data streams to delete; use `*` to delete all data streams +$params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespacedeleteIndexTemplate_deleteIndexTemplate]] -.`deleteIndexTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`deleteIndexTemplate(array $params = [])` **** [source,php] ---- @@ -273,20 +264,13 @@ $params['name'] = (string) The name of the template $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->deleteIndexTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacedeleteTemplate_deleteTemplate]] -.`deleteTemplate()` +.`deleteTemplate(array $params = [])` **** [source,php] ---- @@ -295,20 +279,13 @@ $params['name'] = (string) The name of the template $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->deleteTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceexists_exists]] -.`exists()` +.`exists(array $params = [])` **** [source,php] ---- @@ -321,20 +298,13 @@ $params['expand_wildcards'] = (enum) Whether wildcard expressions should get e $params['flat_settings'] = (boolean) Return settings in flat format (default: false) $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->exists($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceexistsAlias_existsAlias]] -.`existsAlias()` +.`existsAlias(array $params = [])` **** [source,php] ---- @@ -346,21 +316,13 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indice $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->existsAlias($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceexistsIndexTemplate_existsIndexTemplate]] -.`existsIndexTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`existsIndexTemplate(array $params = [])` **** [source,php] ---- @@ -370,20 +332,13 @@ $params['flat_settings'] = (boolean) Return settings in flat format (default: f $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->existsIndexTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceexistsTemplate_existsTemplate]] -.`existsTemplate()` +.`existsTemplate(array $params = [])` **** [source,php] ---- @@ -393,20 +348,13 @@ $params['flat_settings'] = (boolean) Return settings in flat format (default: f $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->existsTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceexistsType_existsType]] -.`existsType()` +.`existsType(array $params = [])` **** [source,php] ---- @@ -418,20 +366,13 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indice $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->existsType($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceflush_flush]] -.`flush()` +.`flush(array $params = [])` **** [source,php] ---- @@ -440,20 +381,13 @@ $params['index'] = (list) A comma-separated list of index names; us $params['force'] = (boolean) Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) $params['wait_if_ongoing'] = (boolean) If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->flush($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceflushSynced_flushSynced]] -.`flushSynced()` +.`flushSynced(array $params = [])` **** [source,php] ---- @@ -463,20 +397,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->flushSynced($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceforcemerge_forcemerge]] -.`forcemerge()` +.`forcemerge(array $params = [])` **** [source,php] ---- @@ -489,20 +416,32 @@ $params['expand_wildcards'] = (enum) Whether to expand wildcard expression t $params['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic) $params['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->forcemerge($params); +[[Elasticsearch_Namespaces_IndicesNamespacefreeze_freeze]] +.`freeze(array $params = [])` +**** +[source,php] +---- +/* +$params['index'] = (string) The name of the index to freeze +$params['timeout'] = (time) Explicit operation timeout +$params['master_timeout'] = (time) Specify timeout for connection to master +$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) +$params['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) +$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed) +$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceget_get]] -.`get()` +.`get(array $params = [])` **** [source,php] ---- @@ -517,20 +456,13 @@ $params['flat_settings'] = (boolean) Return settings in flat format (defaul $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) $params['master_timeout'] = (time) Specify timeout for connection to master */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->get($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetAlias_getAlias]] -.`getAlias()` +.`getAlias(array $params = [])` **** [source,php] ---- @@ -542,20 +474,27 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indice $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getAlias($params); +[[Elasticsearch_Namespaces_IndicesNamespacegetDataStream_getDataStream]] +.`getDataStream(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (list) A comma-separated list of data streams to get; use `*` to get all data streams +$params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetFieldMapping_getFieldMapping]] -.`getFieldMapping()` +.`getFieldMapping(array $params = [])` **** [source,php] ---- @@ -565,21 +504,13 @@ $params['index'] = (list) A comma-separated list of index names $params['type'] = DEPRECATED (list) A comma-separated list of document types $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getFieldMapping($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetIndexTemplate_getIndexTemplate]] -.`getIndexTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getIndexTemplate(array $params = [])` **** [source,php] ---- @@ -589,20 +520,13 @@ $params['flat_settings'] = (boolean) Return settings in flat format (default: f $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getIndexTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetMapping_getMapping]] -.`getMapping()` +.`getMapping(array $params = [])` **** [source,php] ---- @@ -616,20 +540,13 @@ $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to $params['master_timeout'] = (time) Specify timeout for connection to master $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getMapping($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetSettings_getSettings]] -.`getSettings()` +.`getSettings(array $params = [])` **** [source,php] ---- @@ -644,20 +561,13 @@ $params['flat_settings'] = (boolean) Return settings in flat format (defaul $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) $params['include_defaults'] = (boolean) Whether to return all default setting for each of the indices. (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getSettings($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetTemplate_getTemplate]] -.`getTemplate()` +.`getTemplate(array $params = [])` **** [source,php] ---- @@ -665,20 +575,13 @@ $response = $client->indices()->getSettings($params); $params['name'] = (list) The comma separated names of the index templates $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetUpgrade_getUpgrade]] -.`getUpgrade()` +.`getUpgrade(array $params = [])` **** [source,php] ---- @@ -688,20 +591,26 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getUpgrade($params); + +[[Elasticsearch_Namespaces_IndicesNamespacemigrateToDataStream_migrateToDataStream]] +.`migrateToDataStream(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (string) The name of the alias to migrate +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceopen_open]] -.`open()` +.`open(array $params = [])` **** [source,php] ---- @@ -714,20 +623,26 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard in $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed) $params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->open($params); + +[[Elasticsearch_Namespaces_IndicesNamespacepromoteDataStream_promoteDataStream]] +.`promoteDataStream(array $params = [])` +**** +[source,php] +---- +/* +$params['name'] = (string) The name of the data stream +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceputAlias_putAlias]] -.`putAlias()` +.`putAlias(array $params = [])` **** [source,php] ---- @@ -738,21 +653,13 @@ $params['timeout'] = (time) Explicit timestamp for the document $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) The settings for the alias, such as `routing` or `filter` */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->putAlias($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceputIndexTemplate_putIndexTemplate]] -.`putIndexTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`putIndexTemplate(array $params = [])` **** [source,php] ---- @@ -763,40 +670,26 @@ $params['cause'] = (string) User defined reason for creating/updating t $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) The template definition (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->putIndexTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceputMapping_putMapping]] -.`putMapping()` +.`putMapping(array $params = [])` **** [source,php] ---- /* $params['index'] = (list) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->putMapping($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceputSettings_putSettings]] -.`putSettings()` +.`putSettings(array $params = [])` **** [source,php] ---- @@ -811,20 +704,13 @@ $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to $params['flat_settings'] = (boolean) Return settings in flat format (default: false) $params['body'] = (array) The index settings to be updated (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->putSettings($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceputTemplate_putTemplate]] -.`putTemplate()` +.`putTemplate(array $params = [])` **** [source,php] ---- @@ -832,20 +718,13 @@ $response = $client->indices()->putSettings($params); $params['name'] = (string) The name of the template $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->putTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacerecovery_recovery]] -.`recovery()` +.`recovery(array $params = [])` **** [source,php] ---- @@ -854,20 +733,13 @@ $params['index'] = (list) A comma-separated list of index names; use `_all $params['detailed'] = (boolean) Whether to display detailed information about shard recovery (Default = false) $params['active_only'] = (boolean) Display only those recoveries that are currently on-going (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->recovery($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacerefresh_refresh]] -.`refresh()` +.`refresh(array $params = [])` **** [source,php] ---- @@ -877,20 +749,29 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->refresh($params); + +[[Elasticsearch_Namespaces_IndicesNamespacereloadSearchAnalyzers_reloadSearchAnalyzers]] +.`reloadSearchAnalyzers(array $params = [])` +**** +[source,php] +---- +/* +$params['index'] = (list) A comma-separated list of index names to reload analyzers for +$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) +$params['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) +$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceresolveIndex_resolveIndex]] -.`resolveIndex()` +.`resolveIndex(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -899,20 +780,13 @@ $response = $client->indices()->refresh($params); $params['name'] = (list) A comma-separated list of names or wildcard expressions $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->resolveIndex($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacerollover_rollover]] -.`rollover()` +.`rollover(array $params = [])` **** [source,php] ---- @@ -921,20 +795,13 @@ $params['alias'] = (string) The name of the alias to rollover ( $params['new_index'] = (string) The name of the rollover index $params['include_type_name'] = (boolean) Whether a type should be included in the body of the mappings. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->rollover($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacesegments_segments]] -.`segments()` +.`segments(array $params = [])` **** [source,php] ---- @@ -945,20 +812,13 @@ $params['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indice $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) $params['verbose'] = (boolean) Includes detailed memory usage by Lucene. (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->segments($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceshardStores_shardStores]] -.`shardStores()` +.`shardStores(array $params = [])` **** [source,php] ---- @@ -969,20 +829,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->shardStores($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceshrink_shrink]] -.`shrink()` +.`shrink(array $params = [])` **** [source,php] ---- @@ -994,21 +847,13 @@ $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->shrink($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacesimulateIndexTemplate_simulateIndexTemplate]] -.`simulateIndexTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`simulateIndexTemplate(array $params = [])` **** [source,php] ---- @@ -1019,21 +864,13 @@ $params['cause'] = (string) User defined reason for dry-run creating th $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) New index template definition, which will be included in the simulation, as if it already exists in the system */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->simulateIndexTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacesimulateTemplate_simulateTemplate]] -.`simulateTemplate()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`simulateTemplate(array $params = [])` **** [source,php] ---- @@ -1044,20 +881,13 @@ $params['cause'] = (string) User defined reason for dry-run creating th $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) New index template definition to be simulated, if no index template name is specified */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->simulateTemplate($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacesplit_split]] -.`split()` +.`split(array $params = [])` **** [source,php] ---- @@ -1069,40 +899,45 @@ $params['timeout'] = (time) Explicit operation timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for on the shrunken index before the operation returns. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->split($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- /* $params['metric'] = (list) Limit the information returned the specific metrics. */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->indices()->stats($params); +[[Elasticsearch_Namespaces_IndicesNamespaceunfreeze_unfreeze]] +.`unfreeze(array $params = [])` +**** +[source,php] +---- +/* +$params['index'] = (string) The name of the index to unfreeze +$params['timeout'] = (time) Explicit operation timeout +$params['master_timeout'] = (time) Specify timeout for connection to master +$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) +$params['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) +$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed) +$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. +*/ ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceupdateAliases_updateAliases]] -.`updateAliases()` +.`updateAliases(array $params = [])` **** [source,php] ---- @@ -1111,20 +946,13 @@ $params['timeout'] = (time) Request timeout $params['master_timeout'] = (time) Specify timeout for connection to master $params['body'] = (array) The definition of `actions` to perform (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->updateAliases($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespaceupgrade_upgrade]] -.`upgrade()` +.`upgrade(array $params = [])` **** [source,php] ---- @@ -1136,20 +964,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices $params['wait_for_completion'] = (boolean) Specify whether the request should block until the all segments are upgraded (default: false) $params['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->upgrade($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacevalidateQuery_validateQuery]] -.`validateQuery()` +.`validateQuery(array $params = [])` **** [source,php] ---- @@ -1168,188 +989,19 @@ $params['df'] = (string) The field to use as default where no fi $params['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored $params['rewrite'] = (boolean) Provide a more detailed explanation showing the actual Lucene query that will be executed. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->validateQuery($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacecreateDataStream_createDataStream]] -.`createDataStream()` -**** -[source,php] ----- -/* -$params['name'] = (string) The name of the data stream -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->createDataStream($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacedataStreamsStats_dataStreamsStats]] -.`dataStreamsStats()` -**** -[source,php] ----- -/* -$params['name'] = (list) A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->dataStreamsStats($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacedeleteDataStream_deleteDataStream]] -.`deleteDataStream()` -**** -[source,php] ----- -/* -$params['name'] = (list) A comma-separated list of data streams to delete; use `*` to delete all data streams -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->deleteDataStream($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacefreeze_freeze]] -.`freeze()` -**** -[source,php] ----- -/* -$params['index'] = (string) The name of the index to freeze -$params['timeout'] = (time) Explicit operation timeout -$params['master_timeout'] = (time) Specify timeout for connection to master -$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) -$params['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) -$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed) -$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->freeze($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacegetDataStream_getDataStream]] -.`getDataStream()` -**** -[source,php] ----- -/* -$params['name'] = (list) A comma-separated list of data streams to get; use `*` to get all data streams -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getDataStream($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespacereloadSearchAnalyzers_reloadSearchAnalyzers]] -.`reloadSearchAnalyzers()` -**** -[source,php] ----- -/* -$params['index'] = (list) A comma-separated list of index names to reload analyzers for -$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) -$params['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) -$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->reloadSearchAnalyzers($params); ----- -**** - - - -[[Elasticsearch_Namespaces_IndicesNamespaceunfreeze_unfreeze]] -.`unfreeze()` -**** -[source,php] ----- -/* -$params['index'] = (string) The name of the index to unfreeze -$params['timeout'] = (time) Explicit operation timeout -$params['master_timeout'] = (time) Specify timeout for connection to master -$params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) -$params['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) -$params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = closed) -$params['wait_for_active_shards'] = (string) Sets the number of active shards to wait for before the operation returns. -*/ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->unfreeze($params); ---- **** [[Elasticsearch_Namespaces_IndicesNamespacegetAliases_getAliases]] -.`getAliases()` +.`getAliases(array $params = [])` **** [source,php] ---- /* Alias function to getAlias() */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->indices()->getAliases($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/IngestNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/IngestNamespace.asciidoc index e855fa5a7..ef6b17e47 100644 --- a/docs/build/Elasticsearch/Namespaces/IngestNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/IngestNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_IngestNamespace]] === Elasticsearch\Namespaces\IngestNamespace Class IngestNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -21,7 +27,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_IngestNamespacedeletePipeline_deletePipeline]] -.`deletePipeline()` +.`deletePipeline(array $params = [])` **** [source,php] ---- @@ -30,20 +36,13 @@ $params['id'] = (string) Pipeline ID $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest()->deletePipeline($params); ---- **** [[Elasticsearch_Namespaces_IngestNamespacegetPipeline_getPipeline]] -.`getPipeline()` +.`getPipeline(array $params = [])` **** [source,php] ---- @@ -51,39 +50,25 @@ $response = $client->ingest()->deletePipeline($params); $params['id'] = (string) Comma separated list of pipeline ids. Wildcards supported $params['master_timeout'] = (time) Explicit operation timeout for connection to master node */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest()->getPipeline($params); ---- **** [[Elasticsearch_Namespaces_IngestNamespaceprocessorGrok_processorGrok]] -.`processorGrok()` +.`processorGrok(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest()->processorGrok($params); ---- **** [[Elasticsearch_Namespaces_IngestNamespaceputPipeline_putPipeline]] -.`putPipeline()` +.`putPipeline(array $params = [])` **** [source,php] ---- @@ -93,20 +78,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection to $params['timeout'] = (time) Explicit operation timeout $params['body'] = (array) The ingest definition (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest()->putPipeline($params); ---- **** [[Elasticsearch_Namespaces_IngestNamespacesimulate_simulate]] -.`simulate()` +.`simulate(array $params = [])` **** [source,php] ---- @@ -115,13 +93,6 @@ $params['id'] = (string) Pipeline ID $params['verbose'] = (boolean) Verbose mode. Display data output for each processor in executed pipeline (Default = false) $params['body'] = (array) The simulate definition (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ingest()->simulate($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/LicenseNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/LicenseNamespace.asciidoc index 3bce29404..691ae2a42 100644 --- a/docs/build/Elasticsearch/Namespaces/LicenseNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/LicenseNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_LicenseNamespace]] === Elasticsearch\Namespaces\LicenseNamespace Class LicenseNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -24,26 +29,19 @@ The class defines the following methods: [[Elasticsearch_Namespaces_LicenseNamespacedelete_delete]] -.`delete()` +.`delete(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->delete($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespaceget_get]] -.`get()` +.`get(array $params = [])` **** [source,php] ---- @@ -51,58 +49,37 @@ $response = $client->license()->delete($params); $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) $params['accept_enterprise'] = (boolean) If the active license is an enterprise license, return type as 'enterprise' (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->get($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespacegetBasicStatus_getBasicStatus]] -.`getBasicStatus()` +.`getBasicStatus(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->getBasicStatus($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespacegetTrialStatus_getTrialStatus]] -.`getTrialStatus()` +.`getTrialStatus(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->getTrialStatus($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespacepost_post]] -.`post()` +.`post(array $params = [])` **** [source,php] ---- @@ -110,40 +87,26 @@ $response = $client->license()->getTrialStatus($params); $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) $params['body'] = (array) licenses to be installed */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->post($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespacepostStartBasic_postStartBasic]] -.`postStartBasic()` +.`postStartBasic(array $params = [])` **** [source,php] ---- /* $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->postStartBasic($params); ---- **** [[Elasticsearch_Namespaces_LicenseNamespacepostStartTrial_postStartTrial]] -.`postStartTrial()` +.`postStartTrial(array $params = [])` **** [source,php] ---- @@ -151,13 +114,6 @@ $response = $client->license()->postStartBasic($params); $params['type'] = (string) The type of trial license to generate (default: "trial") $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->license()->postStartTrial($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/LogstashNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/LogstashNamespace.asciidoc new file mode 100644 index 000000000..09a5fcb05 --- /dev/null +++ b/docs/build/Elasticsearch/Namespaces/LogstashNamespace.asciidoc @@ -0,0 +1,65 @@ + + +[[Elasticsearch_Namespaces_LogstashNamespace]] +=== Elasticsearch\Namespaces\LogstashNamespace + + + +Class LogstashNamespace + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) + + +*Methods* + +The class defines the following methods: + +* <> +* <> +* <> + + + +[[Elasticsearch_Namespaces_LogstashNamespacedeletePipeline_deletePipeline]] +.`deletePipeline(array $params = [])` +**** +[source,php] +---- +/* +$params['id'] = (string) The ID of the Pipeline +*/ +---- +**** + + + +[[Elasticsearch_Namespaces_LogstashNamespacegetPipeline_getPipeline]] +.`getPipeline(array $params = [])` +**** +[source,php] +---- +/* +$params['id'] = (string) A comma-separated list of Pipeline IDs +*/ +---- +**** + + + +[[Elasticsearch_Namespaces_LogstashNamespaceputPipeline_putPipeline]] +.`putPipeline(array $params = [])` +**** +[source,php] +---- +/* +$params['id'] = (string) The ID of the Pipeline +$params['body'] = (array) The Pipeline to add or update (Required) +*/ +---- +**** + + diff --git a/docs/build/Elasticsearch/Namespaces/MigrationNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/MigrationNamespace.asciidoc index c2bf21695..9488bb64a 100644 --- a/docs/build/Elasticsearch/Namespaces/MigrationNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/MigrationNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_MigrationNamespace]] === Elasticsearch\Namespaces\MigrationNamespace Class MigrationNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,20 +23,13 @@ The class defines the following methods: [[Elasticsearch_Namespaces_MigrationNamespacedeprecations_deprecations]] -.`deprecations()` +.`deprecations(array $params = [])` **** [source,php] ---- /* $params['index'] = (string) Index pattern */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->migration()->deprecations($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/MlNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/MlNamespace.asciidoc index 07ef44024..9b86f7a74 100644 --- a/docs/build/Elasticsearch/Namespaces/MlNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/MlNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_MlNamespace]] === Elasticsearch\Namespaces\MlNamespace Class MlNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -71,57 +76,45 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> [[Elasticsearch_Namespaces_MlNamespacecloseJob_closeJob]] -.`closeJob()` +.`closeJob(array $params = [])` **** [source,php] ---- /* -$params['job_id'] = (string) The name of the job to close -$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) -$params['force'] = (boolean) True if the job should be forcefully closed -$params['timeout'] = (time) Controls the time to wait until a job has closed. Default to 30 minutes -$params['body'] = (array) The URL params optionally sent in the body +$params['job_id'] = (string) The name of the job to close +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['force'] = (boolean) True if the job should be forcefully closed +$params['timeout'] = (time) Controls the time to wait until a job has closed. Default to 30 minutes +$params['body'] = (array) The URL params optionally sent in the body */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->closeJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteCalendar_deleteCalendar]] -.`deleteCalendar()` +.`deleteCalendar(array $params = [])` **** [source,php] ---- /* $params['calendar_id'] = (string) The ID of the calendar to delete */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteCalendar($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteCalendarEvent_deleteCalendarEvent]] -.`deleteCalendarEvent()` +.`deleteCalendarEvent(array $params = [])` **** [source,php] ---- @@ -129,20 +122,13 @@ $response = $client->ml()->deleteCalendar($params); $params['calendar_id'] = (string) The ID of the calendar to modify $params['event_id'] = (string) The ID of the event to remove from the calendar */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteCalendarEvent($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteCalendarJob_deleteCalendarJob]] -.`deleteCalendarJob()` +.`deleteCalendarJob(array $params = [])` **** [source,php] ---- @@ -150,21 +136,14 @@ $response = $client->ml()->deleteCalendarEvent($params); $params['calendar_id'] = (string) The ID of the calendar to modify $params['job_id'] = (string) The ID of the job to remove from the calendar */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteCalendarJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteDataFrameAnalytics_deleteDataFrameAnalytics]] -.`deleteDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`deleteDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -173,20 +152,13 @@ $params['id'] = (string) The ID of the data frame analytics to delete $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false) $params['timeout'] = (time) Controls the time to wait until a job is deleted. Defaults to 1 minute */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteDatafeed_deleteDatafeed]] -.`deleteDatafeed()` +.`deleteDatafeed(array $params = [])` **** [source,php] ---- @@ -194,20 +166,13 @@ $response = $client->ml()->deleteDataFrameAnalytics($params); $params['datafeed_id'] = (string) The ID of the datafeed to delete $params['force'] = (boolean) True if the datafeed should be forcefully deleted */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteExpiredData_deleteExpiredData]] -.`deleteExpiredData()` +.`deleteExpiredData(array $params = [])` **** [source,php] ---- @@ -215,40 +180,26 @@ $response = $client->ml()->deleteDatafeed($params); $params['job_id'] = (string) The ID of the job(s) to perform expired data hygiene for $params['requests_per_second'] = (number) The desired requests per second for the deletion processes. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteExpiredData($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteFilter_deleteFilter]] -.`deleteFilter()` +.`deleteFilter(array $params = [])` **** [source,php] ---- /* $params['filter_id'] = (string) The ID of the filter to delete */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteFilter($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteForecast_deleteForecast]] -.`deleteForecast()` +.`deleteForecast(array $params = [])` **** [source,php] ---- @@ -258,20 +209,13 @@ $params['forecast_id'] = (string) The ID of the forecast to delete, can b $params['allow_no_forecasts'] = (boolean) Whether to ignore if `_all` matches no forecasts $params['timeout'] = (time) Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteForecast($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteJob_deleteJob]] -.`deleteJob()` +.`deleteJob(array $params = [])` **** [source,php] ---- @@ -280,20 +224,13 @@ $params['job_id'] = (string) The ID of the job to delete $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false) $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteModelSnapshot_deleteModelSnapshot]] -.`deleteModelSnapshot()` +.`deleteModelSnapshot(array $params = [])` **** [source,php] ---- @@ -301,81 +238,53 @@ $response = $client->ml()->deleteJob($params); $params['job_id'] = (string) The ID of the job to fetch $params['snapshot_id'] = (string) The ID of the snapshot to delete */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteModelSnapshot($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacedeleteTrainedModel_deleteTrainedModel]] -.`deleteTrainedModel()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`deleteTrainedModel(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- /* $params['model_id'] = (string) The ID of the trained model to delete */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->deleteTrainedModel($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceestimateModelMemory_estimateModelMemory]] -.`estimateModelMemory()` +.`estimateModelMemory(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) The analysis config, plus cardinality estimates for fields it references (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->estimateModelMemory($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceevaluateDataFrame_evaluateDataFrame]] -.`evaluateDataFrame()` +.`evaluateDataFrame(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->evaluateDataFrame($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceexplainDataFrameAnalytics_explainDataFrameAnalytics]] -.`explainDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`explainDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -383,20 +292,13 @@ $response = $client->ml()->evaluateDataFrame($params); $params['id'] = (string) The ID of the data frame analytics to explain $params['body'] = (array) The data frame analytics config to explain */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->explainDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacefindFileStructure_findFileStructure]] -.`findFileStructure()` +.`findFileStructure(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -418,20 +320,13 @@ $params['timestamp_format'] = (string) Optional parameter to specify the ti $params['explain'] = (boolean) Whether to include a commentary on how the structure was derived (Default = false) $params['body'] = (array) The contents of the file to be analyzed (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->findFileStructure($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceflushJob_flushJob]] -.`flushJob()` +.`flushJob(array $params = [])` **** [source,php] ---- @@ -444,20 +339,13 @@ $params['advance_time'] = (string) Advances time to the given value generating r $params['skip_time'] = (string) Skips time to the given value without generating results or updating the model for the skipped interval $params['body'] = (array) Flush parameters */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->flushJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceforecast_forecast]] -.`forecast()` +.`forecast(array $params = [])` **** [source,php] ---- @@ -466,20 +354,13 @@ $params['job_id'] = (string) The ID of the job to forecast for $params['duration'] = (time) The duration of the forecast $params['expires_in'] = (time) The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->forecast($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetBuckets_getBuckets]] -.`getBuckets()` +.`getBuckets(array $params = [])` **** [source,php] ---- @@ -497,20 +378,13 @@ $params['sort'] = (string) Sort buckets by a particular field $params['desc'] = (boolean) Set the sort direction $params['body'] = (array) Bucket selection details if not provided in URI */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getBuckets($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetCalendarEvents_getCalendarEvents]] -.`getCalendarEvents()` +.`getCalendarEvents(array $params = [])` **** [source,php] ---- @@ -522,20 +396,13 @@ $params['end'] = (date) Get events before this time $params['from'] = (int) Skips a number of events $params['size'] = (int) Specifies a max number of events to get */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getCalendarEvents($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetCalendars_getCalendars]] -.`getCalendars()` +.`getCalendars(array $params = [])` **** [source,php] ---- @@ -545,20 +412,13 @@ $params['from'] = (int) skips a number of calendars $params['size'] = (int) specifies a max number of calendars to get $params['body'] = (array) The from and size parameters optionally sent in the body */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getCalendars($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetCategories_getCategories]] -.`getCategories()` +.`getCategories(array $params = [])` **** [source,php] ---- @@ -569,45 +429,32 @@ $params['from'] = (int) skips a number of categories $params['size'] = (int) specifies a max number of categories to get $params['partition_field_value'] = (string) Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getCategories($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetDataFrameAnalytics_getDataFrameAnalytics]] -.`getDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- /* -$params['id'] = (string) The ID of the data frame analytics to fetch -$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true) -$params['from'] = (int) skips a number of analytics (Default = 0) -$params['size'] = (int) specifies a max number of analytics to get (Default = 100) +$params['id'] = (string) The ID of the data frame analytics to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true) +$params['from'] = (int) skips a number of analytics (Default = 0) +$params['size'] = (int) specifies a max number of analytics to get (Default = 100) +$params['exclude_generated'] = (boolean) Omits fields that are illegal to set on data frame analytics PUT (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetDataFrameAnalyticsStats_getDataFrameAnalyticsStats]] -.`getDataFrameAnalyticsStats()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getDataFrameAnalyticsStats(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -616,63 +463,46 @@ $params['id'] = (string) The ID of the data frame analytics stats to $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true) $params['from'] = (int) skips a number of analytics (Default = 0) $params['size'] = (int) specifies a max number of analytics to get (Default = 100) +$params['verbose'] = (boolean) whether the stats response should be verbose (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getDataFrameAnalyticsStats($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetDatafeedStats_getDatafeedStats]] -.`getDatafeedStats()` +.`getDatafeedStats(array $params = [])` **** [source,php] ---- /* $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getDatafeedStats($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetDatafeeds_getDatafeeds]] -.`getDatafeeds()` +.`getDatafeeds(array $params = [])` **** [source,php] ---- /* $params['datafeed_id'] = (string) The ID of the datafeeds to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) +$params['exclude_generated'] = (boolean) Omits fields that are illegal to set on datafeed PUT (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getDatafeeds($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetFilters_getFilters]] -.`getFilters()` +.`getFilters(array $params = [])` **** [source,php] ---- @@ -681,20 +511,13 @@ $params['filter_id'] = (string) The ID of the filter to fetch $params['from'] = (int) skips a number of filters $params['size'] = (int) specifies a max number of filters to get */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getFilters($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetInfluencers_getInfluencers]] -.`getInfluencers()` +.`getInfluencers(array $params = [])` **** [source,php] ---- @@ -710,62 +533,44 @@ $params['sort'] = (string) sort field for the requested influencers $params['desc'] = (boolean) whether the results should be sorted in decending order $params['body'] = (array) Influencer selection criteria */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getInfluencers($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetJobStats_getJobStats]] -.`getJobStats()` +.`getJobStats(array $params = [])` **** [source,php] ---- /* -$params['job_id'] = (string) The ID of the jobs stats to fetch -$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['job_id'] = (string) The ID of the jobs stats to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getJobStats($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetJobs_getJobs]] -.`getJobs()` +.`getJobs(array $params = [])` **** [source,php] ---- /* -$params['job_id'] = (string) The ID of the jobs to fetch -$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['job_id'] = (string) The ID of the jobs to fetch +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) +$params['exclude_generated'] = (boolean) Omits fields that are illegal to set on job PUT (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getJobs($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetModelSnapshots_getModelSnapshots]] -.`getModelSnapshots()` +.`getModelSnapshots(array $params = [])` **** [source,php] ---- @@ -775,20 +580,13 @@ $params['snapshot_id'] = (string) The ID of the snapshot to fetch $params['from'] = (int) Skips a number of documents $params['size'] = (int) The default number of documents returned in queries as a string. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getModelSnapshots($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetOverallBuckets_getOverallBuckets]] -.`getOverallBuckets()` +.`getOverallBuckets(array $params = [])` **** [source,php] ---- @@ -800,23 +598,17 @@ $params['overall_score'] = (double) Returns overall buckets with overall score $params['exclude_interim'] = (boolean) If true overall buckets that include interim buckets will be excluded $params['start'] = (string) Returns overall buckets with timestamps after this time $params['end'] = (string) Returns overall buckets with timestamps earlier than this time +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) $params['body'] = (array) Overall bucket selection details if not provided in URI */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getOverallBuckets($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetRecords_getRecords]] -.`getRecords()` +.`getRecords(array $params = [])` **** [source,php] ---- @@ -832,48 +624,30 @@ $params['sort'] = (string) Sort records by a particular field $params['desc'] = (boolean) Set the sort direction $params['body'] = (array) Record selection criteria */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getRecords($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetTrainedModels_getTrainedModels]] -.`getTrainedModels()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getTrainedModels(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- /* $params['model_id'] = (string) The ID of the trained models to fetch $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) -$params['include_model_definition'] = (boolean) Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false. (Default = false) -$params['decompress_definition'] = (boolean) Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true. (Default = true) -$params['from'] = (int) skips a number of trained models (Default = 0) -$params['size'] = (int) specifies a max number of trained models to get (Default = 100) -$params['tags'] = (list) A comma-separated list of tags that the model must have. +$params['include'] = (string) A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getTrainedModels($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacegetTrainedModelsStats_getTrainedModelsStats]] -.`getTrainedModelsStats()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`getTrainedModelsStats(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -883,59 +657,38 @@ $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression $params['from'] = (int) skips a number of trained models (Default = 0) $params['size'] = (int) specifies a max number of trained models to get (Default = 100) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->getTrainedModelsStats($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceinfo_info]] -.`info()` +.`info(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->info($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceopenJob_openJob]] -.`openJob()` +.`openJob(array $params = [])` **** [source,php] ---- /* $params['job_id'] = (string) The ID of the job to open */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->openJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacepostCalendarEvents_postCalendarEvents]] -.`postCalendarEvents()` +.`postCalendarEvents(array $params = [])` **** [source,php] ---- @@ -943,20 +696,13 @@ $response = $client->ml()->openJob($params); $params['calendar_id'] = (string) The ID of the calendar to modify $params['body'] = (array) A list of events (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->postCalendarEvents($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacepostData_postData]] -.`postData()` +.`postData(array $params = [])` **** [source,php] ---- @@ -966,40 +712,26 @@ $params['reset_start'] = (string) Optional parameter to specify the start of the $params['reset_end'] = (string) Optional parameter to specify the end of the bucket resetting range $params['body'] = (array) The data to process (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->postData($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacepreviewDatafeed_previewDatafeed]] -.`previewDatafeed()` +.`previewDatafeed(array $params = [])` **** [source,php] ---- /* $params['datafeed_id'] = (string) The ID of the datafeed to preview */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->previewDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputCalendar_putCalendar]] -.`putCalendar()` +.`putCalendar(array $params = [])` **** [source,php] ---- @@ -1007,20 +739,13 @@ $response = $client->ml()->previewDatafeed($params); $params['calendar_id'] = (string) The ID of the calendar to create $params['body'] = (array) The calendar details */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putCalendar($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputCalendarJob_putCalendarJob]] -.`putCalendarJob()` +.`putCalendarJob(array $params = [])` **** [source,php] ---- @@ -1028,21 +753,14 @@ $response = $client->ml()->putCalendar($params); $params['calendar_id'] = (string) The ID of the calendar to modify $params['job_id'] = (string) The ID of the job to add to the calendar */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putCalendarJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputDataFrameAnalytics_putDataFrameAnalytics]] -.`putDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`putDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -1050,20 +768,13 @@ $response = $client->ml()->putCalendarJob($params); $params['id'] = (string) The ID of the data frame analytics to create $params['body'] = (array) The data frame analytics configuration (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputDatafeed_putDatafeed]] -.`putDatafeed()` +.`putDatafeed(array $params = [])` **** [source,php] ---- @@ -1075,20 +786,13 @@ $params['ignore_throttled'] = (boolean) Ignore indices that are marked as thro $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) $params['body'] = (array) The datafeed config (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputFilter_putFilter]] -.`putFilter()` +.`putFilter(array $params = [])` **** [source,php] ---- @@ -1096,20 +800,13 @@ $response = $client->ml()->putDatafeed($params); $params['filter_id'] = (string) The ID of the filter to create $params['body'] = (array) The filter details (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putFilter($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputJob_putJob]] -.`putJob()` +.`putJob(array $params = [])` **** [source,php] ---- @@ -1117,21 +814,14 @@ $response = $client->ml()->putFilter($params); $params['job_id'] = (string) The ID of the job to create $params['body'] = (array) The job (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceputTrainedModel_putTrainedModel]] -.`putTrainedModel()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`putTrainedModel(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -1139,20 +829,13 @@ $response = $client->ml()->putJob($params); $params['model_id'] = (string) The ID of the trained models to store $params['body'] = (array) The trained model configuration (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->putTrainedModel($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacerevertModelSnapshot_revertModelSnapshot]] -.`revertModelSnapshot()` +.`revertModelSnapshot(array $params = [])` **** [source,php] ---- @@ -1162,41 +845,27 @@ $params['snapshot_id'] = (string) The ID of the snapshot to rever $params['delete_intervening_results'] = (boolean) Should we reset the results back to the time of the snapshot? $params['body'] = (array) Reversion options */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->revertModelSnapshot($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacesetUpgradeMode_setUpgradeMode]] -.`setUpgradeMode()` +.`setUpgradeMode(array $params = [])` **** [source,php] ---- /* $params['enabled'] = (boolean) Whether to enable upgrade_mode ML setting or not. Defaults to false. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->setUpgradeMode($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacestartDataFrameAnalytics_startDataFrameAnalytics]] -.`startDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`startDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -1205,20 +874,13 @@ $params['id'] = (string) The ID of the data frame analytics to start $params['timeout'] = (time) Controls the time to wait until the task has started. Defaults to 20 seconds $params['body'] = (array) The start data frame analytics parameters */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->startDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacestartDatafeed_startDatafeed]] -.`startDatafeed()` +.`startDatafeed(array $params = [])` **** [source,php] ---- @@ -1229,21 +891,14 @@ $params['end'] = (string) The end time when the datafeed should stop. Wh $params['timeout'] = (time) Controls the time to wait until a datafeed has started. Default to 20 seconds $params['body'] = (array) The start datafeed parameters */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->startDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacestopDataFrameAnalytics_stopDataFrameAnalytics]] -.`stopDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`stopDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -1254,43 +909,30 @@ $params['force'] = (boolean) True if the data frame analytics should be $params['timeout'] = (time) Controls the time to wait until the task has stopped. Defaults to 20 seconds $params['body'] = (array) The stop data frame analytics parameters */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->stopDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacestopDatafeed_stopDatafeed]] -.`stopDatafeed()` +.`stopDatafeed(array $params = [])` **** [source,php] ---- /* $params['datafeed_id'] = (string) The ID of the datafeed to stop +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) $params['force'] = (boolean) True if the datafeed should be forcefully stopped. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->stopDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceupdateDataFrameAnalytics_updateDataFrameAnalytics]] -.`updateDataFrameAnalytics()` -*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release +.`updateDataFrameAnalytics(array $params = [])` +*NOTE:* This API is BETA and may change in ways that are not backwards compatible **** [source,php] ---- @@ -1298,20 +940,13 @@ $response = $client->ml()->stopDatafeed($params); $params['id'] = (string) The ID of the data frame analytics to update $params['body'] = (array) The data frame analytics settings to update (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->updateDataFrameAnalytics($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceupdateDatafeed_updateDatafeed]] -.`updateDatafeed()` +.`updateDatafeed(array $params = [])` **** [source,php] ---- @@ -1323,20 +958,13 @@ $params['ignore_throttled'] = (boolean) Ignore indices that are marked as thro $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) $params['body'] = (array) The datafeed update settings (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->updateDatafeed($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceupdateFilter_updateFilter]] -.`updateFilter()` +.`updateFilter(array $params = [])` **** [source,php] ---- @@ -1344,20 +972,13 @@ $response = $client->ml()->updateDatafeed($params); $params['filter_id'] = (string) The ID of the filter to update $params['body'] = (array) The filter update (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->updateFilter($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceupdateJob_updateJob]] -.`updateJob()` +.`updateJob(array $params = [])` **** [source,php] ---- @@ -1365,20 +986,13 @@ $response = $client->ml()->updateFilter($params); $params['job_id'] = (string) The ID of the job to create $params['body'] = (array) The job update settings (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->updateJob($params); ---- **** [[Elasticsearch_Namespaces_MlNamespaceupdateModelSnapshot_updateModelSnapshot]] -.`updateModelSnapshot()` +.`updateModelSnapshot(array $params = [])` **** [source,php] ---- @@ -1387,53 +1001,47 @@ $params['job_id'] = (string) The ID of the job to fetch $params['snapshot_id'] = (string) The ID of the snapshot to update $params['body'] = (array) The model snapshot properties to update (Required) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->ml()->updateModelSnapshot($params); +[[Elasticsearch_Namespaces_MlNamespaceupgradeJobSnapshot_upgradeJobSnapshot]] +.`upgradeJobSnapshot(array $params = [])` +**** +[source,php] +---- +/* +$params['job_id'] = (string) The ID of the job +$params['snapshot_id'] = (string) The ID of the snapshot +$params['timeout'] = (time) How long should the API wait for the job to be opened and the old snapshot to be loaded. +*/ ---- **** [[Elasticsearch_Namespaces_MlNamespacevalidate_validate]] -.`validate()` +.`validate(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) The job config (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->validate($params); ---- **** [[Elasticsearch_Namespaces_MlNamespacevalidateDetector_validateDetector]] -.`validateDetector()` +.`validateDetector(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) The detector (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ml()->validateDetector($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/MonitoringNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/MonitoringNamespace.asciidoc index d5479ab39..45415973e 100644 --- a/docs/build/Elasticsearch/Namespaces/MonitoringNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/MonitoringNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_MonitoringNamespace]] === Elasticsearch\Namespaces\MonitoringNamespace Class MonitoringNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,7 +23,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_MonitoringNamespacebulk_bulk]] -.`bulk()` +.`bulk(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -30,13 +35,6 @@ $params['system_api_version'] = (string) API Version of the monitored system $params['interval'] = (string) Collection interval (e.g., '10s' or '10000ms') of the payload $params['body'] = (array) The operation definition and data (action-data pairs), separated by newlines (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->monitoring()->bulk($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/NodesNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/NodesNamespace.asciidoc index 3ea270649..9ba1d2bd5 100644 --- a/docs/build/Elasticsearch/Namespaces/NodesNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/NodesNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_NodesNamespace]] === Elasticsearch\Namespaces\NodesNamespace Class NodesNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -21,7 +27,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_NodesNamespacehotThreads_hotThreads]] -.`hotThreads()` +.`hotThreads(array $params = [])` **** [source,php] ---- @@ -34,20 +40,13 @@ $params['ignore_idle_threads'] = (boolean) Don't show threads that are in known- $params['type'] = (enum) The type to sample (default: cpu) (Options = cpu,wait,block) $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes()->hotThreads($params); ---- **** [[Elasticsearch_Namespaces_NodesNamespaceinfo_info]] -.`info()` +.`info(array $params = [])` **** [source,php] ---- @@ -55,40 +54,26 @@ $response = $client->nodes()->hotThreads($params); $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes $params['metric'] = (list) A comma-separated list of metrics you wish returned. Leave empty to return all. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes()->info($params); ---- **** [[Elasticsearch_Namespaces_NodesNamespacereloadSecureSettings_reloadSecureSettings]] -.`reloadSecureSettings()` +.`reloadSecureSettings(array $params = [])` **** [source,php] ---- /* $params['node_id'] = (list) A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes()->reloadSecureSettings($params); ---- **** [[Elasticsearch_Namespaces_NodesNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- @@ -97,20 +82,13 @@ $params['node_id'] = (list) A comma-separated list of node ID $params['metric'] = (list) Limit the information returned to the specified metrics $params['index_metric'] = (list) Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes()->stats($params); ---- **** [[Elasticsearch_Namespaces_NodesNamespaceusage_usage]] -.`usage()` +.`usage(array $params = [])` **** [source,php] ---- @@ -119,13 +97,6 @@ $params['node_id'] = (list) A comma-separated list of node IDs or names to limit $params['metric'] = (list) Limit the information returned to the specified metrics $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->nodes()->usage($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/RollupNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/RollupNamespace.asciidoc index 4378c7542..e11575dc1 100644 --- a/docs/build/Elasticsearch/Namespaces/RollupNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/RollupNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_RollupNamespace]] === Elasticsearch\Namespaces\RollupNamespace Class RollupNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,6 +23,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -25,7 +31,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_RollupNamespacedeleteJob_deleteJob]] -.`deleteJob()` +.`deleteJob(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -33,20 +39,13 @@ The class defines the following methods: /* $params['id'] = (string) The ID of the job to delete */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->deleteJob($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespacegetJobs_getJobs]] -.`getJobs()` +.`getJobs(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -54,20 +53,13 @@ $response = $client->rollup()->deleteJob($params); /* $params['id'] = (string) The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->getJobs($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespacegetRollupCaps_getRollupCaps]] -.`getRollupCaps()` +.`getRollupCaps(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -75,20 +67,13 @@ $response = $client->rollup()->getJobs($params); /* $params['id'] = (string) The ID of the index to check rollup capabilities on, or left blank for all jobs */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->getRollupCaps($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespacegetRollupIndexCaps_getRollupIndexCaps]] -.`getRollupIndexCaps()` +.`getRollupIndexCaps(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -96,20 +81,13 @@ $response = $client->rollup()->getRollupCaps($params); /* $params['index'] = (string) The rollup index or index pattern to obtain rollup capabilities from. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->getRollupIndexCaps($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespaceputJob_putJob]] -.`putJob()` +.`putJob(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -118,20 +96,28 @@ $response = $client->rollup()->getRollupIndexCaps($params); $params['id'] = (string) The ID of the job to create $params['body'] = (array) The job configuration (Required) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->putJob($params); +[[Elasticsearch_Namespaces_RollupNamespacerollup_rollup]] +.`rollup(array $params = [])` +**** +[source,php] +---- +/* +$params['index'] = (string) The index to roll up +$params['rollup_index'] = (string) The name of the rollup index to create +$params['body'] = (array) The rollup configuration (Required) +*/ ---- **** [[Elasticsearch_Namespaces_RollupNamespacerollupSearch_rollupSearch]] -.`rollupSearch()` +.`rollupSearch(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -143,20 +129,13 @@ $params['typed_keys'] = (boolean) Specify whether aggregation and su $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false) $params['body'] = (array) The search request body (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->rollupSearch($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespacestartJob_startJob]] -.`startJob()` +.`startJob(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -164,20 +143,13 @@ $response = $client->rollup()->rollupSearch($params); /* $params['id'] = (string) The ID of the job to start */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->startJob($params); ---- **** [[Elasticsearch_Namespaces_RollupNamespacestopJob_stopJob]] -.`stopJob()` +.`stopJob(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -186,13 +158,6 @@ $response = $client->rollup()->startJob($params); $params['id'] = (string) The ID of the job to stop $params['wait_for_completion'] = (boolean) True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->rollup()->stopJob($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.asciidoc index e7f50cd44..b72e4de98 100644 --- a/docs/build/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_SearchableSnapshotsNamespace]] === Elasticsearch\Namespaces\SearchableSnapshotsNamespace Class SearchableSnapshotsNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -21,7 +26,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SearchableSnapshotsNamespaceclearCache_clearCache]] -.`clearCache()` +.`clearCache(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -32,20 +37,13 @@ $params['ignore_unavailable'] = (boolean) Whether specified concrete indices sho $params['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) $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,none,all) (Default = open) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchablesnapshots()->clearCache($params); ---- **** [[Elasticsearch_Namespaces_SearchableSnapshotsNamespacemount_mount]] -.`mount()` +.`mount(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -55,22 +53,16 @@ $params['repository'] = (string) The name of the repository containing $params['snapshot'] = (string) The name of the snapshot of the index to mount $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) +$params['storage'] = (string) Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` (Default = ) $params['body'] = (array) The restore configuration for mounting the snapshot as searchable (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchablesnapshots()->mount($params); ---- **** [[Elasticsearch_Namespaces_SearchableSnapshotsNamespacerepositoryStats_repositoryStats]] -.`repositoryStats()` +.`repositoryStats(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] @@ -78,34 +70,21 @@ $response = $client->searchablesnapshots()->mount($params); /* $params['repository'] = (string) The repository for which to get the stats for */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchablesnapshots()->repositoryStats($params); ---- **** [[Elasticsearch_Namespaces_SearchableSnapshotsNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` *NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- /* $params['index'] = (list) A comma-separated list of index names +$params['level'] = (enum) Return stats aggregated at cluster, index or shard level (Options = cluster,indices,shards) (Default = indices) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->searchablesnapshots()->stats($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SecurityNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SecurityNamespace.asciidoc index f4ab65f29..3c91ef0af 100644 --- a/docs/build/Elasticsearch/Namespaces/SecurityNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SecurityNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_SecurityNamespace]] === Elasticsearch\Namespaces\SecurityNamespace Class SecurityNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -15,6 +20,7 @@ The class defines the following methods: * <> * <> +* <> * <> * <> * <> @@ -33,6 +39,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -44,26 +51,19 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SecurityNamespaceauthenticate_authenticate]] -.`authenticate()` +.`authenticate(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->authenticate($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacechangePassword_changePassword]] -.`changePassword()` +.`changePassword(array $params = [])` **** [source,php] ---- @@ -72,40 +72,39 @@ $params['username'] = (string) The username of the user to change the password f $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) the new password for the user (Required) */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->security()->changePassword($params); +[[Elasticsearch_Namespaces_SecurityNamespaceclearApiKeyCache_clearApiKeyCache]] +.`clearApiKeyCache(array $params = [])` +**** +[source,php] +---- +/* +$params['ids'] = (list) A comma-separated list of IDs of API keys to clear from the cache +*/ ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceclearCachedPrivileges_clearCachedPrivileges]] -.`clearCachedPrivileges()` +.`clearCachedPrivileges(array $params = [])` **** [source,php] ---- /* $params['application'] = (list) A comma-separated list of application names */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->clearCachedPrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceclearCachedRealms_clearCachedRealms]] -.`clearCachedRealms()` +.`clearCachedRealms(array $params = [])` **** [source,php] ---- @@ -113,40 +112,26 @@ $response = $client->security()->clearCachedPrivileges($params); $params['realms'] = (list) Comma-separated list of realms to clear $params['usernames'] = (list) Comma-separated list of usernames to clear from the cache */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->clearCachedRealms($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceclearCachedRoles_clearCachedRoles]] -.`clearCachedRoles()` +.`clearCachedRoles(array $params = [])` **** [source,php] ---- /* $params['name'] = (list) Role name */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->clearCachedRoles($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacecreateApiKey_createApiKey]] -.`createApiKey()` +.`createApiKey(array $params = [])` **** [source,php] ---- @@ -154,20 +139,13 @@ $response = $client->security()->clearCachedRoles($params); $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) The api key request to create an API key (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->createApiKey($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacedeletePrivileges_deletePrivileges]] -.`deletePrivileges()` +.`deletePrivileges(array $params = [])` **** [source,php] ---- @@ -176,20 +154,13 @@ $params['application'] = (string) Application name $params['name'] = (string) Privilege name $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->deletePrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacedeleteRole_deleteRole]] -.`deleteRole()` +.`deleteRole(array $params = [])` **** [source,php] ---- @@ -197,20 +168,13 @@ $response = $client->security()->deletePrivileges($params); $params['name'] = (string) Role name $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->deleteRole($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacedeleteRoleMapping_deleteRoleMapping]] -.`deleteRoleMapping()` +.`deleteRoleMapping(array $params = [])` **** [source,php] ---- @@ -218,20 +182,13 @@ $response = $client->security()->deleteRole($params); $params['name'] = (string) Role-mapping name $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->deleteRoleMapping($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacedeleteUser_deleteUser]] -.`deleteUser()` +.`deleteUser(array $params = [])` **** [source,php] ---- @@ -239,20 +196,13 @@ $response = $client->security()->deleteRoleMapping($params); $params['username'] = (string) username $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->deleteUser($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacedisableUser_disableUser]] -.`disableUser()` +.`disableUser(array $params = [])` **** [source,php] ---- @@ -260,20 +210,13 @@ $response = $client->security()->deleteUser($params); $params['username'] = (string) The username of the user to disable $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->disableUser($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceenableUser_enableUser]] -.`enableUser()` +.`enableUser(array $params = [])` **** [source,php] ---- @@ -281,20 +224,13 @@ $response = $client->security()->disableUser($params); $params['username'] = (string) The username of the user to enable $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->enableUser($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetApiKey_getApiKey]] -.`getApiKey()` +.`getApiKey(array $params = [])` **** [source,php] ---- @@ -305,39 +241,25 @@ $params['username'] = (string) user name of the user who created this API key $params['realm_name'] = (string) realm name of the user who created this API key to be retrieved $params['owner'] = (boolean) flag to query API keys owned by the currently authenticated user (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getApiKey($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetBuiltinPrivileges_getBuiltinPrivileges]] -.`getBuiltinPrivileges()` +.`getBuiltinPrivileges(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getBuiltinPrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetPrivileges_getPrivileges]] -.`getPrivileges()` +.`getPrivileges(array $params = [])` **** [source,php] ---- @@ -345,119 +267,91 @@ $response = $client->security()->getBuiltinPrivileges($params); $params['application'] = (string) Application name $params['name'] = (string) Privilege name */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getPrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetRole_getRole]] -.`getRole()` +.`getRole(array $params = [])` **** [source,php] ---- /* -$params['name'] = (string) Role name +$params['name'] = (list) A comma-separated list of role names */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getRole($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetRoleMapping_getRoleMapping]] -.`getRoleMapping()` +.`getRoleMapping(array $params = [])` **** [source,php] ---- /* -$params['name'] = (string) Role-Mapping name +$params['name'] = (list) A comma-separated list of role-mapping names */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getRoleMapping($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetToken_getToken]] -.`getToken()` +.`getToken(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) The token request to get (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getToken($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetUser_getUser]] -.`getUser()` +.`getUser(array $params = [])` **** [source,php] ---- /* $params['username'] = (list) A comma-separated list of usernames */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->getUser($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespacegetUserPrivileges_getUserPrivileges]] -.`getUserPrivileges()` +.`getUserPrivileges(array $params = [])` **** [source,php] ---- /* */ +---- +**** -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->security()->getUserPrivileges($params); + +[[Elasticsearch_Namespaces_SecurityNamespacegrantApiKey_grantApiKey]] +.`grantApiKey(array $params = [])` +**** +[source,php] +---- +/* +$params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) +$params['body'] = (array) The api key request to create an API key (Required) +*/ ---- **** [[Elasticsearch_Namespaces_SecurityNamespacehasPrivileges_hasPrivileges]] -.`hasPrivileges()` +.`hasPrivileges(array $params = [])` **** [source,php] ---- @@ -465,59 +359,38 @@ $response = $client->security()->getUserPrivileges($params); $params['user'] = (string) Username $params['body'] = (array) The privileges to test (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->hasPrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceinvalidateApiKey_invalidateApiKey]] -.`invalidateApiKey()` +.`invalidateApiKey(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->invalidateApiKey($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceinvalidateToken_invalidateToken]] -.`invalidateToken()` +.`invalidateToken(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) The token to invalidate (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->invalidateToken($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceputPrivileges_putPrivileges]] -.`putPrivileges()` +.`putPrivileges(array $params = [])` **** [source,php] ---- @@ -525,20 +398,13 @@ $response = $client->security()->invalidateToken($params); $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) The privilege(s) to add (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->putPrivileges($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceputRole_putRole]] -.`putRole()` +.`putRole(array $params = [])` **** [source,php] ---- @@ -547,20 +413,13 @@ $params['name'] = (string) Role name $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) The role to add (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->putRole($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceputRoleMapping_putRoleMapping]] -.`putRoleMapping()` +.`putRoleMapping(array $params = [])` **** [source,php] ---- @@ -569,20 +428,13 @@ $params['name'] = (string) Role-mapping name $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) The role mapping to add (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->putRoleMapping($params); ---- **** [[Elasticsearch_Namespaces_SecurityNamespaceputUser_putUser]] -.`putUser()` +.`putUser(array $params = [])` **** [source,php] ---- @@ -591,13 +443,6 @@ $params['username'] = (string) The username of the User $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) $params['body'] = (array) The user to add (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->security()->putUser($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SlmNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SlmNamespace.asciidoc index 9cb1e73f5..a2812fea5 100644 --- a/docs/build/Elasticsearch/Namespaces/SlmNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SlmNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_SlmNamespace]] === Elasticsearch\Namespaces\SlmNamespace Class SlmNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -26,124 +31,82 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SlmNamespacedeleteLifecycle_deleteLifecycle]] -.`deleteLifecycle()` +.`deleteLifecycle(array $params = [])` **** [source,php] ---- /* $params['policy_id'] = (string) The id of the snapshot lifecycle policy to remove */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->deleteLifecycle($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespaceexecuteLifecycle_executeLifecycle]] -.`executeLifecycle()` +.`executeLifecycle(array $params = [])` **** [source,php] ---- /* $params['policy_id'] = (string) The id of the snapshot lifecycle policy to be executed */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->executeLifecycle($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespaceexecuteRetention_executeRetention]] -.`executeRetention()` +.`executeRetention(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->executeRetention($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespacegetLifecycle_getLifecycle]] -.`getLifecycle()` +.`getLifecycle(array $params = [])` **** [source,php] ---- /* $params['policy_id'] = (list) Comma-separated list of snapshot lifecycle policies to retrieve */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->getLifecycle($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespacegetStats_getStats]] -.`getStats()` +.`getStats(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->getStats($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespacegetStatus_getStatus]] -.`getStatus()` +.`getStatus(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->getStatus($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespaceputLifecycle_putLifecycle]] -.`putLifecycle()` +.`putLifecycle(array $params = [])` **** [source,php] ---- @@ -151,51 +114,30 @@ $response = $client->slm()->getStatus($params); $params['policy_id'] = (string) The id of the snapshot lifecycle policy $params['body'] = (array) The snapshot lifecycle policy definition to register */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->putLifecycle($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespacestart_start]] -.`start()` +.`start(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->start($params); ---- **** [[Elasticsearch_Namespaces_SlmNamespacestop_stop]] -.`stop()` +.`stop(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->slm()->stop($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SnapshotNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SnapshotNamespace.asciidoc index cd30a8954..402ad1882 100644 --- a/docs/build/Elasticsearch/Namespaces/SnapshotNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SnapshotNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_SnapshotNamespace]] === Elasticsearch\Namespaces\SnapshotNamespace Class SnapshotNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -13,6 +19,7 @@ Generated running $ php util/GenerateEndpoints.php 7.9 The class defines the following methods: * <> +* <> * <> * <> * <> @@ -26,7 +33,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SnapshotNamespacecleanupRepository_cleanupRepository]] -.`cleanupRepository()` +.`cleanupRepository(array $params = [])` **** [source,php] ---- @@ -35,20 +42,30 @@ $params['repository'] = (string) A repository name $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['timeout'] = (time) Explicit operation timeout */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->cleanupRepository($params); +[[Elasticsearch_Namespaces_SnapshotNamespaceclone_clone]] +.`clone(array $params = [])` +**** +[source,php] +---- +/* +$params['repository'] = (string) A repository name +$params['snapshot'] = (string) The name of the snapshot to clone from +$params['target_snapshot'] = (string) The name of the cloned snapshot to create +$params['master_timeout'] = (time) Explicit operation timeout for connection to master node +$params['body'] = (array) The snapshot clone definition (Required) +*/ ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacecreate_create]] -.`create()` +.`create(array $params = [])` **** [source,php] ---- @@ -59,20 +76,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connectio $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) $params['body'] = (array) The snapshot definition */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->create($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacecreateRepository_createRepository]] -.`createRepository()` +.`createRepository(array $params = [])` **** [source,php] ---- @@ -83,20 +93,13 @@ $params['timeout'] = (time) Explicit operation timeout $params['verify'] = (boolean) Whether to verify the repository after creation $params['body'] = (array) The repository definition (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->createRepository($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacedelete_delete]] -.`delete()` +.`delete(array $params = [])` **** [source,php] ---- @@ -105,40 +108,26 @@ $params['repository'] = (string) A repository name $params['snapshot'] = (string) A snapshot name $params['master_timeout'] = (time) Explicit operation timeout for connection to master node */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->delete($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacedeleteRepository_deleteRepository]] -.`deleteRepository()` +.`deleteRepository(array $params = [])` **** [source,php] ---- /* $params['repository'] = (list) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->deleteRepository($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespaceget_get]] -.`get()` +.`get(array $params = [])` **** [source,php] ---- @@ -149,20 +138,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connection $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown $params['verbose'] = (boolean) Whether to show verbose snapshot info or only show the basic info found in the repository index blob */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->get($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacegetRepository_getRepository]] -.`getRepository()` +.`getRepository(array $params = [])` **** [source,php] ---- @@ -171,20 +153,13 @@ $params['repository'] = (list) A comma-separated list of repository names $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->getRepository($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacerestore_restore]] -.`restore()` +.`restore(array $params = [])` **** [source,php] ---- @@ -195,20 +170,13 @@ $params['master_timeout'] = (time) Explicit operation timeout for connectio $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = false) $params['body'] = (array) Details of what to restore */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->restore($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespacestatus_status]] -.`status()` +.`status(array $params = [])` **** [source,php] ---- @@ -218,20 +186,13 @@ $params['snapshot'] = (list) A comma-separated list of snapshot names $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->status($params); ---- **** [[Elasticsearch_Namespaces_SnapshotNamespaceverifyRepository_verifyRepository]] -.`verifyRepository()` +.`verifyRepository(array $params = [])` **** [source,php] ---- @@ -240,13 +201,6 @@ $params['repository'] = (string) A repository name $params['master_timeout'] = (time) Explicit operation timeout for connection to master node $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->snapshot()->verifyRepository($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SqlNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SqlNamespace.asciidoc index af732b5ad..a716370d3 100644 --- a/docs/build/Elasticsearch/Namespaces/SqlNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SqlNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_SqlNamespace]] === Elasticsearch\Namespaces\SqlNamespace Class SqlNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -20,26 +25,19 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SqlNamespaceclearCursor_clearCursor]] -.`clearCursor()` +.`clearCursor(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->sql()->clearCursor($params); ---- **** [[Elasticsearch_Namespaces_SqlNamespacequery_query]] -.`query()` +.`query(array $params = [])` **** [source,php] ---- @@ -47,33 +45,19 @@ $response = $client->sql()->clearCursor($params); $params['format'] = (string) a short version of the Accept header, e.g. json, yaml $params['body'] = (array) Use the `query` element to start a query. Use the `cursor` element to continue a query. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->sql()->query($params); ---- **** [[Elasticsearch_Namespaces_SqlNamespacetranslate_translate]] -.`translate()` +.`translate(array $params = [])` **** [source,php] ---- /* $params['body'] = (array) Specify the query in the `query` element. (Required) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->sql()->translate($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/SslNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/SslNamespace.asciidoc index ad7bdf947..fc08b0a5a 100644 --- a/docs/build/Elasticsearch/Namespaces/SslNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/SslNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_SslNamespace]] === Elasticsearch\Namespaces\SslNamespace Class SslNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -18,19 +23,12 @@ The class defines the following methods: [[Elasticsearch_Namespaces_SslNamespacecertificates_certificates]] -.`certificates()` +.`certificates(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->ssl()->certificates($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/TasksNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/TasksNamespace.asciidoc index a95efd250..1a4f47e5b 100644 --- a/docs/build/Elasticsearch/Namespaces/TasksNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/TasksNamespace.asciidoc @@ -1,11 +1,17 @@ -[discrete] + + [[Elasticsearch_Namespaces_TasksNamespace]] === Elasticsearch\Namespaces\TasksNamespace Class TasksNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -20,7 +26,8 @@ The class defines the following methods: [[Elasticsearch_Namespaces_TasksNamespacecancel_cancel]] -.`cancel()` +.`cancel(array $params = [])` +*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- @@ -29,20 +36,14 @@ $params['task_id'] = (string) Cancel the task with specified task id $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes $params['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->tasks()->cancel($params); ---- **** [[Elasticsearch_Namespaces_TasksNamespaceget_get]] -.`get()` +.`get(array $params = [])` +*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- @@ -51,20 +52,14 @@ $params['task_id'] = (string) Return the task with specified id (nod $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false) $params['timeout'] = (time) Explicit operation timeout */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->tasks()->get($params); ---- **** [[Elasticsearch_Namespaces_TasksNamespacelist_list]] -.`list()` +.`list(array $params = [])` +*NOTE:* This API is EXPERIMENTAL and may be changed or removed completely in a future release **** [source,php] ---- @@ -72,33 +67,19 @@ $response = $client->tasks()->get($params); $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->tasks()->list($params); ---- **** [[Elasticsearch_Namespaces_TasksNamespacetasksList_tasksList]] -.`tasksList()` +.`tasksList(array $params = [])` **** [source,php] ---- /* Proxy function to list() to prevent BC break since 7.4.0 */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->tasks()->tasksList($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/TextStructureNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/TextStructureNamespace.asciidoc new file mode 100644 index 000000000..ae618a994 --- /dev/null +++ b/docs/build/Elasticsearch/Namespaces/TextStructureNamespace.asciidoc @@ -0,0 +1,50 @@ + + +[[Elasticsearch_Namespaces_TextStructureNamespace]] +=== Elasticsearch\Namespaces\TextStructureNamespace + + + +Class TextStructureNamespace + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) + + +*Methods* + +The class defines the following methods: + +* <> + + + +[[Elasticsearch_Namespaces_TextStructureNamespacefindStructure_findStructure]] +.`findStructure(array $params = [])` +**** +[source,php] +---- +/* +$params['lines_to_sample'] = (int) How many lines of the file should be included in the analysis (Default = 1000) +$params['line_merge_size_limit'] = (int) Maximum number of characters permitted in a single message when lines are merged to create messages. (Default = 10000) +$params['timeout'] = (time) Timeout after which the analysis will be aborted (Default = 25s) +$params['charset'] = (string) Optional parameter to specify the character set of the file +$params['format'] = (enum) Optional parameter to specify the high level file format (Options = ndjson,xml,delimited,semi_structured_text) +$params['has_header_row'] = (boolean) Optional parameter to specify whether a delimited file includes the column names in its first row +$params['column_names'] = (list) Optional parameter containing a comma separated list of the column names for a delimited file +$params['delimiter'] = (string) Optional parameter to specify the delimiter character for a delimited file - must be a single character +$params['quote'] = (string) Optional parameter to specify the quote character for a delimited file - must be a single character +$params['should_trim_fields'] = (boolean) Optional parameter to specify whether the values between delimiters in a delimited file should have whitespace trimmed from them +$params['grok_pattern'] = (string) Optional parameter to specify the Grok pattern that should be used to extract fields from messages in a semi-structured text file +$params['timestamp_field'] = (string) Optional parameter to specify the timestamp field in the file +$params['timestamp_format'] = (string) Optional parameter to specify the timestamp format in the file - may be either a Joda or Java time format +$params['explain'] = (boolean) Whether to include a commentary on how the structure was derived (Default = false) +$params['body'] = (array) The contents of the file to be analyzed (Required) +*/ +---- +**** + + diff --git a/docs/build/Elasticsearch/Namespaces/TransformNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/TransformNamespace.asciidoc index 6bcb2e328..2654fa2bc 100644 --- a/docs/build/Elasticsearch/Namespaces/TransformNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/TransformNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_TransformNamespace]] === Elasticsearch\Namespaces\TransformNamespace Class TransformNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -25,7 +30,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_TransformNamespacedeleteTransform_deleteTransform]] -.`deleteTransform()` +.`deleteTransform(array $params = [])` **** [source,php] ---- @@ -33,43 +38,30 @@ The class defines the following methods: $params['transform_id'] = (string) The id of the transform to delete $params['force'] = (boolean) When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->deleteTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespacegetTransform_getTransform]] -.`getTransform()` +.`getTransform(array $params = [])` **** [source,php] ---- /* -$params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms -$params['from'] = (int) skips a number of transform configs, defaults to 0 -$params['size'] = (int) specifies a max number of transforms to get, defaults to 100 -$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) +$params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms +$params['from'] = (int) skips a number of transform configs, defaults to 0 +$params['size'] = (int) specifies a max number of transforms to get, defaults to 100 +$params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) +$params['exclude_generated'] = (boolean) Omits fields that are illegal to set on transform PUT (Default = false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->getTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespacegetTransformStats_getTransformStats]] -.`getTransformStats()` +.`getTransformStats(array $params = [])` **** [source,php] ---- @@ -79,59 +71,38 @@ $params['from'] = (number) skips a number of transform stats, defaults $params['size'] = (number) specifies a max number of transform stats to get, defaults to 100 $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->getTransformStats($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespacepreviewTransform_previewTransform]] -.`previewTransform()` +.`previewTransform(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->previewTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespaceputTransform_putTransform]] -.`putTransform()` +.`putTransform(array $params = [])` **** [source,php] ---- /* $params['transform_id'] = (string) The id of the new transform. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->putTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespacestartTransform_startTransform]] -.`startTransform()` +.`startTransform(array $params = [])` **** [source,php] ---- @@ -139,20 +110,13 @@ $response = $client->transform()->putTransform($params); $params['transform_id'] = (string) The id of the transform to start $params['timeout'] = (time) Controls the time to wait for the transform to start */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->startTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespacestopTransform_stopTransform]] -.`stopTransform()` +.`stopTransform(array $params = [])` **** [source,php] ---- @@ -164,33 +128,19 @@ $params['timeout'] = (time) Controls the time to wait until the tran $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) $params['wait_for_checkpoint'] = (boolean) Whether to wait for the transform to reach a checkpoint before stopping. Default to false */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->stopTransform($params); ---- **** [[Elasticsearch_Namespaces_TransformNamespaceupdateTransform_updateTransform]] -.`updateTransform()` +.`updateTransform(array $params = [])` **** [source,php] ---- /* $params['transform_id'] = (string) The id of the transform. */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->transform()->updateTransform($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/WatcherNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/WatcherNamespace.asciidoc index 7bf7c0b89..30d91f316 100644 --- a/docs/build/Elasticsearch/Namespaces/WatcherNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/WatcherNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_WatcherNamespace]] === Elasticsearch\Namespaces\WatcherNamespace Class WatcherNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -20,6 +25,7 @@ The class defines the following methods: * <> * <> * <> +* <> * <> * <> * <> @@ -27,7 +33,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_WatcherNamespaceackWatch_ackWatch]] -.`ackWatch()` +.`ackWatch(array $params = [])` **** [source,php] ---- @@ -35,80 +41,52 @@ The class defines the following methods: $params['watch_id'] = (string) Watch ID (Required) $params['action_id'] = (list) A comma-separated list of the action ids to be acked */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->ackWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespaceactivateWatch_activateWatch]] -.`activateWatch()` +.`activateWatch(array $params = [])` **** [source,php] ---- /* $params['watch_id'] = (string) Watch ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->activateWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespacedeactivateWatch_deactivateWatch]] -.`deactivateWatch()` +.`deactivateWatch(array $params = [])` **** [source,php] ---- /* $params['watch_id'] = (string) Watch ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->deactivateWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespacedeleteWatch_deleteWatch]] -.`deleteWatch()` +.`deleteWatch(array $params = [])` **** [source,php] ---- /* $params['id'] = (string) Watch ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->deleteWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespaceexecuteWatch_executeWatch]] -.`executeWatch()` +.`executeWatch(array $params = [])` **** [source,php] ---- @@ -117,40 +95,26 @@ $params['id'] = (string) Watch ID $params['debug'] = (boolean) indicates whether the watch should execute in debug mode $params['body'] = (array) Execution control */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->executeWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespacegetWatch_getWatch]] -.`getWatch()` +.`getWatch(array $params = [])` **** [source,php] ---- /* $params['id'] = (string) Watch ID */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->getWatch($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespaceputWatch_putWatch]] -.`putWatch()` +.`putWatch(array $params = [])` **** [source,php] ---- @@ -162,39 +126,38 @@ $params['if_seq_no'] = (number) only update the watch if the last operatio $params['if_primary_term'] = (number) only update the watch if the last operation that has changed the watch has the specified primary term $params['body'] = (array) The watch */ +---- +**** + -$params = [ - // ... -]; -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->putWatch($params); +[[Elasticsearch_Namespaces_WatcherNamespacequeryWatches_queryWatches]] +.`queryWatches(array $params = [])` +**** +[source,php] +---- +/* +$params['body'] = (array) From, size, query, sort and search_after +*/ ---- **** [[Elasticsearch_Namespaces_WatcherNamespacestart_start]] -.`start()` +.`start(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->start($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespacestats_stats]] -.`stats()` +.`stats(array $params = [])` **** [source,php] ---- @@ -202,32 +165,18 @@ $response = $client->watcher()->start($params); $params['metric'] = (list) Controls what additional stat metrics should be include in the response $params['emit_stacktraces'] = (boolean) Emits stack traces of currently running watches */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->stats($params); ---- **** [[Elasticsearch_Namespaces_WatcherNamespacestop_stop]] -.`stop()` +.`stop(array $params = [])` **** [source,php] ---- /* */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->watcher()->stop($params); ---- **** diff --git a/docs/build/Elasticsearch/Namespaces/XpackNamespace.asciidoc b/docs/build/Elasticsearch/Namespaces/XpackNamespace.asciidoc index 0e8e42baa..dbe2a2689 100644 --- a/docs/build/Elasticsearch/Namespaces/XpackNamespace.asciidoc +++ b/docs/build/Elasticsearch/Namespaces/XpackNamespace.asciidoc @@ -1,12 +1,17 @@ -[discrete] + [[Elasticsearch_Namespaces_XpackNamespace]] === Elasticsearch\Namespaces\XpackNamespace Class XpackNamespace -Generated running $ php util/GenerateEndpoints.php 7.9 + +*Description* + + +NOTE: this file is autogenerated using util/GenerateEndpoints.php +and Elasticsearch 7.12.1 (3186837139b9c6b6d23c3200870651f10d3343b7) *Methods* @@ -19,7 +24,7 @@ The class defines the following methods: [[Elasticsearch_Namespaces_XpackNamespaceinfo_info]] -.`info()` +.`info(array $params = [])` **** [source,php] ---- @@ -27,33 +32,19 @@ The class defines the following methods: $params['categories'] = (list) Comma-separated list of info categories. Can be any of: build, license, features $params['accept_enterprise'] = (boolean) If an enterprise license is installed, return the type and mode as 'enterprise' (default: false) */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->xpack()->info($params); ---- **** [[Elasticsearch_Namespaces_XpackNamespaceusage_usage]] -.`usage()` +.`usage(array $params = [])` **** [source,php] ---- /* $params['master_timeout'] = (time) Specify timeout for watch write operation */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = $client->xpack()->usage($params); ---- **** diff --git a/docs/build/classes.asciidoc b/docs/build/classes.asciidoc index 40b01b0e8..ffe63929d 100644 --- a/docs/build/classes.asciidoc +++ b/docs/build/classes.asciidoc @@ -1,6 +1,6 @@ [[ElasticsearchPHP_Endpoints]] -== API reference +== Reference - Endpoints This is a complete list of namespaces and their associated endpoints. @@ -17,11 +17,13 @@ NOTE: This is auto-generated documentation * <> * <> * <> +* <> * <> * <> * <> * <> * <> +* <> * <> * <> * <> @@ -34,6 +36,7 @@ NOTE: This is auto-generated documentation * <> * <> * <> +* <> * <> * <> * <> @@ -48,11 +51,13 @@ include::Elasticsearch/Namespaces/DanglingIndicesNamespace.asciidoc[] include::Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.asciidoc[] include::Elasticsearch/Namespaces/EnrichNamespace.asciidoc[] include::Elasticsearch/Namespaces/EqlNamespace.asciidoc[] +include::Elasticsearch/Namespaces/FeaturesNamespace.asciidoc[] include::Elasticsearch/Namespaces/GraphNamespace.asciidoc[] include::Elasticsearch/Namespaces/IlmNamespace.asciidoc[] include::Elasticsearch/Namespaces/IndicesNamespace.asciidoc[] include::Elasticsearch/Namespaces/IngestNamespace.asciidoc[] include::Elasticsearch/Namespaces/LicenseNamespace.asciidoc[] +include::Elasticsearch/Namespaces/LogstashNamespace.asciidoc[] include::Elasticsearch/Namespaces/MigrationNamespace.asciidoc[] include::Elasticsearch/Namespaces/MlNamespace.asciidoc[] include::Elasticsearch/Namespaces/MonitoringNamespace.asciidoc[] @@ -65,7 +70,7 @@ include::Elasticsearch/Namespaces/SnapshotNamespace.asciidoc[] include::Elasticsearch/Namespaces/SqlNamespace.asciidoc[] include::Elasticsearch/Namespaces/SslNamespace.asciidoc[] include::Elasticsearch/Namespaces/TasksNamespace.asciidoc[] +include::Elasticsearch/Namespaces/TextStructureNamespace.asciidoc[] include::Elasticsearch/Namespaces/TransformNamespace.asciidoc[] include::Elasticsearch/Namespaces/WatcherNamespace.asciidoc[] include::Elasticsearch/Namespaces/XpackNamespace.asciidoc[] -include::../experimental-beta-apis.asciidoc[] \ No newline at end of file diff --git a/docs/build/renderer.index b/docs/build/renderer.index index c8469f869..528bc5f17 100644 --- a/docs/build/renderer.index +++ b/docs/build/renderer.index @@ -1 +1 @@ -C:21:"Doctum\Renderer\Index":3099:{a:3:{i:0;a:31:{s:20:"Elasticsearch\Client";s:40:"41392d92c739aeb8e5e162dba05bd03199b2f467";s:27:"Elasticsearch\ClientBuilder";s:40:"64ffad30ba1b1351d03352b742c8cf30ed6f9328";s:45:"Elasticsearch\Namespaces\AsyncSearchNamespace";s:40:"e16f4d6c0c9a35abbccff6e14ca3216295983a8f";s:45:"Elasticsearch\Namespaces\AutoscalingNamespace";s:40:"16fb99466ecbf37ea48f2df03a2ada115a600bc5";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"8f3030baf8faf5c9eccb7f07d790b5ae5e9fa385";s:37:"Elasticsearch\Namespaces\CcrNamespace";s:40:"efcb621571da79c8bb4c2f9d925312baaab0e0c0";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"b88a94c8a26e0a16b20b9c612263338099bb1895";s:49:"Elasticsearch\Namespaces\DanglingIndicesNamespace";s:40:"d737ce8c2b760ed05d9cf9966c83702fd6755598";s:62:"Elasticsearch\Namespaces\DataFrameTransformDeprecatedNamespace";s:40:"e3673920247463d734c67333d0283238ee1ff4bc";s:40:"Elasticsearch\Namespaces\EnrichNamespace";s:40:"b38c8e90bfe59fd35b5cdecb6568ce0dc73e5ae0";s:37:"Elasticsearch\Namespaces\EqlNamespace";s:40:"9e1ff1dedc2188fc82799b843da02a5e14b46014";s:39:"Elasticsearch\Namespaces\GraphNamespace";s:40:"39ae22be2fc902fed161da265a38f5e282f49567";s:37:"Elasticsearch\Namespaces\IlmNamespace";s:40:"22941b09927c52f03c2c44a02287437a10fa13e8";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"1454bd74fd5c74f828a842cd4f18ec56a1fb9a01";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"35ec23599fabdd5b6dbb3bd2aa163d08010baad2";s:41:"Elasticsearch\Namespaces\LicenseNamespace";s:40:"7323db1fbe2838cab725e96957ac9ed8cb176b72";s:43:"Elasticsearch\Namespaces\MigrationNamespace";s:40:"e1a0596c921bb737cd489e7eecf74eb4c34ae0ca";s:36:"Elasticsearch\Namespaces\MlNamespace";s:40:"f08fb92b1c053e43a2adaed7b019a92633235a44";s:44:"Elasticsearch\Namespaces\MonitoringNamespace";s:40:"7cb9e759038d97c3a82e56c44d1144b4051d7a21";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"c00b4de1b869e0c1f6aa81f729527b9de4772012";s:40:"Elasticsearch\Namespaces\RollupNamespace";s:40:"7d4543d68becd6b2ee3a3d27e1e3de3e9e848aa8";s:53:"Elasticsearch\Namespaces\SearchableSnapshotsNamespace";s:40:"9a38da95e1ca472563d2f0c831a4787c1375f549";s:42:"Elasticsearch\Namespaces\SecurityNamespace";s:40:"341a98c6561ff5b3fa4dc7f0d6d9a5cf5b9c9d2e";s:37:"Elasticsearch\Namespaces\SlmNamespace";s:40:"c7dfd50ccf1a4b584198538a25c9cf857a3ef2d2";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"41ff13e453661b78217ffb348820846c0737d62d";s:37:"Elasticsearch\Namespaces\SqlNamespace";s:40:"cb7da0aaadc476b68bf5b13b415e38a2105b7693";s:37:"Elasticsearch\Namespaces\SslNamespace";s:40:"9d3a27f55594e603d07a6aad8bed92350edec1dc";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"316b7494503d525f61699202a01bb5adb27cf278";s:43:"Elasticsearch\Namespaces\TransformNamespace";s:40:"c5e99fd4770ce050f229712843ad7f89bff3b3ac";s:41:"Elasticsearch\Namespaces\WatcherNamespace";s:40:"a8d349b23ab6c5f7e147c62d956b944e34fda11b";s:39:"Elasticsearch\Namespaces\XpackNamespace";s:40:"aecef4a1eb4e821e2a4f788a2e020fcd50a31a43";}i:1;a:1:{i:0;s:4:"main";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}} \ No newline at end of file +C:21:"Doctum\Renderer\Index":3398:{a:3:{i:0;a:34:{s:20:"Elasticsearch\Client";s:40:"f6943c4681d5ffdba5a789013583e504cb70a3cf";s:27:"Elasticsearch\ClientBuilder";s:40:"21cec9bf2a59d975831ec9d69035a3a120a9a345";s:45:"Elasticsearch\Namespaces\AsyncSearchNamespace";s:40:"6fc9a92dc7816ba2093823ab3c1455ec9cc5879c";s:45:"Elasticsearch\Namespaces\AutoscalingNamespace";s:40:"2c3b926711f575a452ded86435e8c9e57cfe969a";s:37:"Elasticsearch\Namespaces\CatNamespace";s:40:"3577f88d273f0170263f35019bb3651b33deda4c";s:37:"Elasticsearch\Namespaces\CcrNamespace";s:40:"181fad0acdd4f0707617435b078b5312ba9d9cc0";s:41:"Elasticsearch\Namespaces\ClusterNamespace";s:40:"fb55e4fdf067430390b1bd40ab4e03fe20119630";s:49:"Elasticsearch\Namespaces\DanglingIndicesNamespace";s:40:"89a2fd6f7f7b2c34c599355919f75fa3ebbcedd3";s:62:"Elasticsearch\Namespaces\DataFrameTransformDeprecatedNamespace";s:40:"6ff68fa9e63fc3c44472521f406d8c5bb7acf97f";s:40:"Elasticsearch\Namespaces\EnrichNamespace";s:40:"b1f74a1ce1201744cdcae0d7d84cba4bb32f798a";s:37:"Elasticsearch\Namespaces\EqlNamespace";s:40:"530663bc407ad80efb08a7af1f26f09ac1bf3786";s:42:"Elasticsearch\Namespaces\FeaturesNamespace";s:40:"862ca554e424a0bccac65a083f27f5dd807b8ec8";s:39:"Elasticsearch\Namespaces\GraphNamespace";s:40:"c80fb7aab5e8e9aeb85d10a6feefad2c26051128";s:37:"Elasticsearch\Namespaces\IlmNamespace";s:40:"dae205c8235e2ae28e74bbcd3282aaed3a581953";s:41:"Elasticsearch\Namespaces\IndicesNamespace";s:40:"9e227074e3f8a86e61241a3a7cfe6f455889cb49";s:40:"Elasticsearch\Namespaces\IngestNamespace";s:40:"ca485d69ad49add09288377088795d9be72adc0d";s:41:"Elasticsearch\Namespaces\LicenseNamespace";s:40:"a6db2f0ef144c67332d085076e627692c4b1c4b1";s:42:"Elasticsearch\Namespaces\LogstashNamespace";s:40:"dc55ee9684e08f92b849c76c453a093ac07458b4";s:43:"Elasticsearch\Namespaces\MigrationNamespace";s:40:"1b46c7dc2889307648099673289461d7c6af9830";s:36:"Elasticsearch\Namespaces\MlNamespace";s:40:"17febf7c489f89cec873d9d4261b22fdce9f041e";s:44:"Elasticsearch\Namespaces\MonitoringNamespace";s:40:"99778ccc7e53dd9bc993df297768c767b23cc9ab";s:39:"Elasticsearch\Namespaces\NodesNamespace";s:40:"1ec0dd8ae912d54a2ef035b144201f7a1ea77612";s:40:"Elasticsearch\Namespaces\RollupNamespace";s:40:"d835ed84cf7cb159962fd4934344392e36e5e939";s:53:"Elasticsearch\Namespaces\SearchableSnapshotsNamespace";s:40:"b26b22778efe2fb4d1686c352497d0cda0c0a261";s:42:"Elasticsearch\Namespaces\SecurityNamespace";s:40:"4942863314524474f90a775f0fefd8ab1a53efd3";s:37:"Elasticsearch\Namespaces\SlmNamespace";s:40:"604c7c85b35e856157da837b52ef22b1812d5951";s:42:"Elasticsearch\Namespaces\SnapshotNamespace";s:40:"58460ba514e23082008c66f92b6491d04712ff2b";s:37:"Elasticsearch\Namespaces\SqlNamespace";s:40:"2bc520074409c32a3f83dac02ebd95b1b30963c5";s:37:"Elasticsearch\Namespaces\SslNamespace";s:40:"75f30381c019d44465a53c60e4f860d74da536da";s:39:"Elasticsearch\Namespaces\TasksNamespace";s:40:"104958f5e7b77fddd28e41bce971748743914a0c";s:47:"Elasticsearch\Namespaces\TextStructureNamespace";s:40:"8af30a0f80eff56a2ff1bb5297cf5c2dce8e5b6f";s:43:"Elasticsearch\Namespaces\TransformNamespace";s:40:"831a900f6688083fdf78828b801278fa3b28839a";s:41:"Elasticsearch\Namespaces\WatcherNamespace";s:40:"f320fdc36854d712991911b21c4033c3d674ee0a";s:39:"Elasticsearch\Namespaces\XpackNamespace";s:40:"4671646d2224ed2e7eba96798a2434f3fd88b662";}i:1;a:1:{i:0;s:4:"main";}i:2;a:2:{i:0;s:13:"Elasticsearch";i:1;s:24:"Elasticsearch\Namespaces";}}} \ No newline at end of file diff --git a/docs/community.asciidoc b/docs/community.asciidoc index 21b9e1eb6..f086dfbba 100644 --- a/docs/community.asciidoc +++ b/docs/community.asciidoc @@ -1,8 +1,8 @@ [[community_dsls]] -== Community DSLs +=== Community DSLs [discrete] -=== ElasticsearchDSL +==== ElasticsearchDSL https://github.com/ongr-io/ElasticsearchDSL[Link: ElasticsearchDSL] [quote, ElasticsearchDSL] @@ -13,7 +13,7 @@ it to an array. __________________________ [discrete] -=== elasticsearcher +==== elasticsearcher https://github.com/madewithlove/elasticsearcher[Link: elasticsearcher] @@ -26,7 +26,7 @@ client. __________________________ [discrete] -=== ElasticSearchQueryDSL +==== ElasticSearchQueryDSL https://github.com/gskema/elasticsearch-query-dsl-php[Link: ElasticSearchQueryDSL] @@ -38,13 +38,14 @@ explicit naming. __________________________ -== Community Integrations +[[community-integrations]] +=== Community Integrations [discrete] -=== Symfony +==== Symfony [discrete] -==== ONGR Elasticsearch Bundle +===== ONGR Elasticsearch Bundle https://github.com/ongr-io/ElasticsearchBundle[Link: ONGR {es} Bundle] @@ -70,7 +71,7 @@ Technical goodies: __________________________ [discrete] -==== FOS Elastica Bundle +===== FOS Elastica Bundle https://github.com/FriendsOfSymfony/FOSElasticaBundle[Link: FOS Elastica Bundle] @@ -87,10 +88,10 @@ __________________________ [discrete] -=== Drupal +==== Drupal [discrete] -==== {es} Connector +===== {es} Connector https://www.drupal.org/project/elasticsearch_connector[Link: {es} Connector] @@ -101,10 +102,10 @@ Drupal. __________________________ [discrete] -=== Laravel +==== Laravel [discrete] -==== shift31/Laravel-Elasticsearch +===== shift31/Laravel-Elasticsearch https://github.com/shift31/laravel-elasticsearch[Link: shift31/Laravel-Elasticsearch] @@ -115,7 +116,7 @@ __________________________ [discrete] -==== cviebrock/Laravel-Elasticsearch +===== cviebrock/Laravel-Elasticsearch https://github.com/cviebrock/laravel-elasticsearch[Link: cviebrock/Laravel-Elasticsearch] @@ -126,7 +127,7 @@ __________________________ [discrete] -==== Plastic +===== Plastic https://github.com/sleimanx2/plastic[Link: Plastic] @@ -138,10 +139,10 @@ mapping, querying, and storing eloquent models. __________________________ [discrete] -=== Helper +==== Helper [discrete] -==== Index Helper +===== Index Helper https://github.com/Nexucis/es-php-index-helper[Link: nexucis/es-php-index-helper] @@ -150,6 +151,6 @@ _____________________ This helper is a light library which wrap the official client elasticsearch-php. It will help you to manage your ES Indices with no downtime. This helper implements the philosophy described in the -https://www.elastic.co/guide/en/elasticsearch/guide/master/index-aliases.html[official documentation] +https://www.elastic.co/guide/en/elasticsearch/guide/current/index-aliases.html[official documentation] which can be summarized in a few words : *use alias instead of index directly*. _____________________ diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc index b0063a661..69c77ac60 100644 --- a/docs/configuration.asciidoc +++ b/docs/configuration.asciidoc @@ -9,8 +9,11 @@ Custom configuration is accomplished before the client is instantiated, through the ClientBuilder helper object. You can find all the configuration options and check sample code that helps you replace the various components. +To learn more about JSON in PHP, read <>. + * <> * <> +* <> * <> * <> * <> @@ -24,10 +27,14 @@ check sample code that helps you replace the various components. * <> +include::php_json_objects.asciidoc[] + include::host-config.asciidoc[] include::set-retries.asciidoc[] +include::http-meta-data.asciidoc[] + include::logger.asciidoc[] include::http-handler.asciidoc[] diff --git a/docs/connecting.asciidoc b/docs/connecting.asciidoc index c621480c1..7cc9a9c5f 100644 --- a/docs/connecting.asciidoc +++ b/docs/connecting.asciidoc @@ -1,4 +1,4 @@ -[[connceting]] +[[connecting]] == Connecting This page contains the information you need to connect and use the Client with @@ -201,6 +201,45 @@ $client = ClientBuilder::create() ---- +[discrete] +[[client-comp]] +=== Enabling the Compatibility Mode + +The Elasticsearch server version 8.0 is introducing a new compatibility mode that +allows you a smoother upgrade experience from 7 to 8. In a nutshell, you can use +the latest 7.x Elasticsearch client with an 8.x Elasticsearch server, giving more +room to coordinate the upgrade of your codebase to the next major version. + +If you want to leverage this functionality, please make sure that you are using the +latest 7.x client and set the environment variable `ELASTIC_CLIENT_APIVERSIONING` +to `true`. The client is handling the rest internally. For every 8.0 and beyond +client, you're all set! The compatibility mode is enabled by default. + +[discrete] +[[space-encode-url]] +=== Space encode in URL + +If you use a space character in an index name, elasticsearch-php will convert it into +a `+`, since this space must be encoded in a URL. The same applies for `id` and `type` +parameters. + +Starting from Elasticsearch 7.4, a `+` in URL will be encoded as `%2B` by all the REST +API functionality. Prior versions handled a `+` as a single space. If your +application requires handling `+` as a single space you can return to the old +behaviour by setting the Elasticsearch system property `es.rest.url_plus_as_space` to `true`. +You can read the https://www.elastic.co/guide/en/elasticsearch/reference/7.17/breaking-changes-7.4.html#_changes_to_encoding_plus_signs_in_urls[Elasticsearch release note] +for mote information. + +Starting from elasticsearch-php 7.17.2 we introduced an environmental variable `ELASTIC_CLIENT_URL_PLUS_AS_SPACE` +that can be used to encode a space using `+`, setting the variable to `true`. +If `ELASTIC_CLIENT_URL_PLUS_AS_SPACE` is set to `false` a space will be encoded using `%20` +as specified in https://www.rfc-editor.org/rfc/rfc3986[RFC 3986]. + +For instance, if you are using a space character in an index name, this will be +encoded using a `+`, default behaviour. If you set `ELASTIC_CLIENT_URL_PLUS_AS_SPACE` +to `false` the space in the index name will be encoded with `%20`. + + [discrete] [[client-usage]] === Usage diff --git a/docs/connection-pool.asciidoc b/docs/connection-pool.asciidoc index 962e56738..1dd1ef1eb 100644 --- a/docs/connection-pool.asciidoc +++ b/docs/connection-pool.asciidoc @@ -78,8 +78,10 @@ The `SimpleConnectionPool` returns the next node as specified by the selector; it does not track node conditions. It returns nodes either they are dead or alive. It is a simple pool of static hosts. -The `SimpleConnectionPool` is not recommended for routine use but it may be a -useful debugging tool. +The `SimpleConnectionPool` is recommended where the Elasticsearch deployment +is located behnd a (reverse-) proxy or load balancer, where the individual +Elasticsearch nodes are not visible to the client. This should be used when +running Elasticsearch deployments on Cloud. To use the `SimpleConnectionPool`: diff --git a/docs/helpers.asciidoc b/docs/helpers.asciidoc new file mode 100644 index 000000000..89631bc92 --- /dev/null +++ b/docs/helpers.asciidoc @@ -0,0 +1,84 @@ +[[client-helpers]] +== Client helpers + +The client comes with helpers to give you a more comfortable experience with +some APIs. + + +[discrete] +[[iterators]] +=== Iterators + + +[discrete] +[[search-response-iterator]] +==== Search response iterator + +The `SearchResponseIterator` can be used to iterate page by page in a search +result using +https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#paginate-search-results[pagination]. + +An example as follows: + +[source,php] +---- +use Elasticsearch\Helper\Iterators\SearchResponseIterator; + +$search_params = [ + 'scroll' => '5m', // period to retain the search context + 'index' => '', // here the index name + 'size' => 100, // 100 results per page + 'body' => [ + 'query' => [ + 'match_all' => new StdClass // {} in JSON + ] + ] +]; +// $client is Elasticsearch\Client instance +$pages = new SearchResponseIterator($client, $search_params); + +// Sample usage of iterating over page results +foreach($pages as $page) { + // do something with hit e.g. copy its data to another index + // e.g. prints the number of document per page (100) + echo count($page['hits']['hits']), PHP_EOL; +} +---- + + +[discrete] +[[search-hit-iterator]] +==== Search hit iterator + +The `SearchHitIterator` can be used to iterate in a `SearchResponseIterator` +without worrying about +https://www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#paginate-search-results[pagination]. + +An example as follows: + +[source,php] +---- +use Elasticsearch\Helper\Iterators\SearchHitIterator; +use Elasticsearch\Helper\Iterators\SearchResponseIterator; + +$search_params = [ + 'scroll' => '5m', // period to retain the search context + 'index' => '', // here the index name + 'size' => 100, // 100 results per page + 'body' => [ + 'query' => [ + 'match_all' => new StdClass // {} in JSON + ] + ] +]; +// $client is Elasticsearch\Client instance +$pages = new SearchResponseIterator($client, $search_params); +$hits = new SearchHitIterator($pages); + +// Sample usage of iterating over hits +foreach($hits as $hit) { + // do something with hit e.g. write to CSV, update a database, etc + // e.g. prints the document id + echo $hit['_id'], PHP_EOL; +} +---- \ No newline at end of file diff --git a/docs/http-meta-data.asciidoc b/docs/http-meta-data.asciidoc new file mode 100644 index 000000000..71f72957b --- /dev/null +++ b/docs/http-meta-data.asciidoc @@ -0,0 +1,70 @@ +[[http-meta-data]] +=== HTTP Meta Data + +By default, the client sends some meta data about the HTTP connection using +custom headers. + +You can disable or enable it using the following methods: + + +==== Elastic Meta Header + +The client sends a `x-elastic-client-meta` header by default. +This header is used to collect meta data about the versions of the components +used by the client. For instance, a value of `x-elastic-client-meta` can be +`es=7.14.0-s,php=7.4.11,t=7.14.0-s,a=0,cu=7.68.0`, where each value is the +version of `es=Elasticsearch`, `t` is the transport version (same of client), +`a` is asyncronouts (`0=false` by default) and `cu=cURL`. + +If you would like to disable it you can use the `setElasticMetaHeader()` +method, as follows: + +[source,php] +---- +$client = Elasticsearch\ClientBuilder::create() + ->setElasticMetaHeader(false) + ->build(); +---- + +==== Include port number in Host header + +This is a special setting for the client that enables the port in the +Host header. This setting has been introduced to prevent issues with +HTTP proxy layers (see issue https://github.com/elastic/elasticsearch-php/issues/993[#993]). + +By default the port number is not included in the Host header. +If you want you can enable it using the `includePortInHostHeader()` function, +as follows: + +[source,php] +---- +$client = Elasticsearch\ClientBuilder::create() + ->includePortInHostHeader(true) + ->build(); +---- + +==== Send the API compatibility layer + +Starting from version 7.13, {es} supports a compatibility header in +`Content-Type` and `Accept`. The PHP client can be configured to emit the following HTTP headers: + +[source] +---- +Content-Type: application/vnd.elasticsearch+json; compatible-with=7 +Accept: application/vnd.elasticsearch+json; compatible-with=7 +---- + +which signals to {es} that the client is requesting 7.x version of request and response +bodies. This allows upgrading from 7.x to 8.x version of Elasticsearch without upgrading +everything at once. {es} should be upgraded first after the compatibility header is +configured and clients should be upgraded second. + +To enable this compatibility header, you need to create an `ELASTIC_CLIENT_APIVERSIONING` +environment variable and set it to `true` or `1`, before the `Client` class initialization. + +In PHP you can set this environment variable as follows: + +[source,php] +---- +putenv("ELASTIC_CLIENT_APIVERSIONING=true"); +---- diff --git a/docs/index.asciidoc b/docs/index.asciidoc index f26b8925b..c41e38ecf 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -1,6 +1,9 @@ -= Elasticsearch-PHP += Elasticsearch PHP Client +:doctype: book + +include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[] include::{asciidoc-dir}/../../shared/attributes.asciidoc[] include::overview.asciidoc[] @@ -15,10 +18,8 @@ include::operations.asciidoc[] include::build/classes.asciidoc[] -include::php_json_objects.asciidoc[] - -include::breaking-changes.asciidoc[] +include::helpers.asciidoc[] -include::community.asciidoc[] +include::release-notes.asciidoc[] include::redirects.asciidoc[] diff --git a/docs/overview.asciidoc b/docs/overview.asciidoc index 637be8436..d079f9d12 100644 --- a/docs/overview.asciidoc +++ b/docs/overview.asciidoc @@ -12,4 +12,13 @@ from one language to the next with minimal effort. The client is designed to be "unopinionated". There are a few universal niceties added to the client (cluster state sniffing, round-robin requests, and so on) but largely it is very barebones. This was intentional; we want a common base -that more sophisticated libraries can build on top of. \ No newline at end of file +that more sophisticated libraries can build on top of. + +* <> +* <> +* <> + + +include::community.asciidoc[] + +include::breaking-changes.asciidoc[] \ No newline at end of file diff --git a/docs/per-request-configuration.asciidoc b/docs/per-request-configuration.asciidoc index 8e045d135..9bedf7c9c 100644 --- a/docs/per-request-configuration.asciidoc +++ b/docs/per-request-configuration.asciidoc @@ -253,7 +253,7 @@ Array It is possible to configure per-request curl timeouts via the `timeout` and `connect_timeout` parameters. These control the client-side, curl timeouts. The -`connect_timeout` paramter controls how long curl should wait for the "connect" +`connect_timeout` parameter controls how long curl should wait for the "connect" phase to finish, while the `timeout` parameter controls how long curl should wait for the entire request to finish. diff --git a/docs/php_json_objects.asciidoc b/docs/php_json_objects.asciidoc index 1e1c39d53..fa29496dd 100644 --- a/docs/php_json_objects.asciidoc +++ b/docs/php_json_objects.asciidoc @@ -1,5 +1,5 @@ [[php_json_objects]] -== Dealing with JSON arrays and objects in PHP +=== Dealing with JSON arrays and objects in PHP A common source of confusion with the client revolves around JSON arrays and objects, and how to specify them in PHP. In particular, problems are caused by @@ -7,7 +7,7 @@ empty objects and arrays of objects. This page shows you some common patterns used in {es} JSON API and how to convert that to a PHP representation. [discrete] -=== Empty Objects +==== Empty Objects The {es} API uses empty JSON objects in several locations which can cause problems for PHP. Unlike other languages, PHP does not have a "short" notation @@ -63,7 +63,7 @@ solution is the only way to acomplish the goal in PHP... there is no "short" version of an empty object. [discrete] -=== Arrays of Objects +==== Arrays of Objects Another common pattern in {es} DSL is an array of objects. For example, consider adding a sort to your query: @@ -126,7 +126,7 @@ $results = $client->search($params); ---- [discrete] -=== Arrays of empty objects +==== Arrays of empty objects Occasionally, you'll encounter DSL that requires both of the previous patterns. The function score query is a good example, it sometimes requires an array of diff --git a/docs/release-notes.asciidoc b/docs/release-notes.asciidoc new file mode 100644 index 000000000..a61848582 --- /dev/null +++ b/docs/release-notes.asciidoc @@ -0,0 +1,406 @@ +[[release-notes]] +== Release notes + +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> + +[discrete] +[[rn-7-15-0]] +=== 7.15.0 + +* Updated endpoints for Elasticsearch 7.15.0 + https://github.com/elastic/elasticsearch-php/commit/995f6d4bde7de76004e95d7a434b1d59da7a7e75[995f6d4] + + +[discrete] +[[rn-7-14-0]] +=== 7.14.0 + +* Usage of psr/log version 2 + https://github.com/elastic/elasticsearch-php/pull/1154[#1154] +* Update search iterators to send `scroll_id` inside the request body + https://github.com/elastic/elasticsearch-php/pull/1134[#1134] +* Added the `ingest.geoip.downloader.enabled=false` setting for ES + https://github.com/elastic/elasticsearch-php/commit/586735109dc18f22bfdf3b73ab0621b37e857be1[5867351] +* Removed phpcs for autogenerated files (endpoints) + https://github.com/elastic/elasticsearch-php/commit/651c57b2e6bf98a0fd48220949966e630e5a804a[651c57b] + + +[discrete] +[[rn-7-13-1]] +=== 7.13.1 + +* Added port in url for trace and logger messages + https://github.com/elastic/elasticsearch-php/pull/1126[#1126] + + +[discrete] +[[rn-7-13-0]] +=== 7.13.0 + +* (DOCS) Added the HTTP meta data section + https://github.com/elastic/elasticsearch-php/pull/1143[#1143] +* Added support for API Compatibility Header + https://github.com/elastic/elasticsearch-php/pull/1142[#1142] +* (DOCS) Added Helpers section to PHP book + https://github.com/elastic/elasticsearch-php/pull/1129[#1129] +* Added the API description in phpdoc section for each endpoint + https://github.com/elastic/elasticsearch-php/commit/9e05c8108b638b60cc676b6a4f4be97c7df9eb64[9e05c81] +* Usage of PHPUnit 9 only + migrated xml configurations + https://github.com/elastic/elasticsearch-php/commit/038b5dd043dc76b20b9f5f265ea914a38d33568d[038b5dd] + + +[discrete] +[[rn-7-12-0]] +=== 7.12.0 + +* Updated the endpoints for ES 7.12 + removed `cpliakas/git-wrapper` in favor of + `symplify/git-wrapper` + https://github.com/elastic/elasticsearch-php/commit/136d5b9717b3806c6b34ef8a5076bfe7cee8b46e[136d5b9] +* Fixed warning header as array in YAML tests generator + https://github.com/elastic/elasticsearch-php/commit/0d81be131bfc7eff6ef82468e61c16077a892aab[0d81be1] +* Refactored TEST_SUITE with free, platinum + removed old YamlRunnerTest + https://github.com/elastic/elasticsearch-php/commit/f69d96fc283580177002b4088c279c3d0c07befe[f69d96f] + + +[discrete] +[[rn-7-11-0]] +=== 7.11.0 + +* Added the `X-Elastic-Client-Meta` header which is used by Elastic Cloud and + can be disabled with `ClientBuilder::setElasticMetaHeader(false)` + https://github.com/elastic/elasticsearch-php/pull/1089[#1089] +* Replaced `array_walk` with `array_map` in `Connection::getURI` for PHP 8 + compatibility + https://github.com/elastic/elasticsearch-php/pull/1075[#1075] +* Remove unnecessary `InvalidArgumentExceptions` + https://github.com/elastic/elasticsearch-php/pull/1069[#1069] +* Introducing PHP 8 compatibility + https://github.com/elastic/elasticsearch-php/pull/1063[#1063] +* Replace Sami by Doctum and fix `.gitignore` + https://github.com/elastic/elasticsearch-php/pull/1062[#1062] + + +[discrete] +[[rn-7-10-0]] +=== 7.10.0 + +* Updated endpoints and namespaces for {es} 7.10 + https://github.com/elastic/elasticsearch-php/commit/3ceb7484a111aa20126168460c79f098c4fe0792[3ceb748] +* Fixed ClientBuilder::fromConfig allowing multiple function parameters (for + example, `setApiKey`) + https://github.com/elastic/elasticsearch-php/pull/1076[#1076] +* Refactored the YAML tests using generated PHPUnit code + [85fadc2](https://github.com/elastic/elasticsearch-php/commit/85fadc2bd4b2b309b19761a50ff13010d43a524d) + + +[discrete] +[[rn-7-9-1]] +=== 7.9.1 + +* Fixed using object instead of array in onFailure transport event + https://github.com/elastic/elasticsearch-php/pull/1066[#1066] +* Fixed reset custom header after endpoint call + https://github.com/elastic/elasticsearch-php/pull/1065[#1065] +* Show generic error messages when server returns no response + https://github.com/elastic/elasticsearch-php/pull/1056[#1056] + + +[discrete] +[[rn-7-9-0]] +=== 7.9.0 + +* Updated endpoints and namespaces for {es} 7.9 + https://github.com/elastic/elasticsearch-php/commit/28bf0ed6df6bc95f83f369509431d97907bfdeb0[28bf0ed] +* Moved `scroll_id` into `body` for search operations in the documentation + https://github.com/elastic/elasticsearch-php/pull/1052[#1052] +* Fixed PHP 7.4 preloading feature for autoload.php + https://github.com/elastic/elasticsearch-php/pull/1051[#1051] +* Improved message of JSON errors using `json_last_error_msg()` + https://github.com/elastic/elasticsearch-php/pull/1045[#1045] + + +[discrete] +[[rn-7-8-0]] +=== 7.8.0 + +* Updated endpoints and namespaces for {es} 7.8 + https://github.com/elastic/elasticsearch-php/commit/f2a0828d5ee9d126ad63e2a1d43f70b4013845e2[f2a0828] +* Improved documentation + https://github.com/elastic/elasticsearch-php/pull/1038[#1038], + https://github.com/elastic/elasticsearch-php/pull/1027[#1027], + https://github.com/elastic/elasticsearch-php/pull/1025[#1025] + + +[discrete] +[[rn-7-7-0]] +=== 7.7.0 + +* Removed setId() into endpoints, fixed `util/GenerateEndpoints.php` + https://github.com/elastic/elasticsearch-php/pull/1026[#1026] +* Fixes JsonErrorException with code instead of message + https://github.com/elastic/elasticsearch-php/pull/1022[#1022] +* Better exception message for Could not parse URI + https://github.com/elastic/elasticsearch-php/pull/1016[#1016] +* Added JUnit log for PHPUnit + https://github.com/elastic/elasticsearch-php/commit/88b7e1ce80a5a52c1d64d00c55fef77097bbd8a9[88b7e1c] +* Added the XPack endpoints + https://github.com/elastic/elasticsearch-php/commit/763d91a3d506075316b84a38b2bed7a098da5028[763d91a] + + + +[discrete] +[[rn-7-6-1]] +=== 7.6.1 + +* Fixed issue with `guzzlehttp/ringphp` and `guzzle/streams` using forks + `ezimuel/ringphp` and `ezimuel/guzzlestreams` + https://github.com/elastic/elasticsearch-php/commit/92a6a4adda5eafd1823c7c9c386e2c7e5e75cd08[92a6a4a] + + +[discrete] +[[rn-7-6-0]] +=== 7.6.0 + +* Generated the new endpoints for {es} 7.6.0 + https://github.com/elastic/elasticsearch-php/commit/be31f317af704f333b43bbcc7c01ddc7c91ec6f8[be31f31] + + +[discrete] +[[rn-7-5-1]] +=== 7.5.1 + +* Fixes port missing in log https://github.com/elastic/elasticsearch-php/issues/925[#925] + https://github.com/elastic/elasticsearch-php/commit/125594b40d167ef1509b3ee49a3f93426390c426[75e0888] +* Added `ClientBuilder::includePortInHostHeader()` to add the `port` in the + `Host` header. This fixes https://github.com/elastic/elasticsearch-php/issues/993[#993]. + By default the `port` is not included in the `Host` header. + https://github.com/elastic/elasticsearch-php/pull/997[#997] +* Replace abandoned packages: ringphp, streams and phpstan-shim + https://github.com/elastic/elasticsearch-php/pull/996[#996] +* Fixed gzip compression when setting Cloud Id + https://github.com/elastic/elasticsearch-php/pull/986[#986] + + +[discrete] +[[rn-7-5-0]] +=== 7.5.0 + +* Fixed `Client::extractArgument` iterable casting to array; this allows passing + a `Traversable` body for some endpoints (for example, Bulk, Msearch, + MsearchTemplate) + https://github.com/elastic/elasticsearch-php/pull/983[#983] +* Fixed the Response Exception if the `reason` field is null + https://github.com/elastic/elasticsearch-php/pull/980[#980] +* Added support for PHP 7.4 + https://github.com/elastic/elasticsearch-php/pull/976[#976] + + +[discrete] +[[rn-7-4-1]] +=== 7.4.1 + +* We added the suppress operator `@` for the deprecation messages + `@trigger_error()`. With this approach, we don't break existing application + that convert PHP errors in Exception (for example, using Laravel with issue + https://github.com/babenkoivan/scout-elasticsearch-driver/issues/297[297]) + Using the `@` operator is still possible to intercept the deprecation message + using a custom error handler. + https://github.com/elastic/elasticsearch-php/pull/973[#973] +* Add missing leading slash in the URL of put mapping endpoint + https://github.com/elastic/elasticsearch-php/pull/970[#970] +* Fix pre 7.2 endpoint class name with aliases + reapply fix #947. This PR + solved the unexpected BC break introduce in 7.4.0 with the code + generation tool + https://github.com/elastic/elasticsearch-php/pull/968[#968] + + +[discrete] +[[rn-7-4-0]] +=== 7.4.0 + +* Added the code generation for endpoints and namespaces based on the + https://github.com/elastic/elasticsearch/tree/v7.4.2/rest-api-spec/src/main/resources/rest-api-spec/api[REST API specification] + of {es}. This tool is available in `util/GenerateEndpoints.php`. + https://github.com/elastic/elasticsearch-php/pull/966[#966] +* Fixed the asciidoc + https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/ElasticsearchPHP_Endpoints.html[endpoints documentation] + based on the code generation using https://github.com/FriendsOfPHP/Sami[Sami] + project https://github.com/elastic/elasticsearch-php/pull/966[#966] +* All the `experimental` and `beta` APIs are now signed with a `@note` tag in + the phpdoc section (for example, + https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/Client.php[$client->rankEval()]). + For more information read the + https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/experimental_and_beta_apis.html[experimental and beta APIs] + section in the documentation. + https://github.com/elastic/elasticsearch-php/pull/966[#966] +* Removed `AlreadyExpiredException` since it has been removed + from {es} with https://github.com/elastic/elasticsearch/pull/24857[#24857] + https://github.com/elastic/elasticsearch-php/pull/954[#954] + + +[discrete] +[[rn-7-3-0]] +=== 7.3.0 + +* Added support for simplified access to the `X-Opaque-Id` header + https://github.com/elastic/elasticsearch-php/pull/952[#952] +* Added the HTTP port in the log messages + https://github.com/elastic/elasticsearch-php/pull/950[#950] +* Fixed hostname with underscore (ClientBuilder::prependMissingScheme) + https://github.com/elastic/elasticsearch-php/pull/949[#949] +* Removed unused Monolog in ClientBuilder + https://github.com/elastic/elasticsearch-php/pull/948[#948] + + +[discrete] +[[rn-7-2-2]] +=== 7.2.2 + +* Reintroduced the optional parameter in + `Elasticsearch\Namespaces\IndicesNamespace::getAliases()`. + This fixes the BC break introduced in 7.2.0 and 7.2.1. + https://github.com/elastic/elasticsearch-php/pull/947[#947] + + +[discrete] +[[rn-7-2-1]] +=== 7.2.1 + +* Reintroduced `Elasticsearch\Namespaces\IndicesNamespace::getAliases()` as proxy + to `IndicesNamespace::getAlias()` to prevent BC breaks. The `getAliases()` is + marked as deprecated and it will be removed from `elasticsearch-php 8.0` + https://github.com/elastic/elasticsearch-php/pull/943[#943] + +[discrete] +==== Docs + +* Fixed missing put mapping code snippet in code examples + https://github.com/elastic/elasticsearch-php/pull/938[#938] + + +[discrete] +[[rn-7-2-0]] +=== 7.2.0 + +* Updated the API endpoints for working with {es} 7.2.0: + * added `wait_for_active_shards` parameter to `indices.close` API; + * added `expand_wildcards` parameter to `cluster.health` API; + * added include_unloaded_segments`, `expand_wildcards`, `forbid_closed_indices` + parameters to `indices.stats` API. + https://github.com/elastic/elasticsearch-php/pull/933/commits/27d721ba44b8c199388650c5a1c8bd69757229aa[27d721b] +* Updated the phpdoc parameters for all the API endpoints + https://github.com/elastic/elasticsearch-php/pull/933/commits/27d721ba44b8c199388650c5a1c8bd69757229aa[27d721b] +* Improved the Travis CI speed using cache feature with composer + https://github.com/elastic/elasticsearch-php/pull/929[#929] +* Fixed `php_uname()` usage checking if it is disabled + https://github.com/elastic/elasticsearch-php/pull/927[#927] +* Added support of Elastic Cloud ID and API key authentication + https://github.com/elastic/elasticsearch-php/pull/923[#923] + + +[discrete] +[[rn-7-1-1]] +=== 7.1.1 + +* Fixed `ClientBuilder::setSSLVerification()` to accept string or boolean + https://github.com/elastic/elasticsearch-php/pull/917[#917] +* Fix type hinting for `setBody` in + `Elasticsearch\Endpoints\Ingest\Pipeline\Put` + https://github.com/elastic/elasticsearch-php/pull/913[#913] + + +[discrete] +[[rn-7-1-0]] +=== 7.1.0 + +* Added warning log for {es} response containing the `Warning` header + https://github.com/elastic/elasticsearch-php/pull/911[#911] +* Fixed #838 hosting company is blocking ports because of `YamlRunnerTest.php` + https://github.com/elastic/elasticsearch-php/pull/844[#844] +* Specialized inheritance of `NoNodesAvailableException` to extend + `ServerErrorResponseException` instead of the generic `\Exception` + https://github.com/elastic/elasticsearch-php/pull/607[#607] +* Fixed scroll TTL is extracted but not set as a body param + https://github.com/elastic/elasticsearch-php/pull/907[#907] + +[discrete] +==== Testing + +* Improved the speed of integration tests removing snapshots delete from + `YamlRunnerTest::clean` + https://github.com/elastic/elasticsearch-php/pull/911[#911] +* Reduced the number of skipping YAML integration tests from 20 to 6 + https://github.com/elastic/elasticsearch-php/pull/911[#911] + +[discrete] +==== Docs + +* Documentation updated for {es} 7 + https://github.com/elastic/elasticsearch-php/pull/904[#904] + + +[discrete] +[[rn-7-0-2]] +=== 7.0.2 + +* Fixed incorrect return type hint when using async requests/futures + https://github.com/elastic/elasticsearch-php/pull/905[#905] + + +[discrete] +[[rn-7-0-1]] +=== 7.0.1 + +* Fixed SniffingConnectionPool removing the return type of Connection::sniff() + https://github.com/elastic/elasticsearch-php/pull/899[#899] + + +[discrete] +[[rn-7-0-0]] +=== 7.0.0 + +* Requirement of PHP 7.1 instead of 7.0 that is not supported since 1 Jan 2019. + https://github.com/elastic/elasticsearch-php/pull/897[#897] +* Code refactoring using type hints and return type declarations where possible + https://github.com/elastic/elasticsearch-php/pull/897[#897] +* Update vendor libraries (PHPUnit 7.5, Symfony YAML 4.3, and so on) + https://github.com/elastic/elasticsearch-php/pull/897[#897] +* Updated all the API endpoints using the + https://github.com/elastic/elasticsearch/tree/v7.0.0/rest-api-spec/src/main/resources/rest-api-spec/api[latest 7.0.0 specs] + of {es} https://github.com/elastic/elasticsearch-php/pull/897[#897] +* Added the `User-Agent` in each HTTP request + https://github.com/elastic/elasticsearch-php/pull/898[#898] +* Simplified the logging methods + `logRequestFail($request, $response, $exception)` and + `logRequestSuccess($request, $response)` in + `Elasticsearch\Connections\Connection` + https://github.com/elastic/elasticsearch-php/pull/876[#876] +* Fix `json_encode` for unicode(emoji) characters + https://github.com/elastic/elasticsearch-php/pull/856[#856] +* Fix HTTP port specification using CURLOPT_PORT, not anymore in the host + https://github.com/elastic/elasticsearch-php/pull/782[#782] diff --git a/phpstan.neon b/phpstan.neon index 8d3ed4325..4aa9e4c09 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -7,3 +7,4 @@ parameters: - '#Constant JSON_THROW_ON_ERROR not found#' - '#Caught class JsonException not found#' - '#Call to method getCode\(\) on an unknown class JsonException#' + - '#Variable \$\w+ in isset\(\) always exists and is not nullable#' diff --git a/phpunit-integration-tests.xml b/phpunit-integration-tests.xml index ea7662d5c..2c83e3ccc 100644 --- a/phpunit-integration-tests.xml +++ b/phpunit-integration-tests.xml @@ -1,27 +1,18 @@ - - - - tests - - - - - Integration - - - - - src - - + + + + src + + + + + tests + + + + + Integration + + diff --git a/phpunit-yaml-free-tests.xml b/phpunit-yaml-free-tests.xml index 8ffdaf036..67e80cfd8 100644 --- a/phpunit-yaml-free-tests.xml +++ b/phpunit-yaml-free-tests.xml @@ -1,35 +1,26 @@ - - - - - - - - - tests/Elasticsearch/Tests/Yaml/Free - - - - - free - - - - - src - - - - - + + + + src + + + + + + + + + + tests/Elasticsearch/Tests/Yaml/Free + + + + + free + + + + + diff --git a/phpunit-yaml-platinum-tests.xml b/phpunit-yaml-platinum-tests.xml index 87bf8e8fb..4c2e5187d 100644 --- a/phpunit-yaml-platinum-tests.xml +++ b/phpunit-yaml-platinum-tests.xml @@ -1,35 +1,26 @@ - - - - - - - - - tests/Elasticsearch/Tests/Yaml/Platinum - - - - - platinum - - - - - src - - - - - + + + + src + + + + + + + + + + tests/Elasticsearch/Tests/Yaml/Platinum + + + + + platinum + + + + + diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1fa63af22..354208118 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,29 +1,20 @@ - - - - tests - - - - - Integration - free - platinum - - - - - src - - + + + + src + + + + + tests + + + + + Integration + free + platinum + + diff --git a/src/Elasticsearch/Client.php b/src/Elasticsearch/Client.php index 26d9acaf6..01ca239fe 100644 --- a/src/Elasticsearch/Client.php +++ b/src/Elasticsearch/Client.php @@ -36,6 +36,7 @@ use Elasticsearch\Namespaces\EnrichNamespace; use Elasticsearch\Namespaces\EqlNamespace; use Elasticsearch\Namespaces\FeaturesNamespace; +use Elasticsearch\Namespaces\FleetNamespace; use Elasticsearch\Namespaces\GraphNamespace; use Elasticsearch\Namespaces\IlmNamespace; use Elasticsearch\Namespaces\IndicesNamespace; @@ -64,11 +65,11 @@ * Class Client * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Client { - const VERSION = '7.13.0-SNAPSHOT'; + const VERSION = '7.17.1'; /** * @var Transport @@ -140,6 +141,11 @@ class Client */ protected $features; + /** + * @var FleetNamespace + */ + protected $fleet; + /** * @var GraphNamespace */ @@ -277,6 +283,7 @@ public function __construct(Transport $transport, callable $endpoint, array $reg $this->enrich = new EnrichNamespace($transport, $endpoint); $this->eql = new EqlNamespace($transport, $endpoint); $this->features = new FeaturesNamespace($transport, $endpoint); + $this->fleet = new FleetNamespace($transport, $endpoint); $this->graph = new GraphNamespace($transport, $endpoint); $this->ilm = new IlmNamespace($transport, $endpoint); $this->indices = new IndicesNamespace($transport, $endpoint); @@ -305,6 +312,8 @@ public function __construct(Transport $transport, callable $endpoint, array $reg } /** + * Allows to perform multiple index/update/delete operations in a single request. + * * $params['index'] = (string) Default index for items which don't provide one * $params['type'] = DEPRECATED (string) Default document type for items which don't provide one * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. 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) @@ -338,6 +347,8 @@ public function bulk(array $params = []) return $this->performRequest($endpoint); } /** + * Explicitly clears the search context for a scroll. + * * $params['scroll_id'] = DEPRECATED (list) A comma-separated list of scroll IDs to clear * $params['body'] = (array) A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter * @@ -359,6 +370,8 @@ public function clearScroll(array $params = []) return $this->performRequest($endpoint); } /** + * Close a point in time + * * $params['body'] = (array) a point-in-time id to close * * @param array $params Associative array of parameters @@ -377,6 +390,8 @@ public function closePointInTime(array $params = []) return $this->performRequest($endpoint); } /** + * Returns number of documents matching a query. + * * $params['index'] = (list) A comma-separated list of indices to restrict the results * $params['type'] = DEPRECATED (list) A comma-separated list of types to restrict the results * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -415,6 +430,8 @@ public function count(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new document in the index.Returns a 409 response when a document with a same ID already exists in the index. + * * $params['id'] = (string) Document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document @@ -449,6 +466,8 @@ public function create(array $params = []) return $this->performRequest($endpoint); } /** + * Removes a document from the index. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document @@ -481,6 +500,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes documents matching the provided query. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required) * $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types * $params['analyzer'] = (string) The analyzer to use for the query string @@ -502,9 +523,6 @@ public function delete(array $params = []) * $params['size'] = (number) Deprecated, please use `max_docs` instead * $params['max_docs'] = (number) Maximum number of documents to process (default: all documents) * $params['sort'] = (list) A comma-separated list of : pairs - * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field - * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes * $params['version'] = (boolean) Specify whether to return document version as part of a hit @@ -538,6 +556,8 @@ public function deleteByQuery(array $params = []) return $this->performRequest($endpoint); } /** + * Changes the number of requests per second for a particular Delete By Query operation. + * * $params['task_id'] = (string) The task id to rethrottle * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * @@ -557,6 +577,8 @@ public function deleteByQueryRethrottle(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a script. + * * $params['id'] = (string) Script ID * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -577,6 +599,8 @@ public function deleteScript(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about whether a document exists in an index. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) @@ -614,6 +638,8 @@ public function exists(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about whether a document source exists in an index. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document; deprecated and optional starting with 7.0 @@ -650,6 +676,8 @@ public function existsSource(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about why a specific matches (or doesn't match) a query. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document @@ -689,6 +717,8 @@ public function explain(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the information about the capabilities of fields among multiple indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['fields'] = (list) A comma-separated list of field names * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -715,6 +745,8 @@ public function fieldCaps(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a document. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) @@ -749,6 +781,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a script. + * * $params['id'] = (string) Script ID * $params['master_timeout'] = (time) Specify timeout for connection to master * @@ -768,13 +802,12 @@ public function getScript(array $params = []) return $this->performRequest($endpoint); } /** + * Returns all script contexts. + * * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function getScriptContext(array $params = []) { @@ -786,13 +819,12 @@ public function getScriptContext(array $params = []) return $this->performRequest($endpoint); } /** + * Returns available script types, languages and contexts + * * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function getScriptLanguages(array $params = []) { @@ -804,6 +836,8 @@ public function getScriptLanguages(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the source of a document. + * * $params['id'] = (string) The document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document; deprecated and optional starting with 7.0 @@ -837,6 +871,8 @@ public function getSource(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates a document in an index. + * * $params['id'] = (string) Document ID * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document @@ -875,6 +911,8 @@ public function index(array $params = []) return $this->performRequest($endpoint); } /** + * Returns basic information about the cluster. + * * * @param array $params Associative array of parameters * @return array @@ -890,6 +928,8 @@ public function info(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to get multiple documents in one request. + * * $params['index'] = (string) The name of the index * $params['type'] = DEPRECATED (string) The type of the document * $params['stored_fields'] = (list) A comma-separated list of stored fields to return in the response @@ -922,9 +962,11 @@ public function mget(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to execute several search operations in one request. + * * $params['index'] = (list) A comma-separated list of index names to use as default * $params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default - * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response * $params['pre_filter_shard_size'] = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. @@ -953,9 +995,11 @@ public function msearch(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to execute several search template operations in one request. + * * $params['index'] = (list) A comma-separated list of index names to use as default * $params['type'] = DEPRECATED (list) A comma-separated list of document types to use as default - * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response * $params['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false) @@ -982,6 +1026,8 @@ public function msearchTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Returns multiple termvectors in one request. + * * $params['index'] = (string) The index in which the document resides. * $params['type'] = DEPRECATED (string) The type of the document. * $params['ids'] = (list) A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body @@ -1018,12 +1064,14 @@ public function mtermvectors(array $params = []) return $this->performRequest($endpoint); } /** + * Open a point in time that can be used in subsequent searches + * * $params['index'] = (list) A comma-separated list of index names to open point in time; use `_all` or empty string to perform the operation on all indices * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) * $params['routing'] = (string) Specific routing value * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) - * $params['keep_alive'] = (string) Specific the time to live for the point in time + * $params['keep_alive'] = (string) Specific the time to live for the point in time (Required) * * @param array $params Associative array of parameters * @return array @@ -1041,6 +1089,8 @@ public function openPointInTime(array $params = []) return $this->performRequest($endpoint); } /** + * Returns whether the cluster is running. + * * * @param array $params Associative array of parameters * @return bool @@ -1059,6 +1109,8 @@ public function ping(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Creates or updates a script. + * * $params['id'] = (string) Script ID (Required) * $params['context'] = (string) Script context * $params['timeout'] = (time) Explicit operation timeout @@ -1085,6 +1137,8 @@ public function putScript(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to evaluate the quality of ranked search results over a set of typical search queries + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -1095,9 +1149,6 @@ public function putScript(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function rankEval(array $params = []) { @@ -1113,6 +1164,8 @@ public function rankEval(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to copy documents from one index to another, optionally filtering the sourcedocuments by a query, changing the destination index settings, or fetching thedocuments from a remote cluster. + * * $params['refresh'] = (boolean) Should the affected indexes be refreshed? * $params['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable. (Default = 1m) * $params['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. 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) @@ -1139,6 +1192,8 @@ public function reindex(array $params = []) return $this->performRequest($endpoint); } /** + * Changes the number of requests per second for a particular Reindex operation. + * * $params['task_id'] = (string) The task id to rethrottle * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * @@ -1158,12 +1213,14 @@ public function reindexRethrottle(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to use the Mustache language to pre-render a search definition. + * * $params['id'] = (string) The id of the stored search template * $params['body'] = (array) The search definition template and its params * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html#_validating_templates + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/render-search-template-api.html */ public function renderSearchTemplate(array $params = []) { @@ -1179,6 +1236,8 @@ public function renderSearchTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Allows an arbitrary script to be executed and a result to be returned + * * $params['body'] = (array) The script to execute * * @param array $params Associative array of parameters @@ -1200,6 +1259,8 @@ public function scriptsPainlessExecute(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to retrieve a large numbers of results from a single search request. + * * $params['scroll_id'] = DEPRECATED (string) The scroll ID * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search * $params['rest_total_hits_as_int'] = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false) @@ -1223,6 +1284,8 @@ public function scroll(array $params = []) return $this->performRequest($endpoint); } /** + * Returns results matching a query. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types * $params['analyzer'] = (string) The analyzer to use for the query string @@ -1290,6 +1353,52 @@ public function search(array $params = []) return $this->performRequest($endpoint); } /** + * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. + * + * $params['index'] = (list) Comma-separated list of data streams, indices, or aliases to search + * $params['field'] = (string) Field containing geospatial data to return + * $params['zoom'] = (int) Zoom level for the vector tile to search + * $params['x'] = (int) X coordinate for the vector tile to search + * $params['y'] = (int) Y coordinate for the vector tile to search + * $params['exact_bounds'] = (boolean) If false, the meta layer's feature is the bounding box of the tile. If true, the meta layer's feature is a bounding box resulting from a `geo_bounds` aggregation. (Default = false) + * $params['extent'] = (int) Size, in pixels, of a side of the vector tile. (Default = 4096) + * $params['grid_precision'] = (int) Additional zoom levels available through the aggs layer. Accepts 0-8. (Default = 8) + * $params['grid_type'] = (enum) Determines the geometry type for features in the aggs layer. (Options = grid,point,centroid) (Default = grid) + * $params['size'] = (int) Maximum number of features to return in the hits layer. Accepts 0-10000. (Default = 10000) + * $params['track_total_hits'] = (boolean|long) Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. + * $params['body'] = (array) Search request body. + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function searchMvt(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $field = $this->extractArgument($params, 'field'); + $zoom = $this->extractArgument($params, 'zoom'); + $x = $this->extractArgument($params, 'x'); + $y = $this->extractArgument($params, 'y'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('SearchMvt'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setField($field); + $endpoint->setZoom($zoom); + $endpoint->setX($x); + $endpoint->setY($y); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Returns information about the indices and shards that a search request would be executed against. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) * $params['routing'] = (string) Specific routing value @@ -1314,6 +1423,8 @@ public function searchShards(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to use the Mustache language to pre-render a search definition. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1323,7 +1434,7 @@ public function searchShards(array $params = []) * $params['preference'] = (string) Specify the node or shard the operation should be performed on (default: random) * $params['routing'] = (list) A comma-separated list of specific routing values * $params['scroll'] = (time) Specify how long a consistent view of the index should be maintained for scrolled search - * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,query_and_fetch,dfs_query_then_fetch,dfs_query_and_fetch) + * $params['search_type'] = (enum) Search operation type (Options = query_then_fetch,dfs_query_then_fetch) * $params['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit * $params['profile'] = (boolean) Specify whether to profile the query execution * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response @@ -1351,6 +1462,31 @@ public function searchTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. + * + * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices + * $params['body'] = (array) field name, string which is the prefix expected in matching terms, timeout and size for max number of results + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-terms-enum.html + */ + public function termsEnum(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('TermsEnum'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Returns information and statistics about terms in the fields of a particular document. + * * $params['index'] = (string) The index in which the document resides. (Required) * $params['id'] = (string) The id of the document, when not specified a doc param should be supplied. * $params['type'] = DEPRECATED (string) The type of the document. @@ -1389,6 +1525,8 @@ public function termvectors(array $params = []) return $this->performRequest($endpoint); } /** + * Updates a document with a script or partial document. + * * $params['id'] = (string) Document ID (Required) * $params['index'] = (string) The name of the index (Required) * $params['type'] = DEPRECATED (string) The type of the document @@ -1428,6 +1566,8 @@ public function update(array $params = []) return $this->performRequest($endpoint); } /** + * Performs an update on every document in the index without changing the source,for example to pick up a mapping change. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required) * $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types * $params['analyzer'] = (string) The analyzer to use for the query string @@ -1450,9 +1590,6 @@ public function update(array $params = []) * $params['size'] = (number) Deprecated, please use `max_docs` instead * $params['max_docs'] = (number) Maximum number of documents to process (default: all documents) * $params['sort'] = (list) A comma-separated list of : pairs - * $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return - * $params['_source_excludes'] = (list) A list of fields to exclude from the returned _source field - * $params['_source_includes'] = (list) A list of fields to extract and return from the _source field * $params['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. * $params['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes * $params['version'] = (boolean) Specify whether to return document version as part of a hit @@ -1487,6 +1624,8 @@ public function updateByQuery(array $params = []) return $this->performRequest($endpoint); } /** + * Changes the number of requests per second for a particular Update By Query operation. + * * $params['task_id'] = (string) The task id to rethrottle * $params['requests_per_second'] = (number) The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (Required) * @@ -1505,134 +1644,240 @@ public function updateByQueryRethrottle(array $params = []) return $this->performRequest($endpoint); } + /** + * Returns the asyncSearch namespace + */ public function asyncSearch(): AsyncSearchNamespace { return $this->asyncSearch; } + /** + * Returns the autoscaling namespace + */ public function autoscaling(): AutoscalingNamespace { return $this->autoscaling; } + /** + * Returns the cat namespace + */ public function cat(): CatNamespace { return $this->cat; } + /** + * Returns the ccr namespace + */ public function ccr(): CcrNamespace { return $this->ccr; } + /** + * Returns the cluster namespace + */ public function cluster(): ClusterNamespace { return $this->cluster; } + /** + * Returns the danglingIndices namespace + */ public function danglingIndices(): DanglingIndicesNamespace { return $this->danglingIndices; } + /** + * Returns the dataFrameTransformDeprecated namespace + */ public function dataFrameTransformDeprecated(): DataFrameTransformDeprecatedNamespace { return $this->dataFrameTransformDeprecated; } + /** + * Returns the enrich namespace + */ public function enrich(): EnrichNamespace { return $this->enrich; } + /** + * Returns the eql namespace + */ public function eql(): EqlNamespace { return $this->eql; } + /** + * Returns the features namespace + */ public function features(): FeaturesNamespace { return $this->features; } + /** + * Returns the fleet namespace + */ + public function fleet(): FleetNamespace + { + return $this->fleet; + } + /** + * Returns the graph namespace + */ public function graph(): GraphNamespace { return $this->graph; } + /** + * Returns the ilm namespace + */ public function ilm(): IlmNamespace { return $this->ilm; } + /** + * Returns the indices namespace + */ public function indices(): IndicesNamespace { return $this->indices; } + /** + * Returns the ingest namespace + */ public function ingest(): IngestNamespace { return $this->ingest; } + /** + * Returns the license namespace + */ public function license(): LicenseNamespace { return $this->license; } + /** + * Returns the logstash namespace + */ public function logstash(): LogstashNamespace { return $this->logstash; } + /** + * Returns the migration namespace + */ public function migration(): MigrationNamespace { return $this->migration; } + /** + * Returns the ml namespace + */ public function ml(): MlNamespace { return $this->ml; } + /** + * Returns the monitoring namespace + */ public function monitoring(): MonitoringNamespace { return $this->monitoring; } + /** + * Returns the nodes namespace + */ public function nodes(): NodesNamespace { return $this->nodes; } + /** + * Returns the rollup namespace + */ public function rollup(): RollupNamespace { return $this->rollup; } + /** + * Returns the searchableSnapshots namespace + */ public function searchableSnapshots(): SearchableSnapshotsNamespace { return $this->searchableSnapshots; } + /** + * Returns the security namespace + */ public function security(): SecurityNamespace { return $this->security; } + /** + * Returns the shutdown namespace + */ public function shutdown(): ShutdownNamespace { return $this->shutdown; } + /** + * Returns the slm namespace + */ public function slm(): SlmNamespace { return $this->slm; } + /** + * Returns the snapshot namespace + */ public function snapshot(): SnapshotNamespace { return $this->snapshot; } + /** + * Returns the sql namespace + */ public function sql(): SqlNamespace { return $this->sql; } + /** + * Returns the ssl namespace + */ public function ssl(): SslNamespace { return $this->ssl; } + /** + * Returns the tasks namespace + */ public function tasks(): TasksNamespace { return $this->tasks; } + /** + * Returns the textStructure namespace + */ public function textStructure(): TextStructureNamespace { return $this->textStructure; } + /** + * Returns the transform namespace + */ public function transform(): TransformNamespace { return $this->transform; } + /** + * Returns the watcher namespace + */ public function watcher(): WatcherNamespace { return $this->watcher; } + /** + * Returns the xpack namespace + */ public function xpack(): XpackNamespace { return $this->xpack; @@ -1653,6 +1898,8 @@ public function __call(string $name, array $arguments) } /** + * Extract an argument from the array of parameters + * * @return null|mixed */ public function extractArgument(array &$params, string $arg) diff --git a/src/Elasticsearch/ClientBuilder.php b/src/Elasticsearch/ClientBuilder.php index ed7026dcf..e4a162d98 100644 --- a/src/Elasticsearch/ClientBuilder.php +++ b/src/Elasticsearch/ClientBuilder.php @@ -42,6 +42,8 @@ class ClientBuilder { + const ALLOWED_METHODS_FROM_CONFIG = ['includePortInHostHeader']; + /** * @var Transport */ @@ -144,6 +146,9 @@ class ClientBuilder */ private $includePortInHostHeader = false; + /** + * Create an instance of ClientBuilder + */ public static function create(): ClientBuilder { return new static(); @@ -185,6 +190,7 @@ public function getRegisteredNamespacesBuilders(): array * Unknown keys will throw an exception by default, but this can be silenced * by setting `quiet` to true * + * @param array $config * @param bool $quiet False if unknown settings throw exception, true to silently * ignore unknown settings * @throws Common\Exceptions\RuntimeException @@ -193,7 +199,7 @@ public static function fromConfig(array $config, bool $quiet = false): Client { $builder = new static; foreach ($config as $key => $value) { - $method = "set$key"; + $method = in_array($key, self::ALLOWED_METHODS_FROM_CONFIG) ? $key : "set$key"; $reflection = new ReflectionClass($builder); if ($reflection->hasMethod($method)) { $func = $reflection->getMethod($method); @@ -214,6 +220,10 @@ public static function fromConfig(array $config, bool $quiet = false): Client } /** + * Get the default handler + * + * @param array $multiParams + * @param array $singleParams * @throws \RuntimeException */ public static function defaultHandler(array $multiParams = [], array $singleParams = []): callable @@ -235,6 +245,8 @@ public static function defaultHandler(array $multiParams = [], array $singlePara } /** + * Get the multi handler for async (CurlMultiHandler) + * * @throws \RuntimeException */ public static function multiHandler(array $params = []): CurlMultiHandler @@ -247,6 +259,8 @@ public static function multiHandler(array $params = []): CurlMultiHandler } /** + * Get the handler instance (CurlHandler) + * * @throws \RuntimeException */ public static function singleHandler(): CurlHandler @@ -258,6 +272,11 @@ public static function singleHandler(): CurlHandler } } + /** + * Set connection Factory + * + * @param ConnectionFactoryInterface $connectionFactory + */ public function setConnectionFactory(ConnectionFactoryInterface $connectionFactory): ClientBuilder { $this->connectionFactory = $connectionFactory; @@ -266,7 +285,10 @@ public function setConnectionFactory(ConnectionFactoryInterface $connectionFacto } /** + * Set the connection pool (default is StaticNoPingConnectionPool) + * * @param AbstractConnectionPool|string $connectionPool + * @param array $args * @throws \InvalidArgumentException */ public function setConnectionPool($connectionPool, array $args = []): ClientBuilder @@ -283,6 +305,11 @@ public function setConnectionPool($connectionPool, array $args = []): ClientBuil return $this; } + /** + * Set the endpoint + * + * @param callable $endpoint + */ public function setEndpoint(callable $endpoint): ClientBuilder { $this->endpoint = $endpoint; @@ -290,6 +317,11 @@ public function setEndpoint(callable $endpoint): ClientBuilder return $this; } + /** + * Register namespace + * + * @param NamespaceBuilderInterface $namespaceBuilder + */ public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder): ClientBuilder { $this->registeredNamespacesBuilders[] = $namespaceBuilder; @@ -297,6 +329,11 @@ public function registerNamespace(NamespaceBuilderInterface $namespaceBuilder): return $this; } + /** + * Set the transport + * + * @param Transport $transport + */ public function setTransport(Transport $transport): ClientBuilder { $this->transport = $transport; @@ -305,8 +342,9 @@ public function setTransport(Transport $transport): ClientBuilder } /** + * Set the HTTP handler (cURL is default) + * * @param mixed $handler - * @return $this */ public function setHandler($handler): ClientBuilder { @@ -315,6 +353,11 @@ public function setHandler($handler): ClientBuilder return $this; } + /** + * Set the PSR-3 Logger + * + * @param LoggerInterface $logger + */ public function setLogger(LoggerInterface $logger): ClientBuilder { $this->logger = $logger; @@ -322,6 +365,11 @@ public function setLogger(LoggerInterface $logger): ClientBuilder return $this; } + /** + * Set the PSR-3 tracer + * + * @param LoggerInterface $tracer + */ public function setTracer(LoggerInterface $tracer): ClientBuilder { $this->tracer = $tracer; @@ -330,6 +378,8 @@ public function setTracer(LoggerInterface $tracer): ClientBuilder } /** + * Set the serializer + * * @param \Elasticsearch\Serializers\SerializerInterface|string $serializer */ public function setSerializer($serializer): ClientBuilder @@ -339,6 +389,11 @@ public function setSerializer($serializer): ClientBuilder return $this; } + /** + * Set the hosts (nodes) + * + * @param array $hosts + */ public function setHosts(array $hosts): ClientBuilder { $this->hosts = $hosts; @@ -365,8 +420,9 @@ public function setApiKey(string $id, string $apiKey): ClientBuilder } /** - * Set the APIKey Pair, consiting of the API Id and the ApiKey of the Response from /_security/api_key + * Set Basic access authentication * + * @see https://en.wikipedia.org/wiki/Basic_access_authentication * @param string $username * @param string $password * @@ -416,6 +472,11 @@ public function setElasticCloudId(string $cloudId): ClientBuilder return $this; } + /** + * Set connection parameters + * + * @param array $params + */ public function setConnectionParams(array $params): ClientBuilder { $this->connectionParams = $params; @@ -423,6 +484,11 @@ public function setConnectionParams(array $params): ClientBuilder return $this; } + /** + * Set number or retries (default is equal to number of nodes) + * + * @param int $retries + */ public function setRetries(int $retries): ClientBuilder { $this->retries = $retries; @@ -431,6 +497,8 @@ public function setRetries(int $retries): ClientBuilder } /** + * Set the selector algorithm + * * @param \Elasticsearch\ConnectionPool\Selectors\SelectorInterface|string $selector */ public function setSelector($selector): ClientBuilder @@ -440,6 +508,12 @@ public function setSelector($selector): ClientBuilder return $this; } + /** + * Set sniff on start + * + * @param bool $sniffOnStart enable or disable sniff on start + */ + public function setSniffOnStart(bool $sniffOnStart): ClientBuilder { $this->sniffOnStart = $sniffOnStart; @@ -448,7 +522,10 @@ public function setSniffOnStart(bool $sniffOnStart): ClientBuilder } /** + * Set SSL certificate + * * @param string $cert The name of a file containing a PEM formatted certificate. + * @param string $password if the certificate requires a password */ public function setSSLCert(string $cert, string $password = null): ClientBuilder { @@ -458,7 +535,10 @@ public function setSSLCert(string $cert, string $password = null): ClientBuilder } /** - * @param string $key The name of a file containing a private SSL key. + * Set SSL key + * + * @param string $key The name of a file containing a private SSL key + * @param string $password if the private key requires a password */ public function setSSLKey(string $key, string $password = null): ClientBuilder { @@ -468,6 +548,8 @@ public function setSSLKey(string $key, string $password = null): ClientBuilder } /** + * Set SSL verification + * * @param bool|string $value */ public function setSSLVerification($value = true): ClientBuilder @@ -499,6 +581,9 @@ public function includePortInHostHeader(bool $enable): ClientBuilder return $this; } + /** + * Build and returns the Client object + */ public function build(): Client { $this->buildLoggers(); @@ -552,11 +637,22 @@ public function build(): Client if (! isset($this->connectionParams['client']['headers'])) { $this->connectionParams['client']['headers'] = []; } + $apiVersioning = $_SERVER['ELASTIC_CLIENT_APIVERSIONING'] + ?? $_ENV['ELASTIC_CLIENT_APIVERSIONING'] + ?? getenv('ELASTIC_CLIENT_APIVERSIONING'); if (! isset($this->connectionParams['client']['headers']['Content-Type'])) { - $this->connectionParams['client']['headers']['Content-Type'] = ['application/json']; + if ($apiVersioning === 'true' || $apiVersioning === '1') { + $this->connectionParams['client']['headers']['Content-Type'] = ['application/vnd.elasticsearch+json;compatible-with=7']; + } else { + $this->connectionParams['client']['headers']['Content-Type'] = ['application/json']; + } } if (! isset($this->connectionParams['client']['headers']['Accept'])) { - $this->connectionParams['client']['headers']['Accept'] = ['application/json']; + if ($apiVersioning === 'true' || $apiVersioning === '1') { + $this->connectionParams['client']['headers']['Accept'] = ['application/vnd.elasticsearch+json;compatible-with=7']; + } else { + $this->connectionParams['client']['headers']['Accept'] = ['application/json']; + } } $this->connectionFactory = new ConnectionFactory($this->handler, $this->connectionParams, $this->serializer, $this->logger, $this->tracer); diff --git a/src/Elasticsearch/Common/EmptyLogger.php b/src/Elasticsearch/Common/EmptyLogger.php index 938a4e51b..2acde2944 100644 --- a/src/Elasticsearch/Common/EmptyLogger.php +++ b/src/Elasticsearch/Common/EmptyLogger.php @@ -32,7 +32,7 @@ class EmptyLogger extends AbstractLogger implements LoggerInterface /** * {@inheritDoc} */ - public function log($level, $message, array $context = []) + public function log($level, $message, array $context = []): void { return; } diff --git a/src/Elasticsearch/Connections/Connection.php b/src/Elasticsearch/Connections/Connection.php index 1542c9b6c..acec0d002 100644 --- a/src/Elasticsearch/Connections/Connection.php +++ b/src/Elasticsearch/Connections/Connection.php @@ -99,7 +99,7 @@ class Connection implements ConnectionInterface /** * @var bool */ - protected $isAlive = false; + protected $isAlive = true; /** * @var float @@ -372,7 +372,7 @@ function ($value) { $uri = $this->path . $uri; } - return $uri ?? ''; + return $uri; } public function getHeaders(): array diff --git a/src/Elasticsearch/Endpoints/AbstractEndpoint.php b/src/Elasticsearch/Endpoints/AbstractEndpoint.php index 489cde5ce..7934013b4 100644 --- a/src/Elasticsearch/Endpoints/AbstractEndpoint.php +++ b/src/Elasticsearch/Endpoints/AbstractEndpoint.php @@ -20,9 +20,7 @@ use Elasticsearch\Common\Exceptions\UnexpectedValueException; use Elasticsearch\Serializers\SerializerInterface; -use Elasticsearch\Transport; -use Exception; -use GuzzleHttp\Ring\Future\FutureArrayInterface; +use Elasticsearch\Utility; abstract class AbstractEndpoint { @@ -127,7 +125,7 @@ public function setIndex($index) $index = implode(",", $index); } - $this->index = urlencode($index); + $this->index = Utility::urlencode($index); return $this; } @@ -155,7 +153,7 @@ public function setType(?string $type) $type = implode(",", $type); } - $this->type = urlencode($type); + $this->type = Utility::urlencode($type); return $this; } @@ -175,7 +173,7 @@ public function setId($docID) $docID = (string) $docID; } - $this->id = urlencode($docID); + $this->id = Utility::urlencode($docID); return $this; } diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php b/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php index 0d6f5c564..d6cba5d3f 100644 --- a/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php +++ b/src/Elasticsearch/Endpoints/AsyncSearch/Delete.php @@ -24,7 +24,7 @@ * Elasticsearch API name async_search.delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Get.php b/src/Elasticsearch/Endpoints/AsyncSearch/Get.php index 423c830c2..330f4d96a 100644 --- a/src/Elasticsearch/Endpoints/AsyncSearch/Get.php +++ b/src/Elasticsearch/Endpoints/AsyncSearch/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name async_search.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Status.php b/src/Elasticsearch/Endpoints/AsyncSearch/Status.php index f2d00de48..2b77ab467 100644 --- a/src/Elasticsearch/Endpoints/AsyncSearch/Status.php +++ b/src/Elasticsearch/Endpoints/AsyncSearch/Status.php @@ -24,7 +24,7 @@ * Elasticsearch API name async_search.status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Status extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php b/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php index 8c875400c..b8964b84b 100644 --- a/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php +++ b/src/Elasticsearch/Endpoints/AsyncSearch/Submit.php @@ -23,7 +23,7 @@ * Elasticsearch API name async_search.submit * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Submit extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php b/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php index 5e375a97e..34a309289 100644 --- a/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php +++ b/src/Elasticsearch/Endpoints/Autoscaling/DeleteAutoscalingPolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name autoscaling.delete_autoscaling_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteAutoscalingPolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php b/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php index 1baca22be..a5cded290 100644 --- a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php +++ b/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingCapacity.php @@ -23,7 +23,7 @@ * Elasticsearch API name autoscaling.get_autoscaling_capacity * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetAutoscalingCapacity extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingPolicy.php b/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingPolicy.php index ecc68df33..9b789b1af 100644 --- a/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingPolicy.php +++ b/src/Elasticsearch/Endpoints/Autoscaling/GetAutoscalingPolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name autoscaling.get_autoscaling_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetAutoscalingPolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php b/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php index 59b2b487d..df7517ce0 100644 --- a/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php +++ b/src/Elasticsearch/Endpoints/Autoscaling/PutAutoscalingPolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name autoscaling.put_autoscaling_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutAutoscalingPolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Bulk.php b/src/Elasticsearch/Endpoints/Bulk.php index c8eb5468e..08c213f57 100644 --- a/src/Elasticsearch/Endpoints/Bulk.php +++ b/src/Elasticsearch/Endpoints/Bulk.php @@ -26,7 +26,7 @@ * Elasticsearch API name bulk * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Bulk extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Aliases.php b/src/Elasticsearch/Endpoints/Cat/Aliases.php index 2ab259c07..7f302f3d8 100644 --- a/src/Elasticsearch/Endpoints/Cat/Aliases.php +++ b/src/Elasticsearch/Endpoints/Cat/Aliases.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.aliases * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Aliases extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Allocation.php b/src/Elasticsearch/Endpoints/Cat/Allocation.php index ec5982c7b..f8fa02a3c 100644 --- a/src/Elasticsearch/Endpoints/Cat/Allocation.php +++ b/src/Elasticsearch/Endpoints/Cat/Allocation.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.allocation * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Allocation extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Count.php b/src/Elasticsearch/Endpoints/Cat/Count.php index a6dd04fa8..d4ed8f2b8 100644 --- a/src/Elasticsearch/Endpoints/Cat/Count.php +++ b/src/Elasticsearch/Endpoints/Cat/Count.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.count * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Count extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Fielddata.php b/src/Elasticsearch/Endpoints/Cat/Fielddata.php index c9abc4d7a..1c74ed007 100644 --- a/src/Elasticsearch/Endpoints/Cat/Fielddata.php +++ b/src/Elasticsearch/Endpoints/Cat/Fielddata.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.fielddata * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Fielddata extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Health.php b/src/Elasticsearch/Endpoints/Cat/Health.php index 0bb925170..a38c306d0 100644 --- a/src/Elasticsearch/Endpoints/Cat/Health.php +++ b/src/Elasticsearch/Endpoints/Cat/Health.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.health * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Health extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Help.php b/src/Elasticsearch/Endpoints/Cat/Help.php index 8ed948ea4..ed393d235 100644 --- a/src/Elasticsearch/Endpoints/Cat/Help.php +++ b/src/Elasticsearch/Endpoints/Cat/Help.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.help * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Help extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Indices.php b/src/Elasticsearch/Endpoints/Cat/Indices.php index 8ac17c683..5359f5480 100644 --- a/src/Elasticsearch/Endpoints/Cat/Indices.php +++ b/src/Elasticsearch/Endpoints/Cat/Indices.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.indices * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Indices extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Master.php b/src/Elasticsearch/Endpoints/Cat/Master.php index 5e16f0320..32e285f56 100644 --- a/src/Elasticsearch/Endpoints/Cat/Master.php +++ b/src/Elasticsearch/Endpoints/Cat/Master.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.master * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Master extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php index 4adbb91f7..30095dcd9 100644 --- a/src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Cat/MlDataFrameAnalytics.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.ml_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MlDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php b/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php index 11cdb7e99..abd383b84 100644 --- a/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php +++ b/src/Elasticsearch/Endpoints/Cat/MlDatafeeds.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.ml_datafeeds * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MlDatafeeds extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/MlJobs.php b/src/Elasticsearch/Endpoints/Cat/MlJobs.php index aaf85994d..d782746a8 100644 --- a/src/Elasticsearch/Endpoints/Cat/MlJobs.php +++ b/src/Elasticsearch/Endpoints/Cat/MlJobs.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.ml_jobs * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MlJobs extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php b/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php index abcfa19a2..712c53850 100644 --- a/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php +++ b/src/Elasticsearch/Endpoints/Cat/MlTrainedModels.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.ml_trained_models * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MlTrainedModels extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php b/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php index aca2b2d88..736b0381c 100644 --- a/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php +++ b/src/Elasticsearch/Endpoints/Cat/NodeAttrs.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.nodeattrs * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class NodeAttrs extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Nodes.php b/src/Elasticsearch/Endpoints/Cat/Nodes.php index b94b698c6..642fccd7f 100644 --- a/src/Elasticsearch/Endpoints/Cat/Nodes.php +++ b/src/Elasticsearch/Endpoints/Cat/Nodes.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.nodes * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Nodes extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/PendingTasks.php b/src/Elasticsearch/Endpoints/Cat/PendingTasks.php index c2cf1e79f..7f85b0c26 100644 --- a/src/Elasticsearch/Endpoints/Cat/PendingTasks.php +++ b/src/Elasticsearch/Endpoints/Cat/PendingTasks.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.pending_tasks * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PendingTasks extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Plugins.php b/src/Elasticsearch/Endpoints/Cat/Plugins.php index 6929db9ab..d5450606b 100644 --- a/src/Elasticsearch/Endpoints/Cat/Plugins.php +++ b/src/Elasticsearch/Endpoints/Cat/Plugins.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.plugins * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Plugins extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Recovery.php b/src/Elasticsearch/Endpoints/Cat/Recovery.php index ad3127959..3d0c55778 100644 --- a/src/Elasticsearch/Endpoints/Cat/Recovery.php +++ b/src/Elasticsearch/Endpoints/Cat/Recovery.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.recovery * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Recovery extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Repositories.php b/src/Elasticsearch/Endpoints/Cat/Repositories.php index 11c615afb..36dfbc45b 100644 --- a/src/Elasticsearch/Endpoints/Cat/Repositories.php +++ b/src/Elasticsearch/Endpoints/Cat/Repositories.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.repositories * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Repositories extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Segments.php b/src/Elasticsearch/Endpoints/Cat/Segments.php index efcf9ec16..d03c7d44c 100644 --- a/src/Elasticsearch/Endpoints/Cat/Segments.php +++ b/src/Elasticsearch/Endpoints/Cat/Segments.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.segments * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Segments extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Shards.php b/src/Elasticsearch/Endpoints/Cat/Shards.php index 0ea33b9b6..2b36f5ac9 100644 --- a/src/Elasticsearch/Endpoints/Cat/Shards.php +++ b/src/Elasticsearch/Endpoints/Cat/Shards.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.shards * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Shards extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Snapshots.php b/src/Elasticsearch/Endpoints/Cat/Snapshots.php index 352a53453..8232c9b23 100644 --- a/src/Elasticsearch/Endpoints/Cat/Snapshots.php +++ b/src/Elasticsearch/Endpoints/Cat/Snapshots.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.snapshots * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Snapshots extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Tasks.php b/src/Elasticsearch/Endpoints/Cat/Tasks.php index dd180cb33..89009da75 100644 --- a/src/Elasticsearch/Endpoints/Cat/Tasks.php +++ b/src/Elasticsearch/Endpoints/Cat/Tasks.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.tasks * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Tasks extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Templates.php b/src/Elasticsearch/Endpoints/Cat/Templates.php index 9d3d9374b..bdfb03e91 100644 --- a/src/Elasticsearch/Endpoints/Cat/Templates.php +++ b/src/Elasticsearch/Endpoints/Cat/Templates.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.templates * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Templates extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/ThreadPool.php b/src/Elasticsearch/Endpoints/Cat/ThreadPool.php index 918d9c582..20137f155 100644 --- a/src/Elasticsearch/Endpoints/Cat/ThreadPool.php +++ b/src/Elasticsearch/Endpoints/Cat/ThreadPool.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.thread_pool * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ThreadPool extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cat/Transforms.php b/src/Elasticsearch/Endpoints/Cat/Transforms.php index 63b574dd3..0ac689c33 100644 --- a/src/Elasticsearch/Endpoints/Cat/Transforms.php +++ b/src/Elasticsearch/Endpoints/Cat/Transforms.php @@ -23,7 +23,7 @@ * Elasticsearch API name cat.transforms * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Transforms extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php index b633a1b16..f62e4f360 100644 --- a/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php +++ b/src/Elasticsearch/Endpoints/Ccr/DeleteAutoFollowPattern.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.delete_auto_follow_pattern * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteAutoFollowPattern extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/Follow.php b/src/Elasticsearch/Endpoints/Ccr/Follow.php index 7e8f27c78..3abc157f5 100644 --- a/src/Elasticsearch/Endpoints/Ccr/Follow.php +++ b/src/Elasticsearch/Endpoints/Ccr/Follow.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.follow * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Follow extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php b/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php index 77556e2a4..8f1733555 100644 --- a/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php +++ b/src/Elasticsearch/Endpoints/Ccr/FollowInfo.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.follow_info * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FollowInfo extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/FollowStats.php b/src/Elasticsearch/Endpoints/Ccr/FollowStats.php index 2567d6091..cf8368476 100644 --- a/src/Elasticsearch/Endpoints/Ccr/FollowStats.php +++ b/src/Elasticsearch/Endpoints/Ccr/FollowStats.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.follow_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FollowStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php b/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php index b16438a05..3c3198b7d 100644 --- a/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php +++ b/src/Elasticsearch/Endpoints/Ccr/ForgetFollower.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.forget_follower * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ForgetFollower extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php index b402914d9..1a19542dd 100644 --- a/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php +++ b/src/Elasticsearch/Endpoints/Ccr/GetAutoFollowPattern.php @@ -23,7 +23,7 @@ * Elasticsearch API name ccr.get_auto_follow_pattern * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetAutoFollowPattern extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php index e9372170a..d01cf35ea 100644 --- a/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php +++ b/src/Elasticsearch/Endpoints/Ccr/PauseAutoFollowPattern.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.pause_auto_follow_pattern * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PauseAutoFollowPattern extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php b/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php index 8029604e7..2a7c5b18a 100644 --- a/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php +++ b/src/Elasticsearch/Endpoints/Ccr/PauseFollow.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.pause_follow * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PauseFollow extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php index 5357709cf..0685aa9eb 100644 --- a/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php +++ b/src/Elasticsearch/Endpoints/Ccr/PutAutoFollowPattern.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.put_auto_follow_pattern * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutAutoFollowPattern extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php b/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php index fee41c1ac..450075b57 100644 --- a/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php +++ b/src/Elasticsearch/Endpoints/Ccr/ResumeAutoFollowPattern.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.resume_auto_follow_pattern * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ResumeAutoFollowPattern extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php b/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php index 3c2caede4..3ad4331ac 100644 --- a/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php +++ b/src/Elasticsearch/Endpoints/Ccr/ResumeFollow.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.resume_follow * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ResumeFollow extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/Stats.php b/src/Elasticsearch/Endpoints/Ccr/Stats.php index 710316b13..c9e6aef20 100644 --- a/src/Elasticsearch/Endpoints/Ccr/Stats.php +++ b/src/Elasticsearch/Endpoints/Ccr/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ccr.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ccr/Unfollow.php b/src/Elasticsearch/Endpoints/Ccr/Unfollow.php index 94c9519c0..c053c32fb 100644 --- a/src/Elasticsearch/Endpoints/Ccr/Unfollow.php +++ b/src/Elasticsearch/Endpoints/Ccr/Unfollow.php @@ -24,7 +24,7 @@ * Elasticsearch API name ccr.unfollow * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Unfollow extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/ClearScroll.php b/src/Elasticsearch/Endpoints/ClearScroll.php index 6416f70a3..cad073ccf 100644 --- a/src/Elasticsearch/Endpoints/ClearScroll.php +++ b/src/Elasticsearch/Endpoints/ClearScroll.php @@ -23,7 +23,7 @@ * Elasticsearch API name clear_scroll * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearScroll extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/ClosePointInTime.php b/src/Elasticsearch/Endpoints/ClosePointInTime.php index f47313099..c4b7cab8e 100644 --- a/src/Elasticsearch/Endpoints/ClosePointInTime.php +++ b/src/Elasticsearch/Endpoints/ClosePointInTime.php @@ -23,7 +23,7 @@ * Elasticsearch API name close_point_in_time * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClosePointInTime extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php b/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php index fb095e2ae..4d7a8d420 100644 --- a/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php +++ b/src/Elasticsearch/Endpoints/Cluster/AllocationExplain.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.allocation_explain * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class AllocationExplain extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php index 8bbd8e82f..4281ea90f 100644 --- a/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php +++ b/src/Elasticsearch/Endpoints/Cluster/DeleteComponentTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name cluster.delete_component_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteComponentTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php b/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php index 995961077..c0ef53f1a 100644 --- a/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php +++ b/src/Elasticsearch/Endpoints/Cluster/DeleteVotingConfigExclusions.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.delete_voting_config_exclusions * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteVotingConfigExclusions extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/ExistsComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/ExistsComponentTemplate.php index 627b69c1f..ae668d509 100644 --- a/src/Elasticsearch/Endpoints/Cluster/ExistsComponentTemplate.php +++ b/src/Elasticsearch/Endpoints/Cluster/ExistsComponentTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name cluster.exists_component_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsComponentTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php index 81522a22f..267439f6e 100644 --- a/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php +++ b/src/Elasticsearch/Endpoints/Cluster/GetComponentTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.get_component_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetComponentTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/GetSettings.php b/src/Elasticsearch/Endpoints/Cluster/GetSettings.php index a66c3cf28..a47baadc9 100644 --- a/src/Elasticsearch/Endpoints/Cluster/GetSettings.php +++ b/src/Elasticsearch/Endpoints/Cluster/GetSettings.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.get_settings * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetSettings extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/Health.php b/src/Elasticsearch/Endpoints/Cluster/Health.php index caa7d9643..f17ca8188 100644 --- a/src/Elasticsearch/Endpoints/Cluster/Health.php +++ b/src/Elasticsearch/Endpoints/Cluster/Health.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.health * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Health extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php b/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php index 8bb913f3e..07dca2e0b 100644 --- a/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php +++ b/src/Elasticsearch/Endpoints/Cluster/PendingTasks.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.pending_tasks * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PendingTasks extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/PostVotingConfigExclusions.php b/src/Elasticsearch/Endpoints/Cluster/PostVotingConfigExclusions.php index 6bf140245..5f6b20447 100644 --- a/src/Elasticsearch/Endpoints/Cluster/PostVotingConfigExclusions.php +++ b/src/Elasticsearch/Endpoints/Cluster/PostVotingConfigExclusions.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.post_voting_config_exclusions * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PostVotingConfigExclusions extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/PutComponentTemplate.php b/src/Elasticsearch/Endpoints/Cluster/PutComponentTemplate.php index 4dae6eecb..59f1877cc 100644 --- a/src/Elasticsearch/Endpoints/Cluster/PutComponentTemplate.php +++ b/src/Elasticsearch/Endpoints/Cluster/PutComponentTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name cluster.put_component_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutComponentTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/PutSettings.php b/src/Elasticsearch/Endpoints/Cluster/PutSettings.php index d910ddacf..2e00728d0 100644 --- a/src/Elasticsearch/Endpoints/Cluster/PutSettings.php +++ b/src/Elasticsearch/Endpoints/Cluster/PutSettings.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.put_settings * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutSettings extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php b/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php index cc502f472..cc2195877 100644 --- a/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php +++ b/src/Elasticsearch/Endpoints/Cluster/RemoteInfo.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.remote_info * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RemoteInfo extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/Reroute.php b/src/Elasticsearch/Endpoints/Cluster/Reroute.php index a13014313..189816aab 100644 --- a/src/Elasticsearch/Endpoints/Cluster/Reroute.php +++ b/src/Elasticsearch/Endpoints/Cluster/Reroute.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.reroute * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Reroute extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/State.php b/src/Elasticsearch/Endpoints/Cluster/State.php index 063ec2d3f..a4fc0ef6b 100644 --- a/src/Elasticsearch/Endpoints/Cluster/State.php +++ b/src/Elasticsearch/Endpoints/Cluster/State.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.state * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class State extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Cluster/Stats.php b/src/Elasticsearch/Endpoints/Cluster/Stats.php index ed6b296fe..ea861e39b 100644 --- a/src/Elasticsearch/Endpoints/Cluster/Stats.php +++ b/src/Elasticsearch/Endpoints/Cluster/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name cluster.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Count.php b/src/Elasticsearch/Endpoints/Count.php index c3c3a6478..00652bcef 100644 --- a/src/Elasticsearch/Endpoints/Count.php +++ b/src/Elasticsearch/Endpoints/Count.php @@ -23,7 +23,7 @@ * Elasticsearch API name count * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Count extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Create.php b/src/Elasticsearch/Endpoints/Create.php index f7d36c8fb..c2a158e52 100644 --- a/src/Elasticsearch/Endpoints/Create.php +++ b/src/Elasticsearch/Endpoints/Create.php @@ -24,7 +24,7 @@ * Elasticsearch API name create * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Create extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php b/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php index cd54a0005..d908ac096 100644 --- a/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php +++ b/src/Elasticsearch/Endpoints/DanglingIndices/DeleteDanglingIndex.php @@ -24,7 +24,7 @@ * Elasticsearch API name dangling_indices.delete_dangling_index * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteDanglingIndex extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php b/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php index 5a1959840..2590ccdb0 100644 --- a/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php +++ b/src/Elasticsearch/Endpoints/DanglingIndices/ImportDanglingIndex.php @@ -24,7 +24,7 @@ * Elasticsearch API name dangling_indices.import_dangling_index * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ImportDanglingIndex extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php b/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php index 18b862748..5e9e3df61 100644 --- a/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php +++ b/src/Elasticsearch/Endpoints/DanglingIndices/ListDanglingIndices.php @@ -23,7 +23,7 @@ * Elasticsearch API name dangling_indices.list_dangling_indices * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ListDanglingIndices extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/DeleteTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/DeleteTransform.php index 186df2460..93f770eda 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/DeleteTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/DeleteTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.delete_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransform.php index 4173eb139..e376ac31c 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransform.php @@ -23,7 +23,7 @@ * Elasticsearch API name data_frame_transform_deprecated.get_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransformStats.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransformStats.php index 694571a62..b07a1f29d 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransformStats.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/GetTransformStats.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.get_transform_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTransformStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PreviewTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PreviewTransform.php index 2d9b49c88..9aaaea9f3 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PreviewTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PreviewTransform.php @@ -23,7 +23,7 @@ * Elasticsearch API name data_frame_transform_deprecated.preview_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PreviewTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PutTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PutTransform.php index 156f08455..80d7e5523 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PutTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/PutTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.put_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StartTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StartTransform.php index 2607ec452..17366cfa7 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StartTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StartTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.start_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StartTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StopTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StopTransform.php index 1ee544025..30fdfacb0 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StopTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/StopTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.stop_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StopTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/UpdateTransform.php b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/UpdateTransform.php index e703be1d0..8a881ba5d 100644 --- a/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/UpdateTransform.php +++ b/src/Elasticsearch/Endpoints/DataFrameTransformDeprecated/UpdateTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name data_frame_transform_deprecated.update_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Delete.php b/src/Elasticsearch/Endpoints/Delete.php index 027514e44..aa0bbd16a 100644 --- a/src/Elasticsearch/Endpoints/Delete.php +++ b/src/Elasticsearch/Endpoints/Delete.php @@ -24,7 +24,7 @@ * Elasticsearch API name delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DeleteByQuery.php b/src/Elasticsearch/Endpoints/DeleteByQuery.php index b230d1433..b78f22e33 100644 --- a/src/Elasticsearch/Endpoints/DeleteByQuery.php +++ b/src/Elasticsearch/Endpoints/DeleteByQuery.php @@ -24,7 +24,7 @@ * Elasticsearch API name delete_by_query * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteByQuery extends AbstractEndpoint { @@ -70,9 +70,6 @@ public function getParamWhitelist(): array 'size', 'max_docs', 'sort', - '_source', - '_source_excludes', - '_source_includes', 'terminate_after', 'stats', 'version', diff --git a/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php b/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php index 7bd25c0a1..cd92586ef 100644 --- a/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php +++ b/src/Elasticsearch/Endpoints/DeleteByQueryRethrottle.php @@ -24,7 +24,7 @@ * Elasticsearch API name delete_by_query_rethrottle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteByQueryRethrottle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/DeleteScript.php b/src/Elasticsearch/Endpoints/DeleteScript.php index be174a11d..33c3264af 100644 --- a/src/Elasticsearch/Endpoints/DeleteScript.php +++ b/src/Elasticsearch/Endpoints/DeleteScript.php @@ -24,7 +24,7 @@ * Elasticsearch API name delete_script * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteScript extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php b/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php index 3a60a00e3..a16c0ee4c 100644 --- a/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php +++ b/src/Elasticsearch/Endpoints/Enrich/DeletePolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name enrich.delete_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeletePolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php b/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php index 04ea6f4ea..81a73c0f1 100644 --- a/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php +++ b/src/Elasticsearch/Endpoints/Enrich/ExecutePolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name enrich.execute_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExecutePolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php b/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php index 08e0242c7..66736f564 100644 --- a/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php +++ b/src/Elasticsearch/Endpoints/Enrich/GetPolicy.php @@ -23,7 +23,7 @@ * Elasticsearch API name enrich.get_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetPolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php b/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php index 156428803..8e3ba8310 100644 --- a/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php +++ b/src/Elasticsearch/Endpoints/Enrich/PutPolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name enrich.put_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutPolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Enrich/Stats.php b/src/Elasticsearch/Endpoints/Enrich/Stats.php index 5897b856d..03901c6ac 100644 --- a/src/Elasticsearch/Endpoints/Enrich/Stats.php +++ b/src/Elasticsearch/Endpoints/Enrich/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name enrich.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Eql/Delete.php b/src/Elasticsearch/Endpoints/Eql/Delete.php index 38af62d8e..abe28be38 100644 --- a/src/Elasticsearch/Endpoints/Eql/Delete.php +++ b/src/Elasticsearch/Endpoints/Eql/Delete.php @@ -24,7 +24,7 @@ * Elasticsearch API name eql.delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Eql/Get.php b/src/Elasticsearch/Endpoints/Eql/Get.php index d920f692d..cf53ab0b5 100644 --- a/src/Elasticsearch/Endpoints/Eql/Get.php +++ b/src/Elasticsearch/Endpoints/Eql/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name eql.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Eql/GetStatus.php b/src/Elasticsearch/Endpoints/Eql/GetStatus.php index 54367ae3a..0ce414284 100644 --- a/src/Elasticsearch/Endpoints/Eql/GetStatus.php +++ b/src/Elasticsearch/Endpoints/Eql/GetStatus.php @@ -24,7 +24,7 @@ * Elasticsearch API name eql.get_status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetStatus extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Eql/Search.php b/src/Elasticsearch/Endpoints/Eql/Search.php index 5e6253a1a..7ed57c264 100644 --- a/src/Elasticsearch/Endpoints/Eql/Search.php +++ b/src/Elasticsearch/Endpoints/Eql/Search.php @@ -24,7 +24,7 @@ * Elasticsearch API name eql.search * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Search extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Exists.php b/src/Elasticsearch/Endpoints/Exists.php index dd743157f..b8ae3c6d2 100644 --- a/src/Elasticsearch/Endpoints/Exists.php +++ b/src/Elasticsearch/Endpoints/Exists.php @@ -24,7 +24,7 @@ * Elasticsearch API name exists * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Exists extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/ExistsSource.php b/src/Elasticsearch/Endpoints/ExistsSource.php index 3771612ed..e51e8c4c9 100644 --- a/src/Elasticsearch/Endpoints/ExistsSource.php +++ b/src/Elasticsearch/Endpoints/ExistsSource.php @@ -24,7 +24,7 @@ * Elasticsearch API name exists_source * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsSource extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Explain.php b/src/Elasticsearch/Endpoints/Explain.php index f2cfe2423..078c4ae7b 100644 --- a/src/Elasticsearch/Endpoints/Explain.php +++ b/src/Elasticsearch/Endpoints/Explain.php @@ -24,7 +24,7 @@ * Elasticsearch API name explain * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Explain extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Features/GetFeatures.php b/src/Elasticsearch/Endpoints/Features/GetFeatures.php index 576d389fc..6dc54a36e 100644 --- a/src/Elasticsearch/Endpoints/Features/GetFeatures.php +++ b/src/Elasticsearch/Endpoints/Features/GetFeatures.php @@ -23,7 +23,7 @@ * Elasticsearch API name features.get_features * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetFeatures extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Features/ResetFeatures.php b/src/Elasticsearch/Endpoints/Features/ResetFeatures.php index f12da097e..7585c2f67 100644 --- a/src/Elasticsearch/Endpoints/Features/ResetFeatures.php +++ b/src/Elasticsearch/Endpoints/Features/ResetFeatures.php @@ -23,7 +23,7 @@ * Elasticsearch API name features.reset_features * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ResetFeatures extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/FieldCaps.php b/src/Elasticsearch/Endpoints/FieldCaps.php index 7997fe8f2..413f04a92 100644 --- a/src/Elasticsearch/Endpoints/FieldCaps.php +++ b/src/Elasticsearch/Endpoints/FieldCaps.php @@ -23,7 +23,7 @@ * Elasticsearch API name field_caps * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FieldCaps extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php b/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php new file mode 100644 index 000000000..80b0a903e --- /dev/null +++ b/src/Elasticsearch/Endpoints/Fleet/GlobalCheckpoints.php @@ -0,0 +1,56 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_fleet/global_checkpoints"; + } + throw new RuntimeException('Missing parameter for the endpoint fleet.global_checkpoints'); + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_advance', + 'wait_for_index', + 'checkpoints', + 'timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/src/Elasticsearch/Endpoints/Fleet/Msearch.php b/src/Elasticsearch/Endpoints/Fleet/Msearch.php new file mode 100644 index 000000000..21dcde0e8 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Fleet/Msearch.php @@ -0,0 +1,80 @@ +serializer = $serializer; + } + + public function getURI(): string + { + $index = $this->index ?? null; + + if (isset($index)) { + return "/$index/_fleet/_fleet_msearch"; + } + return "/_fleet/_fleet_msearch"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): Msearch + { + if (isset($body) !== true) { + return $this; + } + if (is_array($body) === true || $body instanceof Traversable) { + foreach ($body as $item) { + $this->body .= $this->serializer->serialize($item) . "\n"; + } + } elseif (is_string($body)) { + $this->body = $body; + if (substr($body, -1) != "\n") { + $this->body .= "\n"; + } + } else { + throw new InvalidArgumentException("Body must be an array, traversable object or string"); + } + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Fleet/Search.php b/src/Elasticsearch/Endpoints/Fleet/Search.php new file mode 100644 index 000000000..1bea62e4f --- /dev/null +++ b/src/Elasticsearch/Endpoints/Fleet/Search.php @@ -0,0 +1,65 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_fleet/_fleet_search"; + } + throw new RuntimeException('Missing parameter for the endpoint fleet.search'); + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_checkpoints', + 'wait_for_checkpoints_timeout', + 'allow_partial_search_results' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): Search + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Get.php b/src/Elasticsearch/Endpoints/Get.php index 49326f8e8..400363323 100644 --- a/src/Elasticsearch/Endpoints/Get.php +++ b/src/Elasticsearch/Endpoints/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/GetScript.php b/src/Elasticsearch/Endpoints/GetScript.php index a63e4ebbb..d7f851e99 100644 --- a/src/Elasticsearch/Endpoints/GetScript.php +++ b/src/Elasticsearch/Endpoints/GetScript.php @@ -24,7 +24,7 @@ * Elasticsearch API name get_script * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetScript extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/GetScriptContext.php b/src/Elasticsearch/Endpoints/GetScriptContext.php index b9e29f31d..cf099e6d4 100644 --- a/src/Elasticsearch/Endpoints/GetScriptContext.php +++ b/src/Elasticsearch/Endpoints/GetScriptContext.php @@ -23,7 +23,7 @@ * Elasticsearch API name get_script_context * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetScriptContext extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/GetScriptLanguages.php b/src/Elasticsearch/Endpoints/GetScriptLanguages.php index a7fe861ff..cb70adc2c 100644 --- a/src/Elasticsearch/Endpoints/GetScriptLanguages.php +++ b/src/Elasticsearch/Endpoints/GetScriptLanguages.php @@ -23,7 +23,7 @@ * Elasticsearch API name get_script_languages * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetScriptLanguages extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/GetSource.php b/src/Elasticsearch/Endpoints/GetSource.php index 6273d0fe8..37534af86 100644 --- a/src/Elasticsearch/Endpoints/GetSource.php +++ b/src/Elasticsearch/Endpoints/GetSource.php @@ -24,7 +24,7 @@ * Elasticsearch API name get_source * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetSource extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Graph/Explore.php b/src/Elasticsearch/Endpoints/Graph/Explore.php index b1158ce06..5416942cd 100644 --- a/src/Elasticsearch/Endpoints/Graph/Explore.php +++ b/src/Elasticsearch/Endpoints/Graph/Explore.php @@ -24,7 +24,7 @@ * Elasticsearch API name graph.explore * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Explore extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php index 7d05569f0..94d11f7de 100644 --- a/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php +++ b/src/Elasticsearch/Endpoints/Ilm/DeleteLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.delete_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php index 576244953..449898484 100644 --- a/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php +++ b/src/Elasticsearch/Endpoints/Ilm/ExplainLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.explain_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExplainLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php index 6c57a5f5b..f07f15087 100644 --- a/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php +++ b/src/Elasticsearch/Endpoints/Ilm/GetLifecycle.php @@ -23,7 +23,7 @@ * Elasticsearch API name ilm.get_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/GetStatus.php b/src/Elasticsearch/Endpoints/Ilm/GetStatus.php index 2c979ce5c..b86d2a223 100644 --- a/src/Elasticsearch/Endpoints/Ilm/GetStatus.php +++ b/src/Elasticsearch/Endpoints/Ilm/GetStatus.php @@ -23,7 +23,7 @@ * Elasticsearch API name ilm.get_status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetStatus extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/MigrateToDataTiers.php b/src/Elasticsearch/Endpoints/Ilm/MigrateToDataTiers.php new file mode 100644 index 000000000..8bef001c7 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Ilm/MigrateToDataTiers.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php b/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php index 5d6db6810..985da2d50 100644 --- a/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php +++ b/src/Elasticsearch/Endpoints/Ilm/MoveToStep.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.move_to_step * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MoveToStep extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php b/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php index 0ea5d0f88..0f774095b 100644 --- a/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php +++ b/src/Elasticsearch/Endpoints/Ilm/PutLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.put_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php b/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php index 8cacdccdd..73ba949cd 100644 --- a/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php +++ b/src/Elasticsearch/Endpoints/Ilm/RemovePolicy.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.remove_policy * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RemovePolicy extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/Retry.php b/src/Elasticsearch/Endpoints/Ilm/Retry.php index 63106953e..8a54aaef8 100644 --- a/src/Elasticsearch/Endpoints/Ilm/Retry.php +++ b/src/Elasticsearch/Endpoints/Ilm/Retry.php @@ -24,7 +24,7 @@ * Elasticsearch API name ilm.retry * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Retry extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/Start.php b/src/Elasticsearch/Endpoints/Ilm/Start.php index b82aca11b..c2f072e66 100644 --- a/src/Elasticsearch/Endpoints/Ilm/Start.php +++ b/src/Elasticsearch/Endpoints/Ilm/Start.php @@ -23,7 +23,7 @@ * Elasticsearch API name ilm.start * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Start extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ilm/Stop.php b/src/Elasticsearch/Endpoints/Ilm/Stop.php index f9f3c78f0..7db1d077d 100644 --- a/src/Elasticsearch/Endpoints/Ilm/Stop.php +++ b/src/Elasticsearch/Endpoints/Ilm/Stop.php @@ -23,7 +23,7 @@ * Elasticsearch API name ilm.stop * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stop extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Index.php b/src/Elasticsearch/Endpoints/Index.php index d7ded5578..9e6d2df0c 100644 --- a/src/Elasticsearch/Endpoints/Index.php +++ b/src/Elasticsearch/Endpoints/Index.php @@ -24,7 +24,7 @@ * Elasticsearch API name index * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Index extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/AddBlock.php b/src/Elasticsearch/Endpoints/Indices/AddBlock.php index 6f3bcd1b5..9250f651b 100644 --- a/src/Elasticsearch/Endpoints/Indices/AddBlock.php +++ b/src/Elasticsearch/Endpoints/Indices/AddBlock.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.add_block * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class AddBlock extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Analyze.php b/src/Elasticsearch/Endpoints/Indices/Analyze.php index d9845154e..283cddc9e 100644 --- a/src/Elasticsearch/Endpoints/Indices/Analyze.php +++ b/src/Elasticsearch/Endpoints/Indices/Analyze.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.analyze * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Analyze extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ClearCache.php b/src/Elasticsearch/Endpoints/Indices/ClearCache.php index b2517826b..e101ac575 100644 --- a/src/Elasticsearch/Endpoints/Indices/ClearCache.php +++ b/src/Elasticsearch/Endpoints/Indices/ClearCache.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.clear_cache * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCache extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/CloneIndices.php b/src/Elasticsearch/Endpoints/Indices/CloneIndices.php index a31b6efc4..b3e59f305 100644 --- a/src/Elasticsearch/Endpoints/Indices/CloneIndices.php +++ b/src/Elasticsearch/Endpoints/Indices/CloneIndices.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.clone * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CloneIndices extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Close.php b/src/Elasticsearch/Endpoints/Indices/Close.php index 7fc56f45a..7ca4dcde7 100644 --- a/src/Elasticsearch/Endpoints/Indices/Close.php +++ b/src/Elasticsearch/Endpoints/Indices/Close.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.close * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Close extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Create.php b/src/Elasticsearch/Endpoints/Indices/Create.php index 83f541e48..ca4614634 100644 --- a/src/Elasticsearch/Endpoints/Indices/Create.php +++ b/src/Elasticsearch/Endpoints/Indices/Create.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.create * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Create extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php b/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php index 669299fc5..a7737dbdd 100644 --- a/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php +++ b/src/Elasticsearch/Endpoints/Indices/CreateDataStream.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.create_data_stream * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CreateDataStream extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php b/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php index 2b6f0a8dd..ef73ea69f 100644 --- a/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php +++ b/src/Elasticsearch/Endpoints/Indices/DataStreamsStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.data_streams_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DataStreamsStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Delete.php b/src/Elasticsearch/Endpoints/Indices/Delete.php index 95360b1f9..a0a607eff 100644 --- a/src/Elasticsearch/Endpoints/Indices/Delete.php +++ b/src/Elasticsearch/Endpoints/Indices/Delete.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php b/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php index d42f296d6..a869e8c65 100644 --- a/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php +++ b/src/Elasticsearch/Endpoints/Indices/DeleteAlias.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.delete_alias * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteAlias extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php b/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php index f5ac8d0a2..b4848b4e1 100644 --- a/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php +++ b/src/Elasticsearch/Endpoints/Indices/DeleteDataStream.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.delete_data_stream * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteDataStream extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php index 5a5324043..57d95a3e2 100644 --- a/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/DeleteIndexTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.delete_index_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteIndexTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php b/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php index b8f964561..29e92a20b 100644 --- a/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/DeleteTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.delete_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/DiskUsage.php b/src/Elasticsearch/Endpoints/Indices/DiskUsage.php new file mode 100644 index 000000000..e66278167 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Indices/DiskUsage.php @@ -0,0 +1,57 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_disk_usage"; + } + throw new RuntimeException('Missing parameter for the endpoint indices.disk_usage'); + } + + public function getParamWhitelist(): array + { + return [ + 'run_expensive_tasks', + 'flush', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } +} diff --git a/src/Elasticsearch/Endpoints/Indices/Exists.php b/src/Elasticsearch/Endpoints/Indices/Exists.php index b585eb5b2..b5857c5d1 100644 --- a/src/Elasticsearch/Endpoints/Indices/Exists.php +++ b/src/Elasticsearch/Endpoints/Indices/Exists.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.exists * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Exists extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php b/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php index bc47b0dec..39c536cf8 100644 --- a/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php +++ b/src/Elasticsearch/Endpoints/Indices/ExistsAlias.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.exists_alias * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsAlias extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php index 83708829b..186bbb85e 100644 --- a/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/ExistsIndexTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.exists_index_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsIndexTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php b/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php index 3f4d53272..31b9b3416 100644 --- a/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/ExistsTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.exists_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ExistsType.php b/src/Elasticsearch/Endpoints/Indices/ExistsType.php index 993e6eb80..a81a52e03 100644 --- a/src/Elasticsearch/Endpoints/Indices/ExistsType.php +++ b/src/Elasticsearch/Endpoints/Indices/ExistsType.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.exists_type * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExistsType extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php b/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php new file mode 100644 index 000000000..4a41b3986 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Indices/FieldUsageStats.php @@ -0,0 +1,56 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_field_usage_stats"; + } + throw new RuntimeException('Missing parameter for the endpoint indices.field_usage_stats'); + } + + public function getParamWhitelist(): array + { + return [ + 'fields', + 'ignore_unavailable', + 'allow_no_indices', + 'expand_wildcards' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/src/Elasticsearch/Endpoints/Indices/Flush.php b/src/Elasticsearch/Endpoints/Indices/Flush.php index 5bd62a9b2..26dd5478c 100644 --- a/src/Elasticsearch/Endpoints/Indices/Flush.php +++ b/src/Elasticsearch/Endpoints/Indices/Flush.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.flush * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Flush extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/FlushSynced.php b/src/Elasticsearch/Endpoints/Indices/FlushSynced.php index fb3b4bd40..0328caf87 100644 --- a/src/Elasticsearch/Endpoints/Indices/FlushSynced.php +++ b/src/Elasticsearch/Endpoints/Indices/FlushSynced.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.flush_synced * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FlushSynced extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ForceMerge.php b/src/Elasticsearch/Endpoints/Indices/ForceMerge.php index af7a4bfac..cacb341a8 100644 --- a/src/Elasticsearch/Endpoints/Indices/ForceMerge.php +++ b/src/Elasticsearch/Endpoints/Indices/ForceMerge.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.forcemerge * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ForceMerge extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Freeze.php b/src/Elasticsearch/Endpoints/Indices/Freeze.php index b60f1959d..a74d0c9f7 100644 --- a/src/Elasticsearch/Endpoints/Indices/Freeze.php +++ b/src/Elasticsearch/Endpoints/Indices/Freeze.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.freeze * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Freeze extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Get.php b/src/Elasticsearch/Endpoints/Indices/Get.php index 7ccd65323..b2ffcf8c1 100644 --- a/src/Elasticsearch/Endpoints/Indices/Get.php +++ b/src/Elasticsearch/Endpoints/Indices/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetAlias.php b/src/Elasticsearch/Endpoints/Indices/GetAlias.php index 0bb6aecd5..30e4c9b02 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetAlias.php +++ b/src/Elasticsearch/Endpoints/Indices/GetAlias.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_alias * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetAlias extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetDataStream.php b/src/Elasticsearch/Endpoints/Indices/GetDataStream.php index abc8ac4f3..cfeabbd35 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetDataStream.php +++ b/src/Elasticsearch/Endpoints/Indices/GetDataStream.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_data_stream * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetDataStream extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php b/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php index e46860aef..8503dbb5d 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php +++ b/src/Elasticsearch/Endpoints/Indices/GetFieldMapping.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.get_field_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetFieldMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php index e5a84e825..26ac8746f 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/GetIndexTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_index_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetIndexTemplate extends AbstractEndpoint { @@ -58,9 +58,6 @@ public function setName($name): GetIndexTemplate if (isset($name) !== true) { return $this; } - if (is_array($name) === true) { - $name = implode(",", $name); - } $this->name = $name; return $this; diff --git a/src/Elasticsearch/Endpoints/Indices/GetMapping.php b/src/Elasticsearch/Endpoints/Indices/GetMapping.php index 479176859..ae26bd96b 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetMapping.php +++ b/src/Elasticsearch/Endpoints/Indices/GetMapping.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetSettings.php b/src/Elasticsearch/Endpoints/Indices/GetSettings.php index e06cf8e42..c06b20ea9 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetSettings.php +++ b/src/Elasticsearch/Endpoints/Indices/GetSettings.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_settings * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetSettings extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetTemplate.php b/src/Elasticsearch/Endpoints/Indices/GetTemplate.php index 6e341e397..71394a2f8 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/GetTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php b/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php index c019146c4..05618fe41 100644 --- a/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php +++ b/src/Elasticsearch/Endpoints/Indices/GetUpgrade.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.get_upgrade * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetUpgrade extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php b/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php index 31ea70ca2..e98c4425f 100644 --- a/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php +++ b/src/Elasticsearch/Endpoints/Indices/MigrateToDataStream.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.migrate_to_data_stream * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MigrateToDataStream extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php b/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php new file mode 100644 index 000000000..7d9aa70e5 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Indices/ModifyDataStream.php @@ -0,0 +1,58 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Indices/Open.php b/src/Elasticsearch/Endpoints/Indices/Open.php index d58f11407..66e6eff5b 100644 --- a/src/Elasticsearch/Endpoints/Indices/Open.php +++ b/src/Elasticsearch/Endpoints/Indices/Open.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.open * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Open extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php b/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php index ebe42becc..f794ace6d 100644 --- a/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php +++ b/src/Elasticsearch/Endpoints/Indices/PromoteDataStream.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.promote_data_stream * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PromoteDataStream extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PutAlias.php b/src/Elasticsearch/Endpoints/Indices/PutAlias.php index e327bba43..5528e2a5d 100644 --- a/src/Elasticsearch/Endpoints/Indices/PutAlias.php +++ b/src/Elasticsearch/Endpoints/Indices/PutAlias.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.put_alias * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutAlias extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php index 1979e31aa..0d5b2f738 100644 --- a/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/PutIndexTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.put_index_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutIndexTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PutMapping.php b/src/Elasticsearch/Endpoints/Indices/PutMapping.php index 8c4f8a116..5c7f613ca 100644 --- a/src/Elasticsearch/Endpoints/Indices/PutMapping.php +++ b/src/Elasticsearch/Endpoints/Indices/PutMapping.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.put_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PutSettings.php b/src/Elasticsearch/Endpoints/Indices/PutSettings.php index 9a4694cb1..187f2a794 100644 --- a/src/Elasticsearch/Endpoints/Indices/PutSettings.php +++ b/src/Elasticsearch/Endpoints/Indices/PutSettings.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.put_settings * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutSettings extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/PutTemplate.php b/src/Elasticsearch/Endpoints/Indices/PutTemplate.php index bc9f3bf39..76f8c0b49 100644 --- a/src/Elasticsearch/Endpoints/Indices/PutTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/PutTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.put_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Recovery.php b/src/Elasticsearch/Endpoints/Indices/Recovery.php index 4e7f313ef..c847745f3 100644 --- a/src/Elasticsearch/Endpoints/Indices/Recovery.php +++ b/src/Elasticsearch/Endpoints/Indices/Recovery.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.recovery * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Recovery extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Refresh.php b/src/Elasticsearch/Endpoints/Indices/Refresh.php index 5eb1640a8..aa9922405 100644 --- a/src/Elasticsearch/Endpoints/Indices/Refresh.php +++ b/src/Elasticsearch/Endpoints/Indices/Refresh.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.refresh * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Refresh extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php b/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php index 77830a58d..9e9895adb 100644 --- a/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php +++ b/src/Elasticsearch/Endpoints/Indices/ReloadSearchAnalyzers.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.reload_search_analyzers * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ReloadSearchAnalyzers extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php b/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php index 67a7696a9..de8a69aea 100644 --- a/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php +++ b/src/Elasticsearch/Endpoints/Indices/ResolveIndex.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.resolve_index * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ResolveIndex extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Rollover.php b/src/Elasticsearch/Endpoints/Indices/Rollover.php index 90c38628e..b2edca5bf 100644 --- a/src/Elasticsearch/Endpoints/Indices/Rollover.php +++ b/src/Elasticsearch/Endpoints/Indices/Rollover.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.rollover * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Rollover extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Segments.php b/src/Elasticsearch/Endpoints/Indices/Segments.php index 224c500ae..b3e032c6a 100644 --- a/src/Elasticsearch/Endpoints/Indices/Segments.php +++ b/src/Elasticsearch/Endpoints/Indices/Segments.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.segments * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Segments extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ShardStores.php b/src/Elasticsearch/Endpoints/Indices/ShardStores.php index f39d62711..c24bbb177 100644 --- a/src/Elasticsearch/Endpoints/Indices/ShardStores.php +++ b/src/Elasticsearch/Endpoints/Indices/ShardStores.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.shard_stores * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ShardStores extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Shrink.php b/src/Elasticsearch/Endpoints/Indices/Shrink.php index d394780b3..1697d1b46 100644 --- a/src/Elasticsearch/Endpoints/Indices/Shrink.php +++ b/src/Elasticsearch/Endpoints/Indices/Shrink.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.shrink * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Shrink extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php b/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php index 81a90ed13..3c35e7452 100644 --- a/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/SimulateIndexTemplate.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.simulate_index_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SimulateIndexTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php b/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php index bb3a2e63d..662de9ef8 100644 --- a/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php +++ b/src/Elasticsearch/Endpoints/Indices/SimulateTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.simulate_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SimulateTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Split.php b/src/Elasticsearch/Endpoints/Indices/Split.php index a733be80a..e5e29ca28 100644 --- a/src/Elasticsearch/Endpoints/Indices/Split.php +++ b/src/Elasticsearch/Endpoints/Indices/Split.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.split * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Split extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Stats.php b/src/Elasticsearch/Endpoints/Indices/Stats.php index e86d5d29f..8aa11f942 100644 --- a/src/Elasticsearch/Endpoints/Indices/Stats.php +++ b/src/Elasticsearch/Endpoints/Indices/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Unfreeze.php b/src/Elasticsearch/Endpoints/Indices/Unfreeze.php index 8efd193f9..7835ed143 100644 --- a/src/Elasticsearch/Endpoints/Indices/Unfreeze.php +++ b/src/Elasticsearch/Endpoints/Indices/Unfreeze.php @@ -24,7 +24,7 @@ * Elasticsearch API name indices.unfreeze * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Unfreeze extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php b/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php index a39859605..dc0f75396 100644 --- a/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php +++ b/src/Elasticsearch/Endpoints/Indices/UpdateAliases.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.update_aliases * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateAliases extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/Upgrade.php b/src/Elasticsearch/Endpoints/Indices/Upgrade.php index 1584027c7..a7f8b33cc 100644 --- a/src/Elasticsearch/Endpoints/Indices/Upgrade.php +++ b/src/Elasticsearch/Endpoints/Indices/Upgrade.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.upgrade * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Upgrade extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php b/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php index e4276b795..a09c9115f 100644 --- a/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php +++ b/src/Elasticsearch/Endpoints/Indices/ValidateQuery.php @@ -23,7 +23,7 @@ * Elasticsearch API name indices.validate_query * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ValidateQuery extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Info.php b/src/Elasticsearch/Endpoints/Info.php index 1c96cac08..9482792a2 100644 --- a/src/Elasticsearch/Endpoints/Info.php +++ b/src/Elasticsearch/Endpoints/Info.php @@ -23,7 +23,7 @@ * Elasticsearch API name info * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Info extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php b/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php index 1d3f3599b..d068f6f81 100644 --- a/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php +++ b/src/Elasticsearch/Endpoints/Ingest/DeletePipeline.php @@ -24,7 +24,7 @@ * Elasticsearch API name ingest.delete_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeletePipeline extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php b/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php index 18e63a43b..dc64dacd2 100644 --- a/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php +++ b/src/Elasticsearch/Endpoints/Ingest/GeoIpStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ingest.geo_ip_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GeoIpStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php b/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php index cc74d8466..d9ba9732f 100644 --- a/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php +++ b/src/Elasticsearch/Endpoints/Ingest/GetPipeline.php @@ -23,7 +23,7 @@ * Elasticsearch API name ingest.get_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetPipeline extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php b/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php index f18837248..aefd0197d 100644 --- a/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php +++ b/src/Elasticsearch/Endpoints/Ingest/ProcessorGrok.php @@ -23,7 +23,7 @@ * Elasticsearch API name ingest.processor_grok * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ProcessorGrok extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php b/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php index 11da0dbb9..d40856aa9 100644 --- a/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php +++ b/src/Elasticsearch/Endpoints/Ingest/PutPipeline.php @@ -24,7 +24,7 @@ * Elasticsearch API name ingest.put_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutPipeline extends AbstractEndpoint { @@ -42,6 +42,7 @@ public function getURI(): string public function getParamWhitelist(): array { return [ + 'if_version', 'master_timeout', 'timeout' ]; diff --git a/src/Elasticsearch/Endpoints/Ingest/Simulate.php b/src/Elasticsearch/Endpoints/Ingest/Simulate.php index 87554b5fd..589198c5a 100644 --- a/src/Elasticsearch/Endpoints/Ingest/Simulate.php +++ b/src/Elasticsearch/Endpoints/Ingest/Simulate.php @@ -23,7 +23,7 @@ * Elasticsearch API name ingest.simulate * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Simulate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/Delete.php b/src/Elasticsearch/Endpoints/License/Delete.php index 6c57408f0..b0f4afaae 100644 --- a/src/Elasticsearch/Endpoints/License/Delete.php +++ b/src/Elasticsearch/Endpoints/License/Delete.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/Get.php b/src/Elasticsearch/Endpoints/License/Get.php index d90f206d3..9c3127697 100644 --- a/src/Elasticsearch/Endpoints/License/Get.php +++ b/src/Elasticsearch/Endpoints/License/Get.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/GetBasicStatus.php b/src/Elasticsearch/Endpoints/License/GetBasicStatus.php index c090b54ea..4349063f6 100644 --- a/src/Elasticsearch/Endpoints/License/GetBasicStatus.php +++ b/src/Elasticsearch/Endpoints/License/GetBasicStatus.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.get_basic_status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetBasicStatus extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/GetTrialStatus.php b/src/Elasticsearch/Endpoints/License/GetTrialStatus.php index 457d6d67e..2ab9d0ac4 100644 --- a/src/Elasticsearch/Endpoints/License/GetTrialStatus.php +++ b/src/Elasticsearch/Endpoints/License/GetTrialStatus.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.get_trial_status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTrialStatus extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/Post.php b/src/Elasticsearch/Endpoints/License/Post.php index 976febfd8..113aaa1c6 100644 --- a/src/Elasticsearch/Endpoints/License/Post.php +++ b/src/Elasticsearch/Endpoints/License/Post.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.post * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Post extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/PostStartBasic.php b/src/Elasticsearch/Endpoints/License/PostStartBasic.php index 7711f2c55..8d30ffba7 100644 --- a/src/Elasticsearch/Endpoints/License/PostStartBasic.php +++ b/src/Elasticsearch/Endpoints/License/PostStartBasic.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.post_start_basic * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PostStartBasic extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/License/PostStartTrial.php b/src/Elasticsearch/Endpoints/License/PostStartTrial.php index 9c8828b55..f77354c16 100644 --- a/src/Elasticsearch/Endpoints/License/PostStartTrial.php +++ b/src/Elasticsearch/Endpoints/License/PostStartTrial.php @@ -23,7 +23,7 @@ * Elasticsearch API name license.post_start_trial * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PostStartTrial extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Logstash/DeletePipeline.php b/src/Elasticsearch/Endpoints/Logstash/DeletePipeline.php index 8991a809e..5d30c9073 100644 --- a/src/Elasticsearch/Endpoints/Logstash/DeletePipeline.php +++ b/src/Elasticsearch/Endpoints/Logstash/DeletePipeline.php @@ -24,7 +24,7 @@ * Elasticsearch API name logstash.delete_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeletePipeline extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php b/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php index 22b2c63bb..a8d1cb815 100644 --- a/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php +++ b/src/Elasticsearch/Endpoints/Logstash/GetPipeline.php @@ -24,7 +24,7 @@ * Elasticsearch API name logstash.get_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetPipeline extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php b/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php index 406691570..21bc8440d 100644 --- a/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php +++ b/src/Elasticsearch/Endpoints/Logstash/PutPipeline.php @@ -24,7 +24,7 @@ * Elasticsearch API name logstash.put_pipeline * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutPipeline extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/MTermVectors.php b/src/Elasticsearch/Endpoints/MTermVectors.php index a0bbf4c40..558db3d35 100644 --- a/src/Elasticsearch/Endpoints/MTermVectors.php +++ b/src/Elasticsearch/Endpoints/MTermVectors.php @@ -23,7 +23,7 @@ * Elasticsearch API name mtermvectors * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MTermVectors extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Mget.php b/src/Elasticsearch/Endpoints/Mget.php index 01d6763c9..44a39472a 100644 --- a/src/Elasticsearch/Endpoints/Mget.php +++ b/src/Elasticsearch/Endpoints/Mget.php @@ -23,7 +23,7 @@ * Elasticsearch API name mget * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Mget extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Migration/Deprecations.php b/src/Elasticsearch/Endpoints/Migration/Deprecations.php index b670e8fdf..a2146643e 100644 --- a/src/Elasticsearch/Endpoints/Migration/Deprecations.php +++ b/src/Elasticsearch/Endpoints/Migration/Deprecations.php @@ -23,7 +23,7 @@ * Elasticsearch API name migration.deprecations * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Deprecations extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php b/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php new file mode 100644 index 000000000..bcf3d0918 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Migration/GetFeatureUpgradeStatus.php @@ -0,0 +1,48 @@ +body = $body; + + return $this; + } + public function setJobId($job_id): Forecast { if (isset($job_id) !== true) { diff --git a/src/Elasticsearch/Endpoints/Ml/GetBuckets.php b/src/Elasticsearch/Endpoints/Ml/GetBuckets.php index 77c883725..7f79912d2 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetBuckets.php +++ b/src/Elasticsearch/Endpoints/Ml/GetBuckets.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_buckets * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetBuckets extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php b/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php index 894378376..e36456da7 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php +++ b/src/Elasticsearch/Endpoints/Ml/GetCalendarEvents.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_calendar_events * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetCalendarEvents extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetCalendars.php b/src/Elasticsearch/Endpoints/Ml/GetCalendars.php index 26cc27cfa..8228119c9 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetCalendars.php +++ b/src/Elasticsearch/Endpoints/Ml/GetCalendars.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_calendars * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetCalendars extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetCategories.php b/src/Elasticsearch/Endpoints/Ml/GetCategories.php index 46075b28f..8f7974c27 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetCategories.php +++ b/src/Elasticsearch/Endpoints/Ml/GetCategories.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_categories * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetCategories extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php index 9cb3d90f9..a6f0f5457 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalytics.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php index 93fb22769..75b217c80 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php +++ b/src/Elasticsearch/Endpoints/Ml/GetDataFrameAnalyticsStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_data_frame_analytics_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetDataFrameAnalyticsStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php b/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php index 8c045f293..45e9492e0 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php +++ b/src/Elasticsearch/Endpoints/Ml/GetDatafeedStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_datafeed_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetDatafeedStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php b/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php index 90a956095..f28e0c01b 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php +++ b/src/Elasticsearch/Endpoints/Ml/GetDatafeeds.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_datafeeds * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetDatafeeds extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetFilters.php b/src/Elasticsearch/Endpoints/Ml/GetFilters.php index c145d3201..cbb7ed323 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetFilters.php +++ b/src/Elasticsearch/Endpoints/Ml/GetFilters.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_filters * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetFilters extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php b/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php index 285e80f82..389224d60 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php +++ b/src/Elasticsearch/Endpoints/Ml/GetInfluencers.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_influencers * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetInfluencers extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetJobStats.php b/src/Elasticsearch/Endpoints/Ml/GetJobStats.php index cc6cbd905..902e838ad 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetJobStats.php +++ b/src/Elasticsearch/Endpoints/Ml/GetJobStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_job_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetJobStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetJobs.php b/src/Elasticsearch/Endpoints/Ml/GetJobs.php index 911128f85..eb5e36a7e 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetJobs.php +++ b/src/Elasticsearch/Endpoints/Ml/GetJobs.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_jobs * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetJobs extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetModelSnapshotUpgradeStats.php b/src/Elasticsearch/Endpoints/Ml/GetModelSnapshotUpgradeStats.php new file mode 100644 index 000000000..09fa6031a --- /dev/null +++ b/src/Elasticsearch/Endpoints/Ml/GetModelSnapshotUpgradeStats.php @@ -0,0 +1,76 @@ +job_id ?? null; + $snapshot_id = $this->snapshot_id ?? null; + + if (isset($job_id) && isset($snapshot_id)) { + return "/_ml/anomaly_detectors/$job_id/model_snapshots/$snapshot_id/_upgrade/_stats"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.get_model_snapshot_upgrade_stats'); + } + + public function getParamWhitelist(): array + { + return [ + 'allow_no_match' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setJobId($job_id): GetModelSnapshotUpgradeStats + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } + + public function setSnapshotId($snapshot_id): GetModelSnapshotUpgradeStats + { + if (isset($snapshot_id) !== true) { + return $this; + } + $this->snapshot_id = $snapshot_id; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php b/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php index 0a5002108..40be5d4e1 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php +++ b/src/Elasticsearch/Endpoints/Ml/GetModelSnapshots.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_model_snapshots * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetModelSnapshots extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php b/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php index 9898e807b..be639db4f 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php +++ b/src/Elasticsearch/Endpoints/Ml/GetOverallBuckets.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_overall_buckets * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetOverallBuckets extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetRecords.php b/src/Elasticsearch/Endpoints/Ml/GetRecords.php index 50b7d8623..6535de9d1 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetRecords.php +++ b/src/Elasticsearch/Endpoints/Ml/GetRecords.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.get_records * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRecords extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php b/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php index 1967643bc..6b95c5eca 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php +++ b/src/Elasticsearch/Endpoints/Ml/GetTrainedModels.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_trained_models * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTrainedModels extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php b/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php index 2576fcf1b..91c067c1e 100644 --- a/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php +++ b/src/Elasticsearch/Endpoints/Ml/GetTrainedModelsStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.get_trained_models_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTrainedModelsStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/Info.php b/src/Elasticsearch/Endpoints/Ml/Info.php index 40a6f9034..ce42f5def 100644 --- a/src/Elasticsearch/Endpoints/Ml/Info.php +++ b/src/Elasticsearch/Endpoints/Ml/Info.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.info * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Info extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/OpenJob.php b/src/Elasticsearch/Endpoints/Ml/OpenJob.php index edaa52436..5db2017be 100644 --- a/src/Elasticsearch/Endpoints/Ml/OpenJob.php +++ b/src/Elasticsearch/Endpoints/Ml/OpenJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.open_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class OpenJob extends AbstractEndpoint { @@ -50,6 +50,16 @@ public function getMethod(): string return 'POST'; } + public function setBody($body): OpenJob + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + public function setJobId($job_id): OpenJob { if (isset($job_id) !== true) { diff --git a/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php b/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php index d3fc89ec0..2016b2bac 100644 --- a/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php +++ b/src/Elasticsearch/Endpoints/Ml/PostCalendarEvents.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.post_calendar_events * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PostCalendarEvents extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PostData.php b/src/Elasticsearch/Endpoints/Ml/PostData.php index 392093413..558037bfe 100644 --- a/src/Elasticsearch/Endpoints/Ml/PostData.php +++ b/src/Elasticsearch/Endpoints/Ml/PostData.php @@ -27,7 +27,7 @@ * Elasticsearch API name ml.post_data * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PostData extends AbstractEndpoint { @@ -89,4 +89,5 @@ public function setJobId($job_id): PostData return $this; } + } diff --git a/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php index b7b56cf0e..4d23a84ef 100644 --- a/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/PreviewDataFrameAnalytics.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.preview_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PreviewDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php b/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php index 4103445fa..8c67f0b70 100644 --- a/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php +++ b/src/Elasticsearch/Endpoints/Ml/PreviewDatafeed.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.preview_datafeed * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PreviewDatafeed extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutCalendar.php b/src/Elasticsearch/Endpoints/Ml/PutCalendar.php index a858e44ee..73ea41733 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutCalendar.php +++ b/src/Elasticsearch/Endpoints/Ml/PutCalendar.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_calendar * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutCalendar extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php b/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php index 51ed81bc9..4653d05fe 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php +++ b/src/Elasticsearch/Endpoints/Ml/PutCalendarJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_calendar_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutCalendarJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php index e038fc5ed..1566cff50 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/PutDataFrameAnalytics.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php b/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php index 32b7e006e..c5a1e9e0d 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php +++ b/src/Elasticsearch/Endpoints/Ml/PutDatafeed.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_datafeed * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutDatafeed extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutFilter.php b/src/Elasticsearch/Endpoints/Ml/PutFilter.php index 2afe2c7e0..fa1ec5dba 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutFilter.php +++ b/src/Elasticsearch/Endpoints/Ml/PutFilter.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_filter * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutFilter extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/PutJob.php b/src/Elasticsearch/Endpoints/Ml/PutJob.php index bedebcbb5..a38ef3807 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutJob.php +++ b/src/Elasticsearch/Endpoints/Ml/PutJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutJob extends AbstractEndpoint { @@ -42,7 +42,12 @@ public function getURI(): string public function getParamWhitelist(): array { - return []; + return [ + 'ignore_unavailable', + 'allow_no_indices', + 'ignore_throttled', + 'expand_wildcards' + ]; } public function getMethod(): string diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php index 1db3d6133..dfc994e69 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php +++ b/src/Elasticsearch/Endpoints/Ml/PutTrainedModel.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_trained_model * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutTrainedModel extends AbstractEndpoint { @@ -42,7 +42,9 @@ public function getURI(): string public function getParamWhitelist(): array { - return []; + return [ + 'defer_definition_decompression' + ]; } public function getMethod(): string diff --git a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php b/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php index f460b379a..11e4fc138 100644 --- a/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php +++ b/src/Elasticsearch/Endpoints/Ml/PutTrainedModelAlias.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.put_trained_model_alias * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutTrainedModelAlias extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/ResetJob.php b/src/Elasticsearch/Endpoints/Ml/ResetJob.php new file mode 100644 index 000000000..08cbf954c --- /dev/null +++ b/src/Elasticsearch/Endpoints/Ml/ResetJob.php @@ -0,0 +1,64 @@ +job_id ?? null; + + if (isset($job_id)) { + return "/_ml/anomaly_detectors/$job_id/_reset"; + } + throw new RuntimeException('Missing parameter for the endpoint ml.reset_job'); + } + + public function getParamWhitelist(): array + { + return [ + 'wait_for_completion' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setJobId($job_id): ResetJob + { + if (isset($job_id) !== true) { + return $this; + } + $this->job_id = $job_id; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php b/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php index 800d791ac..b9194ae8b 100644 --- a/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php +++ b/src/Elasticsearch/Endpoints/Ml/RevertModelSnapshot.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.revert_model_snapshot * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RevertModelSnapshot extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php b/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php index a9cfe1cf4..e69d917f2 100644 --- a/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php +++ b/src/Elasticsearch/Endpoints/Ml/SetUpgradeMode.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.set_upgrade_mode * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SetUpgradeMode extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php index 5a4cfa0b3..49625833a 100644 --- a/src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/StartDataFrameAnalytics.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.start_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StartDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php b/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php index 6d4c12c83..c1e78921f 100644 --- a/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php +++ b/src/Elasticsearch/Endpoints/Ml/StartDatafeed.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.start_datafeed * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StartDatafeed extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php index 61d031bb3..80467a094 100644 --- a/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/StopDataFrameAnalytics.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.stop_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StopDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php b/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php index e3d5222f1..0333a79d1 100644 --- a/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php +++ b/src/Elasticsearch/Endpoints/Ml/StopDatafeed.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.stop_datafeed * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StopDatafeed extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php b/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php index 21ddcfb7e..fbcab06b0 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php +++ b/src/Elasticsearch/Endpoints/Ml/UpdateDataFrameAnalytics.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.update_data_frame_analytics * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateDataFrameAnalytics extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php b/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php index 828ef7577..c16b783f0 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php +++ b/src/Elasticsearch/Endpoints/Ml/UpdateDatafeed.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.update_datafeed * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateDatafeed extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php b/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php index 01ce5171c..6621479bb 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php +++ b/src/Elasticsearch/Endpoints/Ml/UpdateFilter.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.update_filter * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateFilter extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateJob.php b/src/Elasticsearch/Endpoints/Ml/UpdateJob.php index 33ffe783b..df29f5d5b 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpdateJob.php +++ b/src/Elasticsearch/Endpoints/Ml/UpdateJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.update_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php b/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php index fe8ea125f..9b91ee371 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php +++ b/src/Elasticsearch/Endpoints/Ml/UpdateModelSnapshot.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.update_model_snapshot * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateModelSnapshot extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php b/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php index a7f84f78d..a142ed655 100644 --- a/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php +++ b/src/Elasticsearch/Endpoints/Ml/UpgradeJobSnapshot.php @@ -24,7 +24,7 @@ * Elasticsearch API name ml.upgrade_job_snapshot * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpgradeJobSnapshot extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/Validate.php b/src/Elasticsearch/Endpoints/Ml/Validate.php index c72fa9f74..146aa648e 100644 --- a/src/Elasticsearch/Endpoints/Ml/Validate.php +++ b/src/Elasticsearch/Endpoints/Ml/Validate.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.validate * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Validate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php b/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php index 2e582d8a2..ba5377104 100644 --- a/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php +++ b/src/Elasticsearch/Endpoints/Ml/ValidateDetector.php @@ -23,7 +23,7 @@ * Elasticsearch API name ml.validate_detector * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ValidateDetector extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Monitoring/Bulk.php b/src/Elasticsearch/Endpoints/Monitoring/Bulk.php index af90aec51..596fb6c3d 100644 --- a/src/Elasticsearch/Endpoints/Monitoring/Bulk.php +++ b/src/Elasticsearch/Endpoints/Monitoring/Bulk.php @@ -26,7 +26,7 @@ * Elasticsearch API name monitoring.bulk * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Bulk extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Msearch.php b/src/Elasticsearch/Endpoints/Msearch.php index cc0bb21e8..0f4090d2c 100644 --- a/src/Elasticsearch/Endpoints/Msearch.php +++ b/src/Elasticsearch/Endpoints/Msearch.php @@ -26,7 +26,7 @@ * Elasticsearch API name msearch * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Msearch extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/MsearchTemplate.php b/src/Elasticsearch/Endpoints/MsearchTemplate.php index 8121fc82e..3c98866c7 100644 --- a/src/Elasticsearch/Endpoints/MsearchTemplate.php +++ b/src/Elasticsearch/Endpoints/MsearchTemplate.php @@ -26,7 +26,7 @@ * Elasticsearch API name msearch_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MsearchTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php b/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php new file mode 100644 index 000000000..9fcc03c1b --- /dev/null +++ b/src/Elasticsearch/Endpoints/Nodes/ClearRepositoriesMeteringArchive.php @@ -0,0 +1,77 @@ +node_id ?? null; + $max_archive_version = $this->max_archive_version ?? null; + + if (isset($node_id) && isset($max_archive_version)) { + return "/_nodes/$node_id/_repositories_metering/$max_archive_version"; + } + throw new RuntimeException('Missing parameter for the endpoint nodes.clear_repositories_metering_archive'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setNodeId($node_id): ClearRepositoriesMeteringArchive + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } + + public function setMaxArchiveVersion($max_archive_version): ClearRepositoriesMeteringArchive + { + if (isset($max_archive_version) !== true) { + return $this; + } + $this->max_archive_version = $max_archive_version; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php b/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php new file mode 100644 index 000000000..45a205d89 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Nodes/GetRepositoriesMeteringInfo.php @@ -0,0 +1,65 @@ +node_id ?? null; + + if (isset($node_id)) { + return "/_nodes/$node_id/_repositories_metering"; + } + throw new RuntimeException('Missing parameter for the endpoint nodes.get_repositories_metering_info'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNodeId($node_id): GetRepositoriesMeteringInfo + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Nodes/HotThreads.php b/src/Elasticsearch/Endpoints/Nodes/HotThreads.php index 5c62b2d77..4ce9c42fe 100644 --- a/src/Elasticsearch/Endpoints/Nodes/HotThreads.php +++ b/src/Elasticsearch/Endpoints/Nodes/HotThreads.php @@ -23,7 +23,7 @@ * Elasticsearch API name nodes.hot_threads * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class HotThreads extends AbstractEndpoint { @@ -47,6 +47,7 @@ public function getParamWhitelist(): array 'threads', 'ignore_idle_threads', 'type', + 'sort', 'timeout' ]; } diff --git a/src/Elasticsearch/Endpoints/Nodes/Info.php b/src/Elasticsearch/Endpoints/Nodes/Info.php index c8967e722..e68f212d4 100644 --- a/src/Elasticsearch/Endpoints/Nodes/Info.php +++ b/src/Elasticsearch/Endpoints/Nodes/Info.php @@ -23,7 +23,7 @@ * Elasticsearch API name nodes.info * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Info extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php b/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php index ebc8945ad..8d88272a2 100644 --- a/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php +++ b/src/Elasticsearch/Endpoints/Nodes/ReloadSecureSettings.php @@ -23,7 +23,7 @@ * Elasticsearch API name nodes.reload_secure_settings * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ReloadSecureSettings extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Nodes/Stats.php b/src/Elasticsearch/Endpoints/Nodes/Stats.php index 60e476018..65323e399 100644 --- a/src/Elasticsearch/Endpoints/Nodes/Stats.php +++ b/src/Elasticsearch/Endpoints/Nodes/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name nodes.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Nodes/Usage.php b/src/Elasticsearch/Endpoints/Nodes/Usage.php index 742243096..3adaebcef 100644 --- a/src/Elasticsearch/Endpoints/Nodes/Usage.php +++ b/src/Elasticsearch/Endpoints/Nodes/Usage.php @@ -23,7 +23,7 @@ * Elasticsearch API name nodes.usage * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Usage extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/OpenPointInTime.php b/src/Elasticsearch/Endpoints/OpenPointInTime.php index de5f5b664..78b9ddb80 100644 --- a/src/Elasticsearch/Endpoints/OpenPointInTime.php +++ b/src/Elasticsearch/Endpoints/OpenPointInTime.php @@ -16,6 +16,7 @@ namespace Elasticsearch\Endpoints; +use Elasticsearch\Common\Exceptions\RuntimeException; use Elasticsearch\Endpoints\AbstractEndpoint; /** @@ -23,7 +24,7 @@ * Elasticsearch API name open_point_in_time * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class OpenPointInTime extends AbstractEndpoint { @@ -35,7 +36,7 @@ public function getURI(): string if (isset($index)) { return "/$index/_pit"; } - return "/_pit"; + throw new RuntimeException('Missing parameter for the endpoint open_point_in_time'); } public function getParamWhitelist(): array diff --git a/src/Elasticsearch/Endpoints/Ping.php b/src/Elasticsearch/Endpoints/Ping.php index abbd5f62a..d48fa5b26 100644 --- a/src/Elasticsearch/Endpoints/Ping.php +++ b/src/Elasticsearch/Endpoints/Ping.php @@ -23,7 +23,7 @@ * Elasticsearch API name ping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Ping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/PutScript.php b/src/Elasticsearch/Endpoints/PutScript.php index 4fdb09009..b942a9a1c 100644 --- a/src/Elasticsearch/Endpoints/PutScript.php +++ b/src/Elasticsearch/Endpoints/PutScript.php @@ -24,7 +24,7 @@ * Elasticsearch API name put_script * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutScript extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/RankEval.php b/src/Elasticsearch/Endpoints/RankEval.php index 52f68d951..7c7825e2b 100644 --- a/src/Elasticsearch/Endpoints/RankEval.php +++ b/src/Elasticsearch/Endpoints/RankEval.php @@ -23,7 +23,7 @@ * Elasticsearch API name rank_eval * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RankEval extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Reindex.php b/src/Elasticsearch/Endpoints/Reindex.php index 181aa1e64..3d52561cd 100644 --- a/src/Elasticsearch/Endpoints/Reindex.php +++ b/src/Elasticsearch/Endpoints/Reindex.php @@ -23,7 +23,7 @@ * Elasticsearch API name reindex * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Reindex extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/ReindexRethrottle.php b/src/Elasticsearch/Endpoints/ReindexRethrottle.php index 76db82278..60ef36adf 100644 --- a/src/Elasticsearch/Endpoints/ReindexRethrottle.php +++ b/src/Elasticsearch/Endpoints/ReindexRethrottle.php @@ -24,7 +24,7 @@ * Elasticsearch API name reindex_rethrottle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ReindexRethrottle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/RenderSearchTemplate.php b/src/Elasticsearch/Endpoints/RenderSearchTemplate.php index 64fd0a8c3..f32df7a89 100644 --- a/src/Elasticsearch/Endpoints/RenderSearchTemplate.php +++ b/src/Elasticsearch/Endpoints/RenderSearchTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name render_search_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RenderSearchTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php b/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php index 7d687e96b..276b8a6bf 100644 --- a/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php +++ b/src/Elasticsearch/Endpoints/Rollup/DeleteJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.delete_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/GetJobs.php b/src/Elasticsearch/Endpoints/Rollup/GetJobs.php index dd6e20b70..60f921de0 100644 --- a/src/Elasticsearch/Endpoints/Rollup/GetJobs.php +++ b/src/Elasticsearch/Endpoints/Rollup/GetJobs.php @@ -23,7 +23,7 @@ * Elasticsearch API name rollup.get_jobs * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetJobs extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php b/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php index 65a532140..ccbf25598 100644 --- a/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php +++ b/src/Elasticsearch/Endpoints/Rollup/GetRollupCaps.php @@ -23,7 +23,7 @@ * Elasticsearch API name rollup.get_rollup_caps * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRollupCaps extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php b/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php index 634a04365..2518b26e3 100644 --- a/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php +++ b/src/Elasticsearch/Endpoints/Rollup/GetRollupIndexCaps.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.get_rollup_index_caps * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRollupIndexCaps extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/PutJob.php b/src/Elasticsearch/Endpoints/Rollup/PutJob.php index a86ee9adb..a9775a8d7 100644 --- a/src/Elasticsearch/Endpoints/Rollup/PutJob.php +++ b/src/Elasticsearch/Endpoints/Rollup/PutJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.put_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/Rollup.php b/src/Elasticsearch/Endpoints/Rollup/Rollup.php index a5c955629..22f55727e 100644 --- a/src/Elasticsearch/Endpoints/Rollup/Rollup.php +++ b/src/Elasticsearch/Endpoints/Rollup/Rollup.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.rollup * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Rollup extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php b/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php index ce17693dd..5c481df30 100644 --- a/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php +++ b/src/Elasticsearch/Endpoints/Rollup/RollupSearch.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.rollup_search * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RollupSearch extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/StartJob.php b/src/Elasticsearch/Endpoints/Rollup/StartJob.php index f386d7e91..caca384e7 100644 --- a/src/Elasticsearch/Endpoints/Rollup/StartJob.php +++ b/src/Elasticsearch/Endpoints/Rollup/StartJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.start_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StartJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Rollup/StopJob.php b/src/Elasticsearch/Endpoints/Rollup/StopJob.php index 5b6b7347e..2052c6ab1 100644 --- a/src/Elasticsearch/Endpoints/Rollup/StopJob.php +++ b/src/Elasticsearch/Endpoints/Rollup/StopJob.php @@ -24,7 +24,7 @@ * Elasticsearch API name rollup.stop_job * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StopJob extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php b/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php index bb60792bb..0863aa6b7 100644 --- a/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php +++ b/src/Elasticsearch/Endpoints/ScriptsPainlessExecute.php @@ -23,7 +23,7 @@ * Elasticsearch API name scripts_painless_execute * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ScriptsPainlessExecute extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Scroll.php b/src/Elasticsearch/Endpoints/Scroll.php index 804795be0..0fbeab89b 100644 --- a/src/Elasticsearch/Endpoints/Scroll.php +++ b/src/Elasticsearch/Endpoints/Scroll.php @@ -23,7 +23,7 @@ * Elasticsearch API name scroll * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Scroll extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Search.php b/src/Elasticsearch/Endpoints/Search.php index 00f259bba..9e50a5543 100644 --- a/src/Elasticsearch/Endpoints/Search.php +++ b/src/Elasticsearch/Endpoints/Search.php @@ -23,7 +23,7 @@ * Elasticsearch API name search * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Search extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchMvt.php b/src/Elasticsearch/Endpoints/SearchMvt.php new file mode 100644 index 000000000..f37f843fe --- /dev/null +++ b/src/Elasticsearch/Endpoints/SearchMvt.php @@ -0,0 +1,116 @@ +index ?? null; + $field = $this->field ?? null; + $zoom = $this->zoom ?? null; + $x = $this->x ?? null; + $y = $this->y ?? null; + + if (isset($index) && isset($field) && isset($zoom) && isset($x) && isset($y)) { + return "/$index/_mvt/$field/$zoom/$x/$y"; + } + throw new RuntimeException('Missing parameter for the endpoint search_mvt'); + } + + public function getParamWhitelist(): array + { + return [ + 'exact_bounds', + 'extent', + 'grid_precision', + 'grid_type', + 'size', + 'track_total_hits' + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): SearchMvt + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } + + public function setField($field): SearchMvt + { + if (isset($field) !== true) { + return $this; + } + $this->field = $field; + + return $this; + } + + public function setZoom($zoom): SearchMvt + { + if (isset($zoom) !== true) { + return $this; + } + $this->zoom = $zoom; + + return $this; + } + + public function setX($x): SearchMvt + { + if (isset($x) !== true) { + return $this; + } + $this->x = $x; + + return $this; + } + + public function setY($y): SearchMvt + { + if (isset($y) !== true) { + return $this; + } + $this->y = $y; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/SearchShards.php b/src/Elasticsearch/Endpoints/SearchShards.php index 293938998..6295bf30f 100644 --- a/src/Elasticsearch/Endpoints/SearchShards.php +++ b/src/Elasticsearch/Endpoints/SearchShards.php @@ -23,7 +23,7 @@ * Elasticsearch API name search_shards * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SearchShards extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchTemplate.php b/src/Elasticsearch/Endpoints/SearchTemplate.php index efd35f838..90fefa0b0 100644 --- a/src/Elasticsearch/Endpoints/SearchTemplate.php +++ b/src/Elasticsearch/Endpoints/SearchTemplate.php @@ -23,7 +23,7 @@ * Elasticsearch API name search_template * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SearchTemplate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php new file mode 100644 index 000000000..593eef1ae --- /dev/null +++ b/src/Elasticsearch/Endpoints/SearchableSnapshots/CacheStats.php @@ -0,0 +1,64 @@ +node_id ?? null; + + if (isset($node_id)) { + return "/_searchable_snapshots/$node_id/cache/stats"; + } + return "/_searchable_snapshots/cache/stats"; + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNodeId($node_id): CacheStats + { + if (isset($node_id) !== true) { + return $this; + } + if (is_array($node_id) === true) { + $node_id = implode(",", $node_id); + } + $this->node_id = $node_id; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php index f2062d88e..9bb63dda7 100644 --- a/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php +++ b/src/Elasticsearch/Endpoints/SearchableSnapshots/ClearCache.php @@ -23,7 +23,7 @@ * Elasticsearch API name searchable_snapshots.clear_cache * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCache extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php index 2fdd5105b..0b6c2d57d 100644 --- a/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php +++ b/src/Elasticsearch/Endpoints/SearchableSnapshots/Mount.php @@ -24,7 +24,7 @@ * Elasticsearch API name searchable_snapshots.mount * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Mount extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/RepositoryStats.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/RepositoryStats.php index 913e4646c..e7ae29d1b 100644 --- a/src/Elasticsearch/Endpoints/SearchableSnapshots/RepositoryStats.php +++ b/src/Elasticsearch/Endpoints/SearchableSnapshots/RepositoryStats.php @@ -24,7 +24,7 @@ * Elasticsearch API name searchable_snapshots.repository_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RepositoryStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php b/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php index 967d2ade9..ef08d5f35 100644 --- a/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php +++ b/src/Elasticsearch/Endpoints/SearchableSnapshots/Stats.php @@ -23,7 +23,7 @@ * Elasticsearch API name searchable_snapshots.stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/Authenticate.php b/src/Elasticsearch/Endpoints/Security/Authenticate.php index 58f7c9c6b..6f6d0ec0a 100644 --- a/src/Elasticsearch/Endpoints/Security/Authenticate.php +++ b/src/Elasticsearch/Endpoints/Security/Authenticate.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.authenticate * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Authenticate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ChangePassword.php b/src/Elasticsearch/Endpoints/Security/ChangePassword.php index 903a87a8b..c8250e5e8 100644 --- a/src/Elasticsearch/Endpoints/Security/ChangePassword.php +++ b/src/Elasticsearch/Endpoints/Security/ChangePassword.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.change_password * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ChangePassword extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php b/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php index f6fc2b8e6..a84ef4f56 100644 --- a/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php +++ b/src/Elasticsearch/Endpoints/Security/ClearApiKeyCache.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.clear_api_key_cache * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearApiKeyCache extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php b/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php index ccd371af0..59c13d455 100644 --- a/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/ClearCachedPrivileges.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.clear_cached_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCachedPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php b/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php index 094d59fc0..079d9e3ee 100644 --- a/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php +++ b/src/Elasticsearch/Endpoints/Security/ClearCachedRealms.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.clear_cached_realms * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCachedRealms extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php b/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php index e6c5c41cb..fcf9590af 100644 --- a/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php +++ b/src/Elasticsearch/Endpoints/Security/ClearCachedRoles.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.clear_cached_roles * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCachedRoles extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php b/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php new file mode 100644 index 000000000..88b6bf429 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/ClearCachedServiceTokens.php @@ -0,0 +1,91 @@ +namespace ?? null; + $service = $this->service ?? null; + $name = $this->name ?? null; + + if (isset($namespace) && isset($service) && isset($name)) { + return "/_security/service/$namespace/$service/credential/token/$name/_clear_cache"; + } + throw new RuntimeException('Missing parameter for the endpoint security.clear_cached_service_tokens'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setNamespace($namespace): ClearCachedServiceTokens + { + if (isset($namespace) !== true) { + return $this; + } + $this->namespace = $namespace; + + return $this; + } + + public function setService($service): ClearCachedServiceTokens + { + if (isset($service) !== true) { + return $this; + } + $this->service = $service; + + return $this; + } + + public function setName($name): ClearCachedServiceTokens + { + if (isset($name) !== true) { + return $this; + } + if (is_array($name) === true) { + $name = implode(",", $name); + } + $this->name = $name; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/CreateApiKey.php b/src/Elasticsearch/Endpoints/Security/CreateApiKey.php index b7321e2a0..8c85ecde1 100644 --- a/src/Elasticsearch/Endpoints/Security/CreateApiKey.php +++ b/src/Elasticsearch/Endpoints/Security/CreateApiKey.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.create_api_key * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CreateApiKey extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php b/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php new file mode 100644 index 000000000..e0bfdab2d --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/CreateServiceToken.php @@ -0,0 +1,98 @@ +namespace) !== true) { + throw new RuntimeException( + 'namespace is required for create_service_token' + ); + } + $namespace = $this->namespace; + if (isset($this->service) !== true) { + throw new RuntimeException( + 'service is required for create_service_token' + ); + } + $service = $this->service; + $name = $this->name ?? null; + + if (isset($name)) { + return "/_security/service/$namespace/$service/credential/token/$name"; + } + return "/_security/service/$namespace/$service/credential/token"; + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setNamespace($namespace): CreateServiceToken + { + if (isset($namespace) !== true) { + return $this; + } + $this->namespace = $namespace; + + return $this; + } + + public function setService($service): CreateServiceToken + { + if (isset($service) !== true) { + return $this; + } + $this->service = $service; + + return $this; + } + + public function setName($name): CreateServiceToken + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php b/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php index 6680b7226..7d9c1dafd 100644 --- a/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/DeletePrivileges.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.delete_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeletePrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/DeleteRole.php b/src/Elasticsearch/Endpoints/Security/DeleteRole.php index 23de86f54..e2af97729 100644 --- a/src/Elasticsearch/Endpoints/Security/DeleteRole.php +++ b/src/Elasticsearch/Endpoints/Security/DeleteRole.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.delete_role * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteRole extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php b/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php index 290227be8..f1d10b8cd 100644 --- a/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php +++ b/src/Elasticsearch/Endpoints/Security/DeleteRoleMapping.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.delete_role_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteRoleMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php b/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php new file mode 100644 index 000000000..ca2ae6675 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/DeleteServiceToken.php @@ -0,0 +1,88 @@ +namespace ?? null; + $service = $this->service ?? null; + $name = $this->name ?? null; + + if (isset($namespace) && isset($service) && isset($name)) { + return "/_security/service/$namespace/$service/credential/token/$name"; + } + throw new RuntimeException('Missing parameter for the endpoint security.delete_service_token'); + } + + public function getParamWhitelist(): array + { + return [ + 'refresh' + ]; + } + + public function getMethod(): string + { + return 'DELETE'; + } + + public function setNamespace($namespace): DeleteServiceToken + { + if (isset($namespace) !== true) { + return $this; + } + $this->namespace = $namespace; + + return $this; + } + + public function setService($service): DeleteServiceToken + { + if (isset($service) !== true) { + return $this; + } + $this->service = $service; + + return $this; + } + + public function setName($name): DeleteServiceToken + { + if (isset($name) !== true) { + return $this; + } + $this->name = $name; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/DeleteUser.php b/src/Elasticsearch/Endpoints/Security/DeleteUser.php index 9a3a83c82..b264aa3f2 100644 --- a/src/Elasticsearch/Endpoints/Security/DeleteUser.php +++ b/src/Elasticsearch/Endpoints/Security/DeleteUser.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.delete_user * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteUser extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/DisableUser.php b/src/Elasticsearch/Endpoints/Security/DisableUser.php index 91737d846..8c7e2d8cf 100644 --- a/src/Elasticsearch/Endpoints/Security/DisableUser.php +++ b/src/Elasticsearch/Endpoints/Security/DisableUser.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.disable_user * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DisableUser extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/EnableUser.php b/src/Elasticsearch/Endpoints/Security/EnableUser.php index 1ef5f9052..0ea89f62e 100644 --- a/src/Elasticsearch/Endpoints/Security/EnableUser.php +++ b/src/Elasticsearch/Endpoints/Security/EnableUser.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.enable_user * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class EnableUser extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetApiKey.php b/src/Elasticsearch/Endpoints/Security/GetApiKey.php index 79321bbd1..e332c0fca 100644 --- a/src/Elasticsearch/Endpoints/Security/GetApiKey.php +++ b/src/Elasticsearch/Endpoints/Security/GetApiKey.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_api_key * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetApiKey extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetBuiltinPrivileges.php b/src/Elasticsearch/Endpoints/Security/GetBuiltinPrivileges.php index 716d89575..03f425116 100644 --- a/src/Elasticsearch/Endpoints/Security/GetBuiltinPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/GetBuiltinPrivileges.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_builtin_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetBuiltinPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetPrivileges.php b/src/Elasticsearch/Endpoints/Security/GetPrivileges.php index 2a3335185..b8628a9b6 100644 --- a/src/Elasticsearch/Endpoints/Security/GetPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/GetPrivileges.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetRole.php b/src/Elasticsearch/Endpoints/Security/GetRole.php index 74a805684..c98e67d0a 100644 --- a/src/Elasticsearch/Endpoints/Security/GetRole.php +++ b/src/Elasticsearch/Endpoints/Security/GetRole.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_role * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRole extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php b/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php index 23a2046ce..5f60f4b3a 100644 --- a/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php +++ b/src/Elasticsearch/Endpoints/Security/GetRoleMapping.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_role_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRoleMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php b/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php new file mode 100644 index 000000000..3c185eff2 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/GetServiceAccounts.php @@ -0,0 +1,78 @@ +namespace ?? null; + $service = $this->service ?? null; + + if (isset($namespace) && isset($service)) { + return "/_security/service/$namespace/$service"; + } + if (isset($namespace)) { + return "/_security/service/$namespace"; + } + return "/_security/service"; + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNamespace($namespace): GetServiceAccounts + { + if (isset($namespace) !== true) { + return $this; + } + $this->namespace = $namespace; + + return $this; + } + + public function setService($service): GetServiceAccounts + { + if (isset($service) !== true) { + return $this; + } + $this->service = $service; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php b/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php new file mode 100644 index 000000000..64d0538de --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/GetServiceCredentials.php @@ -0,0 +1,76 @@ +namespace ?? null; + $service = $this->service ?? null; + + if (isset($namespace) && isset($service)) { + return "/_security/service/$namespace/$service/credential"; + } + throw new RuntimeException('Missing parameter for the endpoint security.get_service_credentials'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setNamespace($namespace): GetServiceCredentials + { + if (isset($namespace) !== true) { + return $this; + } + $this->namespace = $namespace; + + return $this; + } + + public function setService($service): GetServiceCredentials + { + if (isset($service) !== true) { + return $this; + } + $this->service = $service; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/GetToken.php b/src/Elasticsearch/Endpoints/Security/GetToken.php index 68308142f..2af480419 100644 --- a/src/Elasticsearch/Endpoints/Security/GetToken.php +++ b/src/Elasticsearch/Endpoints/Security/GetToken.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_token * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetToken extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetUser.php b/src/Elasticsearch/Endpoints/Security/GetUser.php index ee2898963..7411fff24 100644 --- a/src/Elasticsearch/Endpoints/Security/GetUser.php +++ b/src/Elasticsearch/Endpoints/Security/GetUser.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_user * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetUser extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php b/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php index 4128ceb17..ad6dd59fc 100644 --- a/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/GetUserPrivileges.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.get_user_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetUserPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/GrantApiKey.php b/src/Elasticsearch/Endpoints/Security/GrantApiKey.php index a2755b9cc..166a45606 100644 --- a/src/Elasticsearch/Endpoints/Security/GrantApiKey.php +++ b/src/Elasticsearch/Endpoints/Security/GrantApiKey.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.grant_api_key * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GrantApiKey extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/HasPrivileges.php b/src/Elasticsearch/Endpoints/Security/HasPrivileges.php index bcd9a711f..4cffdeedf 100644 --- a/src/Elasticsearch/Endpoints/Security/HasPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/HasPrivileges.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.has_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class HasPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php b/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php index 62089e026..9e71edf85 100644 --- a/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php +++ b/src/Elasticsearch/Endpoints/Security/InvalidateApiKey.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.invalidate_api_key * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class InvalidateApiKey extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/InvalidateToken.php b/src/Elasticsearch/Endpoints/Security/InvalidateToken.php index 19cf4816b..4a4e45bee 100644 --- a/src/Elasticsearch/Endpoints/Security/InvalidateToken.php +++ b/src/Elasticsearch/Endpoints/Security/InvalidateToken.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.invalidate_token * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class InvalidateToken extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/PutPrivileges.php b/src/Elasticsearch/Endpoints/Security/PutPrivileges.php index 8ac738f72..ea3b671a4 100644 --- a/src/Elasticsearch/Endpoints/Security/PutPrivileges.php +++ b/src/Elasticsearch/Endpoints/Security/PutPrivileges.php @@ -23,7 +23,7 @@ * Elasticsearch API name security.put_privileges * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutPrivileges extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/PutRole.php b/src/Elasticsearch/Endpoints/Security/PutRole.php index 887dca0b4..969883992 100644 --- a/src/Elasticsearch/Endpoints/Security/PutRole.php +++ b/src/Elasticsearch/Endpoints/Security/PutRole.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.put_role * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutRole extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php b/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php index 4d61d7d91..86b067747 100644 --- a/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php +++ b/src/Elasticsearch/Endpoints/Security/PutRoleMapping.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.put_role_mapping * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutRoleMapping extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/PutUser.php b/src/Elasticsearch/Endpoints/Security/PutUser.php index ccfef1c25..4285b0f1e 100644 --- a/src/Elasticsearch/Endpoints/Security/PutUser.php +++ b/src/Elasticsearch/Endpoints/Security/PutUser.php @@ -24,7 +24,7 @@ * Elasticsearch API name security.put_user * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutUser extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php b/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php new file mode 100644 index 000000000..2a4fa0de4 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/QueryApiKeys.php @@ -0,0 +1,58 @@ +body) ? 'POST' : 'GET'; + } + + public function setBody($body): QueryApiKeys + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php b/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php new file mode 100644 index 000000000..6461fd3d9 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlAuthenticate.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php b/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php new file mode 100644 index 000000000..b20e24857 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlCompleteLogout.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php b/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php new file mode 100644 index 000000000..fbee509ff --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlInvalidate.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlLogout.php b/src/Elasticsearch/Endpoints/Security/SamlLogout.php new file mode 100644 index 000000000..6dcd82c1d --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlLogout.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php b/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php new file mode 100644 index 000000000..3070ad5b2 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlPrepareAuthentication.php @@ -0,0 +1,56 @@ +body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php b/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php new file mode 100644 index 000000000..a72c9d218 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Security/SamlServiceProviderMetadata.php @@ -0,0 +1,62 @@ +realm_name ?? null; + + if (isset($realm_name)) { + return "/_security/saml/metadata/$realm_name"; + } + throw new RuntimeException('Missing parameter for the endpoint security.saml_service_provider_metadata'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } + + public function setRealmName($realm_name): SamlServiceProviderMetadata + { + if (isset($realm_name) !== true) { + return $this; + } + $this->realm_name = $realm_name; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php b/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php index ca339ddc6..890920f6b 100644 --- a/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php +++ b/src/Elasticsearch/Endpoints/Shutdown/DeleteNode.php @@ -24,7 +24,7 @@ * Elasticsearch API name shutdown.delete_node * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteNode extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Shutdown/GetNode.php b/src/Elasticsearch/Endpoints/Shutdown/GetNode.php index 14cff807d..785d102ef 100644 --- a/src/Elasticsearch/Endpoints/Shutdown/GetNode.php +++ b/src/Elasticsearch/Endpoints/Shutdown/GetNode.php @@ -23,7 +23,7 @@ * Elasticsearch API name shutdown.get_node * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetNode extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Shutdown/PutNode.php b/src/Elasticsearch/Endpoints/Shutdown/PutNode.php index b0825b95c..2d75d6b4f 100644 --- a/src/Elasticsearch/Endpoints/Shutdown/PutNode.php +++ b/src/Elasticsearch/Endpoints/Shutdown/PutNode.php @@ -24,7 +24,7 @@ * Elasticsearch API name shutdown.put_node * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutNode extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php b/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php index 6b567c546..7c252e918 100644 --- a/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php +++ b/src/Elasticsearch/Endpoints/Slm/DeleteLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name slm.delete_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php b/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php index 3c77d4c89..cf4bef2c2 100644 --- a/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php +++ b/src/Elasticsearch/Endpoints/Slm/ExecuteLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name slm.execute_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExecuteLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php b/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php index 8c4ecc706..867baf2a3 100644 --- a/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php +++ b/src/Elasticsearch/Endpoints/Slm/ExecuteRetention.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.execute_retention * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ExecuteRetention extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/GetLifecycle.php b/src/Elasticsearch/Endpoints/Slm/GetLifecycle.php index 7cbbdf2c3..4b7b2737e 100644 --- a/src/Elasticsearch/Endpoints/Slm/GetLifecycle.php +++ b/src/Elasticsearch/Endpoints/Slm/GetLifecycle.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.get_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/GetStats.php b/src/Elasticsearch/Endpoints/Slm/GetStats.php index 4344e7885..a250f8eb2 100644 --- a/src/Elasticsearch/Endpoints/Slm/GetStats.php +++ b/src/Elasticsearch/Endpoints/Slm/GetStats.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.get_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/GetStatus.php b/src/Elasticsearch/Endpoints/Slm/GetStatus.php index aed2d53fb..9d104b613 100644 --- a/src/Elasticsearch/Endpoints/Slm/GetStatus.php +++ b/src/Elasticsearch/Endpoints/Slm/GetStatus.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.get_status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetStatus extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/PutLifecycle.php b/src/Elasticsearch/Endpoints/Slm/PutLifecycle.php index 747edb569..11720e442 100644 --- a/src/Elasticsearch/Endpoints/Slm/PutLifecycle.php +++ b/src/Elasticsearch/Endpoints/Slm/PutLifecycle.php @@ -24,7 +24,7 @@ * Elasticsearch API name slm.put_lifecycle * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutLifecycle extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/Start.php b/src/Elasticsearch/Endpoints/Slm/Start.php index 65fe2f9e4..07886e634 100644 --- a/src/Elasticsearch/Endpoints/Slm/Start.php +++ b/src/Elasticsearch/Endpoints/Slm/Start.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.start * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Start extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Slm/Stop.php b/src/Elasticsearch/Endpoints/Slm/Stop.php index b353cbccc..aea229fe8 100644 --- a/src/Elasticsearch/Endpoints/Slm/Stop.php +++ b/src/Elasticsearch/Endpoints/Slm/Stop.php @@ -23,7 +23,7 @@ * Elasticsearch API name slm.stop * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Stop extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/CleanupRepository.php b/src/Elasticsearch/Endpoints/Snapshot/CleanupRepository.php index 2185a4644..6e05063d9 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/CleanupRepository.php +++ b/src/Elasticsearch/Endpoints/Snapshot/CleanupRepository.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.cleanup_repository * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CleanupRepository extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php b/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php index 38edde7eb..839831a1f 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php +++ b/src/Elasticsearch/Endpoints/Snapshot/CloneSnapshot.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.clone * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CloneSnapshot extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/Create.php b/src/Elasticsearch/Endpoints/Snapshot/Create.php index e64e8acb6..42940c22c 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/Create.php +++ b/src/Elasticsearch/Endpoints/Snapshot/Create.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.create * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Create extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php b/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php index aa056e8d0..441760501 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php +++ b/src/Elasticsearch/Endpoints/Snapshot/CreateRepository.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.create_repository * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CreateRepository extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/Delete.php b/src/Elasticsearch/Endpoints/Snapshot/Delete.php index d04d86b3d..584147b2b 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/Delete.php +++ b/src/Elasticsearch/Endpoints/Snapshot/Delete.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.delete * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Delete extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php b/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php index c80c6dd95..9d650d5b3 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php +++ b/src/Elasticsearch/Endpoints/Snapshot/DeleteRepository.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.delete_repository * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteRepository extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/Get.php b/src/Elasticsearch/Endpoints/Snapshot/Get.php index 2e1732e34..d3ce2b42d 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/Get.php +++ b/src/Elasticsearch/Endpoints/Snapshot/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { @@ -47,6 +47,8 @@ public function getParamWhitelist(): array return [ 'master_timeout', 'ignore_unavailable', + 'index_details', + 'include_repository', 'verbose' ]; } diff --git a/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php b/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php index 014201e30..3e0f79661 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php +++ b/src/Elasticsearch/Endpoints/Snapshot/GetRepository.php @@ -23,7 +23,7 @@ * Elasticsearch API name snapshot.get_repository * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetRepository extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php b/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php new file mode 100644 index 000000000..ccb32da21 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Snapshot/RepositoryAnalyze.php @@ -0,0 +1,74 @@ +repository ?? null; + + if (isset($repository)) { + return "/_snapshot/$repository/_analyze"; + } + throw new RuntimeException('Missing parameter for the endpoint snapshot.repository_analyze'); + } + + public function getParamWhitelist(): array + { + return [ + 'blob_count', + 'concurrency', + 'read_node_count', + 'early_read_node_count', + 'seed', + 'rare_action_probability', + 'max_blob_size', + 'max_total_data_size', + 'timeout', + 'detailed', + 'rarely_abort_writes' + ]; + } + + public function getMethod(): string + { + return 'POST'; + } + + public function setRepository($repository): RepositoryAnalyze + { + if (isset($repository) !== true) { + return $this; + } + $this->repository = $repository; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/Snapshot/Restore.php b/src/Elasticsearch/Endpoints/Snapshot/Restore.php index a250a8637..856172e66 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/Restore.php +++ b/src/Elasticsearch/Endpoints/Snapshot/Restore.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.restore * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Restore extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/Status.php b/src/Elasticsearch/Endpoints/Snapshot/Status.php index 05d572228..78bc17a1c 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/Status.php +++ b/src/Elasticsearch/Endpoints/Snapshot/Status.php @@ -23,7 +23,7 @@ * Elasticsearch API name snapshot.status * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Status extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php b/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php index 09aabc98a..f9a2a8b37 100644 --- a/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php +++ b/src/Elasticsearch/Endpoints/Snapshot/VerifyRepository.php @@ -24,7 +24,7 @@ * Elasticsearch API name snapshot.verify_repository * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class VerifyRepository extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Sql/ClearCursor.php b/src/Elasticsearch/Endpoints/Sql/ClearCursor.php index fe962c913..f3721c31b 100644 --- a/src/Elasticsearch/Endpoints/Sql/ClearCursor.php +++ b/src/Elasticsearch/Endpoints/Sql/ClearCursor.php @@ -23,7 +23,7 @@ * Elasticsearch API name sql.clear_cursor * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClearCursor extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php b/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php new file mode 100644 index 000000000..bb672cfe0 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Sql/DeleteAsync.php @@ -0,0 +1,51 @@ +id ?? null; + + if (isset($id)) { + return "/_sql/async/delete/$id"; + } + throw new RuntimeException('Missing parameter for the endpoint sql.delete_async'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'DELETE'; + } +} diff --git a/src/Elasticsearch/Endpoints/Sql/GetAsync.php b/src/Elasticsearch/Endpoints/Sql/GetAsync.php new file mode 100644 index 000000000..dfbed9150 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Sql/GetAsync.php @@ -0,0 +1,56 @@ +id ?? null; + + if (isset($id)) { + return "/_sql/async/$id"; + } + throw new RuntimeException('Missing parameter for the endpoint sql.get_async'); + } + + public function getParamWhitelist(): array + { + return [ + 'delimiter', + 'format', + 'keep_alive', + 'wait_for_completion_timeout' + ]; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php b/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php new file mode 100644 index 000000000..a0c466989 --- /dev/null +++ b/src/Elasticsearch/Endpoints/Sql/GetAsyncStatus.php @@ -0,0 +1,51 @@ +id ?? null; + + if (isset($id)) { + return "/_sql/async/status/$id"; + } + throw new RuntimeException('Missing parameter for the endpoint sql.get_async_status'); + } + + public function getParamWhitelist(): array + { + return []; + } + + public function getMethod(): string + { + return 'GET'; + } +} diff --git a/src/Elasticsearch/Endpoints/Sql/Query.php b/src/Elasticsearch/Endpoints/Sql/Query.php index a99fcc87b..ac8205b69 100644 --- a/src/Elasticsearch/Endpoints/Sql/Query.php +++ b/src/Elasticsearch/Endpoints/Sql/Query.php @@ -23,7 +23,7 @@ * Elasticsearch API name sql.query * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Query extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Sql/Translate.php b/src/Elasticsearch/Endpoints/Sql/Translate.php index e221e74a6..ddf71b5c2 100644 --- a/src/Elasticsearch/Endpoints/Sql/Translate.php +++ b/src/Elasticsearch/Endpoints/Sql/Translate.php @@ -23,7 +23,7 @@ * Elasticsearch API name sql.translate * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Translate extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Ssl/Certificates.php b/src/Elasticsearch/Endpoints/Ssl/Certificates.php index 75afd8128..ad91139ae 100644 --- a/src/Elasticsearch/Endpoints/Ssl/Certificates.php +++ b/src/Elasticsearch/Endpoints/Ssl/Certificates.php @@ -23,7 +23,7 @@ * Elasticsearch API name ssl.certificates * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Certificates extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Tasks/Cancel.php b/src/Elasticsearch/Endpoints/Tasks/Cancel.php index 7ad9ba29d..7455379e5 100644 --- a/src/Elasticsearch/Endpoints/Tasks/Cancel.php +++ b/src/Elasticsearch/Endpoints/Tasks/Cancel.php @@ -23,7 +23,7 @@ * Elasticsearch API name tasks.cancel * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Cancel extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Tasks/Get.php b/src/Elasticsearch/Endpoints/Tasks/Get.php index b9f457f6e..0f627a005 100644 --- a/src/Elasticsearch/Endpoints/Tasks/Get.php +++ b/src/Elasticsearch/Endpoints/Tasks/Get.php @@ -24,7 +24,7 @@ * Elasticsearch API name tasks.get * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class Get extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Tasks/ListTasks.php b/src/Elasticsearch/Endpoints/Tasks/ListTasks.php index 735ebc6be..82a3d660d 100644 --- a/src/Elasticsearch/Endpoints/Tasks/ListTasks.php +++ b/src/Elasticsearch/Endpoints/Tasks/ListTasks.php @@ -23,7 +23,7 @@ * Elasticsearch API name tasks.list * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ListTasks extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/TermVectors.php b/src/Elasticsearch/Endpoints/TermVectors.php index 03c094497..7175432d1 100644 --- a/src/Elasticsearch/Endpoints/TermVectors.php +++ b/src/Elasticsearch/Endpoints/TermVectors.php @@ -24,7 +24,7 @@ * Elasticsearch API name termvectors * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class TermVectors extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/TermsEnum.php b/src/Elasticsearch/Endpoints/TermsEnum.php new file mode 100644 index 000000000..cb28f5864 --- /dev/null +++ b/src/Elasticsearch/Endpoints/TermsEnum.php @@ -0,0 +1,63 @@ +index ?? null; + + if (isset($index)) { + return "/$index/_terms_enum"; + } + throw new RuntimeException('Missing parameter for the endpoint terms_enum'); + } + + public function getParamWhitelist(): array + { + return [ + + ]; + } + + public function getMethod(): string + { + return isset($this->body) ? 'POST' : 'GET'; + } + + public function setBody($body): TermsEnum + { + if (isset($body) !== true) { + return $this; + } + $this->body = $body; + + return $this; + } +} diff --git a/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php b/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php index ccaa35783..e635be4e7 100644 --- a/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php +++ b/src/Elasticsearch/Endpoints/TextStructure/FindStructure.php @@ -26,7 +26,7 @@ * Elasticsearch API name text_structure.find_structure * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FindStructure extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php b/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php index e8fd98f7f..507aab270 100644 --- a/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/DeleteTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.delete_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DeleteTransform extends AbstractEndpoint { @@ -43,7 +43,8 @@ public function getURI(): string public function getParamWhitelist(): array { return [ - 'force' + 'force', + 'timeout' ]; } diff --git a/src/Elasticsearch/Endpoints/Transform/GetTransform.php b/src/Elasticsearch/Endpoints/Transform/GetTransform.php index 295536abf..415165a98 100644 --- a/src/Elasticsearch/Endpoints/Transform/GetTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/GetTransform.php @@ -23,7 +23,7 @@ * Elasticsearch API name transform.get_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php b/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php index e4dbf0e30..2730a19b1 100644 --- a/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php +++ b/src/Elasticsearch/Endpoints/Transform/GetTransformStats.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.get_transform_stats * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GetTransformStats extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php b/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php index 43665c6e6..829532dc5 100644 --- a/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/PreviewTransform.php @@ -23,25 +23,32 @@ * Elasticsearch API name transform.preview_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PreviewTransform extends AbstractEndpoint { + protected $transform_id; public function getURI(): string { + $transform_id = $this->transform_id ?? null; + if (isset($transform_id)) { + return "/_transform/$transform_id/_preview"; + } return "/_transform/_preview"; } public function getParamWhitelist(): array { - return []; + return [ + 'timeout' + ]; } public function getMethod(): string { - return 'POST'; + return isset($this->body) ? 'POST' : 'GET'; } public function setBody($body): PreviewTransform @@ -53,4 +60,14 @@ public function setBody($body): PreviewTransform return $this; } + + public function setTransformId($transform_id): PreviewTransform + { + if (isset($transform_id) !== true) { + return $this; + } + $this->transform_id = $transform_id; + + return $this; + } } diff --git a/src/Elasticsearch/Endpoints/Transform/PutTransform.php b/src/Elasticsearch/Endpoints/Transform/PutTransform.php index d91d47636..772803f1f 100644 --- a/src/Elasticsearch/Endpoints/Transform/PutTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/PutTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.put_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class PutTransform extends AbstractEndpoint { @@ -43,7 +43,8 @@ public function getURI(): string public function getParamWhitelist(): array { return [ - 'defer_validation' + 'defer_validation', + 'timeout' ]; } diff --git a/src/Elasticsearch/Endpoints/Transform/StartTransform.php b/src/Elasticsearch/Endpoints/Transform/StartTransform.php index 6d4e4abf3..54bc87a78 100644 --- a/src/Elasticsearch/Endpoints/Transform/StartTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/StartTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.start_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StartTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Transform/StopTransform.php b/src/Elasticsearch/Endpoints/Transform/StopTransform.php index 9b1271491..2a379ad15 100644 --- a/src/Elasticsearch/Endpoints/Transform/StopTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/StopTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.stop_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class StopTransform extends AbstractEndpoint { diff --git a/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php b/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php index b77b7da20..d65b0fd58 100644 --- a/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php +++ b/src/Elasticsearch/Endpoints/Transform/UpdateTransform.php @@ -24,7 +24,7 @@ * Elasticsearch API name transform.update_transform * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class UpdateTransform extends AbstractEndpoint { @@ -43,7 +43,8 @@ public function getURI(): string public function getParamWhitelist(): array { return [ - 'defer_validation' + 'defer_validation', + 'timeout' ]; } diff --git a/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php b/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php new file mode 100644 index 000000000..92f534bad --- /dev/null +++ b/src/Elasticsearch/Endpoints/Transform/UpgradeTransforms.php @@ -0,0 +1,49 @@ +count = 0; if (isset($current_page['hits']) && isset($current_page['hits']['total'])) { - $this->count = $current_page['hits']['total']; + $this->count = $current_page['hits']['total']['value'] ?? $current_page['hits']['total']; } $this->readPageData(); diff --git a/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php b/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php index d8fe694f1..ccb442c26 100644 --- a/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php +++ b/src/Elasticsearch/Helper/Iterators/SearchResponseIterator.php @@ -100,12 +100,14 @@ private function clearScroll(): void { if (!empty($this->scroll_id)) { $this->client->clearScroll( - array( - 'scroll_id' => $this->scroll_id, - 'client' => array( + [ + 'body' => [ + 'scroll_id' => $this->scroll_id + ], + 'client' => [ 'ignore' => 404 - ) - ) + ] + ] ); $this->scroll_id = null; } @@ -135,8 +137,10 @@ public function next(): void { $this->current_scrolled_response = $this->client->scroll( [ - 'scroll_id' => $this->scroll_id, - 'scroll' => $this->scroll_ttl + 'body' => [ + 'scroll_id' => $this->scroll_id, + 'scroll' => $this->scroll_ttl + ] ] ); $this->scroll_id = $this->current_scrolled_response['_scroll_id']; diff --git a/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php b/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php index 91a48d301..7dd0f6806 100644 --- a/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php +++ b/src/Elasticsearch/Namespaces/AsyncSearchNamespace.php @@ -22,12 +22,14 @@ * Class AsyncSearchNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class AsyncSearchNamespace extends AbstractNamespace { /** + * Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + * * $params['id'] = (string) The async search ID * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the results of a previously submitted async search request given its ID. + * * $params['id'] = (string) The async search ID * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response * $params['keep_alive'] = (time) Specify the time interval in which the results (partial or final) for this search will be available @@ -67,6 +71,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the status of a previously submitted async search request given its ID. + * * $params['id'] = (string) The async search ID * * @param array $params Associative array of parameters @@ -85,6 +91,8 @@ public function status(array $params = []) return $this->performRequest($endpoint); } /** + * Executes a search request asynchronously. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response (Default = 1s) * $params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false) diff --git a/src/Elasticsearch/Namespaces/AutoscalingNamespace.php b/src/Elasticsearch/Namespaces/AutoscalingNamespace.php index a2b9daeff..fe3e8acc5 100644 --- a/src/Elasticsearch/Namespaces/AutoscalingNamespace.php +++ b/src/Elasticsearch/Namespaces/AutoscalingNamespace.php @@ -22,12 +22,14 @@ * Class AutoscalingNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class AutoscalingNamespace extends AbstractNamespace { /** + * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['name'] = (string) the name of the autoscaling policy * * @param array $params Associative array of parameters @@ -45,6 +47,14 @@ public function deleteAutoscalingPolicy(array $params = []) return $this->performRequest($endpoint); } + /** + * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html + */ public function getAutoscalingCapacity(array $params = []) { @@ -55,6 +65,8 @@ public function getAutoscalingCapacity(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['name'] = (string) the name of the autoscaling policy * * @param array $params Associative array of parameters @@ -73,6 +85,8 @@ public function getAutoscalingPolicy(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['name'] = (string) the name of the autoscaling policy * $params['body'] = (array) the specification of the autoscaling policy (Required) * diff --git a/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php b/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php index 856dcf2a2..8f9e6ebc3 100644 --- a/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php +++ b/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php @@ -24,7 +24,7 @@ use Elasticsearch\Transport; use GuzzleHttp\Ring\Future\FutureArrayInterface; -trait BooleanRequestWrapper +abstract class BooleanRequestWrapper { /** * Perform Request diff --git a/src/Elasticsearch/Namespaces/CatNamespace.php b/src/Elasticsearch/Namespaces/CatNamespace.php index acf2a35f2..85d59df14 100644 --- a/src/Elasticsearch/Namespaces/CatNamespace.php +++ b/src/Elasticsearch/Namespaces/CatNamespace.php @@ -22,12 +22,14 @@ * Class CatNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CatNamespace extends AbstractNamespace { /** + * Shows information about currently configured aliases to indices including filter and routing infos. + * * $params['name'] = (list) A comma-separated list of alias names to return * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -53,6 +55,8 @@ public function aliases(array $params = []) return $this->performRequest($endpoint); } /** + * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -79,6 +83,8 @@ public function allocation(array $params = []) return $this->performRequest($endpoint); } /** + * Provides quick access to the document count of the entire cluster, or individual indices. + * * $params['index'] = (list) A comma-separated list of index names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['h'] = (list) Comma-separated list of column names to display @@ -102,6 +108,8 @@ public function count(array $params = []) return $this->performRequest($endpoint); } /** + * Shows how much heap memory is currently being used by fielddata on every data node in the cluster. + * * $params['fields'] = (list) A comma-separated list of fields to return the fielddata size * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -126,6 +134,8 @@ public function fielddata(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a concise representation of the cluster health. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['h'] = (list) Comma-separated list of column names to display * $params['help'] = (boolean) Return help information (Default = false) @@ -148,6 +158,8 @@ public function health(array $params = []) return $this->performRequest($endpoint); } /** + * Returns help for the Cat APIs. + * * $params['help'] = (boolean) Return help information (Default = false) * $params['s'] = (list) Comma-separated list of column names or column aliases to sort by * @@ -165,6 +177,8 @@ public function help(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about indices: number of primaries and replicas, document counts, disk size, ... + * * $params['index'] = (list) A comma-separated list of index names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -196,6 +210,8 @@ public function indices(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about the master node. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -218,6 +234,8 @@ public function master(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configuration and usage information about data frame analytics jobs. + * * $params['id'] = (string) The ID of the data frame analytics to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -244,6 +262,8 @@ public function mlDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configuration and usage information about datafeeds. + * * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @@ -270,6 +290,8 @@ public function mlDatafeeds(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configuration and usage information about anomaly detection jobs. + * * $params['job_id'] = (string) The ID of the jobs stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @@ -297,6 +319,8 @@ public function mlJobs(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configuration and usage information about inference trained models. + * * $params['model_id'] = (string) The ID of the trained models stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) * $params['from'] = (int) skips a number of trained models (Default = 0) @@ -325,6 +349,8 @@ public function mlTrainedModels(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about custom node attributes. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -347,6 +373,8 @@ public function nodeattrs(array $params = []) return $this->performRequest($endpoint); } /** + * Returns basic statistics about performance of cluster nodes. + * * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['full_id'] = (boolean) Return the full node ID instead of the shortened version (default: false) @@ -373,6 +401,8 @@ public function nodes(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a concise representation of the cluster pending tasks. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -396,6 +426,8 @@ public function pendingTasks(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about installed plugins across nodes node. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -419,6 +451,8 @@ public function plugins(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about index shard recoveries, both on-going completed. + * * $params['index'] = (list) Comma-separated list or wildcard expression of index names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['active_only'] = (boolean) If `true`, the response only includes ongoing shard recoveries (Default = false) @@ -446,6 +480,8 @@ public function recovery(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about snapshot repositories registered in the cluster. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (Default = false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -468,6 +504,8 @@ public function repositories(array $params = []) return $this->performRequest($endpoint); } /** + * Provides low-level information about the segments in the shards of an index. + * * $params['index'] = (list) A comma-separated list of index names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -492,6 +530,8 @@ public function segments(array $params = []) return $this->performRequest($endpoint); } /** + * Provides a detailed view of shard allocation on nodes. + * * $params['index'] = (list) A comma-separated list of index names to limit the returned information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['bytes'] = (enum) The unit in which to display byte values (Options = b,k,kb,m,mb,g,gb,t,tb,p,pb) @@ -519,6 +559,8 @@ public function shards(array $params = []) return $this->performRequest($endpoint); } /** + * Returns all snapshots in a specific repository. + * * $params['repository'] = (list) Name of repository from which to fetch the snapshot information * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['ignore_unavailable'] = (boolean) Set to true to ignore unavailable snapshots (Default = false) @@ -545,6 +587,8 @@ public function snapshots(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about the tasks currently executing on one or more nodes in the cluster. + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. @@ -570,6 +614,8 @@ public function tasks(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about existing templates. + * * $params['name'] = (string) A pattern that returned template names must match * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -595,6 +641,8 @@ public function templates(array $params = []) return $this->performRequest($endpoint); } /** + * Returns cluster-wide thread pool statistics per node.By default the active, queue and rejected statistics are returned for all thread pools. + * * $params['thread_pool_patterns'] = (list) A comma-separated list of regular-expressions to filter the thread pools in the output * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['size'] = (enum) The multiplier in which to display values (Options = ,k,m,g,t,p) @@ -621,6 +669,8 @@ public function threadPool(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configuration and usage information about transforms. + * * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms * $params['from'] = (int) skips a number of transform configs, defaults to 0 * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100 diff --git a/src/Elasticsearch/Namespaces/CcrNamespace.php b/src/Elasticsearch/Namespaces/CcrNamespace.php index 6e1c3e851..efd762491 100644 --- a/src/Elasticsearch/Namespaces/CcrNamespace.php +++ b/src/Elasticsearch/Namespaces/CcrNamespace.php @@ -22,12 +22,14 @@ * Class CcrNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class CcrNamespace extends AbstractNamespace { /** + * Deletes auto-follow patterns. + * * $params['name'] = (string) The name of the auto follow pattern. * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function deleteAutoFollowPattern(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new follower index configured to follow the referenced leader index. + * * $params['index'] = (string) The name of the follower index * $params['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) (Default = 0) * $params['body'] = (array) The name of the leader index and other optional ccr related parameters (Required) @@ -68,6 +72,8 @@ public function follow(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about all follower indices, including parameters and status for each follower index + * * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices * * @param array $params Associative array of parameters @@ -86,6 +92,8 @@ public function followInfo(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. + * * $params['index'] = (list) A comma-separated list of index patterns; use `_all` to perform the operation on all indices * * @param array $params Associative array of parameters @@ -104,6 +112,8 @@ public function followStats(array $params = []) return $this->performRequest($endpoint); } /** + * Removes the follower retention leases from the leader. + * * $params['index'] = (string) the name of the leader index for which specified follower retention leases should be removed * $params['body'] = (array) the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required) * @@ -125,6 +135,8 @@ public function forgetFollower(array $params = []) return $this->performRequest($endpoint); } /** + * Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. + * * $params['name'] = (string) The name of the auto follow pattern. * * @param array $params Associative array of parameters @@ -143,6 +155,8 @@ public function getAutoFollowPattern(array $params = []) return $this->performRequest($endpoint); } /** + * Pauses an auto-follow pattern + * * $params['name'] = (string) The name of the auto follow pattern that should pause discovering new indices to follow. * * @param array $params Associative array of parameters @@ -161,6 +175,8 @@ public function pauseAutoFollowPattern(array $params = []) return $this->performRequest($endpoint); } /** + * Pauses a follower index. The follower index will not fetch any additional operations from the leader index. + * * $params['index'] = (string) The name of the follower index that should pause following its leader index. * * @param array $params Associative array of parameters @@ -179,6 +195,8 @@ public function pauseFollow(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. + * * $params['name'] = (string) The name of the auto follow pattern. * $params['body'] = (array) The specification of the auto follow pattern (Required) * @@ -200,6 +218,8 @@ public function putAutoFollowPattern(array $params = []) return $this->performRequest($endpoint); } /** + * Resumes an auto-follow pattern that has been paused + * * $params['name'] = (string) The name of the auto follow pattern to resume discovering new indices to follow. * * @param array $params Associative array of parameters @@ -218,6 +238,8 @@ public function resumeAutoFollowPattern(array $params = []) return $this->performRequest($endpoint); } /** + * Resumes a follower index that has been paused + * * $params['index'] = (string) The name of the follow index to resume following. * $params['body'] = (array) The name of the leader index and other optional ccr related parameters * @@ -238,6 +260,14 @@ public function resumeFollow(array $params = []) return $this->performRequest($endpoint); } + /** + * Gets all stats related to cross-cluster replication. + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html + */ public function stats(array $params = []) { @@ -248,6 +278,8 @@ public function stats(array $params = []) return $this->performRequest($endpoint); } /** + * Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. + * * $params['index'] = (string) The name of the follower index that should be turned into a regular index. * * @param array $params Associative array of parameters diff --git a/src/Elasticsearch/Namespaces/ClusterNamespace.php b/src/Elasticsearch/Namespaces/ClusterNamespace.php index 724bc5a2f..42c282e8b 100644 --- a/src/Elasticsearch/Namespaces/ClusterNamespace.php +++ b/src/Elasticsearch/Namespaces/ClusterNamespace.php @@ -22,15 +22,17 @@ * Class ClusterNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ClusterNamespace extends AbstractNamespace { /** + * Provides explanations for shard allocations in the cluster. + * * $params['include_yes_decisions'] = (boolean) Return 'YES' decisions in explanation (default: false) * $params['include_disk_info'] = (boolean) Return information about disk usage and shard sizes (default: false) - * $params['body'] = (array) The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' + * $params['body'] = (array) The index, shard, and primary flag to explain. Empty means 'explain a randomly-chosen unassigned shard' * * @param array $params Associative array of parameters * @return array @@ -48,6 +50,8 @@ public function allocationExplain(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a component template + * * $params['name'] = (string) The name of the template * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -68,6 +72,8 @@ public function deleteComponentTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Clears cluster voting config exclusions. + * * $params['wait_for_removal'] = (boolean) Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. (Default = true) * * @param array $params Associative array of parameters @@ -84,6 +90,8 @@ public function deleteVotingConfigExclusions(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about whether a particular component template exist + * * $params['name'] = (string) The name of the template * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -107,6 +115,8 @@ public function existsComponentTemplate(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns one or more component templates + * * $params['name'] = (list) The comma separated names of the component templates * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -127,6 +137,8 @@ public function getComponentTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Returns cluster settings. + * * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -134,7 +146,7 @@ public function getComponentTemplate(array $params = []) * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-get-settings.html */ public function getSettings(array $params = []) { @@ -146,6 +158,8 @@ public function getSettings(array $params = []) return $this->performRequest($endpoint); } /** + * Returns basic information about the health of the cluster. + * * $params['index'] = (list) Limit the information returned to a specific index * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = all) * $params['level'] = (enum) Specify the level of detail for returned information (Options = cluster,indices,shards) (Default = cluster) @@ -175,6 +189,8 @@ public function health(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a list of any cluster-level changes (e.g. create index, update mapping,allocate or fail shard) which have not yet been executed. + * * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['master_timeout'] = (time) Specify timeout for connection to master * @@ -192,6 +208,8 @@ public function pendingTasks(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the cluster voting config exclusions by node ids or node names. + * * $params['node_ids'] = (string) A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_names. * $params['node_names'] = (string) A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify ?node_ids. * $params['timeout'] = (time) Explicit operation timeout (Default = 30s) @@ -210,6 +228,8 @@ public function postVotingConfigExclusions(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates a component template + * * $params['name'] = (string) The name of the template * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false) * $params['timeout'] = (time) Explicit operation timeout @@ -234,6 +254,8 @@ public function putComponentTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the cluster settings. + * * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -255,6 +277,8 @@ public function putSettings(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the information about configured remote clusters. + * * * @param array $params Associative array of parameters * @return array @@ -270,6 +294,8 @@ public function remoteInfo(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to manually change the allocation of individual shards in the cluster. + * * $params['dry_run'] = (boolean) Simulate the operation only and return the resulting state * $params['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed * $params['retry_failed'] = (boolean) Retries allocation of shards that are blocked due to too many subsequent allocation failures @@ -294,6 +320,8 @@ public function reroute(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a comprehensive information about the state of the cluster. + * * $params['metric'] = (list) Limit the information returned to the specified metrics * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -323,6 +351,8 @@ public function state(array $params = []) return $this->performRequest($endpoint); } /** + * Returns high-level overview of cluster statistics. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['timeout'] = (time) Explicit operation timeout diff --git a/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php b/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php index caeeecd75..c3bebeee5 100644 --- a/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php +++ b/src/Elasticsearch/Namespaces/DanglingIndicesNamespace.php @@ -22,12 +22,14 @@ * Class DanglingIndicesNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DanglingIndicesNamespace extends AbstractNamespace { /** + * Deletes the specified dangling index + * * $params['index_uuid'] = (string) The UUID of the dangling index * $params['accept_data_loss'] = (boolean) Must be set to true in order to delete the dangling index * $params['timeout'] = (time) Explicit operation timeout @@ -49,6 +51,8 @@ public function deleteDanglingIndex(array $params = []) return $this->performRequest($endpoint); } /** + * Imports the specified dangling index + * * $params['index_uuid'] = (string) The UUID of the dangling index * $params['accept_data_loss'] = (boolean) Must be set to true in order to import the dangling index * $params['timeout'] = (time) Explicit operation timeout @@ -70,6 +74,8 @@ public function importDanglingIndex(array $params = []) return $this->performRequest($endpoint); } /** + * Returns all dangling indices. + * * * @param array $params Associative array of parameters * @return array diff --git a/src/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.php b/src/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.php index ecc2bcc38..78d941b8d 100644 --- a/src/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.php +++ b/src/Elasticsearch/Namespaces/DataFrameTransformDeprecatedNamespace.php @@ -22,12 +22,14 @@ * Class DataFrameTransformDeprecatedNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class DataFrameTransformDeprecatedNamespace extends AbstractNamespace { /** + * Deletes an existing transform. + * * $params['transform_id'] = (string) The id of the transform to delete * $params['force'] = (boolean) When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. * @@ -50,6 +52,8 @@ public function deleteTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for transforms. + * * $params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms * $params['from'] = (int) skips a number of transform configs, defaults to 0 * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100 @@ -75,6 +79,8 @@ public function getTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for transforms. + * * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms * $params['from'] = (number) skips a number of transform stats, defaults to 0 * $params['size'] = (number) specifies a max number of transform stats to get, defaults to 100 @@ -98,6 +104,18 @@ public function getTransformStats(array $params = []) return $this->performRequest($endpoint); } + /** + * Previews a transform. + * + * $params['body'] = (array) The definition for the transform to preview (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + * + * @note This API is BETA and may change in ways that are not backwards compatible + * + */ public function previewTransform(array $params = []) { $body = $this->extractArgument($params, 'body'); @@ -110,6 +128,8 @@ public function previewTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Instantiates a transform. + * * $params['transform_id'] = (string) The id of the new transform. * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false. * $params['body'] = (array) The transform definition (Required) @@ -135,6 +155,8 @@ public function putTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Starts one or more transforms. + * * $params['transform_id'] = (string) The id of the transform to start * $params['timeout'] = (time) Controls the time to wait for the transform to start * @@ -157,6 +179,8 @@ public function startTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Stops one or more transforms. + * * $params['transform_id'] = (string) The id of the transform to stop * $params['wait_for_completion'] = (boolean) Whether to wait for the transform to fully stop before returning or not. Default to false * $params['timeout'] = (time) Controls the time to wait until the transform has stopped. Default to 30 seconds @@ -181,6 +205,8 @@ public function stopTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of a transform. + * * $params['transform_id'] = (string) The id of the transform. * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false. * $params['body'] = (array) The update transform definition (Required) diff --git a/src/Elasticsearch/Namespaces/EnrichNamespace.php b/src/Elasticsearch/Namespaces/EnrichNamespace.php index 24c555b92..4ae146dd1 100644 --- a/src/Elasticsearch/Namespaces/EnrichNamespace.php +++ b/src/Elasticsearch/Namespaces/EnrichNamespace.php @@ -22,12 +22,14 @@ * Class EnrichNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class EnrichNamespace extends AbstractNamespace { /** + * Deletes an existing enrich policy and its enrich index. + * * $params['name'] = (string) The name of the enrich policy * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function deletePolicy(array $params = []) return $this->performRequest($endpoint); } /** + * Creates the enrich index for an existing enrich policy. + * * $params['name'] = (string) The name of the enrich policy * $params['wait_for_completion'] = (boolean) Should the request should block until the execution is complete. (Default = true) * @@ -65,6 +69,8 @@ public function executePolicy(array $params = []) return $this->performRequest($endpoint); } /** + * Gets information about an enrich policy. + * * $params['name'] = (list) A comma-separated list of enrich policy names * * @param array $params Associative array of parameters @@ -83,6 +89,8 @@ public function getPolicy(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new enrich policy. + * * $params['name'] = (string) The name of the enrich policy * $params['body'] = (array) The enrich policy to register (Required) * @@ -103,6 +111,14 @@ public function putPolicy(array $params = []) return $this->performRequest($endpoint); } + /** + * Gets enrich coordinator statistics and information about enrich policies that are currently executing. + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-stats-api.html + */ public function stats(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/EqlNamespace.php b/src/Elasticsearch/Namespaces/EqlNamespace.php index 5e03b23a9..c6012e4ea 100644 --- a/src/Elasticsearch/Namespaces/EqlNamespace.php +++ b/src/Elasticsearch/Namespaces/EqlNamespace.php @@ -22,12 +22,14 @@ * Class EqlNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class EqlNamespace extends AbstractNamespace { /** + * Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + * * $params['id'] = (string) The async search ID * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Returns async results from previously executed Event Query Language (EQL) search + * * $params['id'] = (string) The async search ID * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response * $params['keep_alive'] = (time) Update the time interval in which the results (partial or final) for this search will be available (Default = 5d) @@ -66,6 +70,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the status of a previously submitted async or stored Event Query Language (EQL) search + * * $params['id'] = (string) The async search ID * * @param array $params Associative array of parameters @@ -84,6 +90,8 @@ public function getStatus(array $params = []) return $this->performRequest($endpoint); } /** + * Returns results matching a query expressed in Event Query Language (EQL) + * * $params['index'] = (string) The name of the index to scope the operation * $params['wait_for_completion_timeout'] = (time) Specify the time that the request should block waiting for the final response * $params['keep_on_completion'] = (boolean) Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false) (Default = false) diff --git a/src/Elasticsearch/Namespaces/FeaturesNamespace.php b/src/Elasticsearch/Namespaces/FeaturesNamespace.php index edb26a98e..d667d354b 100644 --- a/src/Elasticsearch/Namespaces/FeaturesNamespace.php +++ b/src/Elasticsearch/Namespaces/FeaturesNamespace.php @@ -22,12 +22,14 @@ * Class FeaturesNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class FeaturesNamespace extends AbstractNamespace { /** + * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot + * * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * * @param array $params Associative array of parameters @@ -43,6 +45,17 @@ public function getFeatures(array $params = []) return $this->performRequest($endpoint); } + /** + * Resets the internal state of features, usually by deleting system indices + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ public function resetFeatures(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/FleetNamespace.php b/src/Elasticsearch/Namespaces/FleetNamespace.php new file mode 100644 index 000000000..373b818ce --- /dev/null +++ b/src/Elasticsearch/Namespaces/FleetNamespace.php @@ -0,0 +1,107 @@ +extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Fleet\GlobalCheckpoints'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + * + * $params['index'] = (string) The index name to use as the default + * $params['body'] = (array) The request definitions (metadata-fleet search request definition pairs), separated by newlines (Required) + * + * @param array $params Associative array of parameters + * @return array + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function msearch(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Fleet\Msearch'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + * + * $params['index'] = (string) The index name to search. + * $params['wait_for_checkpoints'] = (list) Comma separated list of checkpoints, one per shard (Default = ) + * $params['wait_for_checkpoints_timeout'] = (time) Explicit wait_for_checkpoints timeout + * $params['allow_partial_search_results'] = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true) + * $params['body'] = (array) The search definition using the Query DSL + * + * @param array $params Associative array of parameters + * @return array + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function search(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Fleet\Search'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } +} diff --git a/src/Elasticsearch/Namespaces/GraphNamespace.php b/src/Elasticsearch/Namespaces/GraphNamespace.php index bd25661b2..0fdeb6bd1 100644 --- a/src/Elasticsearch/Namespaces/GraphNamespace.php +++ b/src/Elasticsearch/Namespaces/GraphNamespace.php @@ -22,12 +22,14 @@ * Class GraphNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class GraphNamespace extends AbstractNamespace { /** + * Explore extracted and summarized information about the documents and terms in an index. + * * $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (Required) * $params['type'] = DEPRECATED (list) A comma-separated list of document types to search; leave empty to perform the operation on all types * $params['routing'] = (string) Specific routing value diff --git a/src/Elasticsearch/Namespaces/IlmNamespace.php b/src/Elasticsearch/Namespaces/IlmNamespace.php index 264b76e69..c8303f21f 100644 --- a/src/Elasticsearch/Namespaces/IlmNamespace.php +++ b/src/Elasticsearch/Namespaces/IlmNamespace.php @@ -22,12 +22,14 @@ * Class IlmNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class IlmNamespace extends AbstractNamespace { /** + * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. + * * $params['policy'] = (string) The name of the index lifecycle policy * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function deleteLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. + * * $params['index'] = (string) The name of the index to explain * $params['only_managed'] = (boolean) filters the indices included in the response to ones managed by ILM * $params['only_errors'] = (boolean) filters the indices included in the response to ones in an ILM error state, implies only_managed @@ -66,6 +70,8 @@ public function explainLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the specified policy definition. Includes the policy version and last modified date. + * * $params['policy'] = (string) The name of the index lifecycle policy * * @param array $params Associative array of parameters @@ -84,6 +90,8 @@ public function getLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the current index lifecycle management (ILM) status. + * * * @param array $params Associative array of parameters * @return array @@ -99,6 +107,29 @@ public function getStatus(array $params = []) return $this->performRequest($endpoint); } /** + * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing + * + * $params['dry_run'] = (boolean) If set to true it will simulate the migration, providing a way to retrieve the ILM policies and indices that need to be migrated. The default is false + * $params['body'] = (array) Optionally specify a legacy index template name to delete and optionally specify a node attribute name used for index shard routing (defaults to "data") + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html + */ + public function migrateToDataTiers(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ilm\MigrateToDataTiers'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Manually moves an index into the specified step and executes that step. + * * $params['index'] = (string) The name of the index whose lifecycle step is to change * $params['body'] = (array) The new lifecycle step to move to * @@ -120,6 +151,8 @@ public function moveToStep(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a lifecycle policy + * * $params['policy'] = (string) The name of the index lifecycle policy * $params['body'] = (array) The lifecycle policy definition to register * @@ -141,6 +174,8 @@ public function putLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Removes the assigned lifecycle policy and stops managing the specified index + * * $params['index'] = (string) The name of the index to remove policy on * * @param array $params Associative array of parameters @@ -159,6 +194,8 @@ public function removePolicy(array $params = []) return $this->performRequest($endpoint); } /** + * Retries executing the policy for an index that is in the ERROR step. + * * $params['index'] = (string) The name of the indices (comma-separated) whose failed lifecycle step is to be retry * * @param array $params Associative array of parameters @@ -177,6 +214,8 @@ public function retry(array $params = []) return $this->performRequest($endpoint); } /** + * Start the index lifecycle management (ILM) plugin. + * * * @param array $params Associative array of parameters * @return array @@ -192,6 +231,8 @@ public function start(array $params = []) return $this->performRequest($endpoint); } /** + * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin + * * * @param array $params Associative array of parameters * @return array diff --git a/src/Elasticsearch/Namespaces/IndicesNamespace.php b/src/Elasticsearch/Namespaces/IndicesNamespace.php index 50d60e030..9707d74b0 100644 --- a/src/Elasticsearch/Namespaces/IndicesNamespace.php +++ b/src/Elasticsearch/Namespaces/IndicesNamespace.php @@ -22,12 +22,14 @@ * Class IndicesNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class IndicesNamespace extends AbstractNamespace { /** + * Adds a block to an index. + * * $params['index'] = (list) A comma separated list of indices to add a block to * $params['block'] = (string) The block to add (one of read, write, read_only or metadata) * $params['timeout'] = (time) Explicit operation timeout @@ -54,6 +56,8 @@ public function addBlock(array $params = []) return $this->performRequest($endpoint); } /** + * Performs the analysis process on a text and return the tokens breakdown of the text. + * * $params['index'] = (string) The name of the index to scope the operation * $params['body'] = (array) Define analyzer/tokenizer parameters and the text on which the analysis should be performed * @@ -75,6 +79,8 @@ public function analyze(array $params = []) return $this->performRequest($endpoint); } /** + * Clears all or specific caches for one or more indices. + * * $params['index'] = (list) A comma-separated list of index name to limit the operation * $params['fielddata'] = (boolean) Clear field data * $params['fields'] = (list) A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) @@ -100,6 +106,8 @@ public function clearCache(array $params = []) return $this->performRequest($endpoint); } /** + * Clones an index + * * $params['index'] = (string) The name of the source index to clone * $params['target'] = (string) The name of the target index to clone into * $params['timeout'] = (time) Explicit operation timeout @@ -127,6 +135,8 @@ public function clone(array $params = []) return $this->performRequest($endpoint); } /** + * Closes an index. + * * $params['index'] = (list) A comma separated list of indices to close * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -151,6 +161,8 @@ public function close(array $params = []) return $this->performRequest($endpoint); } /** + * Creates an index with optional settings and mappings. + * * $params['index'] = (string) The name of the index * $params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings. * $params['wait_for_active_shards'] = (string) Set the number of active shards to wait for before the operation returns. @@ -176,6 +188,8 @@ public function create(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a data stream + * * $params['name'] = (string) The name of the data stream * * @param array $params Associative array of parameters @@ -194,6 +208,8 @@ public function createDataStream(array $params = []) return $this->performRequest($endpoint); } /** + * Provides statistics on operations happening in a data stream. + * * $params['name'] = (list) A comma-separated list of data stream names; use `_all` or empty string to perform the operation on all data streams * * @param array $params Associative array of parameters @@ -212,12 +228,14 @@ public function dataStreamsStats(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an index. + * * $params['index'] = (list) A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) * $params['allow_no_indices'] = (boolean) Ignore if a wildcard expression resolves to no concrete indices (default: false) - * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) + * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open, closed, or hidden indices (Options = open,closed,hidden,none,all) (Default = open,closed) * * @param array $params Associative array of parameters * @return array @@ -235,6 +253,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an alias. + * * $params['index'] = (list) A comma-separated list of index names (supports wildcards); use `_all` for all indices (Required) * $params['name'] = (list) A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. (Required) * $params['timeout'] = (time) Explicit timestamp for the document @@ -258,6 +278,8 @@ public function deleteAlias(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a data stream. + * * $params['name'] = (list) A comma-separated list of data streams to delete; use `*` to delete all data streams * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) * @@ -277,6 +299,8 @@ public function deleteDataStream(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an index template. + * * $params['name'] = (string) The name of the template * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -297,6 +321,8 @@ public function deleteIndexTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an index template. + * * $params['name'] = (string) The name of the template * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -317,6 +343,36 @@ public function deleteTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Analyzes the disk usage of each field of an index or data stream + * + * $params['index'] = (string) Comma-separated list of indices or data streams to analyze the disk usage + * $params['run_expensive_tasks'] = (boolean) Must be set to [true] in order for the task to be performed. Defaults to false. + * $params['flush'] = (boolean) Whether flush or not before analyzing the index disk usage. Defaults to true + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['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) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-disk-usage.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function diskUsage(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Indices\DiskUsage'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * Returns information about whether a particular index exists. + * * $params['index'] = (list) A comma-separated list of index names * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) @@ -344,6 +400,8 @@ public function exists(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about whether a particular alias exists. + * * $params['name'] = (list) A comma-separated list of alias names to return (Required) * $params['index'] = (list) A comma-separated list of index names to filter aliases * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -372,6 +430,8 @@ public function existsAlias(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about whether a particular index template exists. + * * $params['name'] = (string) The name of the template * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -396,6 +456,8 @@ public function existsIndexTemplate(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about whether a particular index template exists. + * * $params['name'] = (list) The comma separated names of the index templates * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -420,6 +482,8 @@ public function existsTemplate(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns information about whether a particular document type exists. (DEPRECATED) + * * $params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices * $params['type'] = DEPRECATED (list) A comma-separated list of document types to check * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -448,6 +512,35 @@ public function existsType(array $params = []): bool return BooleanRequestWrapper::performRequest($endpoint, $this->transport); } /** + * Returns the field usage stats for each field of an index + * + * $params['index'] = (string) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * $params['fields'] = (list) A comma-separated list of fields to include in the stats if only a subset of fields should be returned (supports wildcards) + * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) + * $params['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) + * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/field-usage-stats.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function fieldUsageStats(array $params = []) + { + $index = $this->extractArgument($params, 'index'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Indices\FieldUsageStats'); + $endpoint->setParams($params); + $endpoint->setIndex($index); + + return $this->performRequest($endpoint); + } + /** + * Performs the flush operation on one or more indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices * $params['force'] = (boolean) Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) * $params['wait_if_ongoing'] = (boolean) If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. @@ -471,6 +564,8 @@ public function flush(array $params = []) return $this->performRequest($endpoint); } /** + * Performs a synced flush operation on one or more indices. Synced flush is deprecated and will be removed in 8.0. Use flush instead + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -492,6 +587,8 @@ public function flushSynced(array $params = []) return $this->performRequest($endpoint); } /** + * Performs the force merge operation on one or more indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true) * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -516,6 +613,8 @@ public function forcemerge(array $params = []) return $this->performRequest($endpoint); } /** + * Freezes an index. A frozen index has almost no overhead on the cluster (except for maintaining its metadata in memory) and is read-only. + * * $params['index'] = (string) The name of the index to freeze * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -540,6 +639,8 @@ public function freeze(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about one or more indices. + * * $params['index'] = (list) A comma-separated list of index names * $params['include_type_name'] = (boolean) Whether to add the type name to the response (default: false) * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -566,6 +667,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Returns an alias. + * * $params['name'] = (list) A comma-separated list of alias names to return * $params['index'] = (list) A comma-separated list of index names to filter aliases * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -591,6 +694,8 @@ public function getAlias(array $params = []) return $this->performRequest($endpoint); } /** + * Returns data streams. + * * $params['name'] = (list) A comma-separated list of data streams to get; use `*` to get all data streams * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) * @@ -610,6 +715,8 @@ public function getDataStream(array $params = []) return $this->performRequest($endpoint); } /** + * Returns mapping for one or more fields. + * * $params['fields'] = (list) A comma-separated list of fields (Required) * $params['index'] = (list) A comma-separated list of index names * $params['type'] = DEPRECATED (list) A comma-separated list of document types @@ -640,7 +747,9 @@ public function getFieldMapping(array $params = []) return $this->performRequest($endpoint); } /** - * $params['name'] = (list) The comma separated names of the index templates + * Returns an index template. + * + * $params['name'] = (string) A pattern that returned template names must match * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -661,6 +770,8 @@ public function getIndexTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Returns mappings for one or more indices. + * * $params['index'] = (list) A comma-separated list of index names * $params['type'] = DEPRECATED (list) A comma-separated list of document types * $params['include_type_name'] = (boolean) Whether to add the type name to the response (default: false) @@ -688,6 +799,8 @@ public function getMapping(array $params = []) return $this->performRequest($endpoint); } /** + * Returns settings for one or more indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['name'] = (list) The name of the settings that should be included * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -716,6 +829,8 @@ public function getSettings(array $params = []) return $this->performRequest($endpoint); } /** + * Returns an index template. + * * $params['name'] = (list) The comma separated names of the index templates * $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) @@ -738,6 +853,8 @@ public function getTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * DEPRECATED Returns a progress status of current upgrade. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -759,6 +876,8 @@ public function getUpgrade(array $params = []) return $this->performRequest($endpoint); } /** + * Migrates an alias to a data stream + * * $params['name'] = (string) The name of the alias to migrate * * @param array $params Associative array of parameters @@ -777,6 +896,28 @@ public function migrateToDataStream(array $params = []) return $this->performRequest($endpoint); } /** + * Modifies a data stream + * + * $params['body'] = (array) The data stream modifications (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html + */ + public function modifyDataStream(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Indices\ModifyDataStream'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Opens an index. + * * $params['index'] = (list) A comma separated list of indices to open * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -801,6 +942,8 @@ public function open(array $params = []) return $this->performRequest($endpoint); } /** + * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream + * * $params['name'] = (string) The name of the data stream * * @param array $params Associative array of parameters @@ -819,6 +962,8 @@ public function promoteDataStream(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates an alias. + * * $params['index'] = (list) A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. (Required) * $params['name'] = (string) The name of the alias to be created or updated (Required) * $params['timeout'] = (time) Explicit timestamp for the document @@ -845,6 +990,8 @@ public function putAlias(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates an index template. + * * $params['name'] = (string) The name of the template * $params['create'] = (boolean) Whether the index template should only be added if new or can also replace an existing one (Default = false) * $params['cause'] = (string) User defined reason for creating/updating the index template (Default = ) @@ -869,6 +1016,8 @@ public function putIndexTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the index mappings. + * * $params['index'] = (list) A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. * $params['type'] = DEPRECATED (string) The name of the document type * $params['include_type_name'] = (boolean) Whether a type should be expected in the body of the mappings. @@ -900,6 +1049,8 @@ public function putMapping(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the index settings. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['master_timeout'] = (time) Specify timeout for connection to master * $params['timeout'] = (time) Explicit operation timeout @@ -928,6 +1079,8 @@ public function putSettings(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates an index template. + * * $params['name'] = (string) The name of the template * $params['include_type_name'] = (boolean) Whether a type should be returned in the body of the mappings. * $params['order'] = (number) The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) @@ -953,6 +1106,8 @@ public function putTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about ongoing index shard recoveries. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['detailed'] = (boolean) Whether to display detailed information about shard recovery (Default = false) * $params['active_only'] = (boolean) Display only those recoveries that are currently on-going (Default = false) @@ -973,6 +1128,8 @@ public function recovery(array $params = []) return $this->performRequest($endpoint); } /** + * Performs the refresh operation in one or more indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -994,6 +1151,8 @@ public function refresh(array $params = []) return $this->performRequest($endpoint); } /** + * Reloads an index's search analyzers and their resources. + * * $params['index'] = (list) A comma-separated list of index names to reload analyzers for * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -1015,15 +1174,14 @@ public function reloadSearchAnalyzers(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about any matching indices, aliases, and data streams + * * $params['name'] = (list) A comma-separated list of names or wildcard expressions * $params['expand_wildcards'] = (enum) Whether wildcard expressions should get expanded to open or closed indices (default: open) (Options = open,closed,hidden,none,all) (Default = open) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function resolveIndex(array $params = []) { @@ -1037,6 +1195,8 @@ public function resolveIndex(array $params = []) return $this->performRequest($endpoint); } /** + * Updates an alias to point to a new index when the existing indexis considered to be too large or too old. + * * $params['alias'] = (string) The name of the alias to rollover (Required) * $params['new_index'] = (string) The name of the rollover index * $params['include_type_name'] = (boolean) Whether a type should be included in the body of the mappings. @@ -1066,6 +1226,8 @@ public function rollover(array $params = []) return $this->performRequest($endpoint); } /** + * Provides low-level information about segments in a Lucene index. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -1088,6 +1250,8 @@ public function segments(array $params = []) return $this->performRequest($endpoint); } /** + * Provides store information for shard copies of indices. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for (Options = green,yellow,red,all) * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) @@ -1110,6 +1274,8 @@ public function shardStores(array $params = []) return $this->performRequest($endpoint); } /** + * Allow to shrink an existing index into a new index with fewer primary shards. + * * $params['index'] = (string) The name of the source index to shrink * $params['target'] = (string) The name of the target index to shrink into * $params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false) @@ -1138,6 +1304,8 @@ public function shrink(array $params = []) return $this->performRequest($endpoint); } /** + * Simulate matching the given index name against the index templates in the system + * * $params['name'] = (string) The name of the index (it must be a concrete index name) * $params['create'] = (boolean) Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one (Default = false) * $params['cause'] = (string) User defined reason for dry-run creating the new template for simulation purposes (Default = ) @@ -1162,6 +1330,8 @@ public function simulateIndexTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Simulate resolving the given template name or body + * * $params['name'] = (string) The name of the index template * $params['create'] = (boolean) Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one (Default = false) * $params['cause'] = (string) User defined reason for dry-run creating the new template for simulation purposes (Default = ) @@ -1186,6 +1356,8 @@ public function simulateTemplate(array $params = []) return $this->performRequest($endpoint); } /** + * Allows you to split an existing index into a new index with more primary shards. + * * $params['index'] = (string) The name of the source index to split * $params['target'] = (string) The name of the target index to split into * $params['copy_settings'] = (boolean) whether or not to copy settings from the source index (defaults to false) @@ -1214,6 +1386,8 @@ public function split(array $params = []) return $this->performRequest($endpoint); } /** + * Provides statistics on operations happening in an index. + * * $params['metric'] = (list) Limit the information returned the specific metrics. * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['completion_fields'] = (list) A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) @@ -1245,6 +1419,8 @@ public function stats(array $params = []) return $this->performRequest($endpoint); } /** + * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. + * * $params['index'] = (string) The name of the index to unfreeze * $params['timeout'] = (time) Explicit operation timeout * $params['master_timeout'] = (time) Specify timeout for connection to master @@ -1269,6 +1445,8 @@ public function unfreeze(array $params = []) return $this->performRequest($endpoint); } /** + * Updates index aliases. + * * $params['timeout'] = (time) Request timeout * $params['master_timeout'] = (time) Specify timeout for connection to master * $params['body'] = (array) The definition of `actions` to perform (Required) @@ -1289,6 +1467,8 @@ public function updateAliases(array $params = []) return $this->performRequest($endpoint); } /** + * DEPRECATED Upgrades to the current version of Lucene. + * * $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices * $params['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) * $params['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both. (Options = open,closed,hidden,none,all) (Default = open) @@ -1312,6 +1492,8 @@ public function upgrade(array $params = []) return $this->performRequest($endpoint); } /** + * Allows a user to validate a potentially expensive query without executing it. + * * $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices * $params['type'] = DEPRECATED (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types * $params['explain'] = (boolean) Return detailed information about the error diff --git a/src/Elasticsearch/Namespaces/IngestNamespace.php b/src/Elasticsearch/Namespaces/IngestNamespace.php index edf0d29fb..b98927654 100644 --- a/src/Elasticsearch/Namespaces/IngestNamespace.php +++ b/src/Elasticsearch/Namespaces/IngestNamespace.php @@ -22,12 +22,14 @@ * Class IngestNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class IngestNamespace extends AbstractNamespace { /** + * Deletes a pipeline. + * * $params['id'] = (string) Pipeline ID * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -47,6 +49,14 @@ public function deletePipeline(array $params = []) return $this->performRequest($endpoint); } + /** + * Returns statistical information about geoip databases + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/geoip-stats-api.html + */ public function geoIpStats(array $params = []) { @@ -57,6 +67,8 @@ public function geoIpStats(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a pipeline. + * * $params['id'] = (string) Comma separated list of pipeline ids. Wildcards supported * $params['summary'] = (boolean) Return pipelines without their definitions (default: false) * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -77,6 +89,8 @@ public function getPipeline(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a list of the built-in patterns. + * * * @param array $params Associative array of parameters * @return array @@ -92,7 +106,10 @@ public function processorGrok(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates a pipeline. + * * $params['id'] = (string) Pipeline ID + * $params['if_version'] = (int) Required version for optimistic concurrency control for pipeline updates * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout * $params['body'] = (array) The ingest definition (Required) @@ -115,6 +132,8 @@ public function putPipeline(array $params = []) return $this->performRequest($endpoint); } /** + * Allows to simulate a pipeline with example documents. + * * $params['id'] = (string) Pipeline ID * $params['verbose'] = (boolean) Verbose mode. Display data output for each processor in executed pipeline (Default = false) * $params['body'] = (array) The simulate definition (Required) diff --git a/src/Elasticsearch/Namespaces/LicenseNamespace.php b/src/Elasticsearch/Namespaces/LicenseNamespace.php index dc9b06aa9..947365408 100644 --- a/src/Elasticsearch/Namespaces/LicenseNamespace.php +++ b/src/Elasticsearch/Namespaces/LicenseNamespace.php @@ -22,11 +22,19 @@ * Class LicenseNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class LicenseNamespace extends AbstractNamespace { + /** + * Deletes licensing information for the cluster + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-license.html + */ public function delete(array $params = []) { @@ -37,6 +45,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves licensing information for the cluster + * * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) * $params['accept_enterprise'] = (boolean) If the active license is an enterprise license, return type as 'enterprise' (default: false) * @@ -54,6 +64,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about the status of the basic license. + * * * @param array $params Associative array of parameters * @return array @@ -69,6 +81,8 @@ public function getBasicStatus(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about the status of the trial license. + * * * @param array $params Associative array of parameters * @return array @@ -84,6 +98,8 @@ public function getTrialStatus(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the license for the cluster. + * * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) * $params['body'] = (array) licenses to be installed * @@ -103,6 +119,8 @@ public function post(array $params = []) return $this->performRequest($endpoint); } /** + * Starts an indefinite basic license. + * * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) * * @param array $params Associative array of parameters @@ -119,6 +137,8 @@ public function postStartBasic(array $params = []) return $this->performRequest($endpoint); } /** + * starts a limited time trial license. + * * $params['type'] = (string) The type of trial license to generate (default: "trial") * $params['acknowledge'] = (boolean) whether the user has acknowledged acknowledge messages (default: false) * diff --git a/src/Elasticsearch/Namespaces/LogstashNamespace.php b/src/Elasticsearch/Namespaces/LogstashNamespace.php index 951021767..4e8b333a3 100644 --- a/src/Elasticsearch/Namespaces/LogstashNamespace.php +++ b/src/Elasticsearch/Namespaces/LogstashNamespace.php @@ -22,12 +22,14 @@ * Class LogstashNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class LogstashNamespace extends AbstractNamespace { /** + * Deletes Logstash Pipelines used by Central Management + * * $params['id'] = (string) The ID of the Pipeline * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function deletePipeline(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves Logstash Pipelines used by Central Management + * * $params['id'] = (string) A comma-separated list of Pipeline IDs * * @param array $params Associative array of parameters @@ -64,6 +68,8 @@ public function getPipeline(array $params = []) return $this->performRequest($endpoint); } /** + * Adds and updates Logstash Pipelines used for Central Management + * * $params['id'] = (string) The ID of the Pipeline * $params['body'] = (array) The Pipeline to add or update (Required) * diff --git a/src/Elasticsearch/Namespaces/MigrationNamespace.php b/src/Elasticsearch/Namespaces/MigrationNamespace.php index 05d3c852f..024440ec0 100644 --- a/src/Elasticsearch/Namespaces/MigrationNamespace.php +++ b/src/Elasticsearch/Namespaces/MigrationNamespace.php @@ -22,12 +22,14 @@ * Class MigrationNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MigrationNamespace extends AbstractNamespace { /** + * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. + * * $params['index'] = (string) Index pattern * * @param array $params Associative array of parameters @@ -43,6 +45,40 @@ public function deprecations(array $params = []) $endpoint->setParams($params); $endpoint->setIndex($index); + return $this->performRequest($endpoint); + } + /** + * Find out whether system features need to be upgraded or not + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + */ + public function getFeatureUpgradeStatus(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Migration\GetFeatureUpgradeStatus'); + $endpoint->setParams($params); + + return $this->performRequest($endpoint); + } + /** + * Begin upgrades for system features + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-feature-upgrade.html + */ + public function postFeatureUpgrade(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Migration\PostFeatureUpgrade'); + $endpoint->setParams($params); + return $this->performRequest($endpoint); } } diff --git a/src/Elasticsearch/Namespaces/MlNamespace.php b/src/Elasticsearch/Namespaces/MlNamespace.php index b0e2b8e5c..6799daac1 100644 --- a/src/Elasticsearch/Namespaces/MlNamespace.php +++ b/src/Elasticsearch/Namespaces/MlNamespace.php @@ -22,12 +22,14 @@ * Class MlNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MlNamespace extends AbstractNamespace { /** + * Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. + * * $params['job_id'] = (string) The name of the job to close * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @@ -53,6 +55,8 @@ public function closeJob(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to delete * * @param array $params Associative array of parameters @@ -71,6 +75,8 @@ public function deleteCalendar(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes scheduled events from a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to modify * $params['event_id'] = (string) The ID of the event to remove from the calendar * @@ -92,6 +98,8 @@ public function deleteCalendarEvent(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes anomaly detection jobs from a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to modify * $params['job_id'] = (string) The ID of the job to remove from the calendar * @@ -113,6 +121,8 @@ public function deleteCalendarJob(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an existing data frame analytics job. + * * $params['id'] = (string) The ID of the data frame analytics to delete * $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false) * $params['timeout'] = (time) Controls the time to wait until a job is deleted. Defaults to 1 minute @@ -120,9 +130,6 @@ public function deleteCalendarJob(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function deleteDataFrameAnalytics(array $params = []) { @@ -136,6 +143,8 @@ public function deleteDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an existing datafeed. + * * $params['datafeed_id'] = (string) The ID of the datafeed to delete * $params['force'] = (boolean) True if the datafeed should be forcefully deleted * @@ -155,6 +164,8 @@ public function deleteDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes expired and unused machine learning data. + * * $params['job_id'] = (string) The ID of the job(s) to perform expired data hygiene for * $params['requests_per_second'] = (number) The desired requests per second for the deletion processes. * $params['timeout'] = (time) How long can the underlying delete processes run until they are canceled @@ -178,6 +189,8 @@ public function deleteExpiredData(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a filter. + * * $params['filter_id'] = (string) The ID of the filter to delete * * @param array $params Associative array of parameters @@ -196,6 +209,8 @@ public function deleteFilter(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes forecasts from a machine learning job. + * * $params['job_id'] = (string) The ID of the job from which to delete forecasts (Required) * $params['forecast_id'] = (string) The ID of the forecast to delete, can be comma delimited list. Leaving blank implies `_all` * $params['allow_no_forecasts'] = (boolean) Whether to ignore if `_all` matches no forecasts @@ -219,6 +234,8 @@ public function deleteForecast(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an existing anomaly detection job. + * * $params['job_id'] = (string) The ID of the job to delete * $params['force'] = (boolean) True if the job should be forcefully deleted (Default = false) * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true) @@ -239,6 +256,8 @@ public function deleteJob(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an existing model snapshot. + * * $params['job_id'] = (string) The ID of the job to fetch * $params['snapshot_id'] = (string) The ID of the snapshot to delete * @@ -260,14 +279,13 @@ public function deleteModelSnapshot(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. + * * $params['model_id'] = (string) The ID of the trained model to delete * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function deleteTrainedModel(array $params = []) { @@ -281,15 +299,14 @@ public function deleteTrainedModel(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a model alias that refers to the trained model + * * $params['model_alias'] = (string) The trained model alias to delete * $params['model_id'] = (string) The trained model where the model alias is assigned * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function deleteTrainedModelAlias(array $params = []) { @@ -305,6 +322,8 @@ public function deleteTrainedModelAlias(array $params = []) return $this->performRequest($endpoint); } /** + * Estimates the model memory + * * $params['body'] = (array) The analysis config, plus cardinality estimates for fields it references (Required) * * @param array $params Associative array of parameters @@ -322,6 +341,15 @@ public function estimateModelMemory(array $params = []) return $this->performRequest($endpoint); } + /** + * Evaluates the data frame analytics for an annotated index. + * + * $params['body'] = (array) The evaluation definition (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html + */ public function evaluateDataFrame(array $params = []) { $body = $this->extractArgument($params, 'body'); @@ -334,15 +362,14 @@ public function evaluateDataFrame(array $params = []) return $this->performRequest($endpoint); } /** + * Explains a data frame analytics config. + * * $params['id'] = (string) The ID of the data frame analytics to explain * $params['body'] = (array) The data frame analytics config to explain * * @param array $params Associative array of parameters * @return array * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/explain-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function explainDataFrameAnalytics(array $params = []) { @@ -358,6 +385,8 @@ public function explainDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. + * * $params['lines_to_sample'] = (int) How many lines of the file should be included in the analysis (Default = 1000) * $params['line_merge_size_limit'] = (int) Maximum number of characters permitted in a single message when lines are merged to create messages. (Default = 10000) * $params['timeout'] = (time) Timeout after which the analysis will be aborted (Default = 25s) @@ -393,6 +422,8 @@ public function findFileStructure(array $params = []) return $this->performRequest($endpoint); } /** + * Forces any buffered data to be processed by the job. + * * $params['job_id'] = (string) The name of the job to flush * $params['calc_interim'] = (boolean) Calculates interim results for the most recent bucket or all buckets within the latency period * $params['start'] = (string) When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results @@ -419,10 +450,13 @@ public function flushJob(array $params = []) return $this->performRequest($endpoint); } /** + * Predicts the future behavior of a time series by using its historical behavior. + * * $params['job_id'] = (string) The ID of the job to forecast for * $params['duration'] = (time) The duration of the forecast * $params['expires_in'] = (time) The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity. * $params['max_model_memory'] = (string) The max memory able to be used by the forecast. Default is 20mb. + * $params['body'] = (array) Query parameters can be specified in the body * * @param array $params Associative array of parameters * @return array @@ -431,15 +465,19 @@ public function flushJob(array $params = []) public function forecast(array $params = []) { $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('Ml\Forecast'); $endpoint->setParams($params); $endpoint->setJobId($job_id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } /** + * Retrieves anomaly detection job results for one or more buckets. + * * $params['job_id'] = (string) ID of the job to get bucket results from (Required) * $params['timestamp'] = (string) The timestamp of the desired single bucket result * $params['expand'] = (boolean) Include anomaly records @@ -473,6 +511,8 @@ public function getBuckets(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about the scheduled events in calendars. + * * $params['calendar_id'] = (string) The ID of the calendar containing the events * $params['job_id'] = (string) Get events for the job. When this option is used calendar_id must be '_all' * $params['start'] = (string) Get events after this time @@ -496,6 +536,8 @@ public function getCalendarEvents(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for calendars. + * * $params['calendar_id'] = (string) The ID of the calendar to fetch * $params['from'] = (int) skips a number of calendars * $params['size'] = (int) specifies a max number of calendars to get @@ -519,6 +561,8 @@ public function getCalendars(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves anomaly detection job results for one or more categories. + * * $params['job_id'] = (string) The name of the job (Required) * $params['category_id'] = (long) The identifier of the category definition of interest * $params['from'] = (int) skips a number of categories @@ -546,6 +590,8 @@ public function getCategories(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for data frame analytics jobs. + * * $params['id'] = (string) The ID of the data frame analytics to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true) * $params['from'] = (int) skips a number of analytics (Default = 0) @@ -555,9 +601,6 @@ public function getCategories(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function getDataFrameAnalytics(array $params = []) { @@ -571,6 +614,8 @@ public function getDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for data frame analytics jobs. + * * $params['id'] = (string) The ID of the data frame analytics stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) (Default = true) * $params['from'] = (int) skips a number of analytics (Default = 0) @@ -580,9 +625,6 @@ public function getDataFrameAnalytics(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function getDataFrameAnalyticsStats(array $params = []) { @@ -596,6 +638,8 @@ public function getDataFrameAnalyticsStats(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for datafeeds. + * * $params['datafeed_id'] = (string) The ID of the datafeeds stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @@ -616,6 +660,8 @@ public function getDatafeedStats(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for datafeeds. + * * $params['datafeed_id'] = (string) The ID of the datafeeds to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @@ -637,6 +683,8 @@ public function getDatafeeds(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves filters. + * * $params['filter_id'] = (string) The ID of the filter to fetch * $params['from'] = (int) skips a number of filters * $params['size'] = (int) specifies a max number of filters to get @@ -657,6 +705,8 @@ public function getFilters(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves anomaly detection job results for one or more influencers. + * * $params['job_id'] = (string) Identifier for the anomaly detection job * $params['exclude_interim'] = (boolean) Exclude interim results * $params['from'] = (int) skips a number of influencers @@ -686,6 +736,8 @@ public function getInfluencers(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for anomaly detection jobs. + * * $params['job_id'] = (string) The ID of the jobs stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @@ -706,6 +758,8 @@ public function getJobStats(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for anomaly detection jobs. + * * $params['job_id'] = (string) The ID of the jobs to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) * $params['allow_no_jobs'] = (boolean) Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified) @@ -727,6 +781,32 @@ public function getJobs(array $params = []) return $this->performRequest($endpoint); } /** + * Gets stats for anomaly detection job model snapshot upgrades that are in progress. + * + * $params['job_id'] = (string) The ID of the job. May be a wildcard, comma separated list or `_all`. + * $params['snapshot_id'] = (string) The ID of the snapshot. May be a wildcard, comma separated list or `_all`. + * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-model-snapshot-upgrade-stats.html + */ + public function getModelSnapshotUpgradeStats(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + $snapshot_id = $this->extractArgument($params, 'snapshot_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\GetModelSnapshotUpgradeStats'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + $endpoint->setSnapshotId($snapshot_id); + + return $this->performRequest($endpoint); + } + /** + * Retrieves information about model snapshots. + * * $params['job_id'] = (string) The ID of the job to fetch (Required) * $params['snapshot_id'] = (string) The ID of the snapshot to fetch * $params['from'] = (int) Skips a number of documents @@ -757,6 +837,8 @@ public function getModelSnapshots(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. + * * $params['job_id'] = (string) The job IDs for which to calculate overall bucket results * $params['top_n'] = (int) The number of top job bucket scores to be used in the overall_score calculation * $params['bucket_span'] = (string) The span of the overall buckets. Defaults to the longest job bucket_span @@ -786,6 +868,8 @@ public function getOverallBuckets(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves anomaly records for an anomaly detection job. + * * $params['job_id'] = (string) The ID of the job * $params['exclude_interim'] = (boolean) Exclude interim results * $params['from'] = (int) skips a number of records @@ -815,6 +899,8 @@ public function getRecords(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for a trained inference model. + * * $params['model_id'] = (string) The ID of the trained models to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) * $params['include'] = (string) A comma-separate list of fields to optionally include. Valid options are 'definition' and 'total_feature_importance'. Default is none. @@ -828,9 +914,6 @@ public function getRecords(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function getTrainedModels(array $params = []) { @@ -844,6 +927,8 @@ public function getTrainedModels(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for trained inference models. + * * $params['model_id'] = (string) The ID of the trained models stats to fetch * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no trained models. (This includes `_all` string or when no trained models have been specified) (Default = true) * $params['from'] = (int) skips a number of trained models (Default = 0) @@ -852,9 +937,6 @@ public function getTrainedModels(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function getTrainedModelsStats(array $params = []) { @@ -867,6 +949,14 @@ public function getTrainedModelsStats(array $params = []) return $this->performRequest($endpoint); } + /** + * Returns defaults and limits used by machine learning. + * + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html + */ public function info(array $params = []) { @@ -877,7 +967,10 @@ public function info(array $params = []) return $this->performRequest($endpoint); } /** + * Opens one or more anomaly detection jobs. + * * $params['job_id'] = (string) The ID of the job to open + * $params['body'] = (array) Query parameters can be specified in the body * * @param array $params Associative array of parameters * @return array @@ -886,15 +979,19 @@ public function info(array $params = []) public function openJob(array $params = []) { $job_id = $this->extractArgument($params, 'job_id'); + $body = $this->extractArgument($params, 'body'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('Ml\OpenJob'); $endpoint->setParams($params); $endpoint->setJobId($job_id); + $endpoint->setBody($body); return $this->performRequest($endpoint); } /** + * Posts scheduled events in a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to modify * $params['body'] = (array) A list of events (Required) * @@ -916,6 +1013,8 @@ public function postCalendarEvents(array $params = []) return $this->performRequest($endpoint); } /** + * Sends data to an anomaly detection job for analysis. + * * $params['job_id'] = (string) The name of the job receiving the data * $params['reset_start'] = (string) Optional parameter to specify the start of the bucket resetting range * $params['reset_end'] = (string) Optional parameter to specify the end of the bucket resetting range @@ -939,15 +1038,14 @@ public function postData(array $params = []) return $this->performRequest($endpoint); } /** + * Previews that will be analyzed given a data frame analytics config. + * * $params['id'] = (string) The ID of the data frame analytics to preview * $params['body'] = (array) The data frame analytics config to preview * * @param array $params Associative array of parameters * @return array * @see http://www.elastic.co/guide/en/elasticsearch/reference/current/preview-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function previewDataFrameAnalytics(array $params = []) { @@ -963,6 +1061,8 @@ public function previewDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Previews a datafeed. + * * $params['datafeed_id'] = (string) The ID of the datafeed to preview * $params['body'] = (array) The datafeed config and job config with which to execute the preview * @@ -984,6 +1084,8 @@ public function previewDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Instantiates a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to create * $params['body'] = (array) The calendar details * @@ -1005,6 +1107,8 @@ public function putCalendar(array $params = []) return $this->performRequest($endpoint); } /** + * Adds an anomaly detection job to a calendar. + * * $params['calendar_id'] = (string) The ID of the calendar to modify * $params['job_id'] = (string) The ID of the job to add to the calendar * @@ -1026,15 +1130,14 @@ public function putCalendarJob(array $params = []) return $this->performRequest($endpoint); } /** + * Instantiates a data frame analytics job. + * * $params['id'] = (string) The ID of the data frame analytics to create * $params['body'] = (array) The data frame analytics configuration (Required) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function putDataFrameAnalytics(array $params = []) { @@ -1050,6 +1153,8 @@ public function putDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Instantiates a datafeed. + * * $params['datafeed_id'] = (string) The ID of the datafeed to create * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true) @@ -1075,6 +1180,8 @@ public function putDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Instantiates a filter. + * * $params['filter_id'] = (string) The ID of the filter to create * $params['body'] = (array) The filter details (Required) * @@ -1096,8 +1203,14 @@ public function putFilter(array $params = []) return $this->performRequest($endpoint); } /** - * $params['job_id'] = (string) The ID of the job to create - * $params['body'] = (array) The job (Required) + * Instantiates an anomaly detection job. + * + * $params['job_id'] = (string) The ID of the job to create + * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false). Only set if datafeed_config is provided. + * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true). Only set if datafeed_config is provided. + * $params['ignore_throttled'] = (boolean) Ignore indices that are marked as throttled (default: true). Only set if datafeed_config is provided. + * $params['expand_wildcards'] = (enum) Whether source index expressions should get expanded to open or closed indices (default: open). Only set if datafeed_config is provided. (Options = open,closed,hidden,none,all) + * $params['body'] = (array) The job (Required) * * @param array $params Associative array of parameters * @return array @@ -1117,15 +1230,15 @@ public function putJob(array $params = []) return $this->performRequest($endpoint); } /** - * $params['model_id'] = (string) The ID of the trained models to store - * $params['body'] = (array) The trained model configuration (Required) + * Creates an inference trained model. + * + * $params['model_id'] = (string) The ID of the trained models to store + * $params['defer_definition_decompression'] = (boolean) If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. (Default = false) + * $params['body'] = (array) The trained model configuration (Required) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function putTrainedModel(array $params = []) { @@ -1141,6 +1254,8 @@ public function putTrainedModel(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new model alias (or reassigns an existing one) to refer to the trained model + * * $params['model_alias'] = (string) The trained model alias to update * $params['model_id'] = (string) The trained model where the model alias should be assigned * $params['reassign'] = (boolean) If the model_alias already exists and points to a separate model_id, this parameter must be true. Defaults to false. @@ -1148,9 +1263,6 @@ public function putTrainedModel(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-trained-models-aliases.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function putTrainedModelAlias(array $params = []) { @@ -1166,6 +1278,29 @@ public function putTrainedModelAlias(array $params = []) return $this->performRequest($endpoint); } /** + * Resets an existing anomaly detection job. + * + * $params['job_id'] = (string) The ID of the job to reset + * $params['wait_for_completion'] = (boolean) Should this request wait until the operation has completed before returning (Default = true) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-reset-job.html + */ + public function resetJob(array $params = []) + { + $job_id = $this->extractArgument($params, 'job_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Ml\ResetJob'); + $endpoint->setParams($params); + $endpoint->setJobId($job_id); + + return $this->performRequest($endpoint); + } + /** + * Reverts to a specific snapshot. + * * $params['job_id'] = (string) The ID of the job to fetch * $params['snapshot_id'] = (string) The ID of the snapshot to revert to * $params['delete_intervening_results'] = (boolean) Should we reset the results back to the time of the snapshot? @@ -1191,6 +1326,8 @@ public function revertModelSnapshot(array $params = []) return $this->performRequest($endpoint); } /** + * Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. + * * $params['enabled'] = (boolean) Whether to enable upgrade_mode ML setting or not. Defaults to false. * $params['timeout'] = (time) Controls the time to wait before action times out. Defaults to 30 seconds * @@ -1208,6 +1345,8 @@ public function setUpgradeMode(array $params = []) return $this->performRequest($endpoint); } /** + * Starts a data frame analytics job. + * * $params['id'] = (string) The ID of the data frame analytics to start * $params['timeout'] = (time) Controls the time to wait until the task has started. Defaults to 20 seconds * $params['body'] = (array) The start data frame analytics parameters @@ -1215,9 +1354,6 @@ public function setUpgradeMode(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/start-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function startDataFrameAnalytics(array $params = []) { @@ -1233,6 +1369,8 @@ public function startDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Starts one or more datafeeds. + * * $params['datafeed_id'] = (string) The ID of the datafeed to start * $params['start'] = (string) The start time from where the datafeed should begin * $params['end'] = (string) The end time when the datafeed should stop. When not set, the datafeed continues in real time @@ -1257,6 +1395,8 @@ public function startDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Stops one or more data frame analytics jobs. + * * $params['id'] = (string) The ID of the data frame analytics to stop * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no data frame analytics. (This includes `_all` string or when no data frame analytics have been specified) * $params['force'] = (boolean) True if the data frame analytics should be forcefully stopped @@ -1266,9 +1406,6 @@ public function startDatafeed(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/stop-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function stopDataFrameAnalytics(array $params = []) { @@ -1284,6 +1421,8 @@ public function stopDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Stops one or more datafeeds. + * * $params['datafeed_id'] = (string) The ID of the datafeed to stop * $params['allow_no_match'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) * $params['allow_no_datafeeds'] = (boolean) Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified) @@ -1309,15 +1448,14 @@ public function stopDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of a data frame analytics job. + * * $params['id'] = (string) The ID of the data frame analytics to update * $params['body'] = (array) The data frame analytics settings to update (Required) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-dfanalytics.html - * - * @note This API is BETA and may change in ways that are not backwards compatible - * */ public function updateDataFrameAnalytics(array $params = []) { @@ -1333,6 +1471,8 @@ public function updateDataFrameAnalytics(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of a datafeed. + * * $params['datafeed_id'] = (string) The ID of the datafeed to update * $params['ignore_unavailable'] = (boolean) Ignore unavailable indexes (default: false) * $params['allow_no_indices'] = (boolean) Ignore if the source indices expressions resolves to no concrete indices (default: true) @@ -1358,6 +1498,8 @@ public function updateDatafeed(array $params = []) return $this->performRequest($endpoint); } /** + * Updates the description of a filter, adds items, or removes items. + * * $params['filter_id'] = (string) The ID of the filter to update * $params['body'] = (array) The filter update (Required) * @@ -1379,6 +1521,8 @@ public function updateFilter(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of an anomaly detection job. + * * $params['job_id'] = (string) The ID of the job to create * $params['body'] = (array) The job update settings (Required) * @@ -1400,6 +1544,8 @@ public function updateJob(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of a snapshot. + * * $params['job_id'] = (string) The ID of the job to fetch * $params['snapshot_id'] = (string) The ID of the snapshot to update * $params['body'] = (array) The model snapshot properties to update (Required) @@ -1424,6 +1570,8 @@ public function updateModelSnapshot(array $params = []) return $this->performRequest($endpoint); } /** + * Upgrades a given job snapshot to the current major version. + * * $params['job_id'] = (string) The ID of the job * $params['snapshot_id'] = (string) The ID of the snapshot * $params['timeout'] = (time) How long should the API wait for the job to be opened and the old snapshot to be loaded. @@ -1447,6 +1595,8 @@ public function upgradeJobSnapshot(array $params = []) return $this->performRequest($endpoint); } /** + * Validates an anomaly detection job. + * * $params['body'] = (array) The job config (Required) * * @param array $params Associative array of parameters @@ -1465,6 +1615,8 @@ public function validate(array $params = []) return $this->performRequest($endpoint); } /** + * Validates an anomaly detection detector. + * * $params['body'] = (array) The detector (Required) * * @param array $params Associative array of parameters diff --git a/src/Elasticsearch/Namespaces/MonitoringNamespace.php b/src/Elasticsearch/Namespaces/MonitoringNamespace.php index 1ded14aed..9d77711ac 100644 --- a/src/Elasticsearch/Namespaces/MonitoringNamespace.php +++ b/src/Elasticsearch/Namespaces/MonitoringNamespace.php @@ -22,12 +22,14 @@ * Class MonitoringNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class MonitoringNamespace extends AbstractNamespace { /** + * Used by the monitoring features to send monitoring data. + * * $params['type'] = DEPRECATED (string) Default document type for items which don't provide one * $params['system_id'] = (string) Identifier of the monitored system * $params['system_api_version'] = (string) API Version of the monitored system @@ -37,9 +39,6 @@ class MonitoringNamespace extends AbstractNamespace * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/monitor-elasticsearch-cluster.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function bulk(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/NodesNamespace.php b/src/Elasticsearch/Namespaces/NodesNamespace.php index de3426715..2e81800fc 100644 --- a/src/Elasticsearch/Namespaces/NodesNamespace.php +++ b/src/Elasticsearch/Namespaces/NodesNamespace.php @@ -22,18 +22,70 @@ * Class NodesNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class NodesNamespace extends AbstractNamespace { /** + * Removes the archived repositories metering information present in the cluster. + * + * $params['node_id'] = (list) Comma-separated list of node IDs or names used to limit returned information. + * $params['max_archive_version'] = (long) Specifies the maximum archive_version to be cleared from the archive. + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-repositories-metering-archive-api.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function clearRepositoriesMeteringArchive(array $params = []) + { + $node_id = $this->extractArgument($params, 'node_id'); + $max_archive_version = $this->extractArgument($params, 'max_archive_version'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Nodes\ClearRepositoriesMeteringArchive'); + $endpoint->setParams($params); + $endpoint->setNodeId($node_id); + $endpoint->setMaxArchiveVersion($max_archive_version); + + return $this->performRequest($endpoint); + } + /** + * Returns cluster repositories metering information. + * + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information. + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function getRepositoriesMeteringInfo(array $params = []) + { + $node_id = $this->extractArgument($params, 'node_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Nodes\GetRepositoriesMeteringInfo'); + $endpoint->setParams($params); + $endpoint->setNodeId($node_id); + + return $this->performRequest($endpoint); + } + /** + * Returns information about hot threads on each node in the cluster. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['interval'] = (time) The interval for the second sampling of threads * $params['snapshots'] = (number) Number of samples of thread stacktrace (default: 10) * $params['threads'] = (number) Specify the number of threads to provide information for (default: 3) * $params['ignore_idle_threads'] = (boolean) Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) - * $params['type'] = (enum) The type to sample (default: cpu) (Options = cpu,wait,block) + * $params['type'] = (enum) The type to sample (default: cpu) (Options = cpu,wait,block,mem) + * $params['sort'] = (enum) The sort order for 'cpu' type (default: total) (Options = cpu,total) * $params['timeout'] = (time) Explicit operation timeout * * @param array $params Associative array of parameters @@ -52,8 +104,10 @@ public function hotThreads(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about nodes in the cluster. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * $params['metric'] = (list) A comma-separated list of metrics you wish returned. Leave empty to return all. + * $params['metric'] = (list) A comma-separated list of metrics you wish returned. Use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. * $params['flat_settings'] = (boolean) Return settings in flat format (default: false) * $params['timeout'] = (time) Explicit operation timeout * @@ -75,6 +129,8 @@ public function info(array $params = []) return $this->performRequest($endpoint); } /** + * Reloads secure settings. + * * $params['node_id'] = (list) A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. * $params['timeout'] = (time) Explicit operation timeout * $params['body'] = (array) An object containing the password for the elasticsearch keystore @@ -97,6 +153,8 @@ public function reloadSecureSettings(array $params = []) return $this->performRequest($endpoint); } /** + * Returns statistical information about nodes in the cluster. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['metric'] = (list) Limit the information returned to the specified metrics * $params['index_metric'] = (list) Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. @@ -130,6 +188,8 @@ public function stats(array $params = []) return $this->performRequest($endpoint); } /** + * Returns low-level information about REST actions usage on nodes. + * * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['metric'] = (list) Limit the information returned to the specified metrics * $params['timeout'] = (time) Explicit operation timeout diff --git a/src/Elasticsearch/Namespaces/RollupNamespace.php b/src/Elasticsearch/Namespaces/RollupNamespace.php index 9fc6bac7b..610f77f26 100644 --- a/src/Elasticsearch/Namespaces/RollupNamespace.php +++ b/src/Elasticsearch/Namespaces/RollupNamespace.php @@ -22,12 +22,14 @@ * Class RollupNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class RollupNamespace extends AbstractNamespace { /** + * Deletes an existing rollup job. + * * $params['id'] = (string) The ID of the job to delete * * @param array $params Associative array of parameters @@ -49,6 +51,8 @@ public function deleteJob(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the configuration, stats, and status of rollup jobs. + * * $params['id'] = (string) The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs * * @param array $params Associative array of parameters @@ -70,6 +74,8 @@ public function getJobs(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. + * * $params['id'] = (string) The ID of the index to check rollup capabilities on, or left blank for all jobs * * @param array $params Associative array of parameters @@ -91,6 +97,8 @@ public function getRollupCaps(array $params = []) return $this->performRequest($endpoint); } /** + * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). + * * $params['index'] = (string) The rollup index or index pattern to obtain rollup capabilities from. * * @param array $params Associative array of parameters @@ -112,6 +120,8 @@ public function getRollupIndexCaps(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a rollup job. + * * $params['id'] = (string) The ID of the job to create * $params['body'] = (array) The job configuration (Required) * @@ -136,13 +146,18 @@ public function putJob(array $params = []) return $this->performRequest($endpoint); } /** + * Rollup an index + * * $params['index'] = (string) The index to roll up * $params['rollup_index'] = (string) The name of the rollup index to create * $params['body'] = (array) The rollup configuration (Required) * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/rollup-api.html + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * */ public function rollup(array $params = []) { @@ -160,6 +175,8 @@ public function rollup(array $params = []) return $this->performRequest($endpoint); } /** + * Enables searching rolled-up data using the standard query DSL. + * * $params['index'] = (list) The indices or index-pattern(s) (containing rollup or regular data) that should be searched (Required) * $params['type'] = DEPRECATED (string) The doc type inside the index * $params['typed_keys'] = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response @@ -189,6 +206,8 @@ public function rollupSearch(array $params = []) return $this->performRequest($endpoint); } /** + * Starts an existing, stopped rollup job. + * * $params['id'] = (string) The ID of the job to start * * @param array $params Associative array of parameters @@ -210,6 +229,8 @@ public function startJob(array $params = []) return $this->performRequest($endpoint); } /** + * Stops an existing, started rollup job. + * * $params['id'] = (string) The ID of the job to stop * $params['wait_for_completion'] = (boolean) True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. * $params['timeout'] = (time) Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. diff --git a/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php b/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php index c447d04cf..3c0e68a60 100644 --- a/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php +++ b/src/Elasticsearch/Namespaces/SearchableSnapshotsNamespace.php @@ -22,12 +22,37 @@ * Class SearchableSnapshotsNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SearchableSnapshotsNamespace extends AbstractNamespace { /** + * Retrieve node-level cache statistics about searchable snapshots. + * + * $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html + * + * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release + * + */ + public function cacheStats(array $params = []) + { + $node_id = $this->extractArgument($params, 'node_id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('SearchableSnapshots\CacheStats'); + $endpoint->setParams($params); + $endpoint->setNodeId($node_id); + + return $this->performRequest($endpoint); + } + /** + * Clear the cache of searchable snapshots. + * * $params['index'] = (list) A comma-separated list of index names * $params['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed) * $params['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) @@ -52,6 +77,8 @@ public function clearCache(array $params = []) return $this->performRequest($endpoint); } /** + * Mount a snapshot as a searchable index. + * * $params['repository'] = (string) The name of the repository containing the snapshot of the index to mount * $params['snapshot'] = (string) The name of the snapshot of the index to mount * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -62,9 +89,6 @@ public function clearCache(array $params = []) * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-api-mount-snapshot.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function mount(array $params = []) { @@ -82,6 +106,8 @@ public function mount(array $params = []) return $this->performRequest($endpoint); } /** + * DEPRECATED: This API is replaced by the Repositories Metering API. + * * $params['repository'] = (string) The repository for which to get the stats for * * @param array $params Associative array of parameters @@ -103,15 +129,14 @@ public function repositoryStats(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieve shard-level statistics about searchable snapshots. + * * $params['index'] = (list) A comma-separated list of index names * $params['level'] = (enum) Return stats aggregated at cluster, index or shard level (Options = cluster,indices,shards) (Default = indices) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/searchable-snapshots-apis.html - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function stats(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/SecurityNamespace.php b/src/Elasticsearch/Namespaces/SecurityNamespace.php index a9ae067b2..6ac187c0c 100644 --- a/src/Elasticsearch/Namespaces/SecurityNamespace.php +++ b/src/Elasticsearch/Namespaces/SecurityNamespace.php @@ -22,12 +22,14 @@ * Class SecurityNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SecurityNamespace extends AbstractNamespace { /** + * Enables authentication as a user and retrieve information about the authenticated user. + * * * @param array $params Associative array of parameters * @return array @@ -43,6 +45,8 @@ public function authenticate(array $params = []) return $this->performRequest($endpoint); } /** + * Changes the passwords of users in the native realm and built-in users. + * * $params['username'] = (string) The username of the user to change the password for * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) the new password for the user (Required) @@ -65,6 +69,8 @@ public function changePassword(array $params = []) return $this->performRequest($endpoint); } /** + * Clear a subset or all entries from the API key cache. + * * $params['ids'] = (list) A comma-separated list of IDs of API keys to clear from the cache * * @param array $params Associative array of parameters @@ -83,6 +89,8 @@ public function clearApiKeyCache(array $params = []) return $this->performRequest($endpoint); } /** + * Evicts application privileges from the native application privileges cache. + * * $params['application'] = (list) A comma-separated list of application names * * @param array $params Associative array of parameters @@ -101,6 +109,8 @@ public function clearCachedPrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Evicts users from the user cache. Can completely clear the cache or evict specific users. + * * $params['realms'] = (list) Comma-separated list of realms to clear * $params['usernames'] = (list) Comma-separated list of usernames to clear from the cache * @@ -120,6 +130,8 @@ public function clearCachedRealms(array $params = []) return $this->performRequest($endpoint); } /** + * Evicts roles from the native role cache. + * * $params['name'] = (list) Role name * * @param array $params Associative array of parameters @@ -138,6 +150,34 @@ public function clearCachedRoles(array $params = []) return $this->performRequest($endpoint); } /** + * Evicts tokens from the service account token caches. + * + * $params['namespace'] = (string) An identifier for the namespace + * $params['service'] = (string) An identifier for the service name + * $params['name'] = (list) A comma-separated list of service token names + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-service-token-caches.html + */ + public function clearCachedServiceTokens(array $params = []) + { + $namespace = $this->extractArgument($params, 'namespace'); + $service = $this->extractArgument($params, 'service'); + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\ClearCachedServiceTokens'); + $endpoint->setParams($params); + $endpoint->setNamespace($namespace); + $endpoint->setService($service); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * Creates an API key for access without requiring basic authentication. + * * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The api key request to create an API key (Required) * @@ -157,6 +197,35 @@ public function createApiKey(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a service account token for access without requiring basic authentication. + * + * $params['namespace'] = (string) An identifier for the namespace (Required) + * $params['service'] = (string) An identifier for the service name (Required) + * $params['name'] = (string) An identifier for the token name + * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html + */ + public function createServiceToken(array $params = []) + { + $namespace = $this->extractArgument($params, 'namespace'); + $service = $this->extractArgument($params, 'service'); + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\CreateServiceToken'); + $endpoint->setParams($params); + $endpoint->setNamespace($namespace); + $endpoint->setService($service); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * Removes application privileges. + * * $params['application'] = (string) Application name * $params['name'] = (string) Privilege name * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) @@ -179,6 +248,8 @@ public function deletePrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Removes roles in the native realm. + * * $params['name'] = (string) Role name * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * @@ -198,6 +269,8 @@ public function deleteRole(array $params = []) return $this->performRequest($endpoint); } /** + * Removes role mappings. + * * $params['name'] = (string) Role-mapping name * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * @@ -217,6 +290,35 @@ public function deleteRoleMapping(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a service account token. + * + * $params['namespace'] = (string) An identifier for the namespace + * $params['service'] = (string) An identifier for the service name + * $params['name'] = (string) An identifier for the token name + * $params['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-delete-service-token.html + */ + public function deleteServiceToken(array $params = []) + { + $namespace = $this->extractArgument($params, 'namespace'); + $service = $this->extractArgument($params, 'service'); + $name = $this->extractArgument($params, 'name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\DeleteServiceToken'); + $endpoint->setParams($params); + $endpoint->setNamespace($namespace); + $endpoint->setService($service); + $endpoint->setName($name); + + return $this->performRequest($endpoint); + } + /** + * Deletes users from the native realm. + * * $params['username'] = (string) username * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * @@ -236,6 +338,8 @@ public function deleteUser(array $params = []) return $this->performRequest($endpoint); } /** + * Disables users in the native realm. + * * $params['username'] = (string) The username of the user to disable * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * @@ -255,6 +359,8 @@ public function disableUser(array $params = []) return $this->performRequest($endpoint); } /** + * Enables users in the native realm. + * * $params['username'] = (string) The username of the user to enable * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * @@ -274,6 +380,8 @@ public function enableUser(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information for one or more API keys. + * * $params['id'] = (string) API key id of the API key to be retrieved * $params['name'] = (string) API key name of the API key to be retrieved * $params['username'] = (string) user name of the user who created this API key to be retrieved @@ -294,6 +402,8 @@ public function getApiKey(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. + * * * @param array $params Associative array of parameters * @return array @@ -309,6 +419,8 @@ public function getBuiltinPrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves application privileges. + * * $params['application'] = (string) Application name * $params['name'] = (string) Privilege name * @@ -330,6 +442,8 @@ public function getPrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves roles in the native realm. + * * $params['name'] = (list) A comma-separated list of role names * * @param array $params Associative array of parameters @@ -348,6 +462,8 @@ public function getRole(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves role mappings. + * * $params['name'] = (list) A comma-separated list of role-mapping names * * @param array $params Associative array of parameters @@ -366,6 +482,54 @@ public function getRoleMapping(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about service accounts. + * + * $params['namespace'] = (string) An identifier for the namespace + * $params['service'] = (string) An identifier for the service name + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-accounts.html + */ + public function getServiceAccounts(array $params = []) + { + $namespace = $this->extractArgument($params, 'namespace'); + $service = $this->extractArgument($params, 'service'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetServiceAccounts'); + $endpoint->setParams($params); + $endpoint->setNamespace($namespace); + $endpoint->setService($service); + + return $this->performRequest($endpoint); + } + /** + * Retrieves information of all service credentials for a service account. + * + * $params['namespace'] = (string) An identifier for the namespace + * $params['service'] = (string) An identifier for the service name + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-service-credentials.html + */ + public function getServiceCredentials(array $params = []) + { + $namespace = $this->extractArgument($params, 'namespace'); + $service = $this->extractArgument($params, 'service'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\GetServiceCredentials'); + $endpoint->setParams($params); + $endpoint->setNamespace($namespace); + $endpoint->setService($service); + + return $this->performRequest($endpoint); + } + /** + * Creates a bearer token for access without requiring basic authentication. + * * $params['body'] = (array) The token request to get (Required) * * @param array $params Associative array of parameters @@ -384,6 +548,8 @@ public function getToken(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves information about users in the native realm and built-in users. + * * $params['username'] = (list) A comma-separated list of usernames * * @param array $params Associative array of parameters @@ -402,10 +568,12 @@ public function getUser(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves security privileges for the logged in user. + * * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-privileges.html + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user-privileges.html */ public function getUserPrivileges(array $params = []) { @@ -417,6 +585,8 @@ public function getUserPrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Creates an API key on behalf of another user. + * * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The api key request to create an API key (Required) * @@ -436,6 +606,8 @@ public function grantApiKey(array $params = []) return $this->performRequest($endpoint); } /** + * Determines whether the specified user has a specified list of privileges. + * * $params['user'] = (string) Username * $params['body'] = (array) The privileges to test (Required) * @@ -456,6 +628,15 @@ public function hasPrivileges(array $params = []) return $this->performRequest($endpoint); } + /** + * Invalidates one or more API keys. + * + * $params['body'] = (array) The api key request to invalidate API key(s) (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html + */ public function invalidateApiKey(array $params = []) { $body = $this->extractArgument($params, 'body'); @@ -468,6 +649,8 @@ public function invalidateApiKey(array $params = []) return $this->performRequest($endpoint); } /** + * Invalidates one or more access tokens or refresh tokens. + * * $params['body'] = (array) The token to invalidate (Required) * * @param array $params Associative array of parameters @@ -486,6 +669,8 @@ public function invalidateToken(array $params = []) return $this->performRequest($endpoint); } /** + * Adds or updates application privileges. + * * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The privilege(s) to add (Required) * @@ -505,6 +690,8 @@ public function putPrivileges(array $params = []) return $this->performRequest($endpoint); } /** + * Adds and updates roles in the native realm. + * * $params['name'] = (string) Role name * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The role to add (Required) @@ -527,6 +714,8 @@ public function putRole(array $params = []) return $this->performRequest($endpoint); } /** + * Creates and updates role mappings. + * * $params['name'] = (string) Role-mapping name * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The role mapping to add (Required) @@ -549,6 +738,8 @@ public function putRoleMapping(array $params = []) return $this->performRequest($endpoint); } /** + * Adds and updates users in the native realm. These users are commonly referred to as native users. + * * $params['username'] = (string) The username of the User * $params['refresh'] = (enum) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. (Options = true,false,wait_for) * $params['body'] = (array) The user to add (Required) @@ -568,6 +759,146 @@ public function putUser(array $params = []) $endpoint->setUsername($username); $endpoint->setBody($body); + return $this->performRequest($endpoint); + } + /** + * Retrieves information for API keys using a subset of query DSL + * + * $params['body'] = (array) From, size, query, sort and search_after + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html + */ + public function queryApiKeys(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\QueryApiKeys'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair + * + * $params['body'] = (array) The SAML response to authenticate (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-authenticate.html + */ + public function samlAuthenticate(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlAuthenticate'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Verifies the logout response sent from the SAML IdP + * + * $params['body'] = (array) The logout response to verify (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-complete-logout.html + */ + public function samlCompleteLogout(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlCompleteLogout'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Consumes a SAML LogoutRequest + * + * $params['body'] = (array) The LogoutRequest message (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-invalidate.html + */ + public function samlInvalidate(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlInvalidate'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Invalidates an access token and a refresh token that were generated via the SAML Authenticate API + * + * $params['body'] = (array) The tokens to invalidate (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-logout.html + */ + public function samlLogout(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlLogout'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Creates a SAML authentication request + * + * $params['body'] = (array) The realm for which to create the authentication request, identified by either its name or the ACS URL (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-prepare-authentication.html + */ + public function samlPrepareAuthentication(array $params = []) + { + $body = $this->extractArgument($params, 'body'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlPrepareAuthentication'); + $endpoint->setParams($params); + $endpoint->setBody($body); + + return $this->performRequest($endpoint); + } + /** + * Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider + * + * $params['realm_name'] = (string) The name of the SAML realm to get the metadata for + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-saml-sp-metadata.html + */ + public function samlServiceProviderMetadata(array $params = []) + { + $realm_name = $this->extractArgument($params, 'realm_name'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Security\SamlServiceProviderMetadata'); + $endpoint->setParams($params); + $endpoint->setRealmName($realm_name); + return $this->performRequest($endpoint); } } diff --git a/src/Elasticsearch/Namespaces/ShutdownNamespace.php b/src/Elasticsearch/Namespaces/ShutdownNamespace.php index 1259ab8e2..39f7df008 100644 --- a/src/Elasticsearch/Namespaces/ShutdownNamespace.php +++ b/src/Elasticsearch/Namespaces/ShutdownNamespace.php @@ -22,20 +22,19 @@ * Class ShutdownNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class ShutdownNamespace extends AbstractNamespace { /** + * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['node_id'] = (string) The node id of node to be removed from the shutdown state * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function deleteNode(array $params = []) { @@ -49,14 +48,13 @@ public function deleteNode(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['node_id'] = (string) Which node for which to retrieve the shutdown status * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function getNode(array $params = []) { @@ -70,15 +68,14 @@ public function getNode(array $params = []) return $this->performRequest($endpoint); } /** + * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * * $params['node_id'] = (string) The node id of node to be shut down * $params['body'] = (array) The shutdown type definition to register (Required) * * @param array $params Associative array of parameters * @return array * @see https://www.elastic.co/guide/en/elasticsearch/reference/current - * - * @note This API is EXPERIMENTAL and may be changed or removed completely in a future release - * */ public function putNode(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/SlmNamespace.php b/src/Elasticsearch/Namespaces/SlmNamespace.php index a500b8445..671b239a3 100644 --- a/src/Elasticsearch/Namespaces/SlmNamespace.php +++ b/src/Elasticsearch/Namespaces/SlmNamespace.php @@ -22,12 +22,14 @@ * Class SlmNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SlmNamespace extends AbstractNamespace { /** + * Deletes an existing snapshot lifecycle policy. + * * $params['policy_id'] = (string) The id of the snapshot lifecycle policy to remove * * @param array $params Associative array of parameters @@ -46,6 +48,8 @@ public function deleteLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. + * * $params['policy_id'] = (string) The id of the snapshot lifecycle policy to be executed * * @param array $params Associative array of parameters @@ -64,6 +68,8 @@ public function executeLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes any snapshots that are expired according to the policy's retention rules. + * * * @param array $params Associative array of parameters * @return array @@ -79,6 +85,8 @@ public function executeRetention(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. + * * $params['policy_id'] = (list) Comma-separated list of snapshot lifecycle policies to retrieve * * @param array $params Associative array of parameters @@ -97,6 +105,8 @@ public function getLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Returns global and policy-level statistics about actions taken by snapshot lifecycle management. + * * * @param array $params Associative array of parameters * @return array @@ -112,6 +122,8 @@ public function getStats(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the status of snapshot lifecycle management (SLM). + * * * @param array $params Associative array of parameters * @return array @@ -127,6 +139,8 @@ public function getStatus(array $params = []) return $this->performRequest($endpoint); } /** + * Creates or updates a snapshot lifecycle policy. + * * $params['policy_id'] = (string) The id of the snapshot lifecycle policy * $params['body'] = (array) The snapshot lifecycle policy definition to register * @@ -148,6 +162,8 @@ public function putLifecycle(array $params = []) return $this->performRequest($endpoint); } /** + * Turns on snapshot lifecycle management (SLM). + * * * @param array $params Associative array of parameters * @return array @@ -163,6 +179,8 @@ public function start(array $params = []) return $this->performRequest($endpoint); } /** + * Turns off snapshot lifecycle management (SLM). + * * * @param array $params Associative array of parameters * @return array diff --git a/src/Elasticsearch/Namespaces/SnapshotNamespace.php b/src/Elasticsearch/Namespaces/SnapshotNamespace.php index 50ca489b2..8e95ee94f 100644 --- a/src/Elasticsearch/Namespaces/SnapshotNamespace.php +++ b/src/Elasticsearch/Namespaces/SnapshotNamespace.php @@ -22,12 +22,14 @@ * Class SnapshotNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SnapshotNamespace extends AbstractNamespace { /** + * Removes stale data from repository. + * * $params['repository'] = (string) A repository name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -48,6 +50,8 @@ public function cleanupRepository(array $params = []) return $this->performRequest($endpoint); } /** + * Clones indices from one snapshot into another snapshot in the same repository. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (string) The name of the snapshot to clone from * $params['target_snapshot'] = (string) The name of the cloned snapshot to create @@ -76,6 +80,8 @@ public function clone(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a snapshot in a repository. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (string) A snapshot name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -102,6 +108,8 @@ public function create(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a repository. + * * $params['repository'] = (string) A repository name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -126,6 +134,8 @@ public function createRepository(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a snapshot. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (string) A snapshot name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -148,6 +158,8 @@ public function delete(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes a repository. + * * $params['repository'] = (list) Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout @@ -168,10 +180,14 @@ public function deleteRepository(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about a snapshot. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (list) A comma-separated list of snapshot names * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['ignore_unavailable'] = (boolean) Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * $params['index_details'] = (boolean) Whether to include details of each index in the snapshot, if those details are available. Defaults to false. + * $params['include_repository'] = (boolean) Whether to include the repository name in the snapshot info. Defaults to true. * $params['verbose'] = (boolean) Whether to show verbose snapshot info or only show the basic info found in the repository index blob * * @param array $params Associative array of parameters @@ -192,6 +208,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about a repository. + * * $params['repository'] = (list) A comma-separated list of repository names * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false) @@ -212,6 +230,39 @@ public function getRepository(array $params = []) return $this->performRequest($endpoint); } /** + * Analyzes a repository for correctness and performance + * + * $params['repository'] = (string) A repository name + * $params['blob_count'] = (number) Number of blobs to create during the test. Defaults to 100. + * $params['concurrency'] = (number) Number of operations to run concurrently during the test. Defaults to 10. + * $params['read_node_count'] = (number) Number of nodes on which to read a blob after writing. Defaults to 10. + * $params['early_read_node_count'] = (number) Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. + * $params['seed'] = (number) Seed for the random number generator used to create the test workload. Defaults to a random value. + * $params['rare_action_probability'] = (number) Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. + * $params['max_blob_size'] = (string) Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. + * $params['max_total_data_size'] = (string) Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. + * $params['timeout'] = (time) Explicit operation timeout. Defaults to '30s'. + * $params['detailed'] = (boolean) Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. + * $params['rarely_abort_writes'] = (boolean) Whether to rarely abort writes before they complete. Defaults to 'true'. + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html + */ + public function repositoryAnalyze(array $params = []) + { + $repository = $this->extractArgument($params, 'repository'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Snapshot\RepositoryAnalyze'); + $endpoint->setParams($params); + $endpoint->setRepository($repository); + + return $this->performRequest($endpoint); + } + /** + * Restores a snapshot. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (string) A snapshot name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -238,6 +289,8 @@ public function restore(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about the status of a snapshot. + * * $params['repository'] = (string) A repository name * $params['snapshot'] = (list) A comma-separated list of snapshot names * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node @@ -261,6 +314,8 @@ public function status(array $params = []) return $this->performRequest($endpoint); } /** + * Verifies a repository. + * * $params['repository'] = (string) A repository name * $params['master_timeout'] = (time) Explicit operation timeout for connection to master node * $params['timeout'] = (time) Explicit operation timeout diff --git a/src/Elasticsearch/Namespaces/SqlNamespace.php b/src/Elasticsearch/Namespaces/SqlNamespace.php index 4c817cd93..848d38e31 100644 --- a/src/Elasticsearch/Namespaces/SqlNamespace.php +++ b/src/Elasticsearch/Namespaces/SqlNamespace.php @@ -22,11 +22,20 @@ * Class SqlNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SqlNamespace extends AbstractNamespace { + /** + * Clears the SQL cursor + * + * $params['body'] = (array) Specify the cursor value in the `cursor` element to clean the cursor. (Required) + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/clear-sql-cursor-api.html + */ public function clearCursor(array $params = []) { $body = $this->extractArgument($params, 'body'); @@ -39,12 +48,78 @@ public function clearCursor(array $params = []) return $this->performRequest($endpoint); } /** + * Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. + * + * $params['id'] = (string) The async search ID + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-async-sql-search-api.html + */ + public function deleteAsync(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\DeleteAsync'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * Returns the current status and available results for an async SQL search or stored synchronous SQL search + * + * $params['id'] = (string) The async search ID + * $params['delimiter'] = (string) Separator for CSV results (Default = ,) + * $params['format'] = (string) Short version of the Accept header, e.g. json, yaml + * $params['keep_alive'] = (time) Retention period for the search and its results (Default = 5d) + * $params['wait_for_completion_timeout'] = (time) Duration to wait for complete results + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-api.html + */ + public function getAsync(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\GetAsync'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * Returns the current status of an async SQL search or a stored synchronous SQL search + * + * $params['id'] = (string) The async search ID + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-async-sql-search-status-api.html + */ + public function getAsyncStatus(array $params = []) + { + $id = $this->extractArgument($params, 'id'); + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Sql\GetAsyncStatus'); + $endpoint->setParams($params); + $endpoint->setId($id); + + return $this->performRequest($endpoint); + } + /** + * Executes a SQL request + * * $params['format'] = (string) a short version of the Accept header, e.g. json, yaml * $params['body'] = (array) Use the `query` element to start a query. Use the `cursor` element to continue a query. (Required) * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest-overview.html + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-search-api.html */ public function query(array $params = []) { @@ -58,11 +133,13 @@ public function query(array $params = []) return $this->performRequest($endpoint); } /** + * Translates SQL into Elasticsearch queries + * * $params['body'] = (array) Specify the query in the `query` element. (Required) * * @param array $params Associative array of parameters * @return array - * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate-api.html */ public function translate(array $params = []) { diff --git a/src/Elasticsearch/Namespaces/SslNamespace.php b/src/Elasticsearch/Namespaces/SslNamespace.php index ceae33e0a..dac3b4db2 100644 --- a/src/Elasticsearch/Namespaces/SslNamespace.php +++ b/src/Elasticsearch/Namespaces/SslNamespace.php @@ -22,12 +22,14 @@ * Class SslNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class SslNamespace extends AbstractNamespace { /** + * Retrieves information about the X.509 certificates used to encrypt communications in the cluster. + * * * @param array $params Associative array of parameters * @return array diff --git a/src/Elasticsearch/Namespaces/TasksNamespace.php b/src/Elasticsearch/Namespaces/TasksNamespace.php index d2e26435b..127e19b42 100644 --- a/src/Elasticsearch/Namespaces/TasksNamespace.php +++ b/src/Elasticsearch/Namespaces/TasksNamespace.php @@ -22,12 +22,14 @@ * Class TasksNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class TasksNamespace extends AbstractNamespace { /** + * Cancels a task, if it can be cancelled through an API. + * * $params['task_id'] = (string) Cancel the task with specified task id (node_id:task_number) * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all. @@ -53,6 +55,8 @@ public function cancel(array $params = []) return $this->performRequest($endpoint); } /** + * Returns information about a task. + * * $params['task_id'] = (string) Return the task with specified id (node_id:task_number) * $params['wait_for_completion'] = (boolean) Wait for the matching tasks to complete (default: false) * $params['timeout'] = (time) Explicit operation timeout @@ -76,6 +80,8 @@ public function get(array $params = []) return $this->performRequest($endpoint); } /** + * Returns a list of tasks. + * * $params['nodes'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes * $params['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all. * $params['detailed'] = (boolean) Return detailed task information (default: false) diff --git a/src/Elasticsearch/Namespaces/TextStructureNamespace.php b/src/Elasticsearch/Namespaces/TextStructureNamespace.php index 508ee1cb8..a7c49d431 100644 --- a/src/Elasticsearch/Namespaces/TextStructureNamespace.php +++ b/src/Elasticsearch/Namespaces/TextStructureNamespace.php @@ -22,12 +22,14 @@ * Class TextStructureNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class TextStructureNamespace extends AbstractNamespace { /** + * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. + * * $params['lines_to_sample'] = (int) How many lines of the file should be included in the analysis (Default = 1000) * $params['line_merge_size_limit'] = (int) Maximum number of characters permitted in a single message when lines are merged to create messages. (Default = 10000) * $params['timeout'] = (time) Timeout after which the analysis will be aborted (Default = 25s) diff --git a/src/Elasticsearch/Namespaces/TransformNamespace.php b/src/Elasticsearch/Namespaces/TransformNamespace.php index e9f5d6709..d92e971c3 100644 --- a/src/Elasticsearch/Namespaces/TransformNamespace.php +++ b/src/Elasticsearch/Namespaces/TransformNamespace.php @@ -22,14 +22,17 @@ * Class TransformNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class TransformNamespace extends AbstractNamespace { /** + * Deletes an existing transform. + * * $params['transform_id'] = (string) The id of the transform to delete * $params['force'] = (boolean) When `true`, the transform is deleted regardless of its current state. The default value is `false`, meaning that the transform must be `stopped` before it can be deleted. + * $params['timeout'] = (time) Controls the time to wait for the transform deletion * * @param array $params Associative array of parameters * @return array @@ -47,6 +50,8 @@ public function deleteTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves configuration information for transforms. + * * $params['transform_id'] = (string) The id or comma delimited list of id expressions of the transforms to get, '_all' or '*' implies get all transforms * $params['from'] = (int) skips a number of transform configs, defaults to 0 * $params['size'] = (int) specifies a max number of transforms to get, defaults to 100 @@ -69,6 +74,8 @@ public function getTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information for transforms. + * * $params['transform_id'] = (string) The id of the transform for which to get stats. '_all' or '*' implies all transforms * $params['from'] = (number) skips a number of transform stats, defaults to 0 * $params['size'] = (number) specifies a max number of transform stats to get, defaults to 100 @@ -89,20 +96,36 @@ public function getTransformStats(array $params = []) return $this->performRequest($endpoint); } + /** + * Previews a transform. + * + * $params['transform_id'] = (string) The id of the transform to preview. + * $params['timeout'] = (time) Controls the time to wait for the preview + * $params['body'] = (array) The definition for the transform to preview + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/preview-transform.html + */ public function previewTransform(array $params = []) { + $transform_id = $this->extractArgument($params, 'transform_id'); $body = $this->extractArgument($params, 'body'); $endpointBuilder = $this->endpoints; $endpoint = $endpointBuilder('Transform\PreviewTransform'); $endpoint->setParams($params); + $endpoint->setTransformId($transform_id); $endpoint->setBody($body); return $this->performRequest($endpoint); } /** + * Instantiates a transform. + * * $params['transform_id'] = (string) The id of the new transform. * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false. + * $params['timeout'] = (time) Controls the time to wait for the transform to start * $params['body'] = (array) The transform definition (Required) * * @param array $params Associative array of parameters @@ -123,6 +146,8 @@ public function putTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Starts one or more transforms. + * * $params['transform_id'] = (string) The id of the transform to start * $params['timeout'] = (time) Controls the time to wait for the transform to start * @@ -142,6 +167,8 @@ public function startTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Stops one or more transforms. + * * $params['transform_id'] = (string) The id of the transform to stop * $params['force'] = (boolean) Whether to force stop a failed transform or not. Default to false * $params['wait_for_completion'] = (boolean) Whether to wait for the transform to fully stop before returning or not. Default to false @@ -165,8 +192,11 @@ public function stopTransform(array $params = []) return $this->performRequest($endpoint); } /** + * Updates certain properties of a transform. + * * $params['transform_id'] = (string) The id of the transform. * $params['defer_validation'] = (boolean) If validations should be deferred until transform starts, defaults to false. + * $params['timeout'] = (time) Controls the time to wait for the update * $params['body'] = (array) The update transform definition (Required) * * @param array $params Associative array of parameters @@ -184,6 +214,25 @@ public function updateTransform(array $params = []) $endpoint->setTransformId($transform_id); $endpoint->setBody($body); + return $this->performRequest($endpoint); + } + /** + * Upgrades all transforms. + * + * $params['dry_run'] = (boolean) Whether to only check for updates but don't execute + * $params['timeout'] = (time) Controls the time to wait for the upgrade + * + * @param array $params Associative array of parameters + * @return array + * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/upgrade-transforms.html + */ + public function upgradeTransforms(array $params = []) + { + + $endpointBuilder = $this->endpoints; + $endpoint = $endpointBuilder('Transform\UpgradeTransforms'); + $endpoint->setParams($params); + return $this->performRequest($endpoint); } } diff --git a/src/Elasticsearch/Namespaces/WatcherNamespace.php b/src/Elasticsearch/Namespaces/WatcherNamespace.php index e7220d5f4..3cc2398bb 100644 --- a/src/Elasticsearch/Namespaces/WatcherNamespace.php +++ b/src/Elasticsearch/Namespaces/WatcherNamespace.php @@ -22,12 +22,14 @@ * Class WatcherNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class WatcherNamespace extends AbstractNamespace { /** + * Acknowledges a watch, manually throttling the execution of the watch's actions. + * * $params['watch_id'] = (string) Watch ID (Required) * $params['action_id'] = (list) A comma-separated list of the action ids to be acked * @@ -49,6 +51,8 @@ public function ackWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Activates a currently inactive watch. + * * $params['watch_id'] = (string) Watch ID * * @param array $params Associative array of parameters @@ -67,6 +71,8 @@ public function activateWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Deactivates a currently active watch. + * * $params['watch_id'] = (string) Watch ID * * @param array $params Associative array of parameters @@ -85,6 +91,8 @@ public function deactivateWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Removes a watch from Watcher. + * * $params['id'] = (string) Watch ID * * @param array $params Associative array of parameters @@ -103,6 +111,8 @@ public function deleteWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Forces the execution of a stored watch. + * * $params['id'] = (string) Watch ID * $params['debug'] = (boolean) indicates whether the watch should execute in debug mode * $params['body'] = (array) Execution control @@ -125,6 +135,8 @@ public function executeWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves a watch by its ID. + * * $params['id'] = (string) Watch ID * * @param array $params Associative array of parameters @@ -143,6 +155,8 @@ public function getWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Creates a new watch, or updates an existing one. + * * $params['id'] = (string) Watch ID * $params['active'] = (boolean) Specify whether the watch is in/active by default * $params['version'] = (number) Explicit version number for concurrency control @@ -168,6 +182,8 @@ public function putWatch(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves stored watches. + * * $params['body'] = (array) From, size, query, sort and search_after * * @param array $params Associative array of parameters @@ -186,6 +202,8 @@ public function queryWatches(array $params = []) return $this->performRequest($endpoint); } /** + * Starts Watcher if it is not already running. + * * * @param array $params Associative array of parameters * @return array @@ -201,6 +219,8 @@ public function start(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves the current Watcher metrics. + * * $params['metric'] = (list) Controls what additional stat metrics should be include in the response * $params['emit_stacktraces'] = (boolean) Emits stack traces of currently running watches * @@ -220,6 +240,8 @@ public function stats(array $params = []) return $this->performRequest($endpoint); } /** + * Stops Watcher if it is running. + * * * @param array $params Associative array of parameters * @return array diff --git a/src/Elasticsearch/Namespaces/XpackNamespace.php b/src/Elasticsearch/Namespaces/XpackNamespace.php index d7b5ff24a..c2a8b097b 100644 --- a/src/Elasticsearch/Namespaces/XpackNamespace.php +++ b/src/Elasticsearch/Namespaces/XpackNamespace.php @@ -22,12 +22,14 @@ * Class XpackNamespace * * NOTE: this file is autogenerated using util/GenerateEndpoints.php - * and Elasticsearch 7.13.0-SNAPSHOT (ebb67a590736f79b58d59f9d8ccbcc4b5068c88d) + * and Elasticsearch 7.17.0 (bee86328705acaa9a6daede7140defd4d9ec56bd) */ class XpackNamespace extends AbstractNamespace { /** + * Retrieves information about the installed X-Pack features. + * * $params['categories'] = (list) Comma-separated list of info categories. Can be any of: build, license, features * $params['accept_enterprise'] = (boolean) If an enterprise license is installed, return the type and mode as 'enterprise' (default: false) * @@ -45,6 +47,8 @@ public function info(array $params = []) return $this->performRequest($endpoint); } /** + * Retrieves usage information about the installed X-Pack features. + * * $params['master_timeout'] = (time) Specify timeout for watch write operation * * @param array $params Associative array of parameters diff --git a/src/Elasticsearch/Serializers/SmartSerializer.php b/src/Elasticsearch/Serializers/SmartSerializer.php index dac88dee3..f9750b0a4 100644 --- a/src/Elasticsearch/Serializers/SmartSerializer.php +++ b/src/Elasticsearch/Serializers/SmartSerializer.php @@ -20,6 +20,7 @@ use Elasticsearch\Common\Exceptions; use Elasticsearch\Common\Exceptions\Serializer\JsonErrorException; +use JsonException; if (!defined('JSON_INVALID_UTF8_SUBSTITUTE')) { //PHP < 7.2 Define it as 0 so it does nothing @@ -84,9 +85,18 @@ private function decode(?string $data): array try { $result = json_decode($data, true, 512, JSON_THROW_ON_ERROR); return $result; - } catch (\JsonException $e) { - $result = $result ?? []; - throw new JsonErrorException($e->getCode(), $data, $result); + } catch (JsonException $e) { + switch ($e->getCode()) { + case JSON_ERROR_UTF16: + try { + $data = str_replace('\\', '\\\\', $data); + $result = json_decode($data, true, 512, JSON_THROW_ON_ERROR); + return $result; + } catch (JsonException $e) { + throw new JsonErrorException($e->getCode(), $data, []); + } + } + throw new JsonErrorException($e->getCode(), $data, []); } } diff --git a/src/Elasticsearch/Utility.php b/src/Elasticsearch/Utility.php new file mode 100644 index 000000000..da836b7c4 --- /dev/null +++ b/src/Elasticsearch/Utility.php @@ -0,0 +1,48 @@ +log(LogLevel::EMERGENCY, $message, $context); - } - - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = array()): void { $this->output[] = sprintf("%s: %s %s", $level, $message, json_encode($context)); } diff --git a/tests/Elasticsearch/Tests/ClientBuilderTest.php b/tests/Elasticsearch/Tests/ClientBuilderTest.php index f6f7a62be..c44dadc8c 100644 --- a/tests/Elasticsearch/Tests/ClientBuilderTest.php +++ b/tests/Elasticsearch/Tests/ClientBuilderTest.php @@ -18,11 +18,16 @@ namespace Elasticsearch\Tests; +use CurlHandle; use Elasticsearch\Client; use Elasticsearch\ClientBuilder; use Elasticsearch\Common\Exceptions\ElasticsearchException; use Elasticsearch\Common\Exceptions\RuntimeException; +use Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector; +use Elasticsearch\ConnectionPool\StaticNoPingConnectionPool; use Elasticsearch\Tests\ClientBuilder\DummyLogger; +use GuzzleHttp\Ring\Client\CurlHandler; +use GuzzleHttp\Ring\Client\MockHandler; use PHPUnit\Framework\TestCase; class ClientBuilderTest extends TestCase @@ -216,6 +221,9 @@ public function testFromConfig(array $params) $this->assertInstanceOf(Client::class, $client); } + /** + * @doesNotPerformAssertions + */ public function testFromConfigQuiteTrueWithUnknownKey() { $client = ClientBuilder::fromConfig( @@ -296,4 +304,113 @@ public function testElasticClientMetaHeaderIsNotSentWhenDisabled() $this->assertFalse(isset($request['request']['headers']['x-elastic-client-meta'])); } } + + public function getCompatibilityHeaders() + { + return [ + ['true', true], + ['1', true], + ['false', false], + ['0', false] + ]; + } + + /** + * @dataProvider getCompatibilityHeaders + */ + public function testCompatibilityHeader($env, $compatibility) + { + putenv("ELASTIC_CLIENT_APIVERSIONING=$env"); + + $client = ClientBuilder::create() + ->build(); + + try { + $result = $client->info(); + } catch (ElasticsearchException $e) { + $request = $client->transport->getLastConnection()->getLastRequestInfo(); + if ($compatibility) { + $this->assertContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']); + $this->assertContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']); + } else { + $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']); + $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']); + } + } + } + + public function testCompatibilityHeaderDefaultIsOff() + { + $client = ClientBuilder::create() + ->build(); + + try { + $result = $client->info(); + } catch (ElasticsearchException $e) { + $request = $client->transport->getLastConnection()->getLastRequestInfo(); + $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Content-Type']); + $this->assertNotContains('application/vnd.elasticsearch+json;compatible-with=7', $request['request']['headers']['Accept']); + } + } + + /** + * @see https://github.com/elastic/elasticsearch-php/issues/1176 + */ + public function testFromConfigWithIncludePortInHostHeader() + { + $url = 'localhost:1234'; + $config = [ + 'hosts' => [$url], + 'includePortInHostHeader' => true, + 'connectionParams' => [ + 'client' => [ + 'verbose' => true + ] + ], + ]; + + $client = ClientBuilder::fromConfig($config); + + $this->assertInstanceOf(Client::class, $client); + + try { + $result = $client->info(); + } catch (ElasticsearchException $e) { + $request = $client->transport->getLastConnection()->getLastRequestInfo(); + $this->assertTrue(isset($request['request']['headers']['Host'][0])); + $this->assertEquals($url, $request['request']['headers']['Host'][0]); + } + } + + /** + * @see https://github.com/elastic/elasticsearch-php/issues/1242 + */ + public function testRandomizedHostsDisableWithStickRoundRobinSelectorSelectFirstNode() + { + $hosts = ['one', 'two', 'three']; + $data = '{"foo":"bar}'; + + $handler = new MockHandler([ + 'status' => 200, + 'transfer_stats' => [ + 'total_time' => 100 + ], + 'body' => fopen('data:text/plain,'.urlencode($data), 'rb'), + 'effective_url' => 'one' + ]); + + $client = ClientBuilder::create() + ->setHosts($hosts) + ->setHandler($handler) + ->setSelector(StickyRoundRobinSelector::class) + ->setConnectionPool(StaticNoPingConnectionPool::class, ['randomizeHosts' => false]) + ->build(); + + try { + $result = $client->info(); + } catch (ElasticsearchException $e) { + $request = $client->transport->getLastConnection()->getLastRequestInfo(); + $this->assertEquals('one', $request['request']['headers']['Host'][0]); + } + } } diff --git a/tests/Elasticsearch/Tests/ClientIntegrationTest.php b/tests/Elasticsearch/Tests/ClientIntegrationTest.php index 1b66c3019..01b38292b 100644 --- a/tests/Elasticsearch/Tests/ClientIntegrationTest.php +++ b/tests/Elasticsearch/Tests/ClientIntegrationTest.php @@ -59,8 +59,11 @@ private function getClient(): Client ->setHosts([$this->host]) ->setLogger($this->logger); - if (getenv('TEST_SUITE') === 'platinum') { - $client->setSSLVerification(__DIR__ . '/../../../.ci/certs/ca.crt'); + $testSuite = $_SERVER['TEST_SUITE'] + ?? $_ENV['TEST_SUITE'] + ?? getenv('TEST_SUITE'); + if ($testSuite === 'platinum') { + $client->setSSLVerification(false); } return $client->build(); } @@ -153,6 +156,98 @@ public function testIndexCannotBeArrayOfNullsForDelete() ); } + /** + * @see https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/api/search_mvt.json + */ + public function testSupportMapBoxVectorTiles() + { + $client = $this->getClient(); + + if (Utility::getVersion($client) < '7.15') { + $this->markTestSkipped(sprintf( + "The %s test requires Elasticsearch 7.15+", + __FUNCTION__ + )); + } + + // Create a museums index with a custom mappings + $client->indices()->create([ + 'index' => 'museums', + 'body' => [ + "mappings" => [ + "properties" => [ + "location" => ["type" => "geo_point"], + "name" => ["type" => "keyword"], + "price" => ["type" => "long"], + "included" => ["type" => "boolean"] + ] + ] + ] + ]); + + // Bulk some documents + $body = [ + [ "index" => [ "_id" => "1" ]], + [ "location" => "52.374081,4.912350", "name" => "NEMO Science Museum", "price" => 1750, "included" => true ], + [ "index" => [ "_id" => "2" ]], + [ "location" => "52.369219,4.901618", "name" => "Museum Het Rembrandthuis", "price" => 1500, "included" => false ], + [ "index" => [ "_id" => "3" ]], + [ "location" => "52.371667,4.914722", "name" => "Nederlands Scheepvaartmuseum", "price" => 1650, "included" => true ], + [ "index" => [ "_id" => "4" ]], + [ "location" => "52.371667,4.914722", "name" => "Amsterdam Centre for Architecture", "price" => 0, "included" => true ] + ]; + $client->bulk([ + 'index' => 'museums', + 'refresh' => true, + 'body' => $body + ]); + + $body = [ + "grid_precision" => 2, + "fields" => ["name", "price"], + "query" => [ + "term" => [ + "included" => true + ] + ], + "aggs" => [ + "min_price" => [ + "min" => [ + "field" => "price" + ] + ], + "max_price" => [ + "max" => [ + "field" => "price" + ] + ], + "avg_price" => [ + "avg" => [ + "field" => "price" + ] + ] + ] + ]; + + // Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. + $response = $client->searchMvt([ + 'index' => 'museums', + 'field' => 'location', + 'zoom' => 13, + 'x' => 4207, + 'y' => 2692, + 'body' => $body + ]); + + // Remove the index museums + $client->indices()->delete([ + 'index' => 'museums' + ]); + + $this->assertIsString($response); + $this->assertStringContainsString('NEMO Science Museum', $response); + } + private function getLevelOutput(string $level, array $output): string { foreach ($output as $out) { diff --git a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php index e6e58f2ea..d93f3b84b 100644 --- a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php +++ b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/RoundRobinSelectorTest.php @@ -22,7 +22,7 @@ use Elasticsearch\Connections\ConnectionInterface; /** - * Class SnifferTest + * Class RoundRobinSelectorTest * * @subpackage Tests\ConnectionPool\RoundRobinSelectorTest */ diff --git a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php index d2c7cc952..edb3ad4b6 100644 --- a/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php +++ b/tests/Elasticsearch/Tests/ConnectionPool/Selectors/StickyRoundRobinSelectorTest.php @@ -29,6 +29,16 @@ */ class StickyRoundRobinSelectorTest extends \PHPUnit\Framework\TestCase { + /** + * @var Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector + */ + protected $roundRobin; + + public function setUp(): void + { + $this->roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector(); + } + public function tearDown(): void { m::close(); @@ -36,8 +46,6 @@ public function tearDown(): void public function testTenConnections() { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector(); - $mockConnections = []; $mockConnections[] = m::mock(ConnectionInterface::class) ->shouldReceive('isAlive')->times(16)->andReturn(true)->getMock(); @@ -47,7 +55,7 @@ public function testTenConnections() } foreach (range(0, 15) as $index) { - $retConnection = $roundRobin->select($mockConnections); + $retConnection = $this->roundRobin->select($mockConnections); $this->assertSame($mockConnections[0], $retConnection); } @@ -55,8 +63,6 @@ public function testTenConnections() public function testTenConnectionsFirstDies() { - $roundRobin = new Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector(); - $mockConnections = []; $mockConnections[] = m::mock(ConnectionInterface::class) ->shouldReceive('isAlive')->once()->andReturn(false)->getMock(); @@ -69,7 +75,7 @@ public function testTenConnectionsFirstDies() } foreach (range(0, 15) as $index) { - $retConnection = $roundRobin->select($mockConnections); + $retConnection = $this->roundRobin->select($mockConnections); $this->assertSame($mockConnections[1], $retConnection); } diff --git a/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php b/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php index 78980bead..0bff8e156 100644 --- a/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php +++ b/tests/Elasticsearch/Tests/Helper/Iterators/SearchHitIteratorTest.php @@ -64,7 +64,10 @@ public function testWithHits() [ 'foo' => 'bar1' ], [ 'foo' => 'bar2' ] ], - 'total' => 3 + 'total' => [ + 'value' => 3, + 'relation' => 'eq' + ] ] ], [ @@ -74,7 +77,10 @@ public function testWithHits() [ 'foo' => 'bar1' ], [ 'foo' => 'bar2' ] ], - 'total' => 3 + 'total' => [ + 'value' => 3, + 'relation' => 'eq' + ] ] ], [ @@ -84,7 +90,10 @@ public function testWithHits() [ 'foo' => 'bar1' ], [ 'foo' => 'bar2' ] ], - 'total' => 3 + 'total' => [ + 'value' => 3, + 'relation' => 'eq' + ] ] ], [ @@ -94,7 +103,10 @@ public function testWithHits() [ 'foo' => 'bar1' ], [ 'foo' => 'bar2' ] ], - 'total' => 3 + 'total' => [ + 'value' => 3, + 'relation' => 'eq' + ] ] ], [ @@ -103,7 +115,10 @@ public function testWithHits() [ 'foo' => 'bar3' ], [ 'foo' => 'bar4' ] ], - 'total' => 2 + 'total' => [ + 'value' => 2, + 'relation' => 'eq' + ] ] ], [ @@ -112,7 +127,10 @@ public function testWithHits() [ 'foo' => 'bar3' ], [ 'foo' => 'bar4' ] ], - 'total' => 2 + 'total' => [ + 'value' => 2, + 'relation' => 'eq' + ] ] ] ); diff --git a/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php b/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php index 07a56f559..1b706dad4 100644 --- a/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php +++ b/tests/Elasticsearch/Tests/Helper/Iterators/SearchResponseIteratorTest.php @@ -100,8 +100,10 @@ public function testWithHits() ->ordered() ->with( [ - 'scroll_id' => 'scroll_id_01', - 'scroll' => '5m' + 'body' => [ + 'scroll_id' => 'scroll_id_01', + 'scroll' => '5m' + ] ] ) ->andReturn( @@ -122,8 +124,10 @@ public function testWithHits() ->ordered() ->with( [ - 'scroll_id' => 'scroll_id_02', - 'scroll' => '5m' + 'body' => [ + 'scroll_id' => 'scroll_id_02', + 'scroll' => '5m' + ] ] ) ->andReturn( @@ -144,8 +148,10 @@ public function testWithHits() ->ordered() ->with( [ - 'scroll_id' => 'scroll_id_03', - 'scroll' => '5m' + 'body' => [ + 'scroll_id' => 'scroll_id_03', + 'scroll' => '5m' + ] ] ) ->andReturn( @@ -161,8 +167,10 @@ public function testWithHits() ->never() ->with( [ - 'scroll_id' => 'scroll_id_04', - 'scroll' => '5m' + 'body' => [ + 'scroll_id' => 'scroll_id_04', + 'scroll' => '5m' + ] ] ); diff --git a/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php b/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php index 7ad77e794..2592a3ad9 100644 --- a/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php +++ b/tests/Elasticsearch/Tests/Serializers/SmartSerializerTest.php @@ -20,7 +20,6 @@ use Elasticsearch\Common\Exceptions\Serializer\JsonErrorException; use Elasticsearch\Serializers\SmartSerializer; -use Mockery as m; use PHPUnit\Framework\TestCase; /** @@ -29,6 +28,11 @@ */ class SmartSerializerTest extends TestCase { + /** + * @var SmartSerializer + */ + protected $serializer; + public function setUp(): void { $this->serializer = new SmartSerializer(); @@ -45,4 +49,18 @@ public function testThrowJsonErrorException() $result = $this->serializer->deserialize('{ "foo" : bar" }', []); } + + /** + * Single unpaired UTF-16 surrogate in unicode escape + * + * @requires PHP 7.3 + * @see https://github.com/elastic/elasticsearch-php/issues/1171 + */ + public function testSingleUnpairedUTF16SurrogateInUnicodeEscape() + { + $json = '{ "data": "ud83d\ude4f" }'; + + $result = $this->serializer->deserialize($json, []); + $this->assertEquals($result['data'], 'ud83d\ude4f'); + } } diff --git a/tests/Elasticsearch/Tests/TransportTest.php b/tests/Elasticsearch/Tests/TransportTest.php index 7d8f4a59f..56a5b528b 100644 --- a/tests/Elasticsearch/Tests/TransportTest.php +++ b/tests/Elasticsearch/Tests/TransportTest.php @@ -32,6 +32,27 @@ class TransportTest extends TestCase { + /** + * @var LoggerInterface + */ + protected $logger; + /** + * @var LoggerInterface + */ + protected $trace; + /** + * @var SerializerInterface + */ + protected $serializer; + /** + * @var AbstractConnectionPool + */ + protected $connectionPool; + /** + * @var Connection + */ + protected $connection; + public function setUp(): void { $this->logger = $this->createMock(LoggerInterface::class); diff --git a/tests/Elasticsearch/Tests/Utility.php b/tests/Elasticsearch/Tests/Utility.php index 65489b030..9321f87d4 100644 --- a/tests/Elasticsearch/Tests/Utility.php +++ b/tests/Elasticsearch/Tests/Utility.php @@ -30,22 +30,43 @@ class Utility */ private static $version; + /** + * @var bool + */ + private static $hasXPack = false; + + /** + * @var bool + */ + private static $hasIlm = false; + + /** + * @var bool + */ + private static $hasRollups = false; + + /** + * @var bool + */ + private static $hasCcr = false; + + /** + * @var bool + */ + private static $hasShutdown = false; + /** * Get the host URL based on ENV variables */ public static function getHost(): ?string { - $url = getenv('ELASTICSEARCH_URL'); + $url = $_SERVER['ELASTICSEARCH_URL'] + ?? $_ENV['ELASTICSEARCH_URL'] + ?? getenv('ELASTICSEARCH_URL'); if (false !== $url) { return $url; } - switch (getenv('TEST_SUITE')) { - case 'free': - return 'http://localhost:9200'; - case 'platinum': - return 'https://elastic:changeme@localhost:9200'; - } - return null; + return 'https://elastic:changeme@localhost:9200'; } /** @@ -62,9 +83,7 @@ public static function getClient(): Client ] ] ]); - if (getenv('TEST_SUITE') === 'platinum') { - $clientBuilder->setSSLVerification(false); - } + $clientBuilder->setSSLVerification(false); return $clientBuilder->build(); } @@ -95,7 +114,7 @@ public static function removeYamlXPackUsers(Client $client): void ]); } - private static function getVersion(Client $client): string + public static function getVersion(Client $client): string { if (!isset(self::$version)) { $result = $client->info(); @@ -104,6 +123,36 @@ private static function getVersion(Client $client): string return self::$version; } + /** + * Read the plugins installed in Elasticsearch using the + * undocumented API GET /_nodes/plugins + * + * @see ESRestTestCase.java:initClient() + */ + private static function readPlugins(Client $client): void + { + $result = $client->transport->performRequest('GET', '/_nodes/plugins'); + foreach ($result['nodes'] as $node) { + foreach ($node['modules'] as $module) { + if (substr($module['name'], 0, 6) === 'x-pack') { + self::$hasXPack = true; + } + if ($module['name'] === 'x-pack-ilm') { + self::$hasIlm = true; + } + if ($module['name'] === 'x-pack-rollup') { + self::$hasRollups = true; + } + if ($module['name'] === 'x-pack-ccr') { + self::$hasCcr = true; + } + if ($module['name'] === 'x-pack-shutdown') { + self::$hasShutdown = true; + } + } + } + } + /** * Clean up the cluster after a test * @@ -111,8 +160,28 @@ private static function getVersion(Client $client): string */ public static function cleanUpCluster(Client $client): void { + self::readPlugins($client); + + self::ensureNoInitializingShards($client); self::wipeCluster($client); self::waitForClusterStateUpdatesToFinish($client); + self::checkForUnexpectedlyRecreatedObjects($client); + } + + /** + * Waits until all shard initialization is completed. + * This is a handy alternative to ensureGreen as it relates to all shards + * in the cluster and doesn't require to know how many nodes/replica there are. + * + * @see ESRestTestCase.java:ensureNoInitializingShards() + */ + private static function ensureNoInitializingShards(Client $client): void + { + $client->cluster()->health([ + 'wait_for_no_initializing_shards' => true, + 'timeout' => '70s', + 'level' => 'shards' + ]); } /** @@ -122,47 +191,65 @@ public static function cleanUpCluster(Client $client): void */ private static function wipeCluster(Client $client): void { - if (getenv('TEST_SUITE') === 'platinum') { + if (self::$hasXPack) { self::wipeRollupJobs($client); self::waitForPendingRollupTasks($client); } - if (version_compare(self::getVersion($client), '7.3.99') > 0) { self::deleteAllSLMPolicies($client); } + // Clean up searchable snapshots indices before deleting snapshots and repositories + if (self::$hasXPack && version_compare(self::getVersion($client), '7.7.99') > 0) { + self::wipeSearchableSnapshotsIndices($client); + } + self::wipeSnapshots($client); self::wipeDataStreams($client); self::wipeAllIndices($client); - if (getenv('TEST_SUITE') === 'platinum') { + if (self::$hasXPack) { self::wipeTemplateForXpack($client); } else { - // Delete templates - $client->indices()->deleteTemplate([ - 'name' => '*' - ]); - try { - // Delete index template - $client->indices()->deleteIndexTemplate([ - 'name' => '*' - ]); - // Delete component template - $client->cluster()->deleteComponentTemplate([ - 'name' => '*' - ]); - } catch (ElasticsearchException $e) { - // We hit a version of ES that doesn't support index templates v2 yet, so it's safe to ignore - } + self::wipeAllTemplates($client); } self::wipeClusterSettings($client); - if (getenv('TEST_SUITE') === 'platinum') { + if (self::$hasXPack) { self::deleteAllILMPolicies($client); + } + if (self::$hasXPack) { self::deleteAllAutoFollowPatterns($client); + } + if (self::$hasXPack) { self::deleteAllTasks($client); } + + self::deleteAllNodeShutdownMetadata($client); + } + + /** + * Remove all templates + */ + private static function wipeAllTemplates(Client $client): void + { + // Delete templates + $client->indices()->deleteTemplate([ + 'name' => '*' + ]); + try { + // Delete index template + $client->indices()->deleteIndexTemplate([ + 'name' => '*' + ]); + // Delete component template + $client->cluster()->deleteComponentTemplate([ + 'name' => '*' + ]); + } catch (ElasticsearchException $e) { + // We hit a version of ES that doesn't support index templates v2 yet, so it's safe to ignore + } } /** @@ -208,17 +295,20 @@ private static function wipeSnapshots(Client $client): void $repos = $client->snapshot()->getRepository([ 'repository' => '_all' ]); - foreach ($repos as $name => $value) { + foreach ($repos as $repository => $value) { if ($value['type'] === 'fs') { $response = $client->snapshot()->get([ - 'repository' => $name, + 'repository' => $repository, 'snapshot' => '_all', 'ignore_unavailable' => true ]); + if (isset($response['responses'])) { + $response = $response['responses'][0]; + } if (isset($response['snapshots'])) { foreach ($response['snapshots'] as $snapshot) { $client->snapshot()->delete([ - 'repository' => $name, + 'repository' => $repository, 'snapshot' => $snapshot['snapshot'], 'client' => [ 'ignore' => 404 @@ -228,7 +318,7 @@ private static function wipeSnapshots(Client $client): void } } $client->snapshot()->deleteRepository([ - 'repository' => $name, + 'repository' => $repository, 'client' => [ 'ignore' => 404 ] @@ -294,7 +384,7 @@ private static function deleteAllSLMPolicies(Client $client): void private static function wipeDataStreams(Client $client): void { try { - if (version_compare(self::getVersion($client), '7.8.99') > 0) { + if (self::$hasXPack) { $client->indices()->deleteDataStream([ 'name' => '*', 'expand_wildcards' => 'all' @@ -303,12 +393,17 @@ private static function wipeDataStreams(Client $client): void } catch (ElasticsearchException $e) { // We hit a version of ES that doesn't understand expand_wildcards, try again without it try { - $client->indices()->deleteDataStream([ - 'name' => '*' - ]); - } catch (ElasticsearchException $e) { + if (self::$hasXPack) { + $client->indices()->deleteDataStream([ + 'name' => '*' + ]); + } + } catch (Exception $e) { // We hit a version of ES that doesn't serialize DeleteDataStreamAction.Request#wildcardExpressionsOriginallySpecified // field or that doesn't support data streams so it's safe to ignore + if (!in_array($e->getCode(), ['404', '405', '500'])) { + throw $e; + } } } } @@ -330,7 +425,7 @@ private static function wipeAllIndices(Client $client): void 'expand_wildcards' => $expand ]); } catch (Exception $e) { - if ($e->getCode() != '404') { + if (!in_array($e->getCode(), ['404'])) { throw $e; } } @@ -475,15 +570,15 @@ private static function isXPackTemplate(string $name): bool if (strpos($name, '.transform-') !== false) { return true; } + if (strpos($name, '.deprecation-') !== false) { + return true; + } switch ($name) { case ".watches": - case "logstash-index-template": - case ".logstash-management": case "security_audit_log": case ".slm-history": case ".async-search": case "saml-service-provider": - case "ilm-history": case "logs": case "logs-settings": case "logs-mappings": @@ -494,12 +589,15 @@ private static function isXPackTemplate(string $name): bool case "synthetics-settings": case "synthetics-mappings": case ".snapshot-blob-cache": - case ".deprecation-indexing-template": + case "ilm-history": case "logstash-index-template": + case ".logstash-management": case "security-index-template": + case "data-streams-mappings": return true; + default: + return false; } - return false; } /** @@ -515,7 +613,15 @@ private static function preserveILMPolicyIds(): array "watch-history-ilm-policy", "ml-size-based-ilm-policy", "logs", - "metrics" + "metrics", + "synthetics", + "7-days-default", + "30-days-default", + "90-days-default", + "180-days-default", + "365-days-default", + ".fleet-actions-results-ilm-policy", + ".deprecation-indexing-ilm-policy" ]; } @@ -561,14 +667,54 @@ private static function deleteAllTasks(Client $client): void foreach ($tasks['nodes'] as $node => $value) { foreach ($value['tasks'] as $id => $data) { $client->tasks()->cancel([ - 'task_id' => $id, - 'wait_for_completion' => true + 'task_id' => $id ]); } } } } + /** + * If any nodes are registered for shutdown, removes their metadata + * + * @see https://github.com/elastic/elasticsearch/commit/cea054f7dae215475ea0499bc7060ca7ec05382f + */ + private static function deleteAllNodeShutdownMetadata(Client $client) + { + if (!self::$hasShutdown || version_compare(self::getVersion($client), '7.15.0') < 0) { + // Node shutdown APIs are only present in xpack + return; + } + $nodes = $client->shutdown()->getNode(); + foreach ($nodes['nodes'] as $node) { + $client->shutdown()->deleteNode($node['node_id']); + } + } + + /** + * Delete searchable snapshots index + * + * @see https://github.com/elastic/elasticsearch/commit/4927b6917deca6793776cf0c839eadf5ea512b4a + */ + private static function wipeSearchableSnapshotsIndices(Client $client) + { + $indices = $client->cluster()->state([ + 'metric' => 'metadata', + 'filter_path' => 'metadata.indices.*.settings.index.store.snapshot' + ]); + if (!isset($indices['metadata']['indices'])) { + return; + } + foreach ($indices['metadata']['indices'] as $index => $value) { + $client->indices()->delete([ + 'index' => $index, + 'client' => [ + 'ignore' => 404 + ] + ]); + } + } + /** * Wait for Cluster state updates to finish * @@ -582,4 +728,85 @@ private static function waitForClusterStateUpdatesToFinish(Client $client, int $ $stillWaiting = ! empty($result['tasks']); } while ($stillWaiting && time() < ($start + $timeout)); } + + /** + * Returns all the unexpected ilm policies, removing $exclusions from the list + */ + private static function getAllUnexpectedIlmPolicies(Client $client, array $exclusions): array + { + try { + $policies = $client->ilm()->getLifecycle(); + } catch (ElasticsearchException $e) { + return []; + } + foreach ($policies as $name => $value) { + if (in_array($name, $exclusions)) { + unset($policies[$name]); + } + } + return $policies; + } + + /** + * Returns all the unexpected templates + */ + private static function getAllUnexpectedTemplates(Client $client): array + { + if (!self::$hasXPack) { + return []; + } + $unexpected = []; + // In case of bwc testing, if all nodes are before 7.7.0 then no need + // to attempt to delete component and composable index templates, + // because these were introduced in 7.7.0: + if (version_compare(self::getVersion($client), '7.6.99') > 0) { + $result = $client->indices()->getIndexTemplate(); + foreach ($result['index_templates'] as $template) { + if (!self::isXPackTemplate($template['name'])) { + $unexpected[$template['name']] = true; + } + } + $result = $client->cluster()->getComponentTemplate(); + foreach ($result['component_templates'] as $template) { + if (!self::isXPackTemplate($template['name'])) { + $unexpected[$template['name']] = true; + } + } + } + $result = $client->indices()->getIndexTemplate(); + foreach ($result['index_templates'] as $template) { + if (!self::isXPackTemplate($template['name'])) { + $unexpected[$template['name']] = true; + } + } + return array_keys($unexpected); + } + + + /** + * This method checks whether ILM policies or templates get recreated after + * they have been deleted. If so, we are probably deleting them unnecessarily, + * potentially causing test performance problems. This could happen for example + * if someone adds a new standard ILM policy but forgets to put it in the + * exclusion list in this test. + */ + private static function checkForUnexpectedlyRecreatedObjects(Client $client): void + { + if (self::$hasIlm) { + $policies = self::getAllUnexpectedIlmPolicies($client, self::preserveILMPolicyIds()); + if (count($policies) > 0) { + throw new Exception(sprintf( + "Expected no ILM policies after deletions, but found %s", + implode(',', array_keys($policies)) + )); + } + } + $templates = self::getAllUnexpectedTemplates($client); + if (count($templates) > 0) { + throw new Exception(sprintf( + "Expected no templates after deletions, but found %s", + implode(',', array_keys($templates)) + )); + } + } } diff --git a/tests/Elasticsearch/Tests/UtilityTest.php b/tests/Elasticsearch/Tests/UtilityTest.php new file mode 100644 index 000000000..e05ea89be --- /dev/null +++ b/tests/Elasticsearch/Tests/UtilityTest.php @@ -0,0 +1,98 @@ +assertEquals('true', Utility::getEnv(Utility::ENV_URL_PLUS_AS_SPACE)); + } + + public function testGetEnvWithDollarEnv() + { + $_ENV[Utility::ENV_URL_PLUS_AS_SPACE] = 'true'; + $this->assertEquals('true', Utility::getEnv(Utility::ENV_URL_PLUS_AS_SPACE)); + } + + public function testGetEnvWithPutEnv() + { + putenv(Utility::ENV_URL_PLUS_AS_SPACE . '=true'); + $this->assertEquals('true', Utility::getEnv(Utility::ENV_URL_PLUS_AS_SPACE)); + } + + public function testUrlWithPlusAsDefault() + { + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar+baz', $url); + } + + public function testUrlWithPlusWithDollarServer() + { + $_SERVER[Utility::ENV_URL_PLUS_AS_SPACE] = 'true'; + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar+baz', $url); + } + + public function testUrlWithPlusWithDollarEnv() + { + $_ENV[Utility::ENV_URL_PLUS_AS_SPACE] = 'true'; + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar+baz', $url); + } + + public function testUrlWithPlusWithPutEnv() + { + putenv(Utility::ENV_URL_PLUS_AS_SPACE . '=true'); + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar+baz', $url); + } + + public function testUrlWith2BWithDollarServer() + { + $_SERVER[Utility::ENV_URL_PLUS_AS_SPACE] = 'false'; + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar%20baz', $url); + } + + public function testUrlWith2BWithDollarEnv() + { + $_ENV[Utility::ENV_URL_PLUS_AS_SPACE] = 'false'; + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar%20baz', $url); + } + + public function testUrlWith2BWithPutEnv() + { + putenv(Utility::ENV_URL_PLUS_AS_SPACE . '=false'); + $url = Utility::urlencode('bar baz'); + $this->assertEquals('bar%20baz', $url); + } +} diff --git a/util/ActionTest.php b/util/ActionTest.php index e6d6083cb..22771fdb0 100644 --- a/util/ActionTest.php +++ b/util/ActionTest.php @@ -432,6 +432,10 @@ private function convertResponseField(string $field): string if ($field === '$body' || $field === '') { return $output; } + // if the field start with $ use this as variable instead of $response + if ($field[0] === '$') { + list($output, $field) = explode('.', $field, 2); + } // if the field starts with a .$variable remove the first dot if (substr($field, 0, 2) === '.$') { $field = substr($field, 1); diff --git a/util/Endpoint.php b/util/Endpoint.php index 0bf0fe2f5..92a0efab7 100644 --- a/util/Endpoint.php +++ b/util/Endpoint.php @@ -436,12 +436,13 @@ public function getClassName(): string public function renderDocParams(): string { - if (!isset($this->content['params']) && empty($this->getParts())) { - return ''; - } $space = $this->getMaxLengthBodyPartsParams(); $result = "\n /**\n"; + if (isset($this->content['documentation']['description'])) { + $result .= sprintf(" * %s\n", str_replace("\n", '', $this->content['documentation']['description'])); + $result .= " *\n"; + } $result .= $this->extractPartsDescription($space); $result .= $this->extractParamsDescription($space); $result .= $this->extractBodyDescription($space); diff --git a/util/YamlTests.php b/util/YamlTests.php index 868bee677..2e933ab57 100644 --- a/util/YamlTests.php +++ b/util/YamlTests.php @@ -39,6 +39,7 @@ class YamlTests 'Cat\Nodeattrs\_10_BasicTest::TestCatNodesAttrsOutput' => 'Regexp error, it seems not compatible with PHP', 'Cat\Shards\_10_BasicTest::TestCatShardsOutput' => 'Regexp error, it seems not compatible with PHP', 'Indices\Create\_20_Mix_Typeless_TypefulTest::CreateATypedIndexWhileThereIsATypelessTemplate' => 'mismatch on warning header', + 'Indices\GetAlias\_10_BasicTest::GetAliasAgainstClosedIndices' => 'Mismatch values', 'Search\Aggregation\_10_HistogramTest::HistogramProfiler' => "Error reading 'n' field from YAML" ]; @@ -74,14 +75,12 @@ class YamlTests 'RuntimeFields\_50_IpTest::GetMapping' => 'String mismatch', 'RuntimeFields\_60_BooleanTest::GetMapping' => 'String mismatch', 'SearchableSnapshots\_10_UsageTest::TestsSearchableSnapshotsUsageStatsWithFull_copyAndShared_cacheIndices' => 'Mismatch values', + 'ServiceAccounts\_10_BasicTest::TestServiceAccountTokens' => 'Count mismatch', 'Snapshot\_10_BasicTest::CreateASourceOnlySnapshotAndThenRestoreIt' => 'Snapshot name already exists', 'Snapshot\_20_Operator_Privileges_DisabledTest::OperatorOnlySettingsCanBeSetAndRestoredByNonoperatorUserWhenOperatorPrivilegesIsDisabled' => 'Count mismatch', 'Ssl\_10_BasicTest::TestGetSSLCertificates' => 'Mismatch values', 'Transform\_Transforms_CrudTest::TestDeleteTransformWhenItDoesNotExist' => 'Invalid version format: TRANSFORM HTTP/1.1', - 'UnsignedLong\_10_BasicTest::*' => 'Skipped all tests', - 'UnsignedLong\_20_Null_ValueTest::*' => 'Skipped all tests', - 'UnsignedLong\_30_Multi_FieldsTest::*' => 'Skipped all tests', - 'UnsignedLong\_50_Script_ValuesTest::*' => 'Skipped all tests', + 'UnsignedLong\*' => 'Skipped all tests', 'Vectors\_30_Sparse_Vector_BasicTest::DeprecatedFunctionSignature' => 'Failed asserting contains string', ]; @@ -127,6 +126,14 @@ public function __construct(string $testDir, string $testOutput, string $esVersi self::$minorEsVersion = sprintf("%s.%s", $major, $minor); } + /** + * @see https://www.php.net/manual/en/function.yaml-parse-file.php#124980 + */ + private function quoteYInYamlFile(string $file) + { + return str_replace (' y: ', ' "y": ', file_get_contents($file)); + } + private function getAllTests(string $dir): array { $it = new RecursiveDirectoryIterator($dir); @@ -134,11 +141,16 @@ private function getAllTests(string $dir): array // Iterate over the Yaml test files foreach (new RecursiveIteratorIterator($it) as $file) { if ($file->getExtension() === 'yml') { - $test = yaml_parse_file($file->getPathname(), -1, $ndocs, [ - YAML_MAP_TAG => function($value, $tag, $flags) { - return empty($value) ? new stdClass : $value; - } - ]); + $test = yaml_parse( + $this->quoteYInYamlFile($file->getPathname()), + -1, + $ndocs, + [ + YAML_MAP_TAG => function($value, $tag, $flags) { + return empty($value) ? new stdClass : $value; + } + ] + ); if (false === $test) { throw new Exception(sprintf( "YAML parse error file %s", @@ -189,10 +201,11 @@ public function build(): array $skippedTest = sprintf("%s\\%s::%s", $namespace, $testName, $functionName); $skippedAllTest = sprintf("%s\\%s::*", $namespace, $testName); + $skippedAllFiles = sprintf("%s\\*", $namespace); $skip = strtolower(self::$testSuite) === 'free' ? self::SKIPPED_TEST_OSS : self::SKIPPED_TEST_XPACK; - if (isset($skip[$skippedAllTest])) { + if (isset($skip[$skippedAllFiles]) || isset($skip[$skippedAllTest])) { $allSkipped = true; $functions .= self::render( self::TEMPLATE_FUNCTION_SKIPPED, @@ -314,7 +327,7 @@ public static function render(string $fileName, array $params = []): string } elseif ($value instanceof \stdClass) { $value = 'new \stdClass'; } elseif (is_numeric($value)) { - $value = (string) $value; + $value = var_export($value, true); } $output = str_replace($name, $value, $output); } diff --git a/util/build_tests.php b/util/build_tests.php index 879bfe605..292e1a230 100644 --- a/util/build_tests.php +++ b/util/build_tests.php @@ -43,7 +43,7 @@ exit(1); } -$stack = getenv('TEST_SUITE'); +$stack = $_SERVER['TEST_SUITE'] ?? $_ENV['TEST_SUITE']; printf ("*****************************************\n"); printf ("** Bulding YAML tests for %s suite\n", strtoupper($stack)); printf ("*****************************************\n"); diff --git a/util/docstheme/macros.twig b/util/docstheme/macros.twig index 9ea1834e8..ae5fa6a04 100644 --- a/util/docstheme/macros.twig +++ b/util/docstheme/macros.twig @@ -136,3 +136,35 @@ class {% if member.static %} static{% endif %} {% endspaceless %} {%- endmacro -%} + +{% macro method_parameters_signature(method) -%} + {%- from "macros.twig" import hint_link -%} + ( + {%- for parameter in method.parameters %} + {%- if parameter.hashint %}{{ hint_link(parameter.hint) }} {% endif -%} + {%- if parameter.variadic %}...{% endif %}${{ parameter.name|raw }} + {%- if parameter.default is not null %} = {{ parameter.default }}{% endif %} + {%- if not loop.last %}, {% endif %} + {%- endfor -%} + ) +{%- endmacro %} + +{% macro hint_link(hints) -%} + {%- from _self import class_link %} + + {%- if hints %} + {%- for hint in hints %} + {%- if hint.class %} + {{- class_link(hint.name) }} + {%- elseif hint.name %} + {{- abbr_class(hint.name) }} + {%- endif %} + {%- if hint.array %}[]{% endif %} + {%- if not loop.last %}|{% endif %} + {%- endfor %} + {%- endif %} +{%- endmacro %} + +{% macro class_link(class, absolute) -%} + {{- class }} +{%- endmacro %} \ No newline at end of file diff --git a/util/docstheme/pages/class.twig b/util/docstheme/pages/class.twig index 9011d7f5c..8190ecb82 100644 --- a/util/docstheme/pages/class.twig +++ b/util/docstheme/pages/class.twig @@ -36,9 +36,8 @@ The {{ class_type(class) }} defines the following methods: {% if method.name != "__construct" %} -{% if class.shortname != "ClientBuilder" %} [[{{ sanitize(replace_backslash(method)~"_"~method.name) }}]] -.`{{ method.name }}()` +.`{{ method.name }}{{ block('method_parameters_signature') }}` {% if method.tags('note') %} {% for note in method.tags('note') %} *NOTE:* {{ note|join(' ') }} @@ -52,34 +51,16 @@ The {{ class_type(class) }} defines the following methods: {{ method.shortdesc|raw }} {% endif %} */ - -$params = [ - // ... -]; - -$client = ClientBuilder::create()->build(); -$response = {{ get_namespace(class) }}->{{ method.name }}({{ param_list(method)|trim(',') }}); ----- -**** -{% else %} -[[{{ sanitize(replace_backslash(method)~"_"~method.name) }}]] -.`{{ method.name }}()` -**** -[source,php] ----- -/* -{% if method.shortdesc %} - {{ method.shortdesc|raw }} -{% endif %} -*/ - ---- **** {% endif %} -{% endif %} {% endfor %} {% endif %} {% endblock %} +{% block method_parameters_signature -%} + {%- from "macros.twig" import method_parameters_signature -%} + {{ method_parameters_signature(method) }} +{%- endblock %} \ No newline at end of file diff --git a/util/run_es_docker.sh b/util/run_es_docker.sh index 0c3a3c7ba..2c24f45ef 100755 --- a/util/run_es_docker.sh +++ b/util/run_es_docker.sh @@ -22,6 +22,7 @@ if [ "$TEST_SUITE" = "free" ]; then --env "repositories.url.allowed_urls=http://snapshot.*" \ --env "discovery.type=single-node" \ --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \ + --env "action.destructive_requires_name=false" \ --network=esnet \ --name=elasticsearch \ --health-interval=2s \ @@ -45,8 +46,10 @@ else --env "node.attr.testattr=test" \ --env "path.repo=/tmp" \ --env "repositories.url.allowed_urls=http://snapshot.*" \ + --env "ingest.geoip.downloader.enabled=false" \ --env "discovery.type=single-node" \ --env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \ + --env "action.destructive_requires_name=false" \ --env "ELASTIC_PASSWORD=changeme" \ --env "xpack.security.enabled=true" \ --env "xpack.license.self_generated.type=trial" \ diff --git a/util/template/client-class b/util/template/client-class index e14ac3670..7552962ee 100644 --- a/util/template/client-class +++ b/util/template/client-class @@ -89,6 +89,8 @@ class Client } /** + * Extract an argument from the array of parameters + * * @return null|mixed */ public function extractArgument(array &$params, string $arg) diff --git a/util/template/client-namespace-function b/util/template/client-namespace-function index a3d1a38ad..2f7ab1c11 100644 --- a/util/template/client-namespace-function +++ b/util/template/client-namespace-function @@ -1,3 +1,6 @@ + /** + * Returns the :name namespace + */ public function :name(): :namespace { return $this->:name;