Table of Contents

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 string

The name of the resource provider that should handle the request.

resourcePath string

The logical path of the resource type.

Returns

Task

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 string

The name of the resource provider that should handle the request.

resourcePath string

The logical path of the resource type and action.

request object

The 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 string

The 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 string

The name of the resource provider that should handle the request.

resourcePath string

The 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 string

The name of the resource provider that should handle the request.

resourcePath string

The logical path of the resource type.

resource object

The resource to be created or updated.

Returns

Task<ResourceProviderUpsertResult>

The ObjectId of the created or updated resource.