Package com.sap.ai.sdk.core.client

# Class ResourceApi

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

public class ResourceApi 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.

- ## Field Summary

  ### Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi

  `apiClient, defaultHeaders`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceApi()`
  Instantiates this API class to invoke operations on the AI Core
  `ResourceApi(AiCoreService aiCoreService)`
  Instantiates this API class to invoke operations on the AI Core

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BckndResourceGetResponse`
  `get()`
  Get node request status corresponding to tenant
  `BckndResourceGetResponse`
  `get(String authorization)`
  Get node request status corresponding to tenant
  `BckndInstanceTypeGetResponse`
  `get_0()`
  Get list of available instance types
  `BckndInstanceTypeGetResponse`
  `get_0(String authorization)`
  Get list of available instance types
  `BckndResourcePatchResponse`
  `patch(BckndResourcePatchBody bckndResourcePatchBody)`
  Set reserved resources corresponding to tenant
  `BckndResourcePatchResponse`
  `patch(BckndResourcePatchBody bckndResourcePatchBody, String authorization)`
  Set reserved resources corresponding to tenant
  `ResourceApi`
  `withDefaultHeaders(Map<String,String> defaultHeaders)`
  Creates a new API instance with additional default headers.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ResourceApi

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

  - ### ResourceApi

    public ResourceApi(@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 ResourceApi 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

  - ### get

    @Nonnull public BckndResourceGetResponse get(@Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get node request status corresponding to tenant

    Lists all hot spare nodes, used nodes and total nodes corresponding to tenant.

    200 - Reserved resource status were fetched

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

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

    Parameters:
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      BckndResourceGetResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### get

    @Nonnull public BckndResourceGetResponse get() throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get node request status corresponding to tenant

    Lists all hot spare nodes, used nodes and total nodes corresponding to tenant.

    200 - Reserved resource status were fetched

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

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

    Returns:
      BckndResourceGetResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### get_0

    @Nonnull public BckndInstanceTypeGetResponse get_0(@Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get list of available instance types

    Lists all the instance types available in the cluster.

    200 - List of available instance types

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

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

    Parameters:
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      BckndInstanceTypeGetResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### get_0

    @Nonnull public BckndInstanceTypeGetResponse get_0() throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get list of available instance types

    Lists all the instance types available in the cluster.

    200 - List of available instance types

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

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

    Returns:
      BckndInstanceTypeGetResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### patch

    @Nonnull public BckndResourcePatchResponse patch(@Nonnull BckndResourcePatchBody bckndResourcePatchBody, @Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Set reserved resources corresponding to tenant

    Set hot spare nodes corresponding to tenant at main tenant level.

    200 - Reserved resource has been set.

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

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

    Parameters:
      `bckndResourcePatchBody` - (required) The value for the parameter bckndResourcePatchBody
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      BckndResourcePatchResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### patch

    @Nonnull public BckndResourcePatchResponse patch(@Nonnull BckndResourcePatchBody bckndResourcePatchBody) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Set reserved resources corresponding to tenant

    Set hot spare nodes corresponding to tenant at main tenant level.

    200 - Reserved resource has been set.

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

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

    Parameters:
      `bckndResourcePatchBody` - The value for the parameter bckndResourcePatchBody
    Returns:
      BckndResourcePatchResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API