Interface IResourceRESTClient
- Namespace
- FoundationaLLM.Client.Management.Interfaces
- Assembly
- FoundationaLLM.Client.Management.dll
Provides methods to manage calls to the Management API's resource endpoints.
public interface IResourceRESTClient
- Extension Methods
Methods
DeleteResourceAsync(string, string)
Deletes a resource.
Task DeleteResourceAsync(string resourceProvider, string resourcePath)
Parameters
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
Returns
ExecuteResourceActionAsync<T>(string, string, object)
Executes resource actions, serializing the action result to the specified type, For most actions, the result will be a ResourceProviderActionResult.
Task<T> ExecuteResourceActionAsync<T>(string resourceProvider, string resourcePath, object request)
Parameters
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type and action.
requestobjectThe action payload.
Returns
- Task<T>
The ObjectId of the created or updated resource.
Type Parameters
T
GetResourcesAsync<T>(string)
Gets one or more resource.
Task<T> GetResourcesAsync<T>(string fullResourcePath)
Parameters
fullResourcePathstringThe full resource path, including the Instance ID, resource provider, and logical path of the resource type.
Returns
- Task<T>
Type Parameters
TDeserializes the return content to the passed in type.
GetResourcesAsync<T>(string, string)
Gets one or more resource.
Task<T> GetResourcesAsync<T>(string resourceProvider, string resourcePath)
Parameters
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
Returns
- Task<T>
Type Parameters
TDeserializes the return content to the passed in type.
UpsertResourceAsync(string, string, object)
Creates or updates resources.
Task<ResourceProviderUpsertResult> UpsertResourceAsync(string resourceProvider, string resourcePath, object resource)
Parameters
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
resourceobjectThe resource to be created or updated.
Returns
- Task<ResourceProviderUpsertResult>
The ObjectId of the created or updated resource.