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
resourceProvider
stringThe name of the resource provider that should handle the request.
resourcePath
stringThe 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
resourceProvider
stringThe name of the resource provider that should handle the request.
resourcePath
stringThe logical path of the resource type and action.
request
objectThe 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
fullResourcePath
stringThe full resource path, including the Instance ID, resource provider, and logical path of the resource type.
Returns
- Task<T>
Type Parameters
T
Deserializes 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
resourceProvider
stringThe name of the resource provider that should handle the request.
resourcePath
stringThe logical path of the resource type.
Returns
- Task<T>
Type Parameters
T
Deserializes 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
resourceProvider
stringThe name of the resource provider that should handle the request.
resourcePath
stringThe logical path of the resource type.
resource
objectThe resource to be created or updated.
Returns
- Task<ResourceProviderUpsertResult>
The ObjectId of the created or updated resource.