Class SecretApi
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 CoreSecretApi(AiCoreService aiCoreService) Instantiates this API class to invoke operations on the AI Core -
Method Summary
Modifier and TypeMethodDescriptioncreate(BckndGenericSecretPostBody bckndGenericSecretPostBody) Create a new generic secretcreate(BckndGenericSecretPostBody bckndGenericSecretPostBody, String authorization, String aiResourceGroup, Boolean aiTenantScope) Create a new generic secretcom.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponseDeletes the secretcom.sap.cloud.sdk.services.openapi.apache.core.OpenApiResponseDeletes the secretGet a specific secretGet a specific secretgetAll()Lists all secrets corresponding to tenantgetAll(String authorization, Integer $top, Integer $skip, Boolean $count, String aiResourceGroup, Boolean aiTenantScope) Lists all secrets corresponding to tenantupdate(String secretName, BckndGenericSecretPatchBody bckndGenericSecretPatchBody) Update secret credentialsupdate(String secretName, BckndGenericSecretPatchBody bckndGenericSecretPatchBody, String authorization, String aiResourceGroup, Boolean aiTenantScope) Update secret credentialswithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
SecretApi
public SecretApi()Instantiates this API class to invoke operations on the AI Core -
SecretApi
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
-
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 secretCreate 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 bckndGenericSecretPostBodyauthorization- (optional) Authorization bearer token containing a JWT token.aiResourceGroup- (optional) Specify an existing resource group id to useaiTenantScope- (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 secretCreate 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 secretDeletes 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 secretNameauthorization- (optional) Authorization bearer token containing a JWT token.aiResourceGroup- (optional) Specify an existing resource group id to useaiTenantScope- (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 secretDeletes 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 secretRetrieve 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 secretNameauthorization- (optional) Authorization bearer token containing a JWT token.aiResourceGroup- (optional) Specify an existing resource group id to useaiTenantScope- (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 secretRetrieve 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 tenantLists 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 useaiTenantScope- (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.OpenApiRequestExceptionLists all secrets corresponding to tenantLists 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 credentialsUpdate 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 secretNamebckndGenericSecretPatchBody- (required) The value for the parameter bckndGenericSecretPatchBodyauthorization- (optional) Authorization bearer token containing a JWT token.aiResourceGroup- (optional) Specify an existing resource group id to useaiTenantScope- (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 credentialsUpdate 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 secretNamebckndGenericSecretPatchBody- 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
-