
com.influxdb.client.service.TelegrafsService Maven / Gradle / Ivy
package com.influxdb.client.service;
import retrofit2.Call;
import retrofit2.http.*;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import okhttp3.MultipartBody;
import com.influxdb.client.domain.AddResourceMemberRequestBody;
import com.influxdb.client.domain.Error;
import com.influxdb.client.domain.LabelMapping;
import com.influxdb.client.domain.LabelResponse;
import com.influxdb.client.domain.LabelsResponse;
import com.influxdb.client.domain.ResourceMember;
import com.influxdb.client.domain.ResourceMembers;
import com.influxdb.client.domain.ResourceOwner;
import com.influxdb.client.domain.ResourceOwners;
import com.influxdb.client.domain.Telegraf;
import com.influxdb.client.domain.TelegrafPluginRequest;
import com.influxdb.client.domain.Telegrafs;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface TelegrafsService {
/**
* Delete a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Void>
*/
@DELETE("api/v2/telegrafs/{telegrafID}")
Call deleteTelegrafsID(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Delete a label from a Telegraf config
*
* @param telegrafID The Telegraf config ID. (required)
* @param labelID The label ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Void>
*/
@DELETE("api/v2/telegrafs/{telegrafID}/labels/{labelID}")
Call deleteTelegrafsIDLabelsID(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Path("labelID") String labelID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Remove a member from a Telegraf config
*
* @param userID The ID of the member to remove. (required)
* @param telegrafID The Telegraf config ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Void>
*/
@DELETE("api/v2/telegrafs/{telegrafID}/members/{userID}")
Call deleteTelegrafsIDMembersID(
@retrofit2.http.Path("userID") String userID, @retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Remove an owner from a Telegraf config
*
* @param userID The ID of the owner to remove. (required)
* @param telegrafID The Telegraf config ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Void>
*/
@DELETE("api/v2/telegrafs/{telegrafID}/owners/{userID}")
Call deleteTelegrafsIDOwnersID(
@retrofit2.http.Path("userID") String userID, @retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* List all Telegraf configurations
*
* @param zapTraceSpan OpenTracing span context (optional)
* @param orgID The organization ID the Telegraf config belongs to. (optional)
* @return Call<Telegrafs>
*/
@GET("api/v2/telegrafs")
Call getTelegrafs(
@retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Query("orgID") String orgID
);
/**
* Retrieve a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @param accept (optional, default to application/toml)
* @return Call<String>
*/
@GET("api/v2/telegrafs/{telegrafID}")
Call getTelegrafsID(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Header("Accept") String accept
);
/**
* Retrieve a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @param accept (optional, default to application/toml)
* @return Call<ResponseBody>
*/
@GET("api/v2/telegrafs/{telegrafID}")
Call getTelegrafsIDResponseBody(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Header("Accept") String accept
);
/**
* Retrieve a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @param accept (optional, default to application/toml)
* @return Call<String>
*/
@GET("api/v2/telegrafs/{telegrafID}")
Call getTelegrafsIDString(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Header("Accept") String accept
);
/**
* Retrieve a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @param accept (optional, default to application/toml)
* @return Call<Telegraf>
*/
@GET("api/v2/telegrafs/{telegrafID}")
Call getTelegrafsIDTelegraf(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan, @retrofit2.http.Header("Accept") String accept
);
/**
* List all labels for a Telegraf config
*
* @param telegrafID The Telegraf config ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<LabelsResponse>
*/
@GET("api/v2/telegrafs/{telegrafID}/labels")
Call getTelegrafsIDLabels(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* List all users with member privileges for a Telegraf config
*
* @param telegrafID The Telegraf config ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<ResourceMembers>
*/
@GET("api/v2/telegrafs/{telegrafID}/members")
Call getTelegrafsIDMembers(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* List all owners of a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<ResourceOwners>
*/
@GET("api/v2/telegrafs/{telegrafID}/owners")
Call getTelegrafsIDOwners(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Create a Telegraf configuration
*
* @param telegrafPluginRequest Telegraf configuration to create (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Telegraf>
*/
@Headers({
"Content-Type:application/json"
})
@POST("api/v2/telegrafs")
Call postTelegrafs(
@retrofit2.http.Body TelegrafPluginRequest telegrafPluginRequest, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Add a label to a Telegraf config
*
* @param telegrafID The Telegraf config ID. (required)
* @param labelMapping Label to add (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<LabelResponse>
*/
@Headers({
"Content-Type:application/json"
})
@POST("api/v2/telegrafs/{telegrafID}/labels")
Call postTelegrafsIDLabels(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Body LabelMapping labelMapping, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Add a member to a Telegraf config
*
* @param telegrafID The Telegraf config ID. (required)
* @param addResourceMemberRequestBody User to add as member (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<ResourceMember>
*/
@Headers({
"Content-Type:application/json"
})
@POST("api/v2/telegrafs/{telegrafID}/members")
Call postTelegrafsIDMembers(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Body AddResourceMemberRequestBody addResourceMemberRequestBody, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Add an owner to a Telegraf configuration
*
* @param telegrafID The Telegraf configuration ID. (required)
* @param addResourceMemberRequestBody User to add as owner (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<ResourceOwner>
*/
@Headers({
"Content-Type:application/json"
})
@POST("api/v2/telegrafs/{telegrafID}/owners")
Call postTelegrafsIDOwners(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Body AddResourceMemberRequestBody addResourceMemberRequestBody, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
/**
* Update a Telegraf configuration
*
* @param telegrafID The Telegraf config ID. (required)
* @param telegrafPluginRequest Telegraf configuration update to apply (required)
* @param zapTraceSpan OpenTracing span context (optional)
* @return Call<Telegraf>
*/
@Headers({
"Content-Type:application/json"
})
@PUT("api/v2/telegrafs/{telegrafID}")
Call putTelegrafsID(
@retrofit2.http.Path("telegrafID") String telegrafID, @retrofit2.http.Body TelegrafPluginRequest telegrafPluginRequest, @retrofit2.http.Header("Zap-Trace-Span") String zapTraceSpan
);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy