@@ -177,6 +177,140 @@ public CompletableFuture<ApiResponse<LogsIndex>> createLogsIndexWithHttpInfoAsyn
177
177
new GenericType <LogsIndex >() {});
178
178
}
179
179
180
+ /**
181
+ * Delete an index.
182
+ *
183
+ * <p>See {@link #deleteLogsIndexWithHttpInfo}.
184
+ *
185
+ * @param name Name of the log index. (required)
186
+ * @return LogsIndex
187
+ * @throws ApiException if fails to make API call
188
+ */
189
+ public LogsIndex deleteLogsIndex (String name ) throws ApiException {
190
+ return deleteLogsIndexWithHttpInfo (name ).getData ();
191
+ }
192
+
193
+ /**
194
+ * Delete an index.
195
+ *
196
+ * <p>See {@link #deleteLogsIndexWithHttpInfoAsync}.
197
+ *
198
+ * @param name Name of the log index. (required)
199
+ * @return CompletableFuture<LogsIndex>
200
+ */
201
+ public CompletableFuture <LogsIndex > deleteLogsIndexAsync (String name ) {
202
+ return deleteLogsIndexWithHttpInfoAsync (name )
203
+ .thenApply (
204
+ response -> {
205
+ return response .getData ();
206
+ });
207
+ }
208
+
209
+ /**
210
+ * Delete an existing index from your organization. Index deletions are permanent and cannot be
211
+ * reverted. You cannot recreate an index with the same name as deleted ones.
212
+ *
213
+ * @param name Name of the log index. (required)
214
+ * @return ApiResponse<LogsIndex>
215
+ * @throws ApiException if fails to make API call
216
+ * @http.response.details
217
+ * <table border="1">
218
+ * <caption>Response details</caption>
219
+ * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
220
+ * <tr><td> 200 </td><td> OK </td><td> - </td></tr>
221
+ * <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
222
+ * <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
223
+ * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
224
+ * </table>
225
+ */
226
+ public ApiResponse <LogsIndex > deleteLogsIndexWithHttpInfo (String name ) throws ApiException {
227
+ Object localVarPostBody = null ;
228
+
229
+ // verify the required parameter 'name' is set
230
+ if (name == null ) {
231
+ throw new ApiException (
232
+ 400 , "Missing the required parameter 'name' when calling deleteLogsIndex" );
233
+ }
234
+ // create path and map variables
235
+ String localVarPath =
236
+ "/api/v1/logs/config/indexes/{name}"
237
+ .replaceAll ("\\ {" + "name" + "\\ }" , apiClient .escapeString (name .toString ()));
238
+
239
+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
240
+
241
+ Invocation .Builder builder =
242
+ apiClient .createBuilder (
243
+ "v1.LogsIndexesApi.deleteLogsIndex" ,
244
+ localVarPath ,
245
+ new ArrayList <Pair >(),
246
+ localVarHeaderParams ,
247
+ new HashMap <String , String >(),
248
+ new String [] {"application/json" },
249
+ new String [] {"apiKeyAuth" , "appKeyAuth" });
250
+ return apiClient .invokeAPI (
251
+ "DELETE" ,
252
+ builder ,
253
+ localVarHeaderParams ,
254
+ new String [] {},
255
+ localVarPostBody ,
256
+ new HashMap <String , Object >(),
257
+ false ,
258
+ new GenericType <LogsIndex >() {});
259
+ }
260
+
261
+ /**
262
+ * Delete an index.
263
+ *
264
+ * <p>See {@link #deleteLogsIndexWithHttpInfo}.
265
+ *
266
+ * @param name Name of the log index. (required)
267
+ * @return CompletableFuture<ApiResponse<LogsIndex>>
268
+ */
269
+ public CompletableFuture <ApiResponse <LogsIndex >> deleteLogsIndexWithHttpInfoAsync (String name ) {
270
+ Object localVarPostBody = null ;
271
+
272
+ // verify the required parameter 'name' is set
273
+ if (name == null ) {
274
+ CompletableFuture <ApiResponse <LogsIndex >> result = new CompletableFuture <>();
275
+ result .completeExceptionally (
276
+ new ApiException (
277
+ 400 , "Missing the required parameter 'name' when calling deleteLogsIndex" ));
278
+ return result ;
279
+ }
280
+ // create path and map variables
281
+ String localVarPath =
282
+ "/api/v1/logs/config/indexes/{name}"
283
+ .replaceAll ("\\ {" + "name" + "\\ }" , apiClient .escapeString (name .toString ()));
284
+
285
+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
286
+
287
+ Invocation .Builder builder ;
288
+ try {
289
+ builder =
290
+ apiClient .createBuilder (
291
+ "v1.LogsIndexesApi.deleteLogsIndex" ,
292
+ localVarPath ,
293
+ new ArrayList <Pair >(),
294
+ localVarHeaderParams ,
295
+ new HashMap <String , String >(),
296
+ new String [] {"application/json" },
297
+ new String [] {"apiKeyAuth" , "appKeyAuth" });
298
+ } catch (ApiException ex ) {
299
+ CompletableFuture <ApiResponse <LogsIndex >> result = new CompletableFuture <>();
300
+ result .completeExceptionally (ex );
301
+ return result ;
302
+ }
303
+ return apiClient .invokeAPIAsync (
304
+ "DELETE" ,
305
+ builder ,
306
+ localVarHeaderParams ,
307
+ new String [] {},
308
+ localVarPostBody ,
309
+ new HashMap <String , Object >(),
310
+ false ,
311
+ new GenericType <LogsIndex >() {});
312
+ }
313
+
180
314
/**
181
315
* Get an index.
182
316
*
0 commit comments