Class SecretApi

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

public class SecretApi 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

    • SecretApi

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

      public SecretApi(@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 SecretApi 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 BckndGenericSecretDataResponse create(@Nonnull BckndGenericSecretPostBody bckndGenericSecretPostBody, @Nullable String authorization, @Nullable String aiResourceGroup, @Nullable Boolean aiTenantScope) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Create a new generic secret

      Create a new generic secret in the corresponding resource group or at main tenant level.

      200 - Secret has been created

      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:
      bckndGenericSecretPostBody - (required) The value for the parameter bckndGenericSecretPostBody
      authorization - (optional) Authorization bearer token containing a JWT token.
      aiResourceGroup - (optional) Specify an existing resource group id to use
      aiTenantScope - (optional) Specify whether the main tenant scope is to be used
      Returns:
      BckndGenericSecretDataResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • create

      @Nonnull public BckndGenericSecretDataResponse create(@Nonnull BckndGenericSecretPostBody bckndGenericSecretPostBody) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Create a new generic secret

      Create a new generic secret in the corresponding resource group or at main tenant level.

      200 - Secret has been created

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

      @Nonnull public com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse delete(@Nonnull String secretName, @Nullable String authorization, @Nullable String aiResourceGroup, @Nullable Boolean aiTenantScope) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Deletes the secret

      Deletes the secret from provided resource group namespace

      200 - The secret has been removed

      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:
      secretName - (required) The value for the parameter secretName
      authorization - (optional) Authorization bearer token containing a JWT token.
      aiResourceGroup - (optional) Specify an existing resource group id to use
      aiTenantScope - (optional) Specify whether the main tenant scope is to be used
      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
    • delete

      @Nonnull public com.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponse delete(@Nonnull String secretName) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Deletes the secret

      Deletes the secret from provided resource group namespace

      200 - The secret has been removed

      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:
      secretName - The value for the parameter secretName
      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
    • get

      @Nonnull public BckndGenericSecretDetails get(@Nonnull String secretName, @Nullable String authorization, @Nullable String aiResourceGroup, @Nullable Boolean aiTenantScope) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get a specific secret

      Retrieve a single generic secret. This retrieves metadata only, not the secret data itself.

      200 - The secret was fetched

      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:
      secretName - (required) The value for the parameter secretName
      authorization - (optional) Authorization bearer token containing a JWT token.
      aiResourceGroup - (optional) Specify an existing resource group id to use
      aiTenantScope - (optional) Specify whether the main tenant scope is to be used
      Returns:
      BckndGenericSecretDetails
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • get

      @Nonnull public BckndGenericSecretDetails get(@Nonnull String secretName) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Get a specific secret

      Retrieve a single generic secret. This retrieves metadata only, not the secret data itself.

      200 - The secret was fetched

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

      @Nonnull public BckndListGenericSecretsResponse getAll(@Nullable String authorization, @Nullable Integer $top, @Nullable Integer $skip, @Nullable Boolean $count, @Nullable String aiResourceGroup, @Nullable Boolean aiTenantScope) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Lists all secrets corresponding to tenant

      Lists all secrets corresponding to tenant. This retrieves metadata only, not the secret data itself.

      200 - The secrets were fetched

      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:
      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.
      aiResourceGroup - (optional) Specify an existing resource group id to use
      aiTenantScope - (optional) Specify whether the main tenant scope is to be used
      Returns:
      BckndListGenericSecretsResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • getAll

      @Nonnull public BckndListGenericSecretsResponse getAll() throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Lists all secrets corresponding to tenant

      Lists all secrets corresponding to tenant. This retrieves metadata only, not the secret data itself.

      200 - The secrets were fetched

      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.

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

      @Nonnull public BckndGenericSecretDataResponse update(@Nonnull String secretName, @Nonnull BckndGenericSecretPatchBody bckndGenericSecretPatchBody, @Nullable String authorization, @Nullable String aiResourceGroup, @Nullable Boolean aiTenantScope) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Update secret credentials

      Update secret credentials. Replace secret data with the provided data.

      200 - The secret has been updated

      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:
      secretName - (required) The value for the parameter secretName
      bckndGenericSecretPatchBody - (required) The value for the parameter bckndGenericSecretPatchBody
      authorization - (optional) Authorization bearer token containing a JWT token.
      aiResourceGroup - (optional) Specify an existing resource group id to use
      aiTenantScope - (optional) Specify whether the main tenant scope is to be used
      Returns:
      BckndGenericSecretDataResponse
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if an error occurs while attempting to invoke the API
    • update

      @Nonnull public BckndGenericSecretDataResponse update(@Nonnull String secretName, @Nonnull BckndGenericSecretPatchBody bckndGenericSecretPatchBody) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException
      Update secret credentials

      Update secret credentials. Replace secret data with the provided data.

      200 - The secret has been updated

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