Class DeploymentApi

java.lang.Object
dev.restate.admin.api.DeploymentApi

public class DeploymentApi extends Object
  • Constructor Details

    • DeploymentApi

      public DeploymentApi()
    • DeploymentApi

      public DeploymentApi(ApiClient apiClient)
  • Method Details

    • getApiException

      protected ApiException getApiException(String operationId, HttpResponse<InputStream> response) throws IOException
      Throws:
      IOException
    • downloadFileFromResponse

      public File downloadFileFromResponse(HttpResponse<InputStream> response) throws ApiException
      Download file from the given response.
      Parameters:
      response - Response
      Returns:
      File
      Throws:
      ApiException - If fail to read file content from response and write to disk
    • createDeployment

      public RegisterDeploymentResponse createDeployment(@Nonnull RegisterDeploymentRequest registerDeploymentRequest) throws ApiException
      Create deployment Create deployment. Restate will invoke the endpoint to gather additional information required for registration, such as the services exposed by the deployment. If the deployment is already registered, this method will fail unless `force` is set to `true`.
      Parameters:
      registerDeploymentRequest - (required)
      Returns:
      RegisterDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • createDeployment

      public RegisterDeploymentResponse createDeployment(@Nonnull RegisterDeploymentRequest registerDeploymentRequest, Map<String,String> headers) throws ApiException
      Create deployment Create deployment. Restate will invoke the endpoint to gather additional information required for registration, such as the services exposed by the deployment. If the deployment is already registered, this method will fail unless `force` is set to `true`.
      Parameters:
      registerDeploymentRequest - (required)
      headers - Optional headers to include in the request
      Returns:
      RegisterDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • createDeploymentWithHttpInfo

      public ApiResponse<RegisterDeploymentResponse> createDeploymentWithHttpInfo(@Nonnull RegisterDeploymentRequest registerDeploymentRequest) throws ApiException
      Create deployment Create deployment. Restate will invoke the endpoint to gather additional information required for registration, such as the services exposed by the deployment. If the deployment is already registered, this method will fail unless `force` is set to `true`.
      Parameters:
      registerDeploymentRequest - (required)
      Returns:
      ApiResponse<RegisterDeploymentResponse>
      Throws:
      ApiException - if fails to make API call
    • createDeploymentWithHttpInfo

      public ApiResponse<RegisterDeploymentResponse> createDeploymentWithHttpInfo(@Nonnull RegisterDeploymentRequest registerDeploymentRequest, Map<String,String> headers) throws ApiException
      Create deployment Create deployment. Restate will invoke the endpoint to gather additional information required for registration, such as the services exposed by the deployment. If the deployment is already registered, this method will fail unless `force` is set to `true`.
      Parameters:
      registerDeploymentRequest - (required)
      headers - Optional headers to include in the request
      Returns:
      ApiResponse<RegisterDeploymentResponse>
      Throws:
      ApiException - if fails to make API call
    • deleteDeployment

      public void deleteDeployment(@Nonnull String deployment, @Nullable Boolean force) throws ApiException
      Delete deployment Delete deployment. Currently it's supported to remove a deployment only using the force flag
      Parameters:
      deployment - Deployment identifier (required)
      force - If true, the deployment will be forcefully deleted. This might break in-flight invocations, use with caution. (optional)
      Throws:
      ApiException - if fails to make API call
    • deleteDeployment

      public void deleteDeployment(@Nonnull String deployment, @Nullable Boolean force, Map<String,String> headers) throws ApiException
      Delete deployment Delete deployment. Currently it's supported to remove a deployment only using the force flag
      Parameters:
      deployment - Deployment identifier (required)
      force - If true, the deployment will be forcefully deleted. This might break in-flight invocations, use with caution. (optional)
      headers - Optional headers to include in the request
      Throws:
      ApiException - if fails to make API call
    • deleteDeploymentWithHttpInfo

      public ApiResponse<Void> deleteDeploymentWithHttpInfo(@Nonnull String deployment, @Nullable Boolean force) throws ApiException
      Delete deployment Delete deployment. Currently it's supported to remove a deployment only using the force flag
      Parameters:
      deployment - Deployment identifier (required)
      force - If true, the deployment will be forcefully deleted. This might break in-flight invocations, use with caution. (optional)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - if fails to make API call
    • deleteDeploymentWithHttpInfo

      public ApiResponse<Void> deleteDeploymentWithHttpInfo(@Nonnull String deployment, @Nullable Boolean force, Map<String,String> headers) throws ApiException
      Delete deployment Delete deployment. Currently it's supported to remove a deployment only using the force flag
      Parameters:
      deployment - Deployment identifier (required)
      force - If true, the deployment will be forcefully deleted. This might break in-flight invocations, use with caution. (optional)
      headers - Optional headers to include in the request
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - if fails to make API call
    • getDeployment

      public DetailedDeploymentResponse getDeployment(@Nonnull String deployment) throws ApiException
      Get deployment Get deployment metadata
      Parameters:
      deployment - Deployment identifier (required)
      Returns:
      DetailedDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • getDeployment

      public DetailedDeploymentResponse getDeployment(@Nonnull String deployment, Map<String,String> headers) throws ApiException
      Get deployment Get deployment metadata
      Parameters:
      deployment - Deployment identifier (required)
      headers - Optional headers to include in the request
      Returns:
      DetailedDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • getDeploymentWithHttpInfo

      public ApiResponse<DetailedDeploymentResponse> getDeploymentWithHttpInfo(@Nonnull String deployment) throws ApiException
      Get deployment Get deployment metadata
      Parameters:
      deployment - Deployment identifier (required)
      Returns:
      ApiResponse<DetailedDeploymentResponse>
      Throws:
      ApiException - if fails to make API call
    • getDeploymentWithHttpInfo

      public ApiResponse<DetailedDeploymentResponse> getDeploymentWithHttpInfo(@Nonnull String deployment, Map<String,String> headers) throws ApiException
      Get deployment Get deployment metadata
      Parameters:
      deployment - Deployment identifier (required)
      headers - Optional headers to include in the request
      Returns:
      ApiResponse<DetailedDeploymentResponse>
      Throws:
      ApiException - if fails to make API call
    • listDeployments

      public ListDeploymentsResponse listDeployments() throws ApiException
      List deployments List all registered deployments.
      Returns:
      ListDeploymentsResponse
      Throws:
      ApiException - if fails to make API call
    • listDeployments

      public ListDeploymentsResponse listDeployments(Map<String,String> headers) throws ApiException
      List deployments List all registered deployments.
      Parameters:
      headers - Optional headers to include in the request
      Returns:
      ListDeploymentsResponse
      Throws:
      ApiException - if fails to make API call
    • listDeploymentsWithHttpInfo

      public ApiResponse<ListDeploymentsResponse> listDeploymentsWithHttpInfo() throws ApiException
      List deployments List all registered deployments.
      Returns:
      ApiResponse<ListDeploymentsResponse>
      Throws:
      ApiException - if fails to make API call
    • listDeploymentsWithHttpInfo

      public ApiResponse<ListDeploymentsResponse> listDeploymentsWithHttpInfo(Map<String,String> headers) throws ApiException
      List deployments List all registered deployments.
      Parameters:
      headers - Optional headers to include in the request
      Returns:
      ApiResponse<ListDeploymentsResponse>
      Throws:
      ApiException - if fails to make API call
    • updateDeployment

      public DetailedDeploymentResponse updateDeployment(@Nonnull String deployment, @Nonnull UpdateDeploymentRequest updateDeploymentRequest) throws ApiException
      Update deployment Update deployment. Invokes the endpoint and replaces the existing deployment metadata with the discovered information. This is a dangerous operation that should be used only when there are failing invocations on the deployment that cannot be resolved any other way. Sense checks are applied to test that the new deployment is sufficiently similar to the old one.
      Parameters:
      deployment - Deployment identifier (required)
      updateDeploymentRequest - (required)
      Returns:
      DetailedDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • updateDeployment

      public DetailedDeploymentResponse updateDeployment(@Nonnull String deployment, @Nonnull UpdateDeploymentRequest updateDeploymentRequest, Map<String,String> headers) throws ApiException
      Update deployment Update deployment. Invokes the endpoint and replaces the existing deployment metadata with the discovered information. This is a dangerous operation that should be used only when there are failing invocations on the deployment that cannot be resolved any other way. Sense checks are applied to test that the new deployment is sufficiently similar to the old one.
      Parameters:
      deployment - Deployment identifier (required)
      updateDeploymentRequest - (required)
      headers - Optional headers to include in the request
      Returns:
      DetailedDeploymentResponse
      Throws:
      ApiException - if fails to make API call
    • updateDeploymentWithHttpInfo

      public ApiResponse<DetailedDeploymentResponse> updateDeploymentWithHttpInfo(@Nonnull String deployment, @Nonnull UpdateDeploymentRequest updateDeploymentRequest) throws ApiException
      Update deployment Update deployment. Invokes the endpoint and replaces the existing deployment metadata with the discovered information. This is a dangerous operation that should be used only when there are failing invocations on the deployment that cannot be resolved any other way. Sense checks are applied to test that the new deployment is sufficiently similar to the old one.
      Parameters:
      deployment - Deployment identifier (required)
      updateDeploymentRequest - (required)
      Returns:
      ApiResponse<DetailedDeploymentResponse>
      Throws:
      ApiException - if fails to make API call
    • updateDeploymentWithHttpInfo

      public ApiResponse<DetailedDeploymentResponse> updateDeploymentWithHttpInfo(@Nonnull String deployment, @Nonnull UpdateDeploymentRequest updateDeploymentRequest, Map<String,String> headers) throws ApiException
      Update deployment Update deployment. Invokes the endpoint and replaces the existing deployment metadata with the discovered information. This is a dangerous operation that should be used only when there are failing invocations on the deployment that cannot be resolved any other way. Sense checks are applied to test that the new deployment is sufficiently similar to the old one.
      Parameters:
      deployment - Deployment identifier (required)
      updateDeploymentRequest - (required)
      headers - Optional headers to include in the request
      Returns:
      ApiResponse<DetailedDeploymentResponse>
      Throws:
      ApiException - if fails to make API call