All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rancher.service.ContainerApi.groovy Maven / Gradle / Ivy

package io.rancher.service

import io.rancher.base.Filters
import io.rancher.base.TypeCollection
import io.rancher.type.Container
import io.rancher.type.ContainerExec
import io.rancher.type.ContainerLogs
import io.rancher.type.ContainerProxy
import io.rancher.type.HostAccess
import io.rancher.type.Instance
import io.rancher.type.InstanceConsole
import io.rancher.type.InstanceConsoleInput
import io.rancher.type.InstanceStop
import retrofit2.Call
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.QueryMap

interface ContainerApi {
  @GET("projects/{projectId}/container")
  Call> list(@Path("projectId") String projectId)

  @GET("projects/{projectId}/container")
  Call> query(@Path("projectId") String projectId, @QueryMap Filters filters)

  @GET("projects/{projectId}/container/{id}")
  Call get(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container")
  Call create(@Path("projectId") String projectId, @Body Container container)

  @PUT("projects/{projectId}/container/{id}")
  Call update(@Path("projectId") String projectId, @Path("id") String id, @Body Container container)

  @DELETE("projects/{projectId}/container/{id}")
  Call delete(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=allocate")
  Call allocate(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=console")
  Call console(@Path("projectId") String projectId, @Path("id") String id, @Body InstanceConsoleInput instanceConsoleInput)

  @POST("projects/{projectId}/container/{id}?action=deallocate")
  Call deallocate(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=error")
  Call error(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=execute")
  Call execute(@Path("projectId") String projectId, @Path("id") String id, @Body ContainerExec containerExec)

  @POST("projects/{projectId}/container/{id}?action=logs")
  Call logs(@Path("projectId") String projectId, @Path("id") String id, @Body ContainerLogs containerLogs)

  @POST("projects/{projectId}/container/{id}?action=migrate")
  Call migrate(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=proxy")
  Call proxy(@Path("projectId") String projectId, @Path("id") String id, @Body ContainerProxy containerProxy)

  @POST("projects/{projectId}/container/{id}?action=purge")
  Call purge(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=remove")
  Call remove(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=restart")
  Call restart(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=start")
  Call start(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=stop")
  Call stop(@Path("projectId") String projectId, @Path("id") String id, @Body InstanceStop instanceStop)

  @POST("projects/{projectId}/container/{id}?action=updatehealthy")
  Call updatehealthy(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=updatereinitializing")
  Call updatereinitializing(@Path("projectId") String projectId, @Path("id") String id)

  @POST("projects/{projectId}/container/{id}?action=updateunhealthy")
  Call updateunhealthy(@Path("projectId") String projectId, @Path("id") String id)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy