com.datadog.api.client.v1.api.LogsPipelinesApi Maven / Gradle / Ivy
Show all versions of datadog-api-client Show documentation
package com.datadog.api.client.v1.api;
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.ApiResponse;
import com.datadog.api.client.Pair;
import com.datadog.api.client.v1.model.LogsPipeline;
import com.datadog.api.client.v1.model.LogsPipelinesOrder;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.GenericType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class LogsPipelinesApi {
private ApiClient apiClient;
public LogsPipelinesApi() {
this(ApiClient.getDefaultApiClient());
}
public LogsPipelinesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API client.
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client.
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create a pipeline.
*
* See {@link #createLogsPipelineWithHttpInfo}.
*
* @param body Definition of the new pipeline. (required)
* @return LogsPipeline
* @throws ApiException if fails to make API call
*/
public LogsPipeline createLogsPipeline(LogsPipeline body) throws ApiException {
return createLogsPipelineWithHttpInfo(body).getData();
}
/**
* Create a pipeline.
*
*
See {@link #createLogsPipelineWithHttpInfoAsync}.
*
* @param body Definition of the new pipeline. (required)
* @return CompletableFuture<LogsPipeline>
*/
public CompletableFuture createLogsPipelineAsync(LogsPipeline body) {
return createLogsPipelineWithHttpInfoAsync(body)
.thenApply(
response -> {
return response.getData();
});
}
/**
* Create a pipeline in your organization.
*
* @param body Definition of the new pipeline. (required)
* @return ApiResponse<LogsPipeline>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 400 Bad Request -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse createLogsPipelineWithHttpInfo(LogsPipeline body)
throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(
400, "Missing the required parameter 'body' when calling createLogsPipeline");
}
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipelines";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.createLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"POST",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Create a pipeline.
*
* See {@link #createLogsPipelineWithHttpInfo}.
*
* @param body Definition of the new pipeline. (required)
* @return CompletableFuture<ApiResponse<LogsPipeline>>
*/
public CompletableFuture> createLogsPipelineWithHttpInfoAsync(
LogsPipeline body) {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'body' when calling createLogsPipeline"));
return result;
}
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipelines";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.createLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"POST",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Delete a pipeline.
*
* See {@link #deleteLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @throws ApiException if fails to make API call
*/
public void deleteLogsPipeline(String pipelineId) throws ApiException {
deleteLogsPipelineWithHttpInfo(pipelineId);
}
/**
* Delete a pipeline.
*
*
See {@link #deleteLogsPipelineWithHttpInfoAsync}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @return CompletableFuture
*/
public CompletableFuture deleteLogsPipelineAsync(String pipelineId) {
return deleteLogsPipelineWithHttpInfoAsync(pipelineId)
.thenApply(
response -> {
return response.getData();
});
}
/**
* Delete a given pipeline from your organization. This endpoint takes no JSON arguments.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 400 Bad Request -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse deleteLogsPipelineWithHttpInfo(String pipelineId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
throw new ApiException(
400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline");
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.deleteLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"*/*"},
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"DELETE",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
null);
}
/**
* Delete a pipeline.
*
* See {@link #deleteLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @return CompletableFuture<ApiResponse<Void>>
*/
public CompletableFuture> deleteLogsPipelineWithHttpInfoAsync(
String pipelineId) {
Object localVarPostBody = null;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'pipelineId' when calling deleteLogsPipeline"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.deleteLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"*/*"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"DELETE",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
null);
}
/**
* Get a pipeline.
*
* See {@link #getLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to get. (required)
* @return LogsPipeline
* @throws ApiException if fails to make API call
*/
public LogsPipeline getLogsPipeline(String pipelineId) throws ApiException {
return getLogsPipelineWithHttpInfo(pipelineId).getData();
}
/**
* Get a pipeline.
*
*
See {@link #getLogsPipelineWithHttpInfoAsync}.
*
* @param pipelineId ID of the pipeline to get. (required)
* @return CompletableFuture<LogsPipeline>
*/
public CompletableFuture getLogsPipelineAsync(String pipelineId) {
return getLogsPipelineWithHttpInfoAsync(pipelineId)
.thenApply(
response -> {
return response.getData();
});
}
/**
* Get a specific pipeline from your organization. This endpoint takes no JSON arguments.
*
* @param pipelineId ID of the pipeline to get. (required)
* @return ApiResponse<LogsPipeline>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 400 Bad Request -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse getLogsPipelineWithHttpInfo(String pipelineId)
throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
throw new ApiException(
400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline");
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.getLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Get a pipeline.
*
* See {@link #getLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to get. (required)
* @return CompletableFuture<ApiResponse<LogsPipeline>>
*/
public CompletableFuture> getLogsPipelineWithHttpInfoAsync(
String pipelineId) {
Object localVarPostBody = null;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'pipelineId' when calling getLogsPipeline"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.getLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Get pipeline order.
*
* See {@link #getLogsPipelineOrderWithHttpInfo}.
*
* @return LogsPipelinesOrder
* @throws ApiException if fails to make API call
*/
public LogsPipelinesOrder getLogsPipelineOrder() throws ApiException {
return getLogsPipelineOrderWithHttpInfo().getData();
}
/**
* Get pipeline order.
*
*
See {@link #getLogsPipelineOrderWithHttpInfoAsync}.
*
* @return CompletableFuture<LogsPipelinesOrder>
*/
public CompletableFuture getLogsPipelineOrderAsync() {
return getLogsPipelineOrderWithHttpInfoAsync()
.thenApply(
response -> {
return response.getData();
});
}
/**
* Get the current order of your pipelines. This endpoint takes no JSON arguments.
*
* @return ApiResponse<LogsPipelinesOrder>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse getLogsPipelineOrderWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipeline-order";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.getLogsPipelineOrder",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Get pipeline order.
*
* See {@link #getLogsPipelineOrderWithHttpInfo}.
*
* @return CompletableFuture<ApiResponse<LogsPipelinesOrder>>
*/
public CompletableFuture>
getLogsPipelineOrderWithHttpInfoAsync() {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipeline-order";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.getLogsPipelineOrder",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Get all pipelines.
*
* See {@link #listLogsPipelinesWithHttpInfo}.
*
* @return List<LogsPipeline>
* @throws ApiException if fails to make API call
*/
public List listLogsPipelines() throws ApiException {
return listLogsPipelinesWithHttpInfo().getData();
}
/**
* Get all pipelines.
*
* See {@link #listLogsPipelinesWithHttpInfoAsync}.
*
* @return CompletableFuture<List<LogsPipeline>>
*/
public CompletableFuture> listLogsPipelinesAsync() {
return listLogsPipelinesWithHttpInfoAsync()
.thenApply(
response -> {
return response.getData();
});
}
/**
* Get all pipelines from your organization. This endpoint takes no JSON arguments.
*
* @return ApiResponse<List<LogsPipeline>>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse> listLogsPipelinesWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipelines";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.listLogsPipelines",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType>() {});
}
/**
* Get all pipelines.
*
* See {@link #listLogsPipelinesWithHttpInfo}.
*
* @return CompletableFuture<ApiResponse<List<LogsPipeline>>>
*/
public CompletableFuture>> listLogsPipelinesWithHttpInfoAsync() {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipelines";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.listLogsPipelines",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"AuthZ", "apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture>> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap(),
false,
new GenericType>() {});
}
/**
* Update a pipeline.
*
* See {@link #updateLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @param body New definition of the pipeline. (required)
* @return LogsPipeline
* @throws ApiException if fails to make API call
*/
public LogsPipeline updateLogsPipeline(String pipelineId, LogsPipeline body) throws ApiException {
return updateLogsPipelineWithHttpInfo(pipelineId, body).getData();
}
/**
* Update a pipeline.
*
*
See {@link #updateLogsPipelineWithHttpInfoAsync}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @param body New definition of the pipeline. (required)
* @return CompletableFuture<LogsPipeline>
*/
public CompletableFuture updateLogsPipelineAsync(
String pipelineId, LogsPipeline body) {
return updateLogsPipelineWithHttpInfoAsync(pipelineId, body)
.thenApply(
response -> {
return response.getData();
});
}
/**
* Update a given pipeline configuration to change it’s processors or their order.
*
* Note: Using this method updates your pipeline configuration by
* replacing your current configuration with the new one sent to your Datadog
* organization.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @param body New definition of the pipeline. (required)
* @return ApiResponse<LogsPipeline>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 400 Bad Request -
* 403 Forbidden -
* 429 Too many requests -
*
*/
public ApiResponse updateLogsPipelineWithHttpInfo(
String pipelineId, LogsPipeline body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
throw new ApiException(
400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(
400, "Missing the required parameter 'body' when calling updateLogsPipeline");
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.updateLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"PUT",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Update a pipeline.
*
* See {@link #updateLogsPipelineWithHttpInfo}.
*
* @param pipelineId ID of the pipeline to delete. (required)
* @param body New definition of the pipeline. (required)
* @return CompletableFuture<ApiResponse<LogsPipeline>>
*/
public CompletableFuture> updateLogsPipelineWithHttpInfoAsync(
String pipelineId, LogsPipeline body) {
Object localVarPostBody = body;
// verify the required parameter 'pipelineId' is set
if (pipelineId == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'pipelineId' when calling updateLogsPipeline"));
return result;
}
// verify the required parameter 'body' is set
if (body == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'body' when calling updateLogsPipeline"));
return result;
}
// create path and map variables
String localVarPath =
"/api/v1/logs/config/pipelines/{pipeline_id}"
.replaceAll(
"\\{" + "pipeline_id" + "\\}", apiClient.escapeString(pipelineId.toString()));
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.updateLogsPipeline",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"PUT",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Update pipeline order.
*
* See {@link #updateLogsPipelineOrderWithHttpInfo}.
*
* @param body Object containing the new ordered list of pipeline IDs. (required)
* @return LogsPipelinesOrder
* @throws ApiException if fails to make API call
*/
public LogsPipelinesOrder updateLogsPipelineOrder(LogsPipelinesOrder body) throws ApiException {
return updateLogsPipelineOrderWithHttpInfo(body).getData();
}
/**
* Update pipeline order.
*
*
See {@link #updateLogsPipelineOrderWithHttpInfoAsync}.
*
* @param body Object containing the new ordered list of pipeline IDs. (required)
* @return CompletableFuture<LogsPipelinesOrder>
*/
public CompletableFuture updateLogsPipelineOrderAsync(
LogsPipelinesOrder body) {
return updateLogsPipelineOrderWithHttpInfoAsync(body)
.thenApply(
response -> {
return response.getData();
});
}
/**
* Update the order of your pipelines. Since logs are processed sequentially, reordering a
* pipeline may change the structure and content of the data processed by other pipelines and
* their processors.
*
* Note: Using the PUT
method updates your pipeline order by
* replacing your current order with the new one sent to your Datadog organization.
*
* @param body Object containing the new ordered list of pipeline IDs. (required)
* @return ApiResponse<LogsPipelinesOrder>
* @throws ApiException if fails to make API call
* @http.response.details
*
* Response details
* Status Code Description Response Headers
* 200 OK -
* 400 Bad Request -
* 403 Forbidden -
* 422 Unprocessable Entity -
* 429 Too many requests -
*
*/
public ApiResponse updateLogsPipelineOrderWithHttpInfo(
LogsPipelinesOrder body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(
400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder");
}
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipeline-order";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.updateLogsPipelineOrder",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
return apiClient.invokeAPI(
"PUT",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
/**
* Update pipeline order.
*
* See {@link #updateLogsPipelineOrderWithHttpInfo}.
*
* @param body Object containing the new ordered list of pipeline IDs. (required)
* @return CompletableFuture<ApiResponse<LogsPipelinesOrder>>
*/
public CompletableFuture>
updateLogsPipelineOrderWithHttpInfoAsync(LogsPipelinesOrder body) {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(
new ApiException(
400, "Missing the required parameter 'body' when calling updateLogsPipelineOrder"));
return result;
}
// create path and map variables
String localVarPath = "/api/v1/logs/config/pipeline-order";
Map localVarHeaderParams = new HashMap();
Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v1.LogsPipelinesApi.updateLogsPipelineOrder",
localVarPath,
new ArrayList(),
localVarHeaderParams,
new HashMap(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth"});
} catch (ApiException ex) {
CompletableFuture> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"PUT",
builder,
localVarHeaderParams,
new String[] {"application/json"},
localVarPostBody,
new HashMap(),
false,
new GenericType() {});
}
}