/* SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ /* * Modifications Copyright OpenSearch Contributors. See * GitHub history for details. * * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch B.V. licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Threading; using System.Threading.Tasks; using static OpenSearch.Net.HttpMethod; namespace OpenSearch.Net.Specification.NodesApi { // Introduced as workaround for https://github.com/elastic/elasticsearch-net/pull/4602 public partial class LowLevelNodesNamespace { ///POST on /_nodes/reload_secure_settings ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ReloadSecureSettingsForAll(ReloadSecureSettingsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, "_nodes/reload_secure_settings", null, RequestParams(requestParameters)); ///POST on /_nodes/reload_secure_settings ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("nodes.reload_secure_settings", "")] public Task ReloadSecureSettingsForAllAsync(ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, "_nodes/reload_secure_settings", ctx, null, RequestParams(requestParameters)); ///POST on /_nodes/{node_id}/reload_secure_settings ///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. ///Request specific configuration such as querystring parameters & request specific connection settings. public TResponse ReloadSecureSettings(string nodeId, ReloadSecureSettingsRequestParameters requestParameters = null) where TResponse : class, IOpenSearchResponse, new() => DoRequest(POST, Url($"_nodes/{nodeId:nodeId}/reload_secure_settings"), null, RequestParams(requestParameters)); ///POST on /_nodes/{node_id}/reload_secure_settings ///A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. ///Request specific configuration such as querystring parameters & request specific connection settings. [MapsApi("nodes.reload_secure_settings", "node_id")] public Task ReloadSecureSettingsAsync(string nodeId, ReloadSecureSettingsRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(POST, Url($"_nodes/{nodeId:nodeId}/reload_secure_settings"), ctx, null, RequestParams(requestParameters)); } }