Skip to content
DocsTry Aspire
DocsTry

withCognitiveServicesRoleAssignments

Method
📦 Aspire.Hosting.Azure.CognitiveServices v13.4.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
targetAzureOpenAIResource
rolesAzureOpenAIRole[]
IResource

Applies to

This method applies to the following types: