Class DeploymentApi
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.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
apiClient, defaultHeaders -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates this API class to invoke operations on the AI CoreDeploymentApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptionbatchModify(String aiResourceGroup, AiDeploymentBulkModificationRequest aiDeploymentBulkModificationRequest) Patch multiple deploymentsGet number of deploymentscount(String aiResourceGroup, List<String> executableIds, String configurationId, String scenarioId, String status) Get number of deploymentscreate(String aiResourceGroup, AiDeploymentCreationRequest aiDeploymentCreationRequest) Create deploymentMark deployment as deletedGet information about specific deploymentGet information about specific deploymentGet logs of specific deploymentgetLogs(String deploymentId, String authorization, Integer $top, OffsetDateTime start, OffsetDateTime end, String $order) Get logs of specific deploymentmodify(String aiResourceGroup, String deploymentId, AiDeploymentModificationRequest aiDeploymentModificationRequest) Update target status or configuration of a deploymentGet list of deploymentsquery(String aiResourceGroup, List<String> executableIds, String configurationId, String scenarioId, String status, Integer $top, Integer $skip, String $select) Get list of deploymentswithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
DeploymentApi
public DeploymentApi()Instantiates this API class to invoke operations on the AI Core -
DeploymentApi
Instantiates this API class to invoke operations on the AI Core- Parameters:
aiCoreService- The configured connectivity instance to AI Core
-
-
Method Details
-
withDefaultHeaders
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 deploymentsUpdate 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 idaiDeploymentBulkModificationRequest- 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 deploymentsRetrieve 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 idexecutableIds- (optional) Limit query to only these executable IDsconfigurationId- (optional) Configuration identifierscenarioId- (optional) Scenario identifierstatus- (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 deploymentsRetrieve 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 deploymentCreate 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 idaiDeploymentCreationRequest- 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 deletedMark 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 iddeploymentId- 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 deploymentRetrieve 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 iddeploymentId- (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 deploymentRetrieve 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 iddeploymentId- 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 deploymentRetrieve 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 identifierauthorization- (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 deploymentRetrieve 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 deploymentUpdate 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 iddeploymentId- Deployment identifieraiDeploymentModificationRequest- 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 deploymentsRetrieve 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 idexecutableIds- (optional) Limit query to only these executable IDsconfigurationId- (optional) Configuration identifierscenarioId- (optional) Scenario identifierstatus- (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 deploymentsRetrieve 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
-