Package com.netflix.genie.client.apis
Interface ClusterService
-
public interface ClusterService
An interface that provides all methods needed for the Genie cluster client implementation.- Since:
- 3.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CLUSTER_URL_SUFFIX
Path to Clusters.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description retrofit2.Call<java.lang.Void>
addCommandsToCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds)
Method to add commands to a cluster in Genie.retrofit2.Call<java.lang.Void>
addConfigsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs)
Method to add configs to a cluster in Genie.retrofit2.Call<java.lang.Void>
addDependenciesToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies)
Method to add dependencies to a cluster in Genie.retrofit2.Call<java.lang.Void>
addTagsToCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags)
Method to add tags to a cluster in Genie.retrofit2.Call<java.lang.Void>
createCluster(Cluster cluster)
Method to create a cluster in Genie.retrofit2.Call<java.lang.Void>
deleteAllClusters()
Method to delete all clusters in Genie.retrofit2.Call<java.lang.Void>
deleteCluster(java.lang.String clusterId)
Method to delete a cluster in Genie.retrofit2.Call<Cluster>
getCluster(java.lang.String clusterId)
Method to fetch a single job from Genie.retrofit2.Call<com.fasterxml.jackson.databind.JsonNode>
getClusters(java.lang.String name, java.util.List<java.lang.String> statusList, java.util.List<java.lang.String> tagList, java.lang.Long minUpdateTime, java.lang.Long maxUpdateTime, java.lang.Integer size, java.lang.String sort, java.lang.Integer page)
Method to get clusters from Genie based on filters specified.retrofit2.Call<java.util.List<Command>>
getCommandsForCluster(java.lang.String clusterId)
Method to get commmands for a cluster in Genie.retrofit2.Call<java.util.Set<java.lang.String>>
getConfigsForCluster(java.lang.String clusterId)
Method to get configs for a cluster in Genie.retrofit2.Call<java.util.Set<java.lang.String>>
getDependenciesForCluster(java.lang.String clusterId)
Method to get dependency files for a cluster in Genie.retrofit2.Call<java.util.Set<java.lang.String>>
getTagsForCluster(java.lang.String clusterId)
Method to get tags for a cluster in Genie.retrofit2.Call<java.lang.Void>
patchCluster(java.lang.String clusterId, com.github.fge.jsonpatch.JsonPatch patch)
Patch a cluster using JSON Patch.retrofit2.Call<java.lang.Void>
removeAllCommandsForCluster(java.lang.String clusterId)
Method to delete all commands for a cluster in Genie.retrofit2.Call<java.lang.Void>
removeAllConfigsForCluster(java.lang.String clusterId)
Method to delete all configs for a cluster in Genie.retrofit2.Call<java.lang.Void>
removeAllDependenciesForCluster(java.lang.String clusterId)
Method to delete all dependencies for a cluster in Genie.retrofit2.Call<java.lang.Void>
removeAllTagsForCluster(java.lang.String clusterId)
Method to delete all tags for a cluster in Genie.retrofit2.Call<java.lang.Void>
removeCommandForCluster(java.lang.String clusterId, java.lang.String commandId)
Method to delete a command for a cluster in Genie.retrofit2.Call<java.lang.Void>
removeTagForCluster(java.lang.String clusterId, java.lang.String tag)
Method to delete a tag for a cluster in Genie.retrofit2.Call<java.lang.Void>
setCommandsForCluster(java.lang.String clusterId, java.util.List<java.lang.String> commandIds)
Method to override and set commands for a cluster in Genie.retrofit2.Call<java.lang.Void>
updateCluster(java.lang.String clusterId, Cluster cluster)
Method to update a cluster in Genie.retrofit2.Call<java.lang.Void>
updateConfigsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> configs)
Method to update configs for a cluster in Genie.retrofit2.Call<java.lang.Void>
updateDependenciesForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> dependencies)
Method to update dependencies for a cluster in Genie.retrofit2.Call<java.lang.Void>
updateTagsForCluster(java.lang.String clusterId, java.util.Set<java.lang.String> tags)
Method to update tags for a cluster in Genie.
-
-
-
Field Detail
-
CLUSTER_URL_SUFFIX
static final java.lang.String CLUSTER_URL_SUFFIX
Path to Clusters.- See Also:
- Constant Field Values
-
-
Method Detail
-
createCluster
@POST("/api/v3/clusters") retrofit2.Call<java.lang.Void> createCluster(@Body Cluster cluster)
Method to create a cluster in Genie.- Parameters:
cluster
- The cluster object.- Returns:
- A callable object.
-
updateCluster
@PUT("/api/v3/clusters/{id}") retrofit2.Call<java.lang.Void> updateCluster(@Path("id") java.lang.String clusterId, @Body Cluster cluster)
Method to update a cluster in Genie.- Parameters:
clusterId
- The id of the cluster to update.cluster
- The cluster object.- Returns:
- A callable object.
-
getClusters
@GET("/api/v3/clusters") retrofit2.Call<com.fasterxml.jackson.databind.JsonNode> getClusters(@Query("name") java.lang.String name, @Query("status") java.util.List<java.lang.String> statusList, @Query("tag") java.util.List<java.lang.String> tagList, @Query("minUpdateTime") java.lang.Long minUpdateTime, @Query("maxUpdateTime") java.lang.Long maxUpdateTime, @Query("size") java.lang.Integer size, @Query("sort") java.lang.String sort, @Query("page") java.lang.Integer page)
Method to get clusters from Genie based on filters specified.- Parameters:
name
- The name of the cluster.statusList
- The list of statuses.tagList
- The list of tags.minUpdateTime
- Minimum Time after which cluster was updated.maxUpdateTime
- Maximum Time before which cluster was updated.size
- The maximum number of results in the pagesort
- The sort orderpage
- The page index- Returns:
- A callable object.
-
getCluster
@GET("/api/v3/clusters/{id}") retrofit2.Call<Cluster> getCluster(@Path("id") java.lang.String clusterId)
Method to fetch a single job from Genie.- Parameters:
clusterId
- The id of the cluster to get.- Returns:
- A callable object.
-
deleteCluster
@DELETE("/api/v3/clusters/{id}") retrofit2.Call<java.lang.Void> deleteCluster(@Path("id") java.lang.String clusterId)
Method to delete a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
deleteAllClusters
@DELETE("/api/v3/clusters") retrofit2.Call<java.lang.Void> deleteAllClusters()
Method to delete all clusters in Genie.- Returns:
- A callable object.
-
patchCluster
@PATCH("/api/v3/clusters/{id}") retrofit2.Call<java.lang.Void> patchCluster(@Path("id") java.lang.String clusterId, @Body com.github.fge.jsonpatch.JsonPatch patch)
Patch a cluster using JSON Patch.- Parameters:
clusterId
- The id of the cluster to patchpatch
- The JSON Patch instructions- Returns:
- A callable object.
-
getCommandsForCluster
@GET("/api/v3/clusters/{id}/commands") retrofit2.Call<java.util.List<Command>> getCommandsForCluster(@Path("id") java.lang.String clusterId)
Method to get commmands for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
addCommandsToCluster
@POST("/api/v3/clusters/{id}/commands") retrofit2.Call<java.lang.Void> addCommandsToCluster(@Path("id") java.lang.String clusterId, @Body java.util.List<java.lang.String> commandIds)
Method to add commands to a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..commandIds
- The command Ids to be added.- Returns:
- A callable object.
-
setCommandsForCluster
@PUT("/api/v3/clusters/{id}/commands") retrofit2.Call<java.lang.Void> setCommandsForCluster(@Path("id") java.lang.String clusterId, @Body java.util.List<java.lang.String> commandIds)
Method to override and set commands for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..commandIds
- The command Ids to be added.- Returns:
- A callable object.
-
removeCommandForCluster
@DELETE("/api/v3/clusters/{id}/commands/{commandId}") retrofit2.Call<java.lang.Void> removeCommandForCluster(@Path("id") java.lang.String clusterId, @Path("commandId") java.lang.String commandId)
Method to delete a command for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.commandId
- The command to delete.- Returns:
- A callable object.
-
removeAllCommandsForCluster
@DELETE("/api/v3/clusters/{id}/commands") retrofit2.Call<java.lang.Void> removeAllCommandsForCluster(@Path("id") java.lang.String clusterId)
Method to delete all commands for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
getDependenciesForCluster
@GET("/api/v3/clusters/{id}/dependencies") retrofit2.Call<java.util.Set<java.lang.String>> getDependenciesForCluster(@Path("id") java.lang.String clusterId)
Method to get dependency files for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
addDependenciesToCluster
@POST("/api/v3/clusters/{id}/dependencies") retrofit2.Call<java.lang.Void> addDependenciesToCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> dependencies)
Method to add dependencies to a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..dependencies
- The dependencies to be added.- Returns:
- A callable object.
-
updateDependenciesForCluster
@PUT("/api/v3/clusters/{id}/dependencies") retrofit2.Call<java.lang.Void> updateDependenciesForCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> dependencies)
Method to update dependencies for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..dependencies
- The dependencies to be added.- Returns:
- A callable object.
-
removeAllDependenciesForCluster
@DELETE("/api/v3/clusters/{id}/dependencies") retrofit2.Call<java.lang.Void> removeAllDependenciesForCluster(@Path("id") java.lang.String clusterId)
Method to delete all dependencies for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
getConfigsForCluster
@GET("/api/v3/clusters/{id}/configs") retrofit2.Call<java.util.Set<java.lang.String>> getConfigsForCluster(@Path("id") java.lang.String clusterId)
Method to get configs for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
addConfigsToCluster
@POST("/api/v3/clusters/{id}/configs") retrofit2.Call<java.lang.Void> addConfigsToCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> configs)
Method to add configs to a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..configs
- The configs to be added.- Returns:
- A callable object.
-
updateConfigsForCluster
@PUT("/api/v3/clusters/{id}/configs") retrofit2.Call<java.lang.Void> updateConfigsForCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> configs)
Method to update configs for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..configs
- The configs to be added.- Returns:
- A callable object.
-
removeAllConfigsForCluster
@DELETE("/api/v3/clusters/{id}/configs") retrofit2.Call<java.lang.Void> removeAllConfigsForCluster(@Path("id") java.lang.String clusterId)
Method to delete all configs for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
getTagsForCluster
@GET("/api/v3/clusters/{id}/tags") retrofit2.Call<java.util.Set<java.lang.String>> getTagsForCluster(@Path("id") java.lang.String clusterId)
Method to get tags for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
addTagsToCluster
@POST("/api/v3/clusters/{id}/tags") retrofit2.Call<java.lang.Void> addTagsToCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> tags)
Method to add tags to a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..tags
- The tags to be added.- Returns:
- A callable object.
-
updateTagsForCluster
@PUT("/api/v3/clusters/{id}/tags") retrofit2.Call<java.lang.Void> updateTagsForCluster(@Path("id") java.lang.String clusterId, @Body java.util.Set<java.lang.String> tags)
Method to update tags for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster..tags
- The tags to be added.- Returns:
- A callable object.
-
removeTagForCluster
@DELETE("/api/v3/clusters/{id}/tags/{tag}") retrofit2.Call<java.lang.Void> removeTagForCluster(@Path("id") java.lang.String clusterId, @Path("tag") java.lang.String tag)
Method to delete a tag for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.tag
- The tag to delete.- Returns:
- A callable object.
-
removeAllTagsForCluster
@DELETE("/api/v3/clusters/{id}/tags") retrofit2.Call<java.lang.Void> removeAllTagsForCluster(@Path("id") java.lang.String clusterId)
Method to delete all tags for a cluster in Genie.- Parameters:
clusterId
- The id of the cluster.- Returns:
- A callable object.
-
-