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

# Class ResourceGroupApi

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

public class ResourceGroupApi 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
  `ResourceGroupApi()`
  Instantiates this API class to invoke operations on the AI Core
  `ResourceGroupApi(AiCoreService aiCoreService)`
  Instantiates this API class to invoke operations on the AI Core

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BckndResourceGroupBase`
  `create(BckndResourceGroupsPostRequest bckndResourceGroupsPostRequest)`
  Creates a resource group
  `BckndResourceGroupBase`
  `create(BckndResourceGroupsPostRequest bckndResourceGroupsPostRequest, String authorization)`
  Creates a resource group
  `BckndResourceGroupDeletionResponse`
  `delete(String resourceGroupId)`
  Delete a resource group
  `BckndResourceGroupDeletionResponse`
  `delete(String resourceGroupId, String authorization)`
  Delete a resource group
  `BckndResourceGroup`
  `get(String resourceGroupId)`
  Get a resource group
  `BckndResourceGroup`
  `get(String resourceGroupId, String authorization)`
  Get a resource group
  `BckndResourceGroupList`
  `getAll()`
  Gets all resource groups of a given tenant
  `BckndResourceGroupList`
  `getAll(String authorization, Integer $top, Integer $skip, Boolean $count, String prefer, String continueToken, List<String> labelSelector)`
  Gets all resource groups of a given tenant
  `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse`
  `patch(String resourceGroupId, BckndResourceGroupPatchRequest bckndResourceGroupPatchRequest)`
  Change some characteristics of the resource group
  `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse`
  `patch(String resourceGroupId, BckndResourceGroupPatchRequest bckndResourceGroupPatchRequest, String authorization)`
  Change some characteristics of the resource group
  `ResourceGroupApi`
  `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

  - ### ResourceGroupApi

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

  - ### ResourceGroupApi

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

  - ### create

    @Nonnull public BckndResourceGroupBase create(@Nonnull BckndResourceGroupsPostRequest bckndResourceGroupsPostRequest, @Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Creates a resource group

    Create resource group to a given main tenant. The length of resource group id must be between 3 and 253.

    202 - A resource group base object

    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:
      `bckndResourceGroupsPostRequest` - (required) The value for the parameter bckndResourceGroupsPostRequest
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      BckndResourceGroupBase
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### create

    @Nonnull public BckndResourceGroupBase create(@Nonnull BckndResourceGroupsPostRequest bckndResourceGroupsPostRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Creates a resource group

    Create resource group to a given main tenant. The length of resource group id must be between 3 and 253.

    202 - A resource group base object

    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:
      `bckndResourceGroupsPostRequest` - The value for the parameter bckndResourceGroupsPostRequest
    Returns:
      BckndResourceGroupBase
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### delete

    @Nonnull public BckndResourceGroupDeletionResponse delete(@Nonnull String resourceGroupId, @Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Delete a resource group

    Delete a resource group of a given main tenant.

    202 - The deletion of the resource group has been scheduled successfully

    404 - The specified resource was not found

    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:
      `resourceGroupId` - (required) Resource group identifier
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      BckndResourceGroupDeletionResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### delete

    @Nonnull public BckndResourceGroupDeletionResponse delete(@Nonnull String resourceGroupId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Delete a resource group

    Delete a resource group of a given main tenant.

    202 - The deletion of the resource group has been scheduled successfully

    404 - The specified resource was not found

    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:
      `resourceGroupId` - Resource group identifier
    Returns:
      BckndResourceGroupDeletionResponse
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### get

    @Nonnull public BckndResourceGroup get(@Nonnull String resourceGroupId, @Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get a resource group

    Get a resource group of a given main tenant.

    200 - A resource group object

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

    404 - The specified resource was not found

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

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

  - ### get

    @Nonnull public BckndResourceGroup get(@Nonnull String resourceGroupId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Get a resource group

    Get a resource group of a given main tenant.

    200 - A resource group object

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

    404 - The specified resource was not found

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

    Parameters:
      `resourceGroupId` - Resource group identifier
    Returns:
      BckndResourceGroup
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### getAll

    @Nonnull public BckndResourceGroupList getAll(@Nullable String authorization, @Nullable Integer $top, @Nullable Integer $skip, @Nullable Boolean $count, @Nullable String prefer, @Nullable String continueToken, @Nullable List<String> labelSelector) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Gets all resource groups of a given tenant

    Retrieve a list of resource groups for a given tenant.

    200 - A list of resource groups

    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.
      `$top` - (optional) Number of results to display
      `$skip` - (optional) Number of results to be skipped from the ordered list of results
      `$count` - (optional) When the $count field is set to false, the response contains a count of the items present in the response. When the $count field is set to true, the response contains a count of all the items present on the server, and not just the ones in the response. When the $count field is not passed, it is false by default.
      `prefer` - (optional) <p> One can use the HTTP Prefer header to configure the \"maxpagesize\" of this endpoint. \"maxpagesize\" is the maximum number of resourcegroups to return for a request to this endpoint. If more resourcegroups exist, the response will include a \"Link\" HTTP header. This header will include the URL for getting the next batch of resourcegroups. <p> The \"maxpagesize\" preference and the \"continueToken\" parameter together enable splitting a large list of resourcegroups to small chunks. This feature can help to reduce the response time of a single list-resourcegroup request when the client has a large number resourcegroups in the system. <p> By default, the \"maxpagesize\" is not set, which means retrieving all resourcegroups in a single request. <p> Setting a maxpagesize may return fewer than the requested amount of resourcegroups (up to zero) in the event all requested resourcegroups are filtered out. The client should only use the presence of the Link header in the response to determine whether more resourcegroups are available. If \"maxpagesize\" is specified and the response does not include a Link header, the client may assume that no more resourcegroups are available.
      `continueToken` - (optional) <p> A token for getting more resourcegroups from the service. It is encoded in the URL returned via a \"Link\" HTTP header of a response of this endpoint if the original request specified \"maxpagesize\" in a \"Prefer\" HTTP header and the number of available resourcegroups is larger than the number specified by \"maxpagesize\". Do <b>NOT</b> use the \"continueToken\" parameter in other scenarios. <p> The server may reject a continue token that it does not recognize. If the specified continue token is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error. In this case, the client must restart their list request without the continue token.
      `labelSelector` - (optional) filter by labels. Pass in pairs in the form of 'key=value' and / or 'key!=value' separated by commas and the result will be filtered to only those scenarios containing and / or not containing all given key/values
    Returns:
      BckndResourceGroupList
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### getAll

    @Nonnull public BckndResourceGroupList getAll() throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Gets all resource groups of a given tenant

    Retrieve a list of resource groups for a given tenant.

    200 - A list of resource groups

    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:
      BckndResourceGroupList
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### patch

    @Nonnull public com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse patch(@Nonnull String resourceGroupId, @Nonnull BckndResourceGroupPatchRequest bckndResourceGroupPatchRequest, @Nullable String authorization) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Change some characteristics of the resource group

    Replace some characteristics of the resource group, for instance labels.

    202 - Resource group changes accepted.

    404 - The specified resource was not found

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

    Parameters:
      `resourceGroupId` - (required) Resource group identifier
      `bckndResourceGroupPatchRequest` - (required) The value for the parameter bckndResourceGroupPatchRequest
      `authorization` - (optional) Authorization bearer token containing a JWT token.
    Returns:
      An OpenApiResponse containing the status code of the HttpResponse.
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API

  - ### patch

    @Nonnull public com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse patch(@Nonnull String resourceGroupId, @Nonnull BckndResourceGroupPatchRequest bckndResourceGroupPatchRequest) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
    Change some characteristics of the resource group

    Replace some characteristics of the resource group, for instance labels.

    202 - Resource group changes accepted.

    404 - The specified resource was not found

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

    Parameters:
      `resourceGroupId` - Resource group identifier
      `bckndResourceGroupPatchRequest` - The value for the parameter bckndResourceGroupPatchRequest
    Returns:
      An OpenApiResponse containing the status code of the HttpResponse.
    Throws:
      `com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException` - if an error occurs while attempting to invoke the API