Class ResourceController
- Namespace
- FoundationaLLM.Core.API.Controllers
- Assembly
- FoundationaLLM.Core.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("management/instances/{instanceId}/providers/{resourceProvider}")]
public class ResourceController : Controller, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable
- Inheritance
-
ResourceController
- Implements
- Inherited Members
- Extension Methods
Constructors
ResourceController(IOrchestrationContext, IEnumerable<IResourceProviderService>, IManagementCapabilitiesService, ILogger<ResourceController>)
Provides methods to manage resources.
public ResourceController(IOrchestrationContext callContext, IEnumerable<IResourceProviderService> resourceProviderServices, IManagementCapabilitiesService managementCapabilitiesService, ILogger<ResourceController> logger)
Parameters
callContextIOrchestrationContextThe call context containing user identity details.
resourceProviderServicesIEnumerable<IResourceProviderService>The list of IResourceProviderService resource providers.
managementCapabilitiesServiceIManagementCapabilitiesServiceThe management capabilities service used to restrict access to resource providers and resource types.
loggerILogger<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
instanceIdstringThe FoundationaLLM instance identifier.
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
Returns
GetResources(string, string, string)
Gets one or more resources.
[HttpGet("{*resourcePath}", Name = "GetResources")]
public Task<IActionResult> GetResources(string instanceId, string resourceProvider, string resourcePath)
Parameters
instanceIdstringThe FoundationaLLM instance identifier.
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
Returns
UpsertResource(string, string, string)
Creates or updates resources.
[HttpPost("{*resourcePath}", Name = "UpsertResource")]
public Task<IActionResult> UpsertResource(string instanceId, string resourceProvider, string resourcePath)
Parameters
instanceIdstringThe FoundationaLLM instance identifier.
resourceProviderstringThe name of the resource provider that should handle the request.
resourcePathstringThe logical path of the resource type.
Returns
- Task<IActionResult>
The ObjectId of the created or updated resource.