1<?php 2/** 3 * Elasticsearch PHP client 4 * 5 * @link https://github.com/elastic/elasticsearch-php/ 6 * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) 7 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 8 * @license https://www.gnu.org/licenses/lgpl-2.1.html GNU Lesser General Public License, Version 2.1 9 * 10 * Licensed to Elasticsearch B.V under one or more agreements. 11 * Elasticsearch B.V licenses this file to you under the Apache 2.0 License or 12 * the GNU Lesser General Public License, Version 2.1, at your option. 13 * See the LICENSE file in the project root for more information. 14 */ 15declare(strict_types = 1); 16 17namespace Elasticsearch\Namespaces; 18 19use Elasticsearch\Namespaces\AbstractNamespace; 20 21/** 22 * Class AutoscalingNamespace 23 * 24 * NOTE: this file is autogenerated using util/GenerateEndpoints.php 25 * and Elasticsearch 7.16.0-SNAPSHOT (dfc9a8e7563ed5f24b5210ed21ed92ae182cd0ee) 26 */ 27class AutoscalingNamespace extends AbstractNamespace 28{ 29 30 /** 31 * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. 32 * 33 * $params['name'] = (string) the name of the autoscaling policy 34 * 35 * @param array $params Associative array of parameters 36 * @return array 37 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html 38 */ 39 public function deleteAutoscalingPolicy(array $params = []) 40 { 41 $name = $this->extractArgument($params, 'name'); 42 43 $endpointBuilder = $this->endpoints; 44 $endpoint = $endpointBuilder('Autoscaling\DeleteAutoscalingPolicy'); 45 $endpoint->setParams($params); 46 $endpoint->setName($name); 47 48 return $this->performRequest($endpoint); 49 } 50 /** 51 * 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. 52 * 53 * 54 * @param array $params Associative array of parameters 55 * @return array 56 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html 57 */ 58 public function getAutoscalingCapacity(array $params = []) 59 { 60 61 $endpointBuilder = $this->endpoints; 62 $endpoint = $endpointBuilder('Autoscaling\GetAutoscalingCapacity'); 63 $endpoint->setParams($params); 64 65 return $this->performRequest($endpoint); 66 } 67 /** 68 * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. 69 * 70 * $params['name'] = (string) the name of the autoscaling policy 71 * 72 * @param array $params Associative array of parameters 73 * @return array 74 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-policy.html 75 */ 76 public function getAutoscalingPolicy(array $params = []) 77 { 78 $name = $this->extractArgument($params, 'name'); 79 80 $endpointBuilder = $this->endpoints; 81 $endpoint = $endpointBuilder('Autoscaling\GetAutoscalingPolicy'); 82 $endpoint->setParams($params); 83 $endpoint->setName($name); 84 85 return $this->performRequest($endpoint); 86 } 87 /** 88 * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. 89 * 90 * $params['name'] = (string) the name of the autoscaling policy 91 * $params['body'] = (array) the specification of the autoscaling policy (Required) 92 * 93 * @param array $params Associative array of parameters 94 * @return array 95 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-put-autoscaling-policy.html 96 */ 97 public function putAutoscalingPolicy(array $params = []) 98 { 99 $name = $this->extractArgument($params, 'name'); 100 $body = $this->extractArgument($params, 'body'); 101 102 $endpointBuilder = $this->endpoints; 103 $endpoint = $endpointBuilder('Autoscaling\PutAutoscalingPolicy'); 104 $endpoint->setParams($params); 105 $endpoint->setName($name); 106 $endpoint->setBody($body); 107 108 return $this->performRequest($endpoint); 109 } 110} 111