Table of Contents

Class ResourceController

Namespace
FoundationaLLM.Management.API.Controllers
Assembly
FoundationaLLM.Management.API.dll

Provides methods to manage resources.

[Authorize(AuthenticationSchemes = "Bearer", Policy = "MicrosoftEntraIDStandard")]
[ApiController]
[Consumes("application/json", new string[] { "multipart/form-data" })]
[Produces("application/json", new string[] { })]
[Route("instances/{instanceId}/providers/{resourceProvider}")]
public class ResourceController : Controller, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
Inheritance
ResourceController
Implements
Inherited Members
Extension Methods

Constructors

ResourceController(IOrchestrationContext, IEnumerable<IResourceProviderService>, ILogger<ResourceController>)

Provides methods to manage resources.

public ResourceController(IOrchestrationContext callContext, IEnumerable<IResourceProviderService> resourceProviderServices, ILogger<ResourceController> logger)

Parameters

callContext IOrchestrationContext

The call context containing user identity details.

resourceProviderServices IEnumerable<IResourceProviderService>

The list of IResourceProviderService resource providers.

logger ILogger<ResourceController>

The ILogger used for logging.

Methods

DeleteResource(string, string, string)

Deletes a resource.

[HttpDelete("{*resourcePath}", Name = "DeleteResource")]
public Task<IActionResult> DeleteResource(string instanceId, string resourceProvider, string resourcePath)

Parameters

instanceId string

The FoundationaLLM instance identifier.

resourceProvider string

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

resourcePath string

The logical path of the resource type.

Returns

Task<IActionResult>

GetResources(string, string, string)

Gets one or more resources.

[HttpGet("{*resourcePath}", Name = "GetResources")]
public Task<IActionResult> GetResources(string instanceId, string resourceProvider, string resourcePath)

Parameters

instanceId string

The FoundationaLLM instance identifier.

resourceProvider string

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

resourcePath string

The logical path of the resource type.

Returns

Task<IActionResult>

UpsertResource(string, string, string)

Creates or updates resources.

[HttpPost("{*resourcePath}", Name = "UpsertResource")]
public Task<IActionResult> UpsertResource(string instanceId, string resourceProvider, string resourcePath)

Parameters

instanceId string

The FoundationaLLM instance identifier.

resourceProvider string

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

resourcePath string

The logical path of the resource type.

Returns

Task<IActionResult>

The ObjectId of the created or updated resource.