withCognitiveServicesRoleAssignments

Method
📦 Aspire.Hosting.Azure.CognitiveServices v17.0.0
interface ContainerResource {
// ... omitted for brevity
withCognitiveServicesRoleAssignments(
target: AzureOpenAIResource,
roles: AzureOpenAIRole[]): IResource;
}

Signature

methodwithCognitiveServicesRoleAssignmentsbuilder
Assigns the specified roles to the given resource, granting it the necessary permissions on the target Azure OpenAI resource. This replaces the default role assignments for the resource.
withCognitiveServicesRoleAssignments(
target: AzureOpenAIResource,
roles: AzureOpenAIRole[]): IResource
targetAzureOpenAIResourceThe target Azure OpenAI resource.
rolesAzureOpenAIRole[]The Azure OpenAI roles to be assigned (for example, `CognitiveServicesOpenAIUser`).
IResource

Applies to

This method applies to the following types: