Class DeploymentApi

java.lang.Object
com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
com.sap.ai.sdk.core.client.DeploymentApi

public class DeploymentApi extends com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
AI Core in version 2.42.0.

Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a batch job, for example to pre-process or train your models, or perform batch inference. Serve inference requests of trained models. Deploy а trained machine learning model as a web service to serve inference requests with high performance. Register your own Docker registry, synchronize your AI content from your own git repository, and register your own object store for training data and trained models.

  • Constructor Details

    • DeploymentApi

      public DeploymentApi()
      Instantiates this API class to invoke operations on the AI Core
    • DeploymentApi

      public DeploymentApi(@Nonnull AiCoreService aiCoreService)
      Instantiates this API class to invoke operations on the AI Core
      Parameters:
      aiCoreService - The configured connectivity instance to AI Core
  • Method Details

    • withDefaultHeaders

      public DeploymentApi withDefaultHeaders(@Nonnull Map<String,String> defaultHeaders)
      Creates a new API instance with additional default headers.
      Parameters:
      defaultHeaders - Additional headers to include in all requests
      Returns:
      A new API instance with the combined headers
    • batchModify

      @Nonnull public AiDeploymentBulkModificationResponse batchModify(@Nonnull String aiResourceGroup, @Nonnull AiDeploymentBulkModificationRequest aiDeploymentBulkModificationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Patch multiple deployments

      Update status of multiple deployments. stop or delete multiple deployments.

      202 - The modification of the deployments have been scheduled successfully

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      aiDeploymentBulkModificationRequest - The value for the parameter aiDeploymentBulkModificationRequest
      Returns:
      AiDeploymentBulkModificationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • count

      @Nonnull public Integer count(@Nonnull String aiResourceGroup, @Nullable List<String> executableIds, @Nullable String configurationId, @Nullable String scenarioId, @Nullable String status) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get number of deployments

      Retrieve the number of available deployments. The number can be filtered by scenarioId, configurationId, executableIdsList or by deployment status.

      200 - Number of deployments

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      executableIds - (optional) Limit query to only these executable IDs
      configurationId - (optional) Configuration identifier
      scenarioId - (optional) Scenario identifier
      status - (optional) Filter by status
      Returns:
      Integer
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • count

      @Nonnull public Integer count(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get number of deployments

      Retrieve the number of available deployments. The number can be filtered by scenarioId, configurationId, executableIdsList or by deployment status.

      200 - Number of deployments

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      Returns:
      Integer
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • create

      @Nonnull public AiDeploymentCreationResponse create(@Nonnull String aiResourceGroup, @Nonnull AiDeploymentCreationRequest aiDeploymentCreationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Create deployment

      Create a deployment using the configuration specified by configurationId after synchronously checking the correctness of the configuration.

      202 - The deployment has been scheduled successfully

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      aiDeploymentCreationRequest - The value for the parameter aiDeploymentCreationRequest
      Returns:
      AiDeploymentCreationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • delete

      @Nonnull public AiDeploymentDeletionResponse delete(@Nonnull String aiResourceGroup, @Nonnull String deploymentId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Mark deployment as deleted

      Mark deployment with deploymentId as deleted.

      202 - The deletion of the deployment has been scheduled successfully

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      412 - The service didn't meet the precondition needed to execute this operation

      Parameters:
      aiResourceGroup - Specify a resource group id
      deploymentId - Deployment identifier
      Returns:
      AiDeploymentDeletionResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • get

      @Nonnull public AiDeploymentResponseWithDetails get(@Nonnull String aiResourceGroup, @Nonnull String deploymentId, @Nullable String $select) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get information about specific deployment

      Retrieve details for execution with deploymentId.

      200 - Information about the deployment

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      deploymentId - (required) Deployment identifier
      $select - (optional) Allows to request a specified set of properties for each entity
      Returns:
      AiDeploymentResponseWithDetails
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • get

      @Nonnull public AiDeploymentResponseWithDetails get(@Nonnull String aiResourceGroup, @Nonnull String deploymentId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get information about specific deployment

      Retrieve details for execution with deploymentId.

      200 - Information about the deployment

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      Parameters:
      aiResourceGroup - Specify a resource group id
      deploymentId - Deployment identifier
      Returns:
      AiDeploymentResponseWithDetails
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • getLogs

      @Nonnull public RTALogCommonResponse getLogs(@Nonnull String deploymentId, @Nullable String authorization, @Nullable Integer $top, @Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String $order) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get logs of specific deployment

      Retrieve logs of a deployment for getting insight into the deployment results or failures.

      200 - The query was processed successfully and logs of the requested deployment will be returned.

      400 - The request was malformed and could thus not be processed.

      401 - Lacks valid authentication credentials for the target resource.

      404 - The specified resource was not found

      0 - HTTP status codes 401, 403 or 500. Response body contains further details.

      Parameters:
      deploymentId - (required) Deployment identifier
      authorization - (optional) Authorization bearer token containing a JWT token.
      $top - (optional, default to 1000) The max number of entries to return. Defaults to 1000. Limited to 5000 max.
      start - (optional) The start time for the query as a RFC 3339 datetime format. Defaults to one hour ago. + in timezone need to be encoded to %2B.
      end - (optional) The end time for the query as a RFC 3339 datetime format. Defaults to now. + in timezone need to be encoded to %2B.
      $order - (optional) Determines the sort order. Supported values are asc or desc. Defaults to asc. Sort order: * `asc` - Ascending, earliest in the order will appear at the top of the list * `desc` - Descending, last in the order will appear at the top of the list
      Returns:
      RTALogCommonResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • getLogs

      @Nonnull public RTALogCommonResponse getLogs(@Nonnull String deploymentId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get logs of specific deployment

      Retrieve logs of a deployment for getting insight into the deployment results or failures.

      200 - The query was processed successfully and logs of the requested deployment will be returned.

      400 - The request was malformed and could thus not be processed.

      401 - Lacks valid authentication credentials for the target resource.

      404 - The specified resource was not found

      0 - HTTP status codes 401, 403 or 500. Response body contains further details.

      Parameters:
      deploymentId - Deployment identifier
      Returns:
      RTALogCommonResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • modify

      @Nonnull public AiDeploymentModificationResponse modify(@Nonnull String aiResourceGroup, @Nonnull String deploymentId, @Nonnull AiDeploymentModificationRequest aiDeploymentModificationRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Update target status or configuration of a deployment

      Update target status of a deployment to stop a deployment or change the configuration to be used by the deployment after synchronously checking the correctness of the configuration. A change of configuration is only allowed for RUNNING and PENDING deployments.

      202 - The modification of the deployment has been scheduled successfully

      400 - The specification of the resource was incorrect

      404 - The specified resource was not found

      412 - The service didn't meet the precondition needed to execute this operation

      Parameters:
      aiResourceGroup - Specify a resource group id
      deploymentId - Deployment identifier
      aiDeploymentModificationRequest - The value for the parameter aiDeploymentModificationRequest
      Returns:
      AiDeploymentModificationResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • query

      @Nonnull public AiDeploymentList query(@Nonnull String aiResourceGroup, @Nullable List<String> executableIds, @Nullable String configurationId, @Nullable String scenarioId, @Nullable String status, @Nullable Integer $top, @Nullable Integer $skip, @Nullable String $select) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get list of deployments

      Retrieve a list of deployments that match the specified filter criteria. Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a deployment status. With top/skip parameters it is possible to paginate the result list. With select parameter it is possible to select only status.

      200 - A list of deployments

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - (required) Specify a resource group id
      executableIds - (optional) Limit query to only these executable IDs
      configurationId - (optional) Configuration identifier
      scenarioId - (optional) Scenario identifier
      status - (optional) Filter by status
      $top - (optional, default to 10000) Number of results to display
      $skip - (optional) Number of results to be skipped from the ordered list of results
      $select - (optional) Allows to request a specified set of properties for each entity
      Returns:
      AiDeploymentList
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • query

      @Nonnull public AiDeploymentList query(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get list of deployments

      Retrieve a list of deployments that match the specified filter criteria. Filter criteria include a list of executableIds, a scenarioId, a configurationId, or a deployment status. With top/skip parameters it is possible to paginate the result list. With select parameter it is possible to select only status.

      200 - A list of deployments

      400 - The specification of the resource was incorrect

      Parameters:
      aiResourceGroup - Specify a resource group id
      Returns:
      AiDeploymentList
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API