Created
March 20, 2024 14:16
-
-
Save krnese/a91f9eae028e0cc31e476cc5e45ee416 to your computer and use it in GitHub Desktop.
assistant api rbac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"roleGuid": { | |
"type": "string", | |
"defaultValue": "[guid(deployment().name)]" | |
} | |
}, | |
"resources": [ | |
{ | |
"type": "Microsoft.Authorization/roleDefinitions", | |
"apiVersion": "2022-05-01-preview", | |
"name": "[parameters('roleGuid')]", | |
"properties": { | |
"roleName": "Assistant API Reader Role (preview)", | |
"description": "Assistant API Reader Role (preview)", | |
"assignableScopes": [ | |
"[subscription().id]" | |
], | |
"permissions": [ | |
{ | |
"actions": [ | |
"Microsoft.CognitiveServices/accounts/read" | |
], | |
"notActions": [], | |
"dataActions": [ | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/write", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/write", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/messages/write", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/messages/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/messages/files/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/runs/write", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/runs/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/runs/steps/read", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/files/read" | |
], | |
"notDataActions": [ | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/files/write", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/files/delete", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/threads/delete", | |
"Microsoft.CognitiveServices/accounts/OpenAI/assistants/delete" | |
] | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment