@@ -35,6 +35,8 @@ class Autoscaling extends AbstractEndpoint
3535 *
3636 * @param array{
3737 * name: string, // (REQUIRED) the name of the autoscaling policy
38+ * master_timeout: time, // Timeout for processing on master node
39+ * timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
3840 * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
3941 * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
4042 * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -55,11 +57,13 @@ public function deleteAutoscalingPolicy(array $params = [])
5557 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
5658 $ method = 'DELETE ' ;
5759
58- $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
60+ $ url = $ this ->addQueryString ($ url , $ params , ['master_timeout ' , ' timeout ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
5961 $ headers = [
6062 'Accept ' => 'application/json ' ,
6163 ];
62- return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
64+ $ request = $ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null );
65+ $ request = $ this ->addOtelAttributes ($ params , ['name ' ], $ request , 'autoscaling.delete_autoscaling_policy ' );
66+ return $ this ->client ->sendRequest ($ request );
6367 }
6468
6569
@@ -69,6 +73,7 @@ public function deleteAutoscalingPolicy(array $params = [])
6973 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
7074 *
7175 * @param array{
76+ * master_timeout: time, // Timeout for processing on master node
7277 * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
7378 * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
7479 * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -87,11 +92,13 @@ public function getAutoscalingCapacity(array $params = [])
8792 $ url = '/_autoscaling/capacity ' ;
8893 $ method = 'GET ' ;
8994
90- $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
95+ $ url = $ this ->addQueryString ($ url , $ params , ['master_timeout ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
9196 $ headers = [
9297 'Accept ' => 'application/json ' ,
9398 ];
94- return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
99+ $ request = $ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null );
100+ $ request = $ this ->addOtelAttributes ($ params , [], $ request , 'autoscaling.get_autoscaling_capacity ' );
101+ return $ this ->client ->sendRequest ($ request );
95102 }
96103
97104
@@ -102,6 +109,7 @@ public function getAutoscalingCapacity(array $params = [])
102109 *
103110 * @param array{
104111 * name: string, // (REQUIRED) the name of the autoscaling policy
112+ * master_timeout: time, // Timeout for processing on master node
105113 * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
106114 * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
107115 * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -122,11 +130,13 @@ public function getAutoscalingPolicy(array $params = [])
122130 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
123131 $ method = 'GET ' ;
124132
125- $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
133+ $ url = $ this ->addQueryString ($ url , $ params , ['master_timeout ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
126134 $ headers = [
127135 'Accept ' => 'application/json ' ,
128136 ];
129- return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
137+ $ request = $ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null );
138+ $ request = $ this ->addOtelAttributes ($ params , ['name ' ], $ request , 'autoscaling.get_autoscaling_policy ' );
139+ return $ this ->client ->sendRequest ($ request );
130140 }
131141
132142
@@ -137,6 +147,8 @@ public function getAutoscalingPolicy(array $params = [])
137147 *
138148 * @param array{
139149 * name: string, // (REQUIRED) the name of the autoscaling policy
150+ * master_timeout: time, // Timeout for processing on master node
151+ * timeout: time, // Timeout for acknowledgement of update from all nodes in cluster
140152 * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
141153 * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
142154 * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -158,11 +170,13 @@ public function putAutoscalingPolicy(array $params = [])
158170 $ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
159171 $ method = 'PUT ' ;
160172
161- $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
173+ $ url = $ this ->addQueryString ($ url , $ params , ['master_timeout ' , ' timeout ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
162174 $ headers = [
163175 'Accept ' => 'application/json ' ,
164176 'Content-Type ' => 'application/json ' ,
165177 ];
166- return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
178+ $ request = $ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null );
179+ $ request = $ this ->addOtelAttributes ($ params , ['name ' ], $ request , 'autoscaling.put_autoscaling_policy ' );
180+ return $ this ->client ->sendRequest ($ request );
167181 }
168182}
0 commit comments