1: | <?php |
2: | |
3: | declare(strict_types=1); |
4: | |
5: | /** |
6: | * SPDX-License-Identifier: Apache-2.0 |
7: | * |
8: | * The OpenSearch Contributors require contributions made to |
9: | * this file be licensed under the Apache-2.0 license or a |
10: | * compatible open source license. |
11: | * |
12: | * Modifications Copyright OpenSearch Contributors. See |
13: | * GitHub history for details. |
14: | */ |
15: | |
16: | namespace OpenSearch\Namespaces; |
17: | |
18: | use OpenSearch\Endpoints\Security\Authinfo; |
19: | use OpenSearch\Endpoints\Security\Authtoken; |
20: | use OpenSearch\Endpoints\Security\Cache; |
21: | use OpenSearch\Endpoints\Security\ChangePassword; |
22: | use OpenSearch\Endpoints\Security\ConfigUpgradeCheck; |
23: | use OpenSearch\Endpoints\Security\ConfigUpgradePerform; |
24: | use OpenSearch\Endpoints\Security\CreateActionGroup; |
25: | use OpenSearch\Endpoints\Security\CreateAllowlist; |
26: | use OpenSearch\Endpoints\Security\CreateRole; |
27: | use OpenSearch\Endpoints\Security\CreateRoleMapping; |
28: | use OpenSearch\Endpoints\Security\CreateTenant; |
29: | use OpenSearch\Endpoints\Security\CreateUpdateTenancyConfig; |
30: | use OpenSearch\Endpoints\Security\CreateUser; |
31: | use OpenSearch\Endpoints\Security\CreateUserLegacy; |
32: | use OpenSearch\Endpoints\Security\DeleteActionGroup; |
33: | use OpenSearch\Endpoints\Security\DeleteDistinguishedName; |
34: | use OpenSearch\Endpoints\Security\DeleteRole; |
35: | use OpenSearch\Endpoints\Security\DeleteRoleMapping; |
36: | use OpenSearch\Endpoints\Security\DeleteTenant; |
37: | use OpenSearch\Endpoints\Security\DeleteUser; |
38: | use OpenSearch\Endpoints\Security\DeleteUserLegacy; |
39: | use OpenSearch\Endpoints\Security\FlushCache; |
40: | use OpenSearch\Endpoints\Security\GenerateOboToken; |
41: | use OpenSearch\Endpoints\Security\GenerateUserToken; |
42: | use OpenSearch\Endpoints\Security\GenerateUserTokenLegacy; |
43: | use OpenSearch\Endpoints\Security\GetAccountDetails; |
44: | use OpenSearch\Endpoints\Security\GetActionGroup; |
45: | use OpenSearch\Endpoints\Security\GetActionGroups; |
46: | use OpenSearch\Endpoints\Security\GetAllCertificates; |
47: | use OpenSearch\Endpoints\Security\GetAllowlist; |
48: | use OpenSearch\Endpoints\Security\GetAuditConfiguration; |
49: | use OpenSearch\Endpoints\Security\GetCertificates; |
50: | use OpenSearch\Endpoints\Security\GetConfiguration; |
51: | use OpenSearch\Endpoints\Security\GetDashboardsInfo; |
52: | use OpenSearch\Endpoints\Security\GetDistinguishedName; |
53: | use OpenSearch\Endpoints\Security\GetDistinguishedNames; |
54: | use OpenSearch\Endpoints\Security\GetNodeCertificates; |
55: | use OpenSearch\Endpoints\Security\GetPermissionsInfo; |
56: | use OpenSearch\Endpoints\Security\GetRole; |
57: | use OpenSearch\Endpoints\Security\GetRoleMapping; |
58: | use OpenSearch\Endpoints\Security\GetRoleMappings; |
59: | use OpenSearch\Endpoints\Security\GetRoles; |
60: | use OpenSearch\Endpoints\Security\GetSslinfo; |
61: | use OpenSearch\Endpoints\Security\GetTenancyConfig; |
62: | use OpenSearch\Endpoints\Security\GetTenant; |
63: | use OpenSearch\Endpoints\Security\GetTenants; |
64: | use OpenSearch\Endpoints\Security\GetUser; |
65: | use OpenSearch\Endpoints\Security\GetUserLegacy; |
66: | use OpenSearch\Endpoints\Security\GetUsers; |
67: | use OpenSearch\Endpoints\Security\GetUsersLegacy; |
68: | use OpenSearch\Endpoints\Security\Health; |
69: | use OpenSearch\Endpoints\Security\Migrate; |
70: | use OpenSearch\Endpoints\Security\PatchActionGroup; |
71: | use OpenSearch\Endpoints\Security\PatchActionGroups; |
72: | use OpenSearch\Endpoints\Security\PatchAllowlist; |
73: | use OpenSearch\Endpoints\Security\PatchAuditConfiguration; |
74: | use OpenSearch\Endpoints\Security\PatchConfiguration; |
75: | use OpenSearch\Endpoints\Security\PatchDistinguishedName; |
76: | use OpenSearch\Endpoints\Security\PatchDistinguishedNames; |
77: | use OpenSearch\Endpoints\Security\PatchRole; |
78: | use OpenSearch\Endpoints\Security\PatchRoleMapping; |
79: | use OpenSearch\Endpoints\Security\PatchRoleMappings; |
80: | use OpenSearch\Endpoints\Security\PatchRoles; |
81: | use OpenSearch\Endpoints\Security\PatchTenant; |
82: | use OpenSearch\Endpoints\Security\PatchTenants; |
83: | use OpenSearch\Endpoints\Security\PatchUser; |
84: | use OpenSearch\Endpoints\Security\PatchUsers; |
85: | use OpenSearch\Endpoints\Security\PostDashboardsInfo; |
86: | use OpenSearch\Endpoints\Security\ReloadHttpCertificates; |
87: | use OpenSearch\Endpoints\Security\ReloadTransportCertificates; |
88: | use OpenSearch\Endpoints\Security\TenantInfo; |
89: | use OpenSearch\Endpoints\Security\UpdateAuditConfiguration; |
90: | use OpenSearch\Endpoints\Security\UpdateConfiguration; |
91: | use OpenSearch\Endpoints\Security\UpdateDistinguishedName; |
92: | use OpenSearch\Endpoints\Security\Validate; |
93: | use OpenSearch\Endpoints\Security\WhoAmI; |
94: | use OpenSearch\Endpoints\Security\WhoAmIProtected; |
95: | |
96: | /** |
97: | * Class SecurityNamespace |
98: | * |
99: | * NOTE: This file is autogenerated using util/GenerateEndpoints.php |
100: | */ |
101: | class SecurityNamespace extends AbstractNamespace |
102: | { |
103: | /** |
104: | * Returns or updates authentication information for the currently authenticated user. |
105: | * |
106: | * $params['auth_type'] = (string) The type of the current authentication request. |
107: | * $params['verbose'] = (boolean) Whether to return a verbose response. |
108: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
109: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
110: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
111: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
112: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
113: | * |
114: | * @param array $params Associative array of parameters |
115: | * @return array |
116: | */ |
117: | public function authinfo(array $params = []) |
118: | { |
119: | $endpoint = $this->endpointFactory->getEndpoint(Authinfo::class); |
120: | $endpoint->setParams($params); |
121: | |
122: | return $this->performRequest($endpoint); |
123: | } |
124: | |
125: | /** |
126: | * Returns the authorization token for the current user. |
127: | * |
128: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
129: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
130: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
131: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
132: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
133: | * |
134: | * @param array $params Associative array of parameters |
135: | * @return array |
136: | */ |
137: | public function authtoken(array $params = []) |
138: | { |
139: | $endpoint = $this->endpointFactory->getEndpoint(Authtoken::class); |
140: | $endpoint->setParams($params); |
141: | |
142: | return $this->performRequest($endpoint); |
143: | } |
144: | |
145: | /** |
146: | * Not supported for the Cache API. |
147: | * |
148: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
149: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
150: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
151: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
152: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
153: | * |
154: | * @param array $params Associative array of parameters |
155: | * @return array |
156: | */ |
157: | public function cache(array $params = []) |
158: | { |
159: | $endpoint = $this->endpointFactory->getEndpoint(Cache::class); |
160: | $endpoint->setParams($params); |
161: | |
162: | return $this->performRequest($endpoint); |
163: | } |
164: | |
165: | /** |
166: | * Checks whether or not an upgrade can be performed and which security resources can be updated. |
167: | * |
168: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
169: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
170: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
171: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
172: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
173: | * |
174: | * @param array $params Associative array of parameters |
175: | * @return array |
176: | */ |
177: | public function configUpgradeCheck(array $params = []) |
178: | { |
179: | $endpoint = $this->endpointFactory->getEndpoint(ConfigUpgradeCheck::class); |
180: | $endpoint->setParams($params); |
181: | |
182: | return $this->performRequest($endpoint); |
183: | } |
184: | |
185: | /** |
186: | * Assists the cluster operator with upgrading missing default values and stale default definitions. |
187: | * |
188: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
189: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
190: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
191: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
192: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
193: | * |
194: | * @param array $params Associative array of parameters |
195: | * @return array |
196: | */ |
197: | public function configUpgradePerform(array $params = []) |
198: | { |
199: | $body = $this->extractArgument($params, 'body'); |
200: | |
201: | $endpoint = $this->endpointFactory->getEndpoint(ConfigUpgradePerform::class); |
202: | $endpoint->setParams($params); |
203: | $endpoint->setBody($body); |
204: | |
205: | return $this->performRequest($endpoint); |
206: | } |
207: | |
208: | /** |
209: | * Creates or replaces APIs permitted for users on the allow list. Requires a super admin certificate or REST API permissions. |
210: | * |
211: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
212: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
213: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
214: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
215: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
216: | * |
217: | * @param array $params Associative array of parameters |
218: | * @return array |
219: | */ |
220: | public function createAllowlist(array $params = []) |
221: | { |
222: | $body = $this->extractArgument($params, 'body'); |
223: | |
224: | $endpoint = $this->endpointFactory->getEndpoint(CreateAllowlist::class); |
225: | $endpoint->setParams($params); |
226: | $endpoint->setBody($body); |
227: | |
228: | return $this->performRequest($endpoint); |
229: | } |
230: | |
231: | /** |
232: | * Creates or replaces the multi-tenancy configuration. Requires super admin or REST API permissions. |
233: | * |
234: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
235: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
236: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
237: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
238: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
239: | * |
240: | * @param array $params Associative array of parameters |
241: | * @return array |
242: | */ |
243: | public function createUpdateTenancyConfig(array $params = []) |
244: | { |
245: | $body = $this->extractArgument($params, 'body'); |
246: | |
247: | $endpoint = $this->endpointFactory->getEndpoint(CreateUpdateTenancyConfig::class); |
248: | $endpoint->setParams($params); |
249: | $endpoint->setBody($body); |
250: | |
251: | return $this->performRequest($endpoint); |
252: | } |
253: | |
254: | /** |
255: | * Creates or replaces the specified user. Legacy API. |
256: | * |
257: | * $params['username'] = (string) The name of the user to create. (Required) |
258: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
259: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
260: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
261: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
262: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
263: | * |
264: | * @param array $params Associative array of parameters |
265: | * @return array |
266: | */ |
267: | public function createUserLegacy(array $params = []) |
268: | { |
269: | $username = $this->extractArgument($params, 'username'); |
270: | $body = $this->extractArgument($params, 'body'); |
271: | |
272: | $endpoint = $this->endpointFactory->getEndpoint(CreateUserLegacy::class); |
273: | $endpoint->setParams($params); |
274: | $endpoint->setUsername($username); |
275: | $endpoint->setBody($body); |
276: | |
277: | return $this->performRequest($endpoint); |
278: | } |
279: | |
280: | /** |
281: | * Deletes the specified action group. |
282: | * |
283: | * $params['action_group'] = (string) The name of the action group to delete. (Required) |
284: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
285: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
286: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
287: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
288: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
289: | * |
290: | * @param array $params Associative array of parameters |
291: | * @return array |
292: | */ |
293: | public function deleteActionGroup(array $params = []) |
294: | { |
295: | $action_group = $this->extractArgument($params, 'action_group'); |
296: | |
297: | $endpoint = $this->endpointFactory->getEndpoint(DeleteActionGroup::class); |
298: | $endpoint->setParams($params); |
299: | $endpoint->setActionGroup($action_group); |
300: | |
301: | return $this->performRequest($endpoint); |
302: | } |
303: | |
304: | /** |
305: | * Deletes all distinguished names in the specified cluster or node allowlist. Requires super admin or REST API permissions. |
306: | * |
307: | * $params['cluster_name'] = (string) The cluster name to delete from list of distinguished names. (Required) |
308: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
309: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
310: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
311: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
312: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
313: | * |
314: | * @param array $params Associative array of parameters |
315: | * @return array |
316: | */ |
317: | public function deleteDistinguishedName(array $params = []) |
318: | { |
319: | $cluster_name = $this->extractArgument($params, 'cluster_name'); |
320: | |
321: | $endpoint = $this->endpointFactory->getEndpoint(DeleteDistinguishedName::class); |
322: | $endpoint->setParams($params); |
323: | $endpoint->setClusterName($cluster_name); |
324: | |
325: | return $this->performRequest($endpoint); |
326: | } |
327: | |
328: | /** |
329: | * Deletes the specified role. |
330: | * |
331: | * $params['role'] = (string) The name of the role to delete. (Required) |
332: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
333: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
334: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
335: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
336: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
337: | * |
338: | * @param array $params Associative array of parameters |
339: | * @return array |
340: | */ |
341: | public function deleteRole(array $params = []) |
342: | { |
343: | $role = $this->extractArgument($params, 'role'); |
344: | |
345: | $endpoint = $this->endpointFactory->getEndpoint(DeleteRole::class); |
346: | $endpoint->setParams($params); |
347: | $endpoint->setRole($role); |
348: | |
349: | return $this->performRequest($endpoint); |
350: | } |
351: | |
352: | /** |
353: | * Deletes the specified role mapping. |
354: | * |
355: | * $params['role'] = (string) The name of the role for which to delete the role's mappings. (Required) |
356: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
357: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
358: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
359: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
360: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
361: | * |
362: | * @param array $params Associative array of parameters |
363: | * @return array |
364: | */ |
365: | public function deleteRoleMapping(array $params = []) |
366: | { |
367: | $role = $this->extractArgument($params, 'role'); |
368: | |
369: | $endpoint = $this->endpointFactory->getEndpoint(DeleteRoleMapping::class); |
370: | $endpoint->setParams($params); |
371: | $endpoint->setRole($role); |
372: | |
373: | return $this->performRequest($endpoint); |
374: | } |
375: | |
376: | /** |
377: | * Deletes the specified tenant. |
378: | * |
379: | * $params['tenant'] = (string) The name of the tenant to delete. (Required) |
380: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
381: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
382: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
383: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
384: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
385: | * |
386: | * @param array $params Associative array of parameters |
387: | * @return array |
388: | */ |
389: | public function deleteTenant(array $params = []) |
390: | { |
391: | $tenant = $this->extractArgument($params, 'tenant'); |
392: | |
393: | $endpoint = $this->endpointFactory->getEndpoint(DeleteTenant::class); |
394: | $endpoint->setParams($params); |
395: | $endpoint->setTenant($tenant); |
396: | |
397: | return $this->performRequest($endpoint); |
398: | } |
399: | |
400: | /** |
401: | * Deletes the specified internal user. |
402: | * |
403: | * $params['username'] = (string) The name of the user to delete. (Required) |
404: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
405: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
406: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
407: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
408: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
409: | * |
410: | * @param array $params Associative array of parameters |
411: | * @return array |
412: | */ |
413: | public function deleteUser(array $params = []) |
414: | { |
415: | $username = $this->extractArgument($params, 'username'); |
416: | |
417: | $endpoint = $this->endpointFactory->getEndpoint(DeleteUser::class); |
418: | $endpoint->setParams($params); |
419: | $endpoint->setUsername($username); |
420: | |
421: | return $this->performRequest($endpoint); |
422: | } |
423: | |
424: | /** |
425: | * Delete the specified user. Legacy API. |
426: | * |
427: | * $params['username'] = (string) The name of the user to delete. (Required) |
428: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
429: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
430: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
431: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
432: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
433: | * |
434: | * @param array $params Associative array of parameters |
435: | * @return array |
436: | */ |
437: | public function deleteUserLegacy(array $params = []) |
438: | { |
439: | $username = $this->extractArgument($params, 'username'); |
440: | |
441: | $endpoint = $this->endpointFactory->getEndpoint(DeleteUserLegacy::class); |
442: | $endpoint->setParams($params); |
443: | $endpoint->setUsername($username); |
444: | |
445: | return $this->performRequest($endpoint); |
446: | } |
447: | |
448: | /** |
449: | * Flushes the Security plugin's user, authentication, and authorization cache. |
450: | * |
451: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
452: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
453: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
454: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
455: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
456: | * |
457: | * @param array $params Associative array of parameters |
458: | * @return array |
459: | */ |
460: | public function flushCache(array $params = []) |
461: | { |
462: | $endpoint = $this->endpointFactory->getEndpoint(FlushCache::class); |
463: | $endpoint->setParams($params); |
464: | |
465: | return $this->performRequest($endpoint); |
466: | } |
467: | |
468: | /** |
469: | * Generates a `On-Behalf-Of` token for the current user. |
470: | * |
471: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
472: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
473: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
474: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
475: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
476: | * |
477: | * @param array $params Associative array of parameters |
478: | * @return array |
479: | */ |
480: | public function generateOboToken(array $params = []) |
481: | { |
482: | $body = $this->extractArgument($params, 'body'); |
483: | |
484: | $endpoint = $this->endpointFactory->getEndpoint(GenerateOboToken::class); |
485: | $endpoint->setParams($params); |
486: | $endpoint->setBody($body); |
487: | |
488: | return $this->performRequest($endpoint); |
489: | } |
490: | |
491: | /** |
492: | * Generates an authorization token for the specified user. |
493: | * |
494: | * $params['username'] = (string) The name of the user for whom to issue an authorization token. (Required) |
495: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
496: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
497: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
498: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
499: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
500: | * |
501: | * @param array $params Associative array of parameters |
502: | * @return array |
503: | */ |
504: | public function generateUserToken(array $params = []) |
505: | { |
506: | $username = $this->extractArgument($params, 'username'); |
507: | |
508: | $endpoint = $this->endpointFactory->getEndpoint(GenerateUserToken::class); |
509: | $endpoint->setParams($params); |
510: | $endpoint->setUsername($username); |
511: | |
512: | return $this->performRequest($endpoint); |
513: | } |
514: | |
515: | /** |
516: | * Generates authorization token for the given user. Legacy API. Not Implemented. |
517: | * |
518: | * $params['username'] = (string) The name of the user for whom to issue an authorization token. (Required) |
519: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
520: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
521: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
522: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
523: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
524: | * |
525: | * @param array $params Associative array of parameters |
526: | * @return array |
527: | */ |
528: | public function generateUserTokenLegacy(array $params = []) |
529: | { |
530: | $username = $this->extractArgument($params, 'username'); |
531: | |
532: | $endpoint = $this->endpointFactory->getEndpoint(GenerateUserTokenLegacy::class); |
533: | $endpoint->setParams($params); |
534: | $endpoint->setUsername($username); |
535: | |
536: | return $this->performRequest($endpoint); |
537: | } |
538: | |
539: | /** |
540: | * Returns account information for the current user. |
541: | * |
542: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
543: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
544: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
545: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
546: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
547: | * |
548: | * @param array $params Associative array of parameters |
549: | * @return array |
550: | */ |
551: | public function getAccountDetails(array $params = []) |
552: | { |
553: | $endpoint = $this->endpointFactory->getEndpoint(GetAccountDetails::class); |
554: | $endpoint->setParams($params); |
555: | |
556: | return $this->performRequest($endpoint); |
557: | } |
558: | |
559: | /** |
560: | * Retrieves one action group. |
561: | * |
562: | * $params['action_group'] = (string) The name of the action group to retrieve. (Required) |
563: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
564: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
565: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
566: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
567: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
568: | * |
569: | * @param array $params Associative array of parameters |
570: | * @return array |
571: | */ |
572: | public function getActionGroup(array $params = []) |
573: | { |
574: | $action_group = $this->extractArgument($params, 'action_group'); |
575: | |
576: | $endpoint = $this->endpointFactory->getEndpoint(GetActionGroup::class); |
577: | $endpoint->setParams($params); |
578: | $endpoint->setActionGroup($action_group); |
579: | |
580: | return $this->performRequest($endpoint); |
581: | } |
582: | |
583: | /** |
584: | * Retrieves the cluster security certificates. |
585: | * |
586: | * $params['cert_type'] = (string) The type of certificates (`HTTP`, `TRANSPORT`, or `ALL`) to retrieve from all nodes. |
587: | * $params['timeout'] = (string) The maximum duration, in seconds, to spend retrieving certificates from all nodes before a timeout. |
588: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
589: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
590: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
591: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
592: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
593: | * |
594: | * @param array $params Associative array of parameters |
595: | * @return array |
596: | */ |
597: | public function getAllCertificates(array $params = []) |
598: | { |
599: | $endpoint = $this->endpointFactory->getEndpoint(GetAllCertificates::class); |
600: | $endpoint->setParams($params); |
601: | |
602: | return $this->performRequest($endpoint); |
603: | } |
604: | |
605: | /** |
606: | * Retrieves the current list of allowed APIs accessible to a normal user. |
607: | * |
608: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
609: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
610: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
611: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
612: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
613: | * |
614: | * @param array $params Associative array of parameters |
615: | * @return array |
616: | */ |
617: | public function getAllowlist(array $params = []) |
618: | { |
619: | $endpoint = $this->endpointFactory->getEndpoint(GetAllowlist::class); |
620: | $endpoint->setParams($params); |
621: | |
622: | return $this->performRequest($endpoint); |
623: | } |
624: | |
625: | /** |
626: | * Retrieves the audit configuration. |
627: | * |
628: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
629: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
630: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
631: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
632: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
633: | * |
634: | * @param array $params Associative array of parameters |
635: | * @return array |
636: | */ |
637: | public function getAuditConfiguration(array $params = []) |
638: | { |
639: | $endpoint = $this->endpointFactory->getEndpoint(GetAuditConfiguration::class); |
640: | $endpoint->setParams($params); |
641: | |
642: | return $this->performRequest($endpoint); |
643: | } |
644: | |
645: | /** |
646: | * Retrieves the cluster security certificates. |
647: | * |
648: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
649: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
650: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
651: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
652: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
653: | * |
654: | * @param array $params Associative array of parameters |
655: | * @return array |
656: | */ |
657: | public function getCertificates(array $params = []) |
658: | { |
659: | $endpoint = $this->endpointFactory->getEndpoint(GetCertificates::class); |
660: | $endpoint->setParams($params); |
661: | |
662: | return $this->performRequest($endpoint); |
663: | } |
664: | |
665: | /** |
666: | * Returns the current Security plugin configuration in a JSON format. |
667: | * |
668: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
669: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
670: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
671: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
672: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
673: | * |
674: | * @param array $params Associative array of parameters |
675: | * @return array |
676: | */ |
677: | public function getConfiguration(array $params = []) |
678: | { |
679: | $endpoint = $this->endpointFactory->getEndpoint(GetConfiguration::class); |
680: | $endpoint->setParams($params); |
681: | |
682: | return $this->performRequest($endpoint); |
683: | } |
684: | |
685: | /** |
686: | * Retrieves the current values for dynamic security settings for OpenSearch Dashboards. |
687: | * |
688: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
689: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
690: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
691: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
692: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
693: | * |
694: | * @param array $params Associative array of parameters |
695: | * @return array |
696: | */ |
697: | public function getDashboardsInfo(array $params = []) |
698: | { |
699: | $endpoint = $this->endpointFactory->getEndpoint(GetDashboardsInfo::class); |
700: | $endpoint->setParams($params); |
701: | |
702: | return $this->performRequest($endpoint); |
703: | } |
704: | |
705: | /** |
706: | * Retrieves all node distinguished names. Requires super admin or REST API permissions. |
707: | * |
708: | * $params['cluster_name'] = (string) The name of the cluster to retrieve that cluster's nodes DN settings. (Required) |
709: | * $params['show_all'] = (boolean) Whether to include or exclude any static node's DN settings from the final result. |
710: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
711: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
712: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
713: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
714: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
715: | * |
716: | * @param array $params Associative array of parameters |
717: | * @return array |
718: | */ |
719: | public function getDistinguishedName(array $params = []) |
720: | { |
721: | $cluster_name = $this->extractArgument($params, 'cluster_name'); |
722: | |
723: | $endpoint = $this->endpointFactory->getEndpoint(GetDistinguishedName::class); |
724: | $endpoint->setParams($params); |
725: | $endpoint->setClusterName($cluster_name); |
726: | |
727: | return $this->performRequest($endpoint); |
728: | } |
729: | |
730: | /** |
731: | * Retrieves the specified node's security certificates. |
732: | * |
733: | * $params['node_id'] = (string) The node ID to retrieve certificates for. |
734: | * $params['cert_type'] = (string) The type of certificates (`HTTP`, `TRANSPORT`, or `ALL`) to retrieve from a node. |
735: | * $params['timeout'] = (string) The maximum duration, in seconds, to spend retrieving certificates from all nodes before a timeout. |
736: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
737: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
738: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
739: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
740: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
741: | * |
742: | * @param array $params Associative array of parameters |
743: | * @return array |
744: | */ |
745: | public function getNodeCertificates(array $params = []) |
746: | { |
747: | $node_id = $this->extractArgument($params, 'node_id'); |
748: | |
749: | $endpoint = $this->endpointFactory->getEndpoint(GetNodeCertificates::class); |
750: | $endpoint->setParams($params); |
751: | $endpoint->setNodeId($node_id); |
752: | |
753: | return $this->performRequest($endpoint); |
754: | } |
755: | |
756: | /** |
757: | * Retrieves the evaluated REST API permissions for the currently logged in user. |
758: | * |
759: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
760: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
761: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
762: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
763: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
764: | * |
765: | * @param array $params Associative array of parameters |
766: | * @return array |
767: | */ |
768: | public function getPermissionsInfo(array $params = []) |
769: | { |
770: | $endpoint = $this->endpointFactory->getEndpoint(GetPermissionsInfo::class); |
771: | $endpoint->setParams($params); |
772: | |
773: | return $this->performRequest($endpoint); |
774: | } |
775: | |
776: | /** |
777: | * Retrieves one role. |
778: | * |
779: | * $params['role'] = (string) The name of the role to retrieve. (Required) |
780: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
781: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
782: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
783: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
784: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
785: | * |
786: | * @param array $params Associative array of parameters |
787: | * @return array |
788: | */ |
789: | public function getRole(array $params = []) |
790: | { |
791: | $role = $this->extractArgument($params, 'role'); |
792: | |
793: | $endpoint = $this->endpointFactory->getEndpoint(GetRole::class); |
794: | $endpoint->setParams($params); |
795: | $endpoint->setRole($role); |
796: | |
797: | return $this->performRequest($endpoint); |
798: | } |
799: | |
800: | /** |
801: | * Retrieves the specified role mapping. |
802: | * |
803: | * $params['role'] = (string) The name of the role mapping to retrieve. (Required) |
804: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
805: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
806: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
807: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
808: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
809: | * |
810: | * @param array $params Associative array of parameters |
811: | * @return array |
812: | */ |
813: | public function getRoleMapping(array $params = []) |
814: | { |
815: | $role = $this->extractArgument($params, 'role'); |
816: | |
817: | $endpoint = $this->endpointFactory->getEndpoint(GetRoleMapping::class); |
818: | $endpoint->setParams($params); |
819: | $endpoint->setRole($role); |
820: | |
821: | return $this->performRequest($endpoint); |
822: | } |
823: | |
824: | /** |
825: | * Retrieves information about the SSL configuration. |
826: | * |
827: | * $params['show_dn'] = (Array) Whether to include all domain names in the response. |
828: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
829: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
830: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
831: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
832: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
833: | * |
834: | * @param array $params Associative array of parameters |
835: | * @return array |
836: | */ |
837: | public function getSslinfo(array $params = []) |
838: | { |
839: | $endpoint = $this->endpointFactory->getEndpoint(GetSslinfo::class); |
840: | $endpoint->setParams($params); |
841: | |
842: | return $this->performRequest($endpoint); |
843: | } |
844: | |
845: | /** |
846: | * Retrieves the multi-tenancy configuration. Requires super admin or REST API permissions. |
847: | * |
848: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
849: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
850: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
851: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
852: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
853: | * |
854: | * @param array $params Associative array of parameters |
855: | * @return array |
856: | */ |
857: | public function getTenancyConfig(array $params = []) |
858: | { |
859: | $endpoint = $this->endpointFactory->getEndpoint(GetTenancyConfig::class); |
860: | $endpoint->setParams($params); |
861: | |
862: | return $this->performRequest($endpoint); |
863: | } |
864: | |
865: | /** |
866: | * Retrieves the specified tenant. |
867: | * |
868: | * $params['tenant'] = (string) The name of the tenant to retrieve. (Required) |
869: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
870: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
871: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
872: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
873: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
874: | * |
875: | * @param array $params Associative array of parameters |
876: | * @return array |
877: | */ |
878: | public function getTenant(array $params = []) |
879: | { |
880: | $tenant = $this->extractArgument($params, 'tenant'); |
881: | |
882: | $endpoint = $this->endpointFactory->getEndpoint(GetTenant::class); |
883: | $endpoint->setParams($params); |
884: | $endpoint->setTenant($tenant); |
885: | |
886: | return $this->performRequest($endpoint); |
887: | } |
888: | |
889: | /** |
890: | * Retrieve information about the specified internal user. |
891: | * |
892: | * $params['username'] = (string) The name of the user to retrieve. (Required) |
893: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
894: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
895: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
896: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
897: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
898: | * |
899: | * @param array $params Associative array of parameters |
900: | * @return array |
901: | */ |
902: | public function getUser(array $params = []) |
903: | { |
904: | $username = $this->extractArgument($params, 'username'); |
905: | |
906: | $endpoint = $this->endpointFactory->getEndpoint(GetUser::class); |
907: | $endpoint->setParams($params); |
908: | $endpoint->setUsername($username); |
909: | |
910: | return $this->performRequest($endpoint); |
911: | } |
912: | |
913: | /** |
914: | * Retrieve one user. Legacy API. |
915: | * |
916: | * $params['username'] = (string) The name of the user to retrieve. (Required) |
917: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
918: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
919: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
920: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
921: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
922: | * |
923: | * @param array $params Associative array of parameters |
924: | * @return array |
925: | */ |
926: | public function getUserLegacy(array $params = []) |
927: | { |
928: | $username = $this->extractArgument($params, 'username'); |
929: | |
930: | $endpoint = $this->endpointFactory->getEndpoint(GetUserLegacy::class); |
931: | $endpoint->setParams($params); |
932: | $endpoint->setUsername($username); |
933: | |
934: | return $this->performRequest($endpoint); |
935: | } |
936: | |
937: | /** |
938: | * Retrieve all internal users. Legacy API. |
939: | * |
940: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
941: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
942: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
943: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
944: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
945: | * |
946: | * @param array $params Associative array of parameters |
947: | * @return array |
948: | */ |
949: | public function getUsersLegacy(array $params = []) |
950: | { |
951: | $endpoint = $this->endpointFactory->getEndpoint(GetUsersLegacy::class); |
952: | $endpoint->setParams($params); |
953: | |
954: | return $this->performRequest($endpoint); |
955: | } |
956: | |
957: | /** |
958: | * Checks to see if the Security plugin is running. |
959: | * |
960: | * $params['mode'] = (string) A flag that determines whether to consider the security status before returning a response for a health query response. For example, `strict` mode indicates service should check the Security plugin status. |
961: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
962: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
963: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
964: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
965: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
966: | * |
967: | * @param array $params Associative array of parameters |
968: | * @return array |
969: | */ |
970: | public function health(array $params = []) |
971: | { |
972: | $endpoint = $this->endpointFactory->getEndpoint(Health::class); |
973: | $endpoint->setParams($params); |
974: | |
975: | return $this->performRequest($endpoint); |
976: | } |
977: | |
978: | /** |
979: | * Migrates the security configuration from v6 to v7. |
980: | * |
981: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
982: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
983: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
984: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
985: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
986: | * |
987: | * @param array $params Associative array of parameters |
988: | * @return array |
989: | */ |
990: | public function migrate(array $params = []) |
991: | { |
992: | $endpoint = $this->endpointFactory->getEndpoint(Migrate::class); |
993: | $endpoint->setParams($params); |
994: | |
995: | return $this->performRequest($endpoint); |
996: | } |
997: | |
998: | /** |
999: | * Updates the individual attributes of an action group. |
1000: | * |
1001: | * $params['action_group'] = (string) The name of the action group to update. (Required) |
1002: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1003: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1004: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1005: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1006: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1007: | * |
1008: | * @param array $params Associative array of parameters |
1009: | * @return array |
1010: | */ |
1011: | public function patchActionGroup(array $params = []) |
1012: | { |
1013: | $action_group = $this->extractArgument($params, 'action_group'); |
1014: | $body = $this->extractArgument($params, 'body'); |
1015: | |
1016: | $endpoint = $this->endpointFactory->getEndpoint(PatchActionGroup::class); |
1017: | $endpoint->setParams($params); |
1018: | $endpoint->setActionGroup($action_group); |
1019: | $endpoint->setBody($body); |
1020: | |
1021: | return $this->performRequest($endpoint); |
1022: | } |
1023: | |
1024: | /** |
1025: | * Updates the current list of APIs accessible for users on the allow list. |
1026: | * |
1027: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1028: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1029: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1030: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1031: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1032: | * |
1033: | * @param array $params Associative array of parameters |
1034: | * @return array |
1035: | */ |
1036: | public function patchAllowlist(array $params = []) |
1037: | { |
1038: | $body = $this->extractArgument($params, 'body'); |
1039: | |
1040: | $endpoint = $this->endpointFactory->getEndpoint(PatchAllowlist::class); |
1041: | $endpoint->setParams($params); |
1042: | $endpoint->setBody($body); |
1043: | |
1044: | return $this->performRequest($endpoint); |
1045: | } |
1046: | |
1047: | /** |
1048: | * Updates the specified fields in the audit configuration. |
1049: | * |
1050: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1051: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1052: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1053: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1054: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1055: | * |
1056: | * @param array $params Associative array of parameters |
1057: | * @return array |
1058: | */ |
1059: | public function patchAuditConfiguration(array $params = []) |
1060: | { |
1061: | $body = $this->extractArgument($params, 'body'); |
1062: | |
1063: | $endpoint = $this->endpointFactory->getEndpoint(PatchAuditConfiguration::class); |
1064: | $endpoint->setParams($params); |
1065: | $endpoint->setBody($body); |
1066: | |
1067: | return $this->performRequest($endpoint); |
1068: | } |
1069: | |
1070: | /** |
1071: | * Updates the existing security configuration using the REST API. Requires super admin or REST API permissions. |
1072: | * |
1073: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1074: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1075: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1076: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1077: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1078: | * |
1079: | * @param array $params Associative array of parameters |
1080: | * @return array |
1081: | */ |
1082: | public function patchConfiguration(array $params = []) |
1083: | { |
1084: | $body = $this->extractArgument($params, 'body'); |
1085: | |
1086: | $endpoint = $this->endpointFactory->getEndpoint(PatchConfiguration::class); |
1087: | $endpoint->setParams($params); |
1088: | $endpoint->setBody($body); |
1089: | |
1090: | return $this->performRequest($endpoint); |
1091: | } |
1092: | |
1093: | /** |
1094: | * Updates the distinguished cluster name for the specified cluster. Requires super admin or REST API permissions. |
1095: | * |
1096: | * $params['cluster_name'] = (string) The cluster name to update the `nodesDn` value. (Required) |
1097: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1098: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1099: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1100: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1101: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1102: | * |
1103: | * @param array $params Associative array of parameters |
1104: | * @return array |
1105: | */ |
1106: | public function patchDistinguishedName(array $params = []) |
1107: | { |
1108: | $cluster_name = $this->extractArgument($params, 'cluster_name'); |
1109: | $body = $this->extractArgument($params, 'body'); |
1110: | |
1111: | $endpoint = $this->endpointFactory->getEndpoint(PatchDistinguishedName::class); |
1112: | $endpoint->setParams($params); |
1113: | $endpoint->setClusterName($cluster_name); |
1114: | $endpoint->setBody($body); |
1115: | |
1116: | return $this->performRequest($endpoint); |
1117: | } |
1118: | |
1119: | /** |
1120: | * Bulk updates specified node distinguished names. Requires super admin or REST API permissions. |
1121: | * |
1122: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1123: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1124: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1125: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1126: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1127: | * |
1128: | * @param array $params Associative array of parameters |
1129: | * @return array |
1130: | */ |
1131: | public function patchDistinguishedNames(array $params = []) |
1132: | { |
1133: | $body = $this->extractArgument($params, 'body'); |
1134: | |
1135: | $endpoint = $this->endpointFactory->getEndpoint(PatchDistinguishedNames::class); |
1136: | $endpoint->setParams($params); |
1137: | $endpoint->setBody($body); |
1138: | |
1139: | return $this->performRequest($endpoint); |
1140: | } |
1141: | |
1142: | /** |
1143: | * Updates the individual attributes of a role. |
1144: | * |
1145: | * $params['role'] = (string) The name of the role to update. (Required) |
1146: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1147: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1148: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1149: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1150: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1151: | * |
1152: | * @param array $params Associative array of parameters |
1153: | * @return array |
1154: | */ |
1155: | public function patchRole(array $params = []) |
1156: | { |
1157: | $role = $this->extractArgument($params, 'role'); |
1158: | $body = $this->extractArgument($params, 'body'); |
1159: | |
1160: | $endpoint = $this->endpointFactory->getEndpoint(PatchRole::class); |
1161: | $endpoint->setParams($params); |
1162: | $endpoint->setRole($role); |
1163: | $endpoint->setBody($body); |
1164: | |
1165: | return $this->performRequest($endpoint); |
1166: | } |
1167: | |
1168: | /** |
1169: | * Updates the individual attributes of a role mapping. |
1170: | * |
1171: | * $params['role'] = (string) The name of the role to update a role mapping for (Required) |
1172: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1173: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1174: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1175: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1176: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1177: | * |
1178: | * @param array $params Associative array of parameters |
1179: | * @return array |
1180: | */ |
1181: | public function patchRoleMapping(array $params = []) |
1182: | { |
1183: | $role = $this->extractArgument($params, 'role'); |
1184: | $body = $this->extractArgument($params, 'body'); |
1185: | |
1186: | $endpoint = $this->endpointFactory->getEndpoint(PatchRoleMapping::class); |
1187: | $endpoint->setParams($params); |
1188: | $endpoint->setRole($role); |
1189: | $endpoint->setBody($body); |
1190: | |
1191: | return $this->performRequest($endpoint); |
1192: | } |
1193: | |
1194: | /** |
1195: | * Adds, deletes, or modifies a single tenant. |
1196: | * |
1197: | * $params['tenant'] = (string) The name of the tenant to update. (Required) |
1198: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1199: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1200: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1201: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1202: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1203: | * |
1204: | * @param array $params Associative array of parameters |
1205: | * @return array |
1206: | */ |
1207: | public function patchTenant(array $params = []) |
1208: | { |
1209: | $tenant = $this->extractArgument($params, 'tenant'); |
1210: | $body = $this->extractArgument($params, 'body'); |
1211: | |
1212: | $endpoint = $this->endpointFactory->getEndpoint(PatchTenant::class); |
1213: | $endpoint->setParams($params); |
1214: | $endpoint->setTenant($tenant); |
1215: | $endpoint->setBody($body); |
1216: | |
1217: | return $this->performRequest($endpoint); |
1218: | } |
1219: | |
1220: | /** |
1221: | * Updates individual attributes for an internal user. |
1222: | * |
1223: | * $params['username'] = (string) The name of the user to update. (Required) |
1224: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1225: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1226: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1227: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1228: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1229: | * |
1230: | * @param array $params Associative array of parameters |
1231: | * @return array |
1232: | */ |
1233: | public function patchUser(array $params = []) |
1234: | { |
1235: | $username = $this->extractArgument($params, 'username'); |
1236: | $body = $this->extractArgument($params, 'body'); |
1237: | |
1238: | $endpoint = $this->endpointFactory->getEndpoint(PatchUser::class); |
1239: | $endpoint->setParams($params); |
1240: | $endpoint->setUsername($username); |
1241: | $endpoint->setBody($body); |
1242: | |
1243: | return $this->performRequest($endpoint); |
1244: | } |
1245: | |
1246: | /** |
1247: | * Retrieves the current values for dynamic security settings for OpenSearch Dashboards. |
1248: | * |
1249: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1250: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1251: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1252: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1253: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1254: | * |
1255: | * @param array $params Associative array of parameters |
1256: | * @return array |
1257: | */ |
1258: | public function postDashboardsInfo(array $params = []) |
1259: | { |
1260: | $endpoint = $this->endpointFactory->getEndpoint(PostDashboardsInfo::class); |
1261: | $endpoint->setParams($params); |
1262: | |
1263: | return $this->performRequest($endpoint); |
1264: | } |
1265: | |
1266: | /** |
1267: | * Reloads the HTTP communication certificates. |
1268: | * |
1269: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1270: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1271: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1272: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1273: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1274: | * |
1275: | * @param array $params Associative array of parameters |
1276: | * @return array |
1277: | */ |
1278: | public function reloadHttpCertificates(array $params = []) |
1279: | { |
1280: | $endpoint = $this->endpointFactory->getEndpoint(ReloadHttpCertificates::class); |
1281: | $endpoint->setParams($params); |
1282: | |
1283: | return $this->performRequest($endpoint); |
1284: | } |
1285: | |
1286: | /** |
1287: | * Reloads the transport communication certificates. |
1288: | * |
1289: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1290: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1291: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1292: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1293: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1294: | * |
1295: | * @param array $params Associative array of parameters |
1296: | * @return array |
1297: | */ |
1298: | public function reloadTransportCertificates(array $params = []) |
1299: | { |
1300: | $endpoint = $this->endpointFactory->getEndpoint(ReloadTransportCertificates::class); |
1301: | $endpoint->setParams($params); |
1302: | |
1303: | return $this->performRequest($endpoint); |
1304: | } |
1305: | |
1306: | /** |
1307: | * Retrieves the names of current tenants. Requires super admin or `kibanaserver` permissions. |
1308: | * |
1309: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1310: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1311: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1312: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1313: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1314: | * |
1315: | * @param array $params Associative array of parameters |
1316: | * @return array |
1317: | */ |
1318: | public function tenantInfo(array $params = []) |
1319: | { |
1320: | $endpoint = $this->endpointFactory->getEndpoint(TenantInfo::class); |
1321: | $endpoint->setParams($params); |
1322: | |
1323: | return $this->performRequest($endpoint); |
1324: | } |
1325: | |
1326: | /** |
1327: | * Updates the audit configuration. |
1328: | * |
1329: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1330: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1331: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1332: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1333: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1334: | * |
1335: | * @param array $params Associative array of parameters |
1336: | * @return array |
1337: | */ |
1338: | public function updateAuditConfiguration(array $params = []) |
1339: | { |
1340: | $body = $this->extractArgument($params, 'body'); |
1341: | |
1342: | $endpoint = $this->endpointFactory->getEndpoint(UpdateAuditConfiguration::class); |
1343: | $endpoint->setParams($params); |
1344: | $endpoint->setBody($body); |
1345: | |
1346: | return $this->performRequest($endpoint); |
1347: | } |
1348: | |
1349: | /** |
1350: | * Updates the settings for an existing security configuration. Requires super admin or REST API permissions. |
1351: | * |
1352: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1353: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1354: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1355: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1356: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1357: | * |
1358: | * @param array $params Associative array of parameters |
1359: | * @return array |
1360: | */ |
1361: | public function updateConfiguration(array $params = []) |
1362: | { |
1363: | $body = $this->extractArgument($params, 'body'); |
1364: | |
1365: | $endpoint = $this->endpointFactory->getEndpoint(UpdateConfiguration::class); |
1366: | $endpoint->setParams($params); |
1367: | $endpoint->setBody($body); |
1368: | |
1369: | return $this->performRequest($endpoint); |
1370: | } |
1371: | |
1372: | /** |
1373: | * Adds or updates the specified distinguished names in the cluster or node allowlist. Requires super admin or REST API permissions. |
1374: | * |
1375: | * $params['cluster_name'] = (string) The name of the cluster containing the `nodesDn` value to create or update. (Required) |
1376: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1377: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1378: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1379: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1380: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1381: | * |
1382: | * @param array $params Associative array of parameters |
1383: | * @return array |
1384: | */ |
1385: | public function updateDistinguishedName(array $params = []) |
1386: | { |
1387: | $cluster_name = $this->extractArgument($params, 'cluster_name'); |
1388: | $body = $this->extractArgument($params, 'body'); |
1389: | |
1390: | $endpoint = $this->endpointFactory->getEndpoint(UpdateDistinguishedName::class); |
1391: | $endpoint->setParams($params); |
1392: | $endpoint->setClusterName($cluster_name); |
1393: | $endpoint->setBody($body); |
1394: | |
1395: | return $this->performRequest($endpoint); |
1396: | } |
1397: | |
1398: | /** |
1399: | * Checks whether the v6 security configuration is valid and ready to be migrated to v7. |
1400: | * |
1401: | * $params['accept_invalid'] = (boolean) Whether an invalid v6 configuration should be allowed. |
1402: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1403: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1404: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1405: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1406: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1407: | * |
1408: | * @param array $params Associative array of parameters |
1409: | * @return array |
1410: | */ |
1411: | public function validate(array $params = []) |
1412: | { |
1413: | $endpoint = $this->endpointFactory->getEndpoint(Validate::class); |
1414: | $endpoint->setParams($params); |
1415: | |
1416: | return $this->performRequest($endpoint); |
1417: | } |
1418: | |
1419: | /** |
1420: | * Gets the identity information for the user currently logged in. |
1421: | * |
1422: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1423: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1424: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1425: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1426: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1427: | * |
1428: | * @param array $params Associative array of parameters |
1429: | * @return array |
1430: | */ |
1431: | public function whoAmI(array $params = []) |
1432: | { |
1433: | $endpoint = $this->endpointFactory->getEndpoint(WhoAmI::class); |
1434: | $endpoint->setParams($params); |
1435: | |
1436: | return $this->performRequest($endpoint); |
1437: | } |
1438: | |
1439: | /** |
1440: | * Gets the identity information for the user currently logged in. To use this operation, you must have access to this endpoint when authorization at REST layer is enabled. |
1441: | * |
1442: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. (Default = false) |
1443: | * $params['human'] = (boolean) Whether to return human readable values for statistics. (Default = true) |
1444: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. (Default = false) |
1445: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1446: | * $params['filter_path'] = (any) Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with "-". |
1447: | * |
1448: | * @param array $params Associative array of parameters |
1449: | * @return array |
1450: | */ |
1451: | public function whoAmIProtected(array $params = []) |
1452: | { |
1453: | $endpoint = $this->endpointFactory->getEndpoint(WhoAmIProtected::class); |
1454: | $endpoint->setParams($params); |
1455: | |
1456: | return $this->performRequest($endpoint); |
1457: | } |
1458: | |
1459: | /** |
1460: | * Changes the password for the current user. |
1461: | * |
1462: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1463: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1464: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1465: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1466: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1467: | * $params['current_password'] = (string) The current password |
1468: | * $params['password'] = (string) New password |
1469: | * |
1470: | * @param array $params Associative array of parameters |
1471: | * @return array |
1472: | */ |
1473: | public function changePassword(array $params = []) |
1474: | { |
1475: | $body = $this->extractArgument($params, 'body'); |
1476: | if ($body === null) { |
1477: | $body = [ |
1478: | 'current_password' => $this->extractArgument($params, 'current_password'), |
1479: | 'password' => $this->extractArgument($params, 'password'), |
1480: | ]; |
1481: | } |
1482: | |
1483: | $endpoint = $this->endpointFactory->getEndpoint(ChangePassword::class); |
1484: | $endpoint->setParams($params); |
1485: | $endpoint->setBody($body); |
1486: | |
1487: | return $this->performRequest($endpoint); |
1488: | } |
1489: | /** |
1490: | * Creates or replaces the specified action group. |
1491: | * |
1492: | * $params['action_group'] = (string) The name of the action group to create or replace. (Required) |
1493: | * $params['allowed_actions'] = (array) list of allowed actions |
1494: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1495: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1496: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1497: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1498: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1499: | * |
1500: | * @param array $params Associative array of parameters |
1501: | * @return array |
1502: | */ |
1503: | public function createActionGroup(array $params = []) |
1504: | { |
1505: | $action_group = $this->extractArgument($params, 'action_group'); |
1506: | $body = $this->extractArgument($params, 'body'); |
1507: | if ($body === null) { |
1508: | $body = [ |
1509: | 'allowed_actions' => $this->extractArgument($params, 'allowed_actions'), |
1510: | ]; |
1511: | } |
1512: | |
1513: | $endpoint = $this->endpointFactory->getEndpoint(CreateActionGroup::class); |
1514: | $endpoint->setParams($params); |
1515: | $endpoint->setActionGroup($action_group); |
1516: | $endpoint->setBody($body); |
1517: | |
1518: | return $this->performRequest($endpoint); |
1519: | } |
1520: | /** |
1521: | * Creates or replaces the specified role mapping. |
1522: | * |
1523: | * $params['role'] = (string) (Required) |
1524: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1525: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1526: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1527: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1528: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1529: | * $params['backend_roles'] = (array) |
1530: | * $params['hosts'] = (array) |
1531: | * $params['users'] = (array) |
1532: | * |
1533: | * @param array $params Associative array of parameters |
1534: | * @return array |
1535: | */ |
1536: | public function createRoleMapping(array $params = []) |
1537: | { |
1538: | $role = $this->extractArgument($params, 'role'); |
1539: | $body = $this->extractArgument($params, 'body'); |
1540: | if ($body === null) { |
1541: | $body = array_filter([ |
1542: | 'backend_roles' => $this->extractArgument($params, 'backend_roles'), |
1543: | 'hosts' => $this->extractArgument($params, 'hosts'), |
1544: | 'users' => $this->extractArgument($params, 'users'), |
1545: | ]); |
1546: | } |
1547: | |
1548: | $endpoint = $this->endpointFactory->getEndpoint(CreateRoleMapping::class); |
1549: | $endpoint->setParams($params); |
1550: | $endpoint->setRole($role); |
1551: | $endpoint->setBody($body); |
1552: | |
1553: | return $this->performRequest($endpoint); |
1554: | } |
1555: | /** |
1556: | * Creates or replaces the specified role. |
1557: | * |
1558: | * $params['role'] = (string) (Required) |
1559: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1560: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1561: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1562: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1563: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1564: | * $params['cluster_permissions'] = (array) |
1565: | * $params['index_permissions'] = (array) |
1566: | * $params['tenant_permissions'] = (array) |
1567: | * |
1568: | * @param array $params Associative array of parameters |
1569: | * @return array |
1570: | */ |
1571: | public function createRole(array $params = []) |
1572: | { |
1573: | $role = $this->extractArgument($params, 'role'); |
1574: | $body = $this->extractArgument($params, 'body'); |
1575: | if ($body === null) { |
1576: | $body = array_filter([ |
1577: | 'cluster_permissions' => $this->extractArgument($params, 'cluster_permissions'), |
1578: | 'index_permissions' => $this->extractArgument($params, 'index_permissions'), |
1579: | 'tenant_permissions' => $this->extractArgument($params, 'tenant_permissions'), |
1580: | ]); |
1581: | } |
1582: | |
1583: | $endpoint = $this->endpointFactory->getEndpoint(CreateRole::class); |
1584: | $endpoint->setParams($params); |
1585: | $endpoint->setRole($role); |
1586: | $endpoint->setBody($body); |
1587: | |
1588: | return $this->performRequest($endpoint); |
1589: | } |
1590: | /** |
1591: | * Creates or replaces the specified tenant. |
1592: | * |
1593: | * $params['tenant'] = (string) The name of the tenant to create |
1594: | * $params['description'] = (string) Description of the tenant |
1595: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1596: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1597: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1598: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1599: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1600: | * |
1601: | * @param array $params Associative array of parameters |
1602: | * @return array |
1603: | */ |
1604: | public function createTenant(array $params = []) |
1605: | { |
1606: | $tenant = $this->extractArgument($params, 'tenant'); |
1607: | $body = $this->extractArgument($params, 'body'); |
1608: | if ($body === null) { |
1609: | $body = [ |
1610: | 'description' => $this->extractArgument($params, 'description'), |
1611: | ]; |
1612: | } |
1613: | |
1614: | $endpoint = $this->endpointFactory->getEndpoint(CreateTenant::class); |
1615: | $endpoint->setParams($params); |
1616: | $endpoint->setTenant($tenant); |
1617: | $endpoint->setBody($body); |
1618: | |
1619: | return $this->performRequest($endpoint); |
1620: | } |
1621: | /** |
1622: | * Creates or replaces the specified user. |
1623: | * |
1624: | * $params['username'] = (string) (Required) |
1625: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1626: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1627: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1628: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1629: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1630: | * $params['password'] = (string) |
1631: | * $params['opendistro_security_roles'] = (array) |
1632: | * $params['backend_roles'] = (array) |
1633: | * $params['attributes'] = (array) |
1634: | * |
1635: | * @param array $params Associative array of parameters |
1636: | * @return array |
1637: | */ |
1638: | public function createUser(array $params = []) |
1639: | { |
1640: | $username = $this->extractArgument($params, 'username'); |
1641: | $body = $this->extractArgument($params, 'body'); |
1642: | if ($body === null) { |
1643: | $body = array_filter([ |
1644: | 'password' => $this->extractArgument($params, 'password'), |
1645: | 'opendistro_security_roles' => $this->extractArgument($params, 'opendistro_security_roles'), |
1646: | 'backend_roles' => $this->extractArgument($params, 'backend_roles'), |
1647: | 'attributes' => $this->extractArgument($params, 'attributes'), |
1648: | ]); |
1649: | } |
1650: | |
1651: | $endpoint = $this->endpointFactory->getEndpoint(CreateUser::class); |
1652: | $endpoint->setParams($params); |
1653: | $endpoint->setUsername($username); |
1654: | $endpoint->setBody($body); |
1655: | |
1656: | return $this->performRequest($endpoint); |
1657: | } |
1658: | /** |
1659: | * Proxy function to deleteDistinguishedNames() to prevent BC break. |
1660: | * This API will be removed in a future version. Use 'deleteDistinguishedName' API instead. |
1661: | */ |
1662: | public function deleteDistinguishedNames(array $params = []) |
1663: | { |
1664: | return $this->deleteDistinguishedName($params); |
1665: | } |
1666: | /** |
1667: | * Proxy function to getAccount() to prevent BC break. |
1668: | * This API will be removed in a future version. Use 'getAccountDetails' API instead. |
1669: | */ |
1670: | public function getAccount(array $params = []) |
1671: | { |
1672: | return $this->getAccountDetails($params); |
1673: | } |
1674: | /** |
1675: | * Retrieves all action groups. |
1676: | * If 'action_group' is provided in $params, calls 'getActionGroup'. |
1677: | * |
1678: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1679: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1680: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1681: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1682: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1683: | * |
1684: | * @param array $params Associative array of parameters |
1685: | * @return array |
1686: | */ |
1687: | public function getActionGroups(array $params = []) |
1688: | { |
1689: | if (isset($params['action_group'])) { |
1690: | $endpoint = $this->endpointFactory->getEndpoint(GetActionGroup::class); |
1691: | $action_group = $this->extractArgument($params, 'action_group'); |
1692: | $endpoint->setActionGroup($action_group); |
1693: | } else { |
1694: | $endpoint = $this->endpointFactory->getEndpoint(GetActionGroups::class); |
1695: | } |
1696: | $endpoint->setParams($params); |
1697: | |
1698: | return $this->performRequest($endpoint); |
1699: | } |
1700: | /** |
1701: | * Proxy function to getConfig() to prevent BC break. |
1702: | * This API will be removed in a future version. Use 'getConfiguration' API instead. |
1703: | */ |
1704: | public function getConfig(array $params = []) |
1705: | { |
1706: | return $this->getConfiguration($params); |
1707: | } |
1708: | /** |
1709: | * Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. |
1710: | * If 'cluster_name' is provided in $params, calls GetDistinguishedName. |
1711: | * |
1712: | * $params['cluster_name'] = (string) Name of the cluster. |
1713: | * $params['show_all'] = (boolean) Show all DN. |
1714: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1715: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1716: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1717: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1718: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1719: | * |
1720: | * @param array $params Associative array of parameters |
1721: | * @return array |
1722: | */ |
1723: | public function getDistinguishedNames(array $params = []) |
1724: | { |
1725: | if (isset($params['cluster_name'])) { |
1726: | $endpoint = $this->endpointFactory->getEndpoint(GetDistinguishedName::class); |
1727: | $cluster_name = $this->extractArgument($params, 'cluster_name'); |
1728: | $endpoint->setClusterName($cluster_name); |
1729: | } else { |
1730: | $endpoint = $this->endpointFactory->getEndpoint(GetDistinguishedNames::class); |
1731: | } |
1732: | $endpoint->setParams($params); |
1733: | |
1734: | return $this->performRequest($endpoint); |
1735: | } |
1736: | /** |
1737: | * Retrieves role mappings. Only accessible to super-admins and with rest-api permissions when enabled. |
1738: | * If 'role' is provided in $params, calls GetRoleMapping. |
1739: | * |
1740: | * $params['role'] = (string) Name of the role. |
1741: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1742: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1743: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1744: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1745: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1746: | * |
1747: | * @param array $params Associative array of parameters |
1748: | * @return array |
1749: | */ |
1750: | public function getRoleMappings(array $params = []) |
1751: | { |
1752: | if (isset($params['role'])) { |
1753: | $endpoint = $this->endpointFactory->getEndpoint(GetRoleMapping::class); |
1754: | $role = $this->extractArgument($params, 'role'); |
1755: | $endpoint->setRole($role); |
1756: | } else { |
1757: | $endpoint = $this->endpointFactory->getEndpoint(GetRoleMappings::class); |
1758: | } |
1759: | $endpoint->setParams($params); |
1760: | |
1761: | return $this->performRequest($endpoint); |
1762: | } |
1763: | /** |
1764: | * Retrieves roles. Only accessible to super-admins and with rest-api permissions when enabled. |
1765: | * If 'role' is provided in $params, calls getRole. |
1766: | * |
1767: | * $params['role'] = (string) Name of the role. |
1768: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1769: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1770: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1771: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1772: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1773: | * |
1774: | * @param array $params Associative array of parameters |
1775: | * @return array |
1776: | */ |
1777: | public function getRoles(array $params = []) |
1778: | { |
1779: | if (isset($params['role'])) { |
1780: | $endpoint = $this->endpointFactory->getEndpoint(GetRole::class); |
1781: | $role = $this->extractArgument($params, 'role'); |
1782: | $endpoint->setRole($role); |
1783: | } else { |
1784: | $endpoint = $this->endpointFactory->getEndpoint(GetRoles::class); |
1785: | } |
1786: | $endpoint->setParams($params); |
1787: | |
1788: | return $this->performRequest($endpoint); |
1789: | } |
1790: | /** |
1791: | * Retrieves tenants. Only accessible to super-admins and with rest-api permissions when enabled. |
1792: | * If 'tenant' is provided in $params, calls GetTenant. |
1793: | * |
1794: | * $params['tenant'] = (string) Name of the tenant. |
1795: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1796: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1797: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1798: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1799: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1800: | * |
1801: | * @param array $params Associative array of parameters |
1802: | * @return array |
1803: | */ |
1804: | public function getTenants(array $params = []) |
1805: | { |
1806: | if (isset($params['tenant'])) { |
1807: | $endpoint = $this->endpointFactory->getEndpoint(GetTenant::class); |
1808: | $tenant = $this->extractArgument($params, 'tenant'); |
1809: | $endpoint->setTenant($tenant); |
1810: | } else { |
1811: | $endpoint = $this->endpointFactory->getEndpoint(GetTenants::class); |
1812: | } |
1813: | $endpoint->setParams($params); |
1814: | |
1815: | return $this->performRequest($endpoint); |
1816: | } |
1817: | /** |
1818: | * Retrieve all internal users. |
1819: | * If 'username' is provided in $params, calls 'getUser'. |
1820: | * |
1821: | * $params['username'] = (string) The username of the user to fetch, omit to fetch all (optional). |
1822: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1823: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1824: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1825: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1826: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1827: | * |
1828: | * @param array $params Associative array of parameters |
1829: | * @return array |
1830: | */ |
1831: | public function getUsers(array $params = []): array |
1832: | { |
1833: | $endpointBuilder = $this->endpoints; |
1834: | |
1835: | if (isset($params['username'])) { |
1836: | $endpoint = $this->endpointFactory->getEndpoint(GetUser::class); |
1837: | $username = $this->extractArgument($params, 'username'); |
1838: | $endpoint->setUsername($username); |
1839: | } else { |
1840: | $endpoint = $this->endpointFactory->getEndpoint(GetUsers::class); |
1841: | } |
1842: | |
1843: | $endpoint->setParams($params); |
1844: | |
1845: | return $this->performRequest($endpoint); |
1846: | } |
1847: | /** |
1848: | * Creates, updates, or deletes multiple action groups in a single call. |
1849: | * If 'action_group' is provided in $params, calls patchActionGroup. |
1850: | * |
1851: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1852: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1853: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1854: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1855: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1856: | * |
1857: | * @param array $params Associative array of parameters |
1858: | * @return array |
1859: | */ |
1860: | public function patchActionGroups(array $params = []) |
1861: | { |
1862: | $body = $this->extractArgument($params, 'body'); |
1863: | |
1864: | if ($body === null) { |
1865: | $body = $this->extractArgument($params, 'ops') ?? []; |
1866: | } |
1867: | |
1868: | if (isset($params['action_group'])) { |
1869: | $endpoint = $this->endpointFactory->getEndpoint(PatchActionGroup::class); |
1870: | $action_group = $this->extractArgument($params, 'action_group'); |
1871: | $endpoint->setActionGroup($action_group); |
1872: | } else { |
1873: | $endpoint = $this->endpointFactory->getEndpoint(PatchActionGroups::class); |
1874: | } |
1875: | $endpoint->setParams($params); |
1876: | $endpoint->setBody($body); |
1877: | |
1878: | return $this->performRequest($endpoint); |
1879: | } |
1880: | /** |
1881: | * Proxy function to patchConfig() to prevent BC break. |
1882: | * This API will be removed in a future version. Use 'patchConfiguration' API instead. |
1883: | */ |
1884: | public function patchConfig(array $params = []) |
1885: | { |
1886: | $ops = $this->extractArgument($params, 'ops'); |
1887: | if ($ops !== null) { |
1888: | $params['body'] = $ops; |
1889: | } |
1890: | return $this->patchConfiguration($params); |
1891: | } |
1892: | /** |
1893: | * Creates or updates multiple role mappings in a single call. |
1894: | * If 'role' is provided in $params, calls patchRoleMappings. |
1895: | * |
1896: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1897: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1898: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1899: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1900: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1901: | * |
1902: | * @param array $params Associative array of parameters |
1903: | * @return array |
1904: | */ |
1905: | public function patchRoleMappings(array $params = []) |
1906: | { |
1907: | $body = $this->extractArgument($params, 'body'); |
1908: | if ($body === null) { |
1909: | $body = $this->extractArgument($params, 'ops') ?? []; |
1910: | } |
1911: | |
1912: | if (isset($params['role'])) { |
1913: | $endpoint = $this->endpointFactory->getEndpoint(PatchRoleMapping::class); |
1914: | $role = $this->extractArgument($params, 'role'); |
1915: | $endpoint->setRole($role); |
1916: | } else { |
1917: | $endpoint = $this->endpointFactory->getEndpoint(PatchRoleMappings::class); |
1918: | } |
1919: | $endpoint->setParams($params); |
1920: | $endpoint->setBody($body); |
1921: | |
1922: | return $this->performRequest($endpoint); |
1923: | } |
1924: | /** |
1925: | * Creates, updates, or deletes multiple roles in a single call. |
1926: | * If 'role' is provided in $params, calls patchRole. |
1927: | * |
1928: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1929: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1930: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1931: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1932: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1933: | * |
1934: | * @param array $params Associative array of parameters |
1935: | * @return array |
1936: | */ |
1937: | public function patchRoles(array $params = []) |
1938: | { |
1939: | $body = $this->extractArgument($params, 'body'); |
1940: | if ($body === null) { |
1941: | $body = $this->extractArgument($params, 'ops') ?? []; |
1942: | } |
1943: | |
1944: | if (isset($params['role'])) { |
1945: | $endpoint = $this->endpointFactory->getEndpoint(PatchRole::class); |
1946: | $role = $this->extractArgument($params, 'role'); |
1947: | $endpoint->setRole($role); |
1948: | } else { |
1949: | $endpoint = $this->endpointFactory->getEndpoint(PatchRoles::class); |
1950: | } |
1951: | |
1952: | $endpoint->setParams($params); |
1953: | $endpoint->setBody($body); |
1954: | |
1955: | return $this->performRequest($endpoint); |
1956: | } |
1957: | /** |
1958: | * Add, delete, or modify multiple tenants in a single call. |
1959: | * If 'tenant' is provided in $params, calls 'patchTenant'. |
1960: | * |
1961: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1962: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1963: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1964: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1965: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1966: | * |
1967: | * @param array $params Associative array of parameters |
1968: | * @return array |
1969: | */ |
1970: | public function patchTenants(array $params = []) |
1971: | { |
1972: | $body = $this->extractArgument($params, 'body'); |
1973: | if ($body === null) { |
1974: | $body = $this->extractArgument($params, 'ops') ?? []; |
1975: | } |
1976: | |
1977: | if (isset($params['tenant'])) { |
1978: | $endpoint = $this->endpointFactory->getEndpoint(PatchTenant::class); |
1979: | $tenant = $this->extractArgument($params, 'tenant'); |
1980: | $endpoint->setTenant($tenant); |
1981: | } else { |
1982: | $endpoint = $this->endpointFactory->getEndpoint(PatchTenants::class); |
1983: | } |
1984: | |
1985: | $endpoint->setParams($params); |
1986: | $endpoint->setBody($body); |
1987: | |
1988: | return $this->performRequest($endpoint); |
1989: | } |
1990: | /** |
1991: | * Creates, updates, or deletes multiple internal users in a single call. |
1992: | * If 'username' is provided in $params, calls patchUser. |
1993: | * |
1994: | * $params['pretty'] = (boolean) Whether to pretty format the returned JSON response. |
1995: | * $params['human'] = (boolean) Whether to return human readable values for statistics. |
1996: | * $params['error_trace'] = (boolean) Whether to include the stack trace of returned errors. |
1997: | * $params['source'] = (string) The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. |
1998: | * $params['filter_path'] = (any) Comma-separated list of filters used to reduce the response. |
1999: | * |
2000: | * @param array $params Associative array of parameters |
2001: | * @return array |
2002: | */ |
2003: | public function patchUsers(array $params = []) |
2004: | { |
2005: | $body = $this->extractArgument($params, 'body'); |
2006: | if ($body === null) { |
2007: | $body = $this->extractArgument($params, 'ops') ?? []; |
2008: | } |
2009: | |
2010: | if (isset($params['username'])) { |
2011: | $endpoint = $this->endpointFactory->getEndpoint(PatchUser::class); |
2012: | $username = $this->extractArgument($params, 'username'); |
2013: | $endpoint->setUsername($username); |
2014: | } else { |
2015: | $endpoint = $this->endpointFactory->getEndpoint(PatchUsers::class); |
2016: | } |
2017: | |
2018: | $endpoint->setParams($params); |
2019: | $endpoint->setBody($body); |
2020: | |
2021: | return $this->performRequest($endpoint); |
2022: | } |
2023: | /** |
2024: | * Proxy function to updateConfig() to prevent BC break. |
2025: | * This API will be removed in a future version. Use 'updateConfiguration' API instead. |
2026: | */ |
2027: | public function updateConfig(array $params = []) |
2028: | { |
2029: | $body = [ 'dynamic' => $this->extractArgument($params, 'dynamic')]; |
2030: | $params['body'] = $body; |
2031: | return $this->updateConfiguration($params); |
2032: | } |
2033: | /** |
2034: | * Proxy function to updateDistinguishedNames() to prevent BC break. |
2035: | * This API will be removed in a future version. Use 'updateDistinguishedName' API instead. |
2036: | */ |
2037: | public function updateDistinguishedNames(array $params = []) |
2038: | { |
2039: | $body = [ 'nodes_dn' => $this->extractArgument($params, 'nodes_dn')]; |
2040: | $params['body'] = $body; |
2041: | return $this->updateDistinguishedName($params); |
2042: | } |
2043: | } |
2044: |