@@ -35,6 +35,8 @@ class Autoscaling extends AbstractEndpoint
35
35
*
36
36
* @param array{
37
37
* 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
38
40
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
39
41
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
40
42
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -55,11 +57,13 @@ public function deleteAutoscalingPolicy(array $params = [])
55
57
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
56
58
$ method = 'DELETE ' ;
57
59
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 ' ]);
59
61
$ headers = [
60
62
'Accept ' => 'application/json ' ,
61
63
];
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 );
63
67
}
64
68
65
69
@@ -69,6 +73,7 @@ public function deleteAutoscalingPolicy(array $params = [])
69
73
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-get-autoscaling-capacity.html
70
74
*
71
75
* @param array{
76
+ * master_timeout: time, // Timeout for processing on master node
72
77
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
73
78
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
74
79
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -87,11 +92,13 @@ public function getAutoscalingCapacity(array $params = [])
87
92
$ url = '/_autoscaling/capacity ' ;
88
93
$ method = 'GET ' ;
89
94
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 ' ]);
91
96
$ headers = [
92
97
'Accept ' => 'application/json ' ,
93
98
];
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 );
95
102
}
96
103
97
104
@@ -102,6 +109,7 @@ public function getAutoscalingCapacity(array $params = [])
102
109
*
103
110
* @param array{
104
111
* name: string, // (REQUIRED) the name of the autoscaling policy
112
+ * master_timeout: time, // Timeout for processing on master node
105
113
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
106
114
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
107
115
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -122,11 +130,13 @@ public function getAutoscalingPolicy(array $params = [])
122
130
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
123
131
$ method = 'GET ' ;
124
132
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 ' ]);
126
134
$ headers = [
127
135
'Accept ' => 'application/json ' ,
128
136
];
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 );
130
140
}
131
141
132
142
@@ -137,6 +147,8 @@ public function getAutoscalingPolicy(array $params = [])
137
147
*
138
148
* @param array{
139
149
* 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
140
152
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
141
153
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
142
154
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -158,11 +170,13 @@ public function putAutoscalingPolicy(array $params = [])
158
170
$ url = '/_autoscaling/policy/ ' . $ this ->encode ($ params ['name ' ]);
159
171
$ method = 'PUT ' ;
160
172
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 ' ]);
162
174
$ headers = [
163
175
'Accept ' => 'application/json ' ,
164
176
'Content-Type ' => 'application/json ' ,
165
177
];
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 );
167
181
}
168
182
}
0 commit comments