diff --git a/code/backend/batch/utilities/helpers/EnvHelper.py b/code/backend/batch/utilities/helpers/EnvHelper.py index 61483a6d4..f24eb4c30 100644 --- a/code/backend/batch/utilities/helpers/EnvHelper.py +++ b/code/backend/batch/utilities/helpers/EnvHelper.py @@ -16,6 +16,10 @@ def __init__(self, **kwargs) -> None: self.LOGLEVEL = os.environ.get("LOGLEVEL", "INFO").upper() + # Azure + self.AZURE_SUBSCRIPTION_ID = os.getenv("AZURE_SUBSCRIPTION_ID", "") + self.AZURE_RESOURCE_GROUP = os.getenv("AZURE_RESOURCE_GROUP", "") + # Azure Search self.AZURE_SEARCH_SERVICE = os.getenv("AZURE_SEARCH_SERVICE", "") self.AZURE_SEARCH_INDEX = os.getenv("AZURE_SEARCH_INDEX", "") @@ -159,7 +163,12 @@ def __init__(self, **kwargs) -> None: "ORCHESTRATION_STRATEGY", "openai_function" ) # Speech Service + self.AZURE_SPEECH_SERVICE_NAME = os.getenv("AZURE_SPEECH_SERVICE_NAME", "") self.AZURE_SPEECH_SERVICE_REGION = os.getenv("AZURE_SPEECH_SERVICE_REGION") + self.AZURE_SPEECH_REGION_ENDPOINT = os.environ.get( + "AZURE_SPEECH_REGION_ENDPOINT", + f"https://{self.AZURE_SPEECH_SERVICE_REGION}.api.cognitive.microsoft.com/", + ) self.LOAD_CONFIG_FROM_BLOB_STORAGE = self.get_env_var_bool( "LOAD_CONFIG_FROM_BLOB_STORAGE" diff --git a/code/create_app.py b/code/create_app.py index 938a76cc6..0c7fdaea2 100644 --- a/code/create_app.py +++ b/code/create_app.py @@ -7,8 +7,10 @@ from flask import Flask, Response, request, jsonify from dotenv import load_dotenv import sys +import functools from backend.batch.utilities.helpers.EnvHelper import EnvHelper - +from azure.mgmt.cognitiveservices import CognitiveServicesManagementClient +from azure.identity import DefaultAzureCredential logger = logging.getLogger(__name__) @@ -285,6 +287,24 @@ def conversation_without_data(request, env_helper): ) +@functools.cache +def get_speech_key(env_helper: EnvHelper): + """ + Get the Azure Speech key directly from Azure. + This is required to generate short-lived tokens when using RBAC. + """ + client = CognitiveServicesManagementClient( + credential=DefaultAzureCredential(), + subscription_id=env_helper.AZURE_SUBSCRIPTION_ID, + ) + keys = client.accounts.list_keys( + resource_group_name=env_helper.AZURE_RESOURCE_GROUP, + account_name=env_helper.AZURE_SPEECH_SERVICE_NAME, + ) + + return keys.key1 + + def create_app(): # Fixing MIME types for static files under Windows mimetypes.add_type("application/javascript", ".js") @@ -381,4 +401,29 @@ def conversation_custom(): 500, ) + @app.route("/api/speech/token", methods=["GET"]) + def speech_token(): + try: + speech_key = env_helper.AZURE_SPEECH_KEY or get_speech_key(env_helper) + + response = requests.post( + f"{env_helper.AZURE_SPEECH_REGION_ENDPOINT}sts/v1.0/issueToken", + headers={ + "Ocp-Apim-Subscription-Key": speech_key, + }, + ) + + if response.status_code == 200: + return { + "token": response.text, + "region": env_helper.AZURE_SPEECH_SERVICE_REGION, + } + + logger.error(f"Failed to get speech token: {response.text}") + return {"error": "Failed to get speech token"}, response.status_code + except Exception as e: + logger.exception(f"Exception in /api/speech/token | {str(e)}") + + return {"error": "Failed to get speech token"}, 500 + return app diff --git a/code/frontend/src/pages/chat/Chat.tsx b/code/frontend/src/pages/chat/Chat.tsx index b8497995d..f3772b2b5 100644 --- a/code/frontend/src/pages/chat/Chat.tsx +++ b/code/frontend/src/pages/chat/Chat.tsx @@ -8,7 +8,6 @@ import { import { SpeechRecognizer, ResultReason, - AutoDetectSourceLanguageResult, } from "microsoft-cognitiveservices-speech-sdk"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; @@ -22,7 +21,7 @@ import { multiLingualSpeechRecognizer } from "../../util/SpeechToText"; import { ChatMessage, ConversationRequest, -customConversationApi, + customConversationApi, Citation, ToolMessageContent, ChatResponse, @@ -56,8 +55,6 @@ const Chat = () => { const [isRecognizing, setIsRecognizing] = useState(false); const [isListening, setIsListening] = useState(false); const recognizerRef = useRef(null); - const [subscriptionKey, setSubscriptionKey] = useState(""); - const [serviceRegion, setServiceRegion] = useState(""); const makeApiRequest = async (question: string) => { lastQuestionRef.current = question; @@ -110,7 +107,7 @@ const Chat = () => { ]); } runningText = ""; - } catch {} + } catch { } }); } setAnswers([...answers, userMessage, ...result.choices[0].messages]); @@ -134,62 +131,47 @@ const Chat = () => { return abortController.abort(); }; - useEffect(() => { - async function fetchServerConfig() { - try { - const response = await fetch("/api/config"); - if (!response.ok) { - throw new Error("Network response was not ok"); - } - const data = await response.json(); - const fetchedSubscriptionKey = data.azureSpeechKey; - const fetchedServiceRegion = data.azureSpeechRegion; - - setSubscriptionKey(fetchedSubscriptionKey); - setServiceRegion(fetchedServiceRegion); - } catch (error) { - console.error("Error fetching server configuration:", error); + const fetchSpeechToken = async (): Promise<{ token: string, region: string; }> => { + try { + const response = await fetch("/api/speech/token"); + if (!response.ok) { + throw new Error("Network response was not ok"); } + return response.json(); + } catch (error) { + console.error("Error fetching server configuration:", error); + throw error; } + }; - fetchServerConfig(); - }, []); - - const startSpeechRecognition = ( - subscriptionKey: string, - serviceRegion: string - ) => { + const startSpeechRecognition = async () => { if (!isRecognizing) { setIsRecognizing(true); - if (!subscriptionKey || !serviceRegion) { - console.error( - "Azure Speech subscription key or region is not defined." - ); - } else { - const recognizer = multiLingualSpeechRecognizer(subscriptionKey, serviceRegion, [ - "en-US", - "fr-FR", - "de-DE", - "it-IT" - ]); - recognizerRef.current = recognizer; // Store the recognizer in the ref + const { token, region } = await fetchSpeechToken(); - recognizerRef.current.recognized = (s, e) => { - if (e.result.reason === ResultReason.RecognizedSpeech) { - const recognized = e.result.text; - // console.log("Recognized:", recognized); - setUserMessage(recognized); - setRecognizedText(recognized); - } - }; + const recognizer = multiLingualSpeechRecognizer(token, region, [ + "en-US", + "fr-FR", + "de-DE", + "it-IT" + ]); + recognizerRef.current = recognizer; // Store the recognizer in the ref - recognizerRef.current.startContinuousRecognitionAsync(() => { - setIsRecognizing(true); - // console.log("Speech recognition started."); - setIsListening(true); - }); - } + recognizerRef.current.recognized = (s, e) => { + if (e.result.reason === ResultReason.RecognizedSpeech) { + const recognized = e.result.text; + // console.log("Recognized:", recognized); + setUserMessage(recognized); + setRecognizedText(recognized); + } + }; + + recognizerRef.current.startContinuousRecognitionAsync(() => { + setIsRecognizing(true); + // console.log("Speech recognition started."); + setIsListening(true); + }); } }; @@ -208,10 +190,10 @@ const Chat = () => { } }; - const onMicrophoneClick = () => { + const onMicrophoneClick = async () => { if (!isRecognizing) { // console.log("Starting speech recognition..."); - startSpeechRecognition(subscriptionKey, serviceRegion); + await startSpeechRecognition(); } else { // console.log("Stopping speech recognition..."); stopSpeechRecognition(); @@ -294,7 +276,7 @@ const Chat = () => { answer.role === "assistant" ? answer.content : "Sorry, an error occurred. Try refreshing the conversation or waiting a few minutes. If the issue persists, contact your system administrator. Error: " + - answer.content, + answer.content, citations: answer.role === "assistant" ? parseCitationFromMessage(answers[index - 1]) diff --git a/code/frontend/src/util/SpeechToText.tsx b/code/frontend/src/util/SpeechToText.tsx index 34024621f..cb0f15dfe 100644 --- a/code/frontend/src/util/SpeechToText.tsx +++ b/code/frontend/src/util/SpeechToText.tsx @@ -7,12 +7,12 @@ import { export const multiLingualSpeechRecognizer = ( - subscriptionKey: string, + token: string, serviceRegion: string, languages: string[] ) => { - const speechConfig = SpeechConfig.fromSubscription( - subscriptionKey, + const speechConfig = SpeechConfig.fromAuthorizationToken( + token, serviceRegion ); const audioConfig = AudioConfig.fromDefaultMicrophoneInput(); diff --git a/code/frontend/test/SpeechToText.test.ts b/code/frontend/test/SpeechToText.test.ts index 9711b7deb..b05394c7d 100644 --- a/code/frontend/test/SpeechToText.test.ts +++ b/code/frontend/test/SpeechToText.test.ts @@ -4,12 +4,12 @@ import { multiLingualSpeechRecognizer } from "../src/util/SpeechToText.js"; describe("SpeechToText", () => { it("creates a speech recognizer with multiple languages", async () => { - const key = "key"; + const token = "token"; const region = "region"; const languages = ["en-US", "fr-FR", "de-DE", "it-IT"]; - const recognizer = multiLingualSpeechRecognizer(key, region, languages); + const recognizer = multiLingualSpeechRecognizer(token, region, languages); - expect(recognizer.properties.getProperty("SpeechServiceConnection_Key")).to.equal(key); + expect(recognizer.authorizationToken).to.equal(token); expect(recognizer.properties.getProperty("SpeechServiceConnection_Region")).to.equal(region); expect(recognizer.properties.getProperty("SpeechServiceConnection_AutoDetectSourceLanguages")).to.equal(languages.join(",")); }); diff --git a/code/tests/functional/backend_api/conftest.py b/code/tests/functional/backend_api/conftest.py index b4e5937bb..ff9cb7f5b 100644 --- a/code/tests/functional/backend_api/conftest.py +++ b/code/tests/functional/backend_api/conftest.py @@ -108,6 +108,11 @@ def setup_default_mocking(httpserver: HTTPServer, app_config: AppConfig): } ) + httpserver.expect_request( + "/sts/v1.0/issueToken", + method="POST", + ).respond_with_data("speech-token") + yield httpserver.check() diff --git a/code/tests/functional/backend_api/tests/with_data/conftest.py b/code/tests/functional/backend_api/tests/with_data/conftest.py index f53fe1b29..6c029e011 100644 --- a/code/tests/functional/backend_api/tests/with_data/conftest.py +++ b/code/tests/functional/backend_api/tests/with_data/conftest.py @@ -26,6 +26,7 @@ def app_config(make_httpserver, ca): "AZURE_OPENAI_ENDPOINT": f"https://localhost:{make_httpserver.port}/", "AZURE_SEARCH_SERVICE": f"https://localhost:{make_httpserver.port}/", "AZURE_CONTENT_SAFETY_ENDPOINT": f"https://localhost:{make_httpserver.port}/", + "AZURE_SPEECH_REGION_ENDPOINT": f"https://localhost:{make_httpserver.port}/", "SSL_CERT_FILE": ca_temp_path, "CURL_CA_BUNDLE": ca_temp_path, } diff --git a/code/tests/functional/backend_api/tests/with_data/test_speech_token.py b/code/tests/functional/backend_api/tests/with_data/test_speech_token.py new file mode 100644 index 000000000..761e185be --- /dev/null +++ b/code/tests/functional/backend_api/tests/with_data/test_speech_token.py @@ -0,0 +1,61 @@ +import pytest +import requests +from pytest_httpserver import HTTPServer +from tests.functional.backend_api.app_config import AppConfig +from tests.functional.backend_api.request_matching import ( + RequestMatcher, + verify_request_made, +) + +pytestmark = pytest.mark.functional + + +def test_speech_token_returned(app_url: str, app_config: AppConfig): + # when + response = requests.get(f"{app_url}/api/speech/token") + + # then + assert response.status_code == 200 + assert response.json() == { + "token": "speech-token", + "region": app_config.get("AZURE_SPEECH_SERVICE_REGION"), + } + assert response.headers["Content-Type"] == "application/json" + + +def test_speech_service_called_correctly( + app_url: str, app_config: AppConfig, httpserver: HTTPServer +): + # when + requests.get(f"{app_url}/api/speech/token") + + # then + verify_request_made( + mock_httpserver=httpserver, + request_matcher=RequestMatcher( + path="/sts/v1.0/issueToken", + method="POST", + headers={ + "Ocp-Apim-Subscription-Key": app_config.get("AZURE_SPEECH_SERVICE_KEY") + }, + times=1, + ), + ) + + +def test_failure_fetching_speech_token(app_url: str, httpserver: HTTPServer): + # given + httpserver.clear_all_handlers() # Clear default successful responses + + httpserver.expect_request( + "/sts/v1.0/issueToken", + method="POST", + ).respond_with_json({"error": "Bad request"}, status=400) + + # when + response = requests.get(f"{app_url}/api/speech/token") + + # then + assert response.status_code == 400 + assert response.json() == {"error": "Failed to get speech token"} + assert response.headers["Content-Type"] == "application/json" diff --git a/code/tests/test_app.py b/code/tests/test_app.py index df14a7854..ece22c1e8 100644 --- a/code/tests/test_app.py +++ b/code/tests/test_app.py @@ -1,24 +1,152 @@ import json import os +from flask.testing import FlaskClient import pytest from unittest.mock import MagicMock, Mock, patch from create_app import create_app +AZURE_SPEECH_KEY = "mock-speech-key" +AZURE_SPEECH_SERVICE_REGION = "mock-speech-service-region" +AZURE_SPEECH_REGION_ENDPOINT = "mock-speech-region-endpoint" +AZURE_OPENAI_ENDPOINT = "mock-openai-endpoint" +AZURE_OPENAI_MODEL = "mock-openai-model" +AZURE_OPENAI_SYSTEM_MESSAGE = "system-message" +AZURE_OPENAI_API_VERSION = "mock-version" +AZURE_OPENAI_API_KEY = "mock-api-key" +AZURE_SEARCH_KEY = "mock-search-key" +AZURE_OPENAI_TEMPERATURE = "0.5" +AZURE_OPENAI_MAX_TOKENS = "500" +AZURE_OPENAI_TOP_P = "0.8" +AZURE_OPENAI_STOP_SEQUENCE = "\n|STOP" +TOKEN = "mock-token" + @pytest.fixture def client(): return create_app().test_client() -@pytest.fixture -def env_helper_mock(autouse=True): - patcher = patch("create_app.EnvHelper") +@pytest.fixture(autouse=True) +def env_helper_mock(): + with patch("create_app.EnvHelper") as mock: + env_helper = mock.return_value + + env_helper.AZURE_SPEECH_KEY = AZURE_SPEECH_KEY + env_helper.AZURE_SPEECH_SERVICE_REGION = AZURE_SPEECH_SERVICE_REGION + env_helper.AZURE_SPEECH_REGION_ENDPOINT = AZURE_SPEECH_REGION_ENDPOINT + env_helper.AZURE_OPENAI_ENDPOINT = AZURE_OPENAI_ENDPOINT + env_helper.AZURE_OPENAI_MODEL = AZURE_OPENAI_MODEL + env_helper.AZURE_OPENAI_SYSTEM_MESSAGE = AZURE_OPENAI_SYSTEM_MESSAGE + env_helper.AZURE_OPENAI_API_VERSION = AZURE_OPENAI_API_VERSION + env_helper.AZURE_OPENAI_API_KEY = AZURE_OPENAI_API_KEY + env_helper.AZURE_SEARCH_KEY = AZURE_SEARCH_KEY + env_helper.AZURE_OPENAI_TEMPERATURE = AZURE_OPENAI_TEMPERATURE + env_helper.AZURE_OPENAI_MAX_TOKENS = AZURE_OPENAI_MAX_TOKENS + env_helper.AZURE_OPENAI_TOP_P = AZURE_OPENAI_TOP_P + env_helper.AZURE_OPENAI_STOP_SEQUENCE = AZURE_OPENAI_STOP_SEQUENCE + env_helper.SHOULD_STREAM = True + env_helper.AZURE_AUTH_TYPE = "keys" + env_helper.AZURE_TOKEN_PROVIDER.return_value = TOKEN + env_helper.should_use_data.return_value = True + + yield env_helper + + +class TestSpeechToken: + @patch("create_app.requests") + def test_returns_speech_token_using_keys( + self, requests: MagicMock, client: FlaskClient + ): + # given + mock_response: MagicMock = requests.post.return_value + mock_response.text = "speech-token" + mock_response.status_code = 200 + + # when + response = client.get("/api/speech/token") + + # then + assert response.status_code == 200 + assert response.json == { + "token": "speech-token", + "region": AZURE_SPEECH_SERVICE_REGION, + } + + requests.post.assert_called_once_with( + f"{AZURE_SPEECH_REGION_ENDPOINT}sts/v1.0/issueToken", + headers={ + "Ocp-Apim-Subscription-Key": AZURE_SPEECH_KEY, + }, + ) + + @patch("create_app.CognitiveServicesManagementClient") + @patch("create_app.requests") + def test_returns_speech_token_using_rbac( + self, + requests: MagicMock, + CognitiveServicesManagementClientMock: MagicMock, + env_helper_mock: MagicMock, + client: FlaskClient, + ): + # given + env_helper_mock.AZURE_SPEECH_KEY = None - EnvHelperMock = patcher.start() - mock = EnvHelperMock.return_value - yield mock + mock_cognitive_services_client_mock = ( + CognitiveServicesManagementClientMock.return_value + ) + mock_cognitive_services_client_mock.accounts.list_keys.return_value = MagicMock( + key1="mock-key1", key2="mock-key2" + ) - patcher.stop() + mock_response: MagicMock = requests.post.return_value + mock_response.text = "speech-token" + mock_response.status_code = 200 + + # when + response = client.get("/api/speech/token") + + # then + assert response.status_code == 200 + assert response.json == { + "token": "speech-token", + "region": AZURE_SPEECH_SERVICE_REGION, + } + + requests.post.assert_called_once_with( + f"{AZURE_SPEECH_REGION_ENDPOINT}sts/v1.0/issueToken", + headers={ + "Ocp-Apim-Subscription-Key": "mock-key1", + }, + ) + + @patch("create_app.requests") + def test_error_when_cannot_retrieve_speech_token( + self, requests: MagicMock, client: FlaskClient + ): + # given + mock_response: MagicMock = requests.post.return_value + mock_response.text = "error" + mock_response.status_code = 400 + + # when + response = client.get("/api/speech/token") + + # then + assert response.status_code == 400 + assert response.json == {"error": "Failed to get speech token"} + + @patch("create_app.requests") + def test_error_when_unexpected_error_occurs( + self, requests: MagicMock, client: FlaskClient + ): + # given + requests.post.side_effect = Exception("An error occurred") + + # when + response = client.get("/api/speech/token") + + assert response.status_code == 500 + assert response.json == {"error": "Failed to get speech token"} class TestConfig: @@ -27,9 +155,9 @@ def test_returns_correct_config(self, client): assert response.status_code == 200 assert response.json == { - "azureSpeechKey": "", - "azureSpeechRegion": None, - "AZURE_OPENAI_ENDPOINT": "https://.openai.azure.com/", + "azureSpeechKey": AZURE_SPEECH_KEY, + "azureSpeechRegion": AZURE_SPEECH_SERVICE_REGION, + "AZURE_OPENAI_ENDPOINT": AZURE_OPENAI_ENDPOINT, } @@ -44,7 +172,7 @@ def setup_method(self): }, {"content": "An answer", "end_turn": True, "role": "assistant"}, ] - self.openai_model = "some-model" + self.openai_model = "mock-model" self.body = { "conversation_id": "123", "messages": [ @@ -204,7 +332,7 @@ def __exit__(self, *args): def iter_lines(self, chunk_size=512): assistant = { "id": "response.id", - "model": "some-model", + "model": "mock-model", "created": 0, "object": "response.object", "choices": [ @@ -230,7 +358,7 @@ def iter_lines(self, chunk_size=512): message = { "id": "response.id", - "model": "some-model", + "model": "mock-model", "created": 0, "object": "response.object", "choices": [ @@ -244,7 +372,7 @@ def iter_lines(self, chunk_size=512): end = { "id": "response.id", - "model": "some-model", + "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"delta": {}, "end_turn": True, "finish_reason": "stop"}], @@ -276,38 +404,7 @@ def setup_method(self): {"role": "user", "content": "What is the meaning of life?"}, ], } - - self.system_message = "system-message" - self.openai_model = "some-model" - self.openai_endpoint = "some-endpoint" - self.content = "some content" - self.openai_api_version = "some-version" - self.openai_api_key = "some-api-key" - self.search_key = "some-search-key" - self.token = "some-token" - self.temperature = "0.5" - self.max_tokens = "500" - self.top_p = "0.8" - self.stop_sequence = "\n|STOP" - - @pytest.fixture(autouse=True) - def setup_env_helper_mock(self, env_helper_mock): - # These are the default values for the env_helper - # They can be overridden within each test - env_helper_mock.AZURE_OPENAI_SYSTEM_MESSAGE = self.system_message - env_helper_mock.AZURE_OPENAI_MODEL = self.openai_model - env_helper_mock.AZURE_OPENAI_ENDPOINT = self.openai_endpoint - env_helper_mock.AZURE_OPENAI_API_VERSION = self.openai_api_version - env_helper_mock.AZURE_OPENAI_API_KEY = self.openai_api_key - env_helper_mock.AZURE_SEARCH_KEY = self.search_key - env_helper_mock.AZURE_TOKEN_PROVIDER.return_value = self.token - env_helper_mock.AZURE_OPENAI_TEMPERATURE = self.temperature - env_helper_mock.AZURE_OPENAI_MAX_TOKENS = self.max_tokens - env_helper_mock.AZURE_OPENAI_TOP_P = self.top_p - env_helper_mock.AZURE_OPENAI_STOP_SEQUENCE = self.stop_sequence - env_helper_mock.SHOULD_STREAM = True - env_helper_mock.AZURE_AUTH_TYPE = "keys" - env_helper_mock.should_use_data.return_value = True + self.content = "mock content" @patch("create_app.requests.Session") def test_converstation_azure_byod_returns_correct_response_when_streaming_with_data_keys( @@ -332,9 +429,9 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_with_d data = str(response.data, "utf-8") assert ( data - == r"""{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "", "end_turn": false, "role": "assistant"}]}]} -{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": false, "role": "assistant"}]}]} -{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": true, "role": "assistant"}]}]} + == r"""{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "", "end_turn": false, "role": "assistant"}]}]} +{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": false, "role": "assistant"}]}]} +{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": true, "role": "assistant"}]}]} """ ) @@ -343,9 +440,9 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_with_d assert request_body["data_sources"][0]["parameters"]["authentication"] == { "type": "api_key", - "key": self.search_key, + "key": AZURE_SEARCH_KEY, } - assert request_headers["api-key"] == self.openai_api_key + assert request_headers["api-key"] == AZURE_OPENAI_API_KEY @patch("create_app.requests.Session") def test_converstation_azure_byod_returns_correct_response_when_streaming_with_data_rbac( @@ -371,9 +468,9 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_with_d data = str(response.data, "utf-8") assert ( data - == r"""{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "", "end_turn": false, "role": "assistant"}]}]} -{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": false, "role": "assistant"}]}]} -{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": true, "role": "assistant"}]}]} + == r"""{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "", "end_turn": false, "role": "assistant"}]}]} +{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": false, "role": "assistant"}]}]} +{"id": "response.id", "model": "mock-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"content": "{\"citations\": [{\"content\": \"content\", \"title\": \"title\"}], \"intent\": \"intent\"}", "end_turn": false, "role": "tool"}, {"content": "A question\n?", "end_turn": true, "role": "assistant"}]}]} """ ) @@ -383,7 +480,7 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_with_d assert request_body["data_sources"][0]["parameters"]["authentication"] == { "type": "system_assigned_managed_identity" } - assert request_headers["Authorization"] == f"Bearer {self.token}" + assert request_headers["Authorization"] == f"Bearer {TOKEN}" @patch("create_app.requests.post") def test_converstation_azure_byod_returns_correct_response_when_not_streaming_with_data( @@ -395,14 +492,14 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi post_mock.return_value.status_code = 200 post_mock.return_value.json.return_value = { "id": "response.id", - "model": "some-model", + "model": "mock-model", "created": 0, "object": "response.object", "choices": [ { "message": { "content": self.content, - "context": {"context": "some-context"}, + "context": {"context": "mock-context"}, } } ], @@ -419,14 +516,14 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi assert response.status_code == 200 assert response.json == { "id": "response.id", - "model": "some-model", + "model": "mock-model", "created": 0, "object": "response.object", "choices": [ { "messages": [ { - "content": '{"context": "some-context"}', + "content": '{"context": "mock-context"}', "end_turn": False, "role": "tool", }, @@ -512,7 +609,7 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi openai_create_mock = MagicMock( id="response.id", - model="some-model", + model=AZURE_OPENAI_MODEL, created=0, object="response.object", ) @@ -530,7 +627,7 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi assert response.status_code == 200 assert response.json == { "id": "response.id", - "model": "some-model", + "model": AZURE_OPENAI_MODEL, "created": 0, "object": "response.object", "choices": [ @@ -546,13 +643,13 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi } azure_openai_mock.assert_called_once_with( - azure_endpoint=self.openai_endpoint, - api_version=self.openai_api_version, - api_key=self.openai_api_key, + azure_endpoint=AZURE_OPENAI_ENDPOINT, + api_version=AZURE_OPENAI_API_VERSION, + api_key=AZURE_OPENAI_API_KEY, ) openai_client_mock.chat.completions.create.assert_called_once_with( - model="some-model", + model=AZURE_OPENAI_MODEL, messages=[{"role": "system", "content": "system-message"}] + self.body["messages"], temperature=0.5, @@ -577,7 +674,7 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi openai_create_mock = MagicMock( id="response.id", - model="some-model", + model=AZURE_OPENAI_MODEL, created=0, object="response.object", ) @@ -595,7 +692,7 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi assert response.status_code == 200 assert response.json == { "id": "response.id", - "model": "some-model", + "model": AZURE_OPENAI_MODEL, "created": 0, "object": "response.object", "choices": [ @@ -611,13 +708,13 @@ def test_converstation_azure_byod_returns_correct_response_when_not_streaming_wi } azure_openai_mock.assert_called_once_with( - azure_endpoint=self.openai_endpoint, - api_version=self.openai_api_version, + azure_endpoint=AZURE_OPENAI_ENDPOINT, + api_version=AZURE_OPENAI_API_VERSION, azure_ad_token_provider=env_helper_mock.AZURE_TOKEN_PROVIDER, ) openai_client_mock.chat.completions.create.assert_called_once_with( - model="some-model", + model=AZURE_OPENAI_MODEL, messages=[{"role": "system", "content": "system-message"}] + self.body["messages"], temperature=0.5, @@ -639,7 +736,7 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_withou mock_response = MagicMock( id="response.id", - model="some-model", + model=AZURE_OPENAI_MODEL, created=0, object="response.object", ) @@ -660,7 +757,7 @@ def test_converstation_azure_byod_returns_correct_response_when_streaming_withou data = str(response.data, "utf-8") assert ( data - == '{"id": "response.id", "model": "some-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"role": "assistant", "content": "some content"}]}]}\n' + == '{"id": "response.id", "model": "mock-openai-model", "created": 0, "object": "response.object", "choices": [{"messages": [{"role": "assistant", "content": "mock content"}]}]}\n' ) @patch("create_app.requests.Session") diff --git a/infra/main.bicep b/infra/main.bicep index 30f761cad..99f6a5c51 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -398,6 +398,7 @@ module web './app/web.bicep' = if (hostingModel == 'code') { AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_OPENAI_STREAM: azureOpenAIStream AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_USE_SEMANTIC_SEARCH: azureSearchUseSemanticSearch AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' AZURE_SEARCH_INDEX: azureSearchIndex @@ -413,6 +414,7 @@ module web './app/web.bicep' = if (hostingModel == 'code') { AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn AZURE_SPEECH_SERVICE_NAME: speechServiceName AZURE_SPEECH_SERVICE_REGION: location + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId ORCHESTRATION_STRATEGY: orchestrationStrategy LOGLEVEL: logLevel } @@ -460,6 +462,7 @@ module web_docker './app/web.bicep' = if (hostingModel == 'container') { AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_OPENAI_STREAM: azureOpenAIStream AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_USE_SEMANTIC_SEARCH: azureSearchUseSemanticSearch AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' AZURE_SEARCH_INDEX: azureSearchIndex @@ -475,6 +478,7 @@ module web_docker './app/web.bicep' = if (hostingModel == 'container') { AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn AZURE_SPEECH_SERVICE_NAME: speechServiceName AZURE_SPEECH_SERVICE_REGION: location + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId ORCHESTRATION_STRATEGY: orchestrationStrategy LOGLEVEL: logLevel } @@ -523,6 +527,7 @@ module adminweb './app/adminweb.bicep' = if (hostingModel == 'code') { AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_OPENAI_STREAM: azureOpenAIStream AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' AZURE_SEARCH_INDEX: azureSearchIndex AZURE_SEARCH_USE_SEMANTIC_SEARCH: azureSearchUseSemanticSearch @@ -535,6 +540,7 @@ module adminweb './app/adminweb.bicep' = if (hostingModel == 'code') { AZURE_SEARCH_FILTER: azureSearchFilter AZURE_SEARCH_TITLE_COLUMN: azureSearchTitleColumn AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId BACKEND_URL: 'https://${functionName}.azurewebsites.net' DOCUMENT_PROCESSING_QUEUE_NAME: queueName FUNCTION_KEY: clientKey @@ -585,6 +591,7 @@ module adminweb_docker './app/adminweb.bicep' = if (hostingModel == 'container') AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion AZURE_OPENAI_STREAM: azureOpenAIStream AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' AZURE_SEARCH_INDEX: azureSearchIndex AZURE_SEARCH_USE_SEMANTIC_SEARCH: azureSearchUseSemanticSearch @@ -597,6 +604,7 @@ module adminweb_docker './app/adminweb.bicep' = if (hostingModel == 'container') AZURE_SEARCH_FILTER: azureSearchFilter AZURE_SEARCH_TITLE_COLUMN: azureSearchTitleColumn AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId BACKEND_URL: 'https://${functionName}-docker.azurewebsites.net' DOCUMENT_PROCESSING_QUEUE_NAME: queueName FUNCTION_KEY: clientKey @@ -674,8 +682,10 @@ module function './app/function.bicep' = if (hostingModel == 'code') { AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel AZURE_OPENAI_RESOURCE: azureOpenAIResourceName AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_INDEX: azureSearchIndex AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId DOCUMENT_PROCESSING_QUEUE_NAME: queueName ORCHESTRATION_STRATEGY: orchestrationStrategy LOGLEVEL: logLevel @@ -718,8 +728,10 @@ module function_docker './app/function.bicep' = if (hostingModel == 'container') AZURE_OPENAI_EMBEDDING_MODEL: azureOpenAIEmbeddingModel AZURE_OPENAI_RESOURCE: azureOpenAIResourceName AZURE_OPENAI_API_VERSION: azureOpenAIApiVersion + AZURE_RESOURCE_GROUP: rgName AZURE_SEARCH_INDEX: azureSearchIndex AZURE_SEARCH_SERVICE: 'https://${azureAISearchName}.search.windows.net' + AZURE_SUBSCRIPTION_ID: subscription().subscriptionId DOCUMENT_PROCESSING_QUEUE_NAME: queueName ORCHESTRATION_STRATEGY: orchestrationStrategy LOGLEVEL: logLevel @@ -863,6 +875,7 @@ output AZURE_OPENAI_RESOURCE string = azureOpenAIResourceName output AZURE_OPENAI_EMBEDDING_MODEL string = azureOpenAIEmbeddingModel output AZURE_OPENAI_MODEL string = azureOpenAIModel output AZURE_OPENAI_API_KEY string = useKeyVault ? storekeys.outputs.OPENAI_KEY_NAME : '' +output AZURE_RESOURCE_GROUP string = rgName output AZURE_SEARCH_KEY string = useKeyVault ? storekeys.outputs.SEARCH_KEY_NAME : '' output AZURE_SEARCH_SERVICE string = search.outputs.endpoint output AZURE_SEARCH_USE_SEMANTIC_SEARCH string = azureSearchUseSemanticSearch @@ -877,8 +890,10 @@ output AZURE_SEARCH_TITLE_COLUMN string = azureSearchTitleColumn output AZURE_SEARCH_URL_COLUMN string = azureSearchUrlColumn output AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION bool = azureSearchUseIntegratedVectorization output AZURE_SEARCH_INDEX string = azureSearchIndex +output AZURE_SPEECH_SERVICE_NAME string = speechServiceName output AZURE_SPEECH_SERVICE_REGION string = location output AZURE_SPEECH_SERVICE_KEY string = useKeyVault ? storekeys.outputs.SPEECH_KEY_NAME : '' +output AZURE_SUBSCRIPTION_ID string = subscription().subscriptionId output AZURE_TENANT_ID string = tenant().tenantId output DOCUMENT_PROCESSING_QUEUE_NAME string = queueName output ORCHESTRATION_STRATEGY string = orchestrationStrategy diff --git a/infra/main.json b/infra/main.json index da573b2fa..223050b72 100644 --- a/infra/main.json +++ b/infra/main.json @@ -4,8 +4,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "16424067960359050937" + "version": "0.26.54.24096", + "templateHash": "7165162009587255181" } }, "parameters": { @@ -468,8 +468,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "18407114162280426775" + "version": "0.26.54.24096", + "templateHash": "4552321833419182500" }, "description": "Creates an Azure Key Vault." }, @@ -583,8 +583,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10580067567296932781" + "version": "0.26.54.24096", + "templateHash": "5605014717660667625" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -732,8 +732,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -803,8 +803,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -878,8 +878,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10580067567296932781" + "version": "0.26.54.24096", + "templateHash": "5605014717660667625" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -1042,8 +1042,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "12714039581294574286" + "version": "0.26.54.24096", + "templateHash": "5524474597014904513" } }, "parameters": { @@ -1232,8 +1232,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15593973660167090308" + "version": "0.26.54.24096", + "templateHash": "15608951755656851490" }, "description": "Creates an Azure AI Search instance." }, @@ -1397,8 +1397,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "6728315099548749563" + "version": "0.26.54.24096", + "templateHash": "6383905216384960764" }, "description": "Creates an Azure App Service plan." }, @@ -1537,6 +1537,7 @@ "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", "AZURE_OPENAI_STREAM": "[parameters('azureOpenAIStream')]", "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_USE_SEMANTIC_SEARCH": "[parameters('azureSearchUseSemanticSearch')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", @@ -1552,6 +1553,7 @@ "AZURE_SEARCH_URL_COLUMN": "[parameters('azureSearchUrlColumn')]", "AZURE_SPEECH_SERVICE_NAME": "[parameters('speechServiceName')]", "AZURE_SPEECH_SERVICE_REGION": "[parameters('location')]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "ORCHESTRATION_STRATEGY": "[parameters('orchestrationStrategy')]", "LOGLEVEL": "[parameters('logLevel')]" } @@ -1563,8 +1565,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2617364981024851878" + "version": "0.26.54.24096", + "templateHash": "6440307526170828052" } }, "parameters": { @@ -1726,8 +1728,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -1953,8 +1955,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -2031,8 +2033,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -2100,8 +2102,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -2169,8 +2171,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -2235,8 +2237,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -2392,6 +2394,7 @@ "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", "AZURE_OPENAI_STREAM": "[parameters('azureOpenAIStream')]", "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_USE_SEMANTIC_SEARCH": "[parameters('azureSearchUseSemanticSearch')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", @@ -2407,6 +2410,7 @@ "AZURE_SEARCH_URL_COLUMN": "[parameters('azureSearchUrlColumn')]", "AZURE_SPEECH_SERVICE_NAME": "[parameters('speechServiceName')]", "AZURE_SPEECH_SERVICE_REGION": "[parameters('location')]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "ORCHESTRATION_STRATEGY": "[parameters('orchestrationStrategy')]", "LOGLEVEL": "[parameters('logLevel')]" } @@ -2418,8 +2422,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2617364981024851878" + "version": "0.26.54.24096", + "templateHash": "6440307526170828052" } }, "parameters": { @@ -2581,8 +2585,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -2808,8 +2812,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -2886,8 +2890,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -2955,8 +2959,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -3024,8 +3028,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -3090,8 +3094,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -3250,6 +3254,7 @@ "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", "AZURE_OPENAI_STREAM": "[parameters('azureOpenAIStream')]", "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", "AZURE_SEARCH_USE_SEMANTIC_SEARCH": "[parameters('azureSearchUseSemanticSearch')]", @@ -3262,6 +3267,7 @@ "AZURE_SEARCH_FILTER": "[parameters('azureSearchFilter')]", "AZURE_SEARCH_TITLE_COLUMN": "[parameters('azureSearchTitleColumn')]", "AZURE_SEARCH_URL_COLUMN": "[parameters('azureSearchUrlColumn')]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "BACKEND_URL": "[format('https://{0}.azurewebsites.net', parameters('functionName'))]", "DOCUMENT_PROCESSING_QUEUE_NAME": "[variables('queueName')]", "FUNCTION_KEY": "[variables('clientKey')]", @@ -3276,8 +3282,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "8190548878142406566" + "version": "0.26.54.24096", + "templateHash": "16467193950465231540" } }, "parameters": { @@ -3439,8 +3445,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -3666,8 +3672,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -3744,8 +3750,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -3813,8 +3819,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -3882,8 +3888,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -3951,8 +3957,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -4017,8 +4023,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -4174,6 +4180,7 @@ "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", "AZURE_OPENAI_STREAM": "[parameters('azureOpenAIStream')]", "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", "AZURE_SEARCH_USE_SEMANTIC_SEARCH": "[parameters('azureSearchUseSemanticSearch')]", @@ -4186,6 +4193,7 @@ "AZURE_SEARCH_FILTER": "[parameters('azureSearchFilter')]", "AZURE_SEARCH_TITLE_COLUMN": "[parameters('azureSearchTitleColumn')]", "AZURE_SEARCH_URL_COLUMN": "[parameters('azureSearchUrlColumn')]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "BACKEND_URL": "[format('https://{0}-docker.azurewebsites.net', parameters('functionName'))]", "DOCUMENT_PROCESSING_QUEUE_NAME": "[variables('queueName')]", "FUNCTION_KEY": "[variables('clientKey')]", @@ -4200,8 +4208,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "8190548878142406566" + "version": "0.26.54.24096", + "templateHash": "16467193950465231540" } }, "parameters": { @@ -4363,8 +4371,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -4590,8 +4598,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -4668,8 +4676,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -4737,8 +4745,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -4806,8 +4814,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -4875,8 +4883,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -4941,8 +4949,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -5055,8 +5063,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10048108379044846923" + "version": "0.26.54.24096", + "templateHash": "54270050405814058" }, "description": "Creates an Application Insights instance and a Log Analytics workspace." }, @@ -5107,8 +5115,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "17101038721523251751" + "version": "0.26.54.24096", + "templateHash": "5766449277789384912" }, "description": "Creates a Log Analytics workspace." }, @@ -5188,8 +5196,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5016503703443937813" + "version": "0.26.54.24096", + "templateHash": "1697740909761260680" }, "description": "Creates an Application Insights instance based on an existing Log Analytics workspace." }, @@ -5253,8 +5261,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "4596399009213720452" + "version": "0.26.54.24096", + "templateHash": "623850250427461329" }, "description": "Creates a dashboard for an Application Insights instance." }, @@ -6584,8 +6592,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "17202152709669682199" + "version": "0.26.54.24096", + "templateHash": "13808750971846892864" } }, "parameters": { @@ -6624,7 +6632,7 @@ } }, "variables": { - "wookbookContents": "{\r\n \"version\": \"Notebook/1.0\",\r\n \"items\": [\r\n {\r\n \"type\": 1,\r\n \"content\": {\r\n \"json\": \"# Chat With Your Data Monitoring\"\r\n },\r\n \"name\": \"Heading\"\r\n },\r\n {\r\n \"type\": 9,\r\n \"content\": {\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"id\": \"b958a893-1fec-49c0-9487-5404949fa49d\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"appserviceplan\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/serverfarms'\\r\\n| summarize by id\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/serverFarms/{app-service-plan}\"\r\n },\r\n {\r\n \"id\": \"be0e9b6d-0022-413e-8f51-27c30d71f1a2\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"backendappservice\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{backend-app-service}\"\r\n },\r\n {\r\n \"id\": \"ed4452bd-c9f7-4662-816d-5be5a1f7ac3e\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"webappservice\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{web-app-service}\"\r\n },\r\n {\r\n \"id\": \"f2597276-1732-41e2-a8e7-3250adc62843\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"adminappservice\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{admin-app-service}\"\r\n },\r\n {\r\n \"id\": \"d2b7cfb5-2b5e-40e2-996c-471d76431957\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"eventgrid\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'microsoft.eventgrid/systemtopics'\\r\\n| summarize by id\\r\\n\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/systemTopics/{event-grid}\"\r\n },\r\n {\r\n \"id\": \"45dd012e-d365-40aa-8bbe-645fcc397f9f\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"loganalytics\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.OperationalInsights/workspaces'\\r\\n| summarize by id\\r\\n\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.OperationalInsights/workspaces/{log-analytics}\"\r\n },\r\n {\r\n \"id\": \"2c947381-754c-4edb-8e9c-d600b0f6a9bb\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"openai\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.CognitiveServices/accounts'\\r\\n| where kind == 'OpenAI'\\r\\n| summarize by id\\r\\n\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.CognitiveServices/accounts/{open-ai}\"\r\n },\r\n {\r\n \"id\": \"543a5643-4fae-417b-afa8-4fb441045021\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"aisearch\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Search/searchServices'\\r\\n| summarize by id\\r\\n\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Search/searchServices/{ai-search}\"\r\n },\r\n {\r\n \"id\": \"de9a1a63-4e15-404d-b056-f2f125fb6a7e\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"storageaccount\",\r\n \"type\": 5,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Storage/storageAccounts'\\r\\n| summarize by id\\r\\n\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"isHiddenWhenLocked\": true,\r\n \"typeSettings\": {\r\n \"additionalResourceOptions\": [],\r\n \"showDefault\": false\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\",\r\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}\"\r\n }\r\n ],\r\n \"style\": \"pills\",\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\"\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"never\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"show\"\r\n },\r\n \"name\": \"Resource Parameters\"\r\n },\r\n {\r\n \"type\": 9,\r\n \"content\": {\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"crossComponentResources\": [\r\n \"{subscription-id}\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"id\": \"c612fd9e-e4be-4739-855e-a545344709a4\",\r\n \"version\": \"KqlParameterItem/1.0\",\r\n \"name\": \"timerange\",\r\n \"label\": \"Time Range\",\r\n \"type\": 4,\r\n \"isRequired\": true,\r\n \"isGlobal\": true,\r\n \"typeSettings\": {\r\n \"selectableValues\": [\r\n {\r\n \"durationMs\": 300000\r\n },\r\n {\r\n \"durationMs\": 900000\r\n },\r\n {\r\n \"durationMs\": 1800000\r\n },\r\n {\r\n \"durationMs\": 3600000\r\n },\r\n {\r\n \"durationMs\": 14400000\r\n },\r\n {\r\n \"durationMs\": 43200000\r\n },\r\n {\r\n \"durationMs\": 86400000\r\n },\r\n {\r\n \"durationMs\": 172800000\r\n },\r\n {\r\n \"durationMs\": 259200000\r\n },\r\n {\r\n \"durationMs\": 604800000\r\n },\r\n {\r\n \"durationMs\": 1209600000\r\n },\r\n {\r\n \"durationMs\": 2419200000\r\n },\r\n {\r\n \"durationMs\": 2592000000\r\n },\r\n {\r\n \"durationMs\": 5184000000\r\n },\r\n {\r\n \"durationMs\": 7776000000\r\n }\r\n ],\r\n \"allowCustom\": true\r\n },\r\n \"timeContext\": {\r\n \"durationMs\": 86400000\r\n },\r\n \"value\": {\r\n \"durationMs\": 3600000\r\n }\r\n }\r\n ],\r\n \"style\": \"pills\",\r\n \"queryType\": 1,\r\n \"resourceType\": \"microsoft.resourcegraph/resources\"\r\n },\r\n \"name\": \"Time Picker\"\r\n },\r\n {\r\n \"type\": 11,\r\n \"content\": {\r\n \"version\": \"LinkItem/1.0\",\r\n \"style\": \"tabs\",\r\n \"links\": [\r\n {\r\n \"id\": \"60be91b1-8788-4b49-a8cd-34af2b0eb618\",\r\n \"cellValue\": \"selTab\",\r\n \"linkTarget\": \"parameter\",\r\n \"linkLabel\": \"App Operations\",\r\n \"subTarget\": \"Operations\",\r\n \"style\": \"link\"\r\n },\r\n {\r\n \"id\": \"c73d4e39-d3d4-4f60-89b7-1a05ed84ebbd\",\r\n \"cellValue\": \"selTab\",\r\n \"linkTarget\": \"parameter\",\r\n \"linkLabel\": \"App Resources\",\r\n \"subTarget\": \"Resources\",\r\n \"style\": \"link\"\r\n },\r\n {\r\n \"id\": \"cbfcb8a9-d229-4b10-a38a-d6826ac29e27\",\r\n \"cellValue\": \"selTab\",\r\n \"linkTarget\": \"parameter\",\r\n \"linkLabel\": \"Open AI\",\r\n \"subTarget\": \"Open AI\",\r\n \"style\": \"link\"\r\n },\r\n {\r\n \"id\": \"8c2e5ee1-49c8-4dbd-81cf-2baca35cbc61\",\r\n \"cellValue\": \"selTab\",\r\n \"linkTarget\": \"parameter\",\r\n \"linkLabel\": \"AI Search\",\r\n \"subTarget\": \"AI Search\",\r\n \"style\": \"link\"\r\n },\r\n {\r\n \"id\": \"e770e864-ada2-4af5-a5ed-28cca4b137eb\",\r\n \"cellValue\": \"selTab\",\r\n \"linkTarget\": \"parameter\",\r\n \"linkLabel\": \"Storage\",\r\n \"subTarget\": \"Storage\",\r\n \"style\": \"link\"\r\n }\r\n ]\r\n },\r\n \"name\": \"links - 4\"\r\n },\r\n {\r\n \"type\": 12,\r\n \"content\": {\r\n \"version\": \"NotebookGroup/1.0\",\r\n \"groupType\": \"editable\",\r\n \"items\": [\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"webappservice\",\r\n \"resourceIds\": [\r\n \"{webappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http2xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http3xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http4xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http5xx\",\r\n \"aggregation\": 1\r\n }\r\n ],\r\n \"title\": \"Web App Responses\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Web App Responses\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"webappservice\",\r\n \"resourceIds\": [\r\n \"{webappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Web App Response Times\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Web App Response Times\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"adminappservice\",\r\n \"resourceIds\": [\r\n \"{adminappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http2xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http3xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http4xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http5xx\",\r\n \"aggregation\": 1\r\n }\r\n ],\r\n \"title\": \"Admin App Responses\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Admin App Responses\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"adminappservice\",\r\n \"resourceIds\": [\r\n \"{adminappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Admin App Response Times\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Admin App Response Times\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"backendappservice\",\r\n \"resourceIds\": [\r\n \"{backendappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http2xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http3xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http4xx\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--Http5xx\",\r\n \"aggregation\": 1\r\n }\r\n ],\r\n \"title\": \"Backend Responses\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Backend Responses\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/sites\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"backendappservice\",\r\n \"resourceIds\": [\r\n \"{backendappservice}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/sites\",\r\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Backend Response Times\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Backend Response Times\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook9a7f88c8-6e80-41a3-9837-09d29d05a802\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.eventgrid/systemtopics\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"eventgrid\",\r\n \"resourceIds\": [\r\n \"{eventgrid}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishFailCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--MatchedEventCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DeliverySuccessCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DeadLetteredCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DeliveryAttemptFailCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DroppedEventCount\",\r\n \"aggregation\": 1\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--AdvancedFilterEvaluationCount\",\r\n \"aggregation\": 1\r\n }\r\n ],\r\n \"title\": \"Event Grid Events\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Event Grid Events\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook14a73dd8-6d4d-43ba-8bea-f7c159ffd85d\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.eventgrid/systemtopics\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"eventgrid\",\r\n \"resourceIds\": [\r\n \"{eventgrid}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 3600000\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessLatencyInMs\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessLatencyInMs\",\r\n \"aggregation\": 3\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DestinationProcessingDurationInMs\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\r\n \"metric\": \"microsoft.eventgrid/systemtopics--DestinationProcessingDurationInMs\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Event Grid Latency\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Event Grid Latency\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 3,\r\n \"content\": {\r\n \"version\": \"KqlItem/1.0\",\r\n \"query\": \"AppExceptions\\r\\n | project TimeGenerated, AppRoleName, ExceptionType, OuterMessage\\r\\n\",\r\n \"size\": 0,\r\n \"showAnalytics\": true,\r\n \"title\": \"App Exceptions\",\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"queryType\": 0,\r\n \"resourceType\": \"microsoft.operationalinsights/workspaces\",\r\n \"crossComponentResources\": [\r\n \"{loganalytics}\"\r\n ],\r\n \"gridSettings\": {\r\n \"sortBy\": [\r\n {\r\n \"itemKey\": \"TimeGenerated\",\r\n \"sortOrder\": 2\r\n }\r\n ]\r\n },\r\n \"sortBy\": [\r\n {\r\n \"itemKey\": \"TimeGenerated\",\r\n \"sortOrder\": 2\r\n }\r\n ]\r\n },\r\n \"name\": \"App Exceptions\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 3,\r\n \"content\": {\r\n \"version\": \"KqlItem/1.0\",\r\n \"query\": \"AppRequests\\r\\n | project TimeGenerated, AppRoleName, Name, Success, Url, PerformanceBucket\",\r\n \"size\": 0,\r\n \"showAnalytics\": true,\r\n \"title\": \"App Requests\",\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"queryType\": 0,\r\n \"resourceType\": \"microsoft.operationalinsights/workspaces\",\r\n \"crossComponentResources\": [\r\n \"{loganalytics}\"\r\n ]\r\n },\r\n \"name\": \"App Requests\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"selTab\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"Operations\"\r\n },\r\n \"name\": \"Operations Group\"\r\n },\r\n {\r\n \"type\": 12,\r\n \"content\": {\r\n \"version\": \"NotebookGroup/1.0\",\r\n \"groupType\": \"editable\",\r\n \"items\": [\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookdf438966-1e39-4357-b905-15a0d9de5cf8\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/serverfarms\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"appserviceplan\",\r\n \"resourceIds\": [\r\n \"{appserviceplan}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--CpuPercentage\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--CpuPercentage\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"CPU Usage\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"CPU Usage\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook4188b464-c50d-4c92-ae63-4f129284888c\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/serverfarms\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"appserviceplan\",\r\n \"resourceIds\": [\r\n \"{appserviceplan}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--MemoryPercentage\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--MemoryPercentage\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Memory Usage\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Memory Usage\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookd7cc149c-bd48-432d-8343-6c6eebdee5d9\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/serverfarms\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"appserviceplan\",\r\n \"resourceIds\": [\r\n \"{appserviceplan}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--BytesReceived\",\r\n \"aggregation\": 1,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Data In\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Data In\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook54212fe0-54bb-4b55-9be0-efbd987d461b\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.web/serverfarms\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"appserviceplan\",\r\n \"resourceIds\": [\r\n \"{appserviceplan}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.web/serverfarms\",\r\n \"metric\": \"microsoft.web/serverfarms--BytesSent\",\r\n \"aggregation\": 1,\r\n \"splitBy\": null,\r\n \"columnName\": \"\"\r\n }\r\n ],\r\n \"title\": \"Data Out\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Data Out\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"selTab\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"Resources\"\r\n },\r\n \"name\": \"Resources Group\"\r\n },\r\n {\r\n \"type\": 12,\r\n \"content\": {\r\n \"version\": \"NotebookGroup/1.0\",\r\n \"groupType\": \"editable\",\r\n \"items\": [\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbooka838a7f8-a1e2-42c2-b8eb-2601e4486462\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"openai\",\r\n \"resourceIds\": [\r\n \"{openai}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\r\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"aggregation\": 1,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Open AI Requests by Deployment\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"formatters\": [\r\n {\r\n \"columnMatch\": \"Subscription\",\r\n \"formatter\": 5\r\n },\r\n {\r\n \"columnMatch\": \"Name\",\r\n \"formatter\": 13,\r\n \"formatOptions\": {\r\n \"linkTarget\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\r\n \"formatter\": 5\r\n },\r\n {\r\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"formatter\": 1,\r\n \"numberFormat\": {\r\n \"unit\": 0,\r\n \"options\": null\r\n }\r\n }\r\n ],\r\n \"rowLimit\": 10000,\r\n \"labelSettings\": [\r\n {\r\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"label\": \"Azure OpenAI Requests (Sum)\"\r\n },\r\n {\r\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\r\n \"label\": \"Azure OpenAI Requests Timeline\"\r\n }\r\n ]\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Open AI Requests by Deployment\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbooka838a7f8-a1e2-42c2-b8eb-2601e4486462\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"openai\",\r\n \"resourceIds\": [\r\n \"{openai}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\r\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"aggregation\": 1,\r\n \"splitBy\": \"ModelVersion\"\r\n }\r\n ],\r\n \"title\": \"Open AI Requests by Model Version\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"formatters\": [\r\n {\r\n \"columnMatch\": \"Subscription\",\r\n \"formatter\": 5\r\n },\r\n {\r\n \"columnMatch\": \"Name\",\r\n \"formatter\": 13,\r\n \"formatOptions\": {\r\n \"linkTarget\": \"Resource\"\r\n }\r\n },\r\n {\r\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\r\n \"formatter\": 5\r\n },\r\n {\r\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"formatter\": 1,\r\n \"numberFormat\": {\r\n \"unit\": 0,\r\n \"options\": null\r\n }\r\n }\r\n ],\r\n \"rowLimit\": 10000,\r\n \"labelSettings\": [\r\n {\r\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\r\n \"label\": \"Azure OpenAI Requests (Sum)\"\r\n },\r\n {\r\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\r\n \"label\": \"Azure OpenAI Requests Timeline\"\r\n }\r\n ]\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Open AI Requests by Model Version\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"openai\",\r\n \"resourceIds\": [\r\n \"{openai}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\r\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-GeneratedTokens\",\r\n \"aggregation\": 7,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Generated Completions Tokens\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Generated Completions Tokens\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"openai\",\r\n \"resourceIds\": [\r\n \"{openai}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\r\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-TokenTransaction\",\r\n \"aggregation\": 7,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Processed Inference Tokens\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Processed Inference Tokens\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"openai\",\r\n \"resourceIds\": [\r\n \"{openai}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\r\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-ProcessedPromptTokens\",\r\n \"aggregation\": 7,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Processed Prompt Tokens\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Processed Prompt Tokens\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"selTab\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"Open AI\"\r\n },\r\n \"name\": \"Open AI Group\"\r\n },\r\n {\r\n \"type\": 12,\r\n \"content\": {\r\n \"version\": \"NotebookGroup/1.0\",\r\n \"groupType\": \"editable\",\r\n \"items\": [\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookacb9885c-d72e-468f-a567-655708cfec44\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.search/searchservices\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"aisearch\",\r\n \"resourceIds\": [\r\n \"{aisearch}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.search/searchservices\",\r\n \"metric\": \"microsoft.search/searchservices--SearchLatency\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.search/searchservices\",\r\n \"metric\": \"microsoft.search/searchservices--SearchLatency\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Search Latency\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Search Latency\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookc3418582-4b58-4016-8180-d3ecff43c408\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.search/searchservices\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"aisearch\",\r\n \"resourceIds\": [\r\n \"{aisearch}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.search/searchservices\",\r\n \"metric\": \"microsoft.search/searchservices--SearchQueriesPerSecond\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.search/searchservices\",\r\n \"metric\": \"microsoft.search/searchservices--SearchQueriesPerSecond\",\r\n \"aggregation\": 3\r\n }\r\n ],\r\n \"title\": \"Search Queries per second\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Search Queries per second\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook9e9aa03e-6125-4347-b768-ca7151d413e3\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.search/searchservices\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"aisearch\",\r\n \"resourceIds\": [\r\n \"{aisearch}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.search/searchservices\",\r\n \"metric\": \"microsoft.search/searchservices--ThrottledSearchQueriesPercentage\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Throttled Search Queries Percentage\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"showPin\": false,\r\n \"name\": \"Throttled Search Queries Percentage\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"selTab\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"AI Search\"\r\n },\r\n \"name\": \"Search Group\"\r\n },\r\n {\r\n \"type\": 12,\r\n \"content\": {\r\n \"version\": \"NotebookGroup/1.0\",\r\n \"groupType\": \"editable\",\r\n \"items\": [\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookd5a8891d-2021-47cb-a5aa-d92dd112aab0\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.storage/storageaccounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"storageaccount\",\r\n \"resourceIds\": [\r\n \"{storageaccount}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts\",\r\n \"metric\": \"microsoft.storage/storageaccounts-Capacity-UsedCapacity\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-BlobCapacity\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueCapacity\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableCapacity\",\r\n \"aggregation\": 4\r\n }\r\n ],\r\n \"title\": \"Capacity\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Storage Capacity\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookd5a8891d-2021-47cb-a5aa-d92dd112aab0\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.storage/storageaccounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"storageaccount\",\r\n \"resourceIds\": [\r\n \"{storageaccount}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-ContainerCount\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-BlobCount\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueCount\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueMessageCount\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableCount\",\r\n \"aggregation\": 4\r\n },\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\r\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableEntityCount\",\r\n \"aggregation\": 4\r\n }\r\n ],\r\n \"title\": \"Counts\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Storage Counts\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook14f8930f-94fe-4c30-b21b-97e802e48f53\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.storage/storageaccounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"storageaccount\",\r\n \"resourceIds\": [\r\n \"{storageaccount}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts\",\r\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-Ingress\",\r\n \"aggregation\": 1,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Ingress\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Storage Ingress\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbook14f8930f-94fe-4c30-b21b-97e802e48f53\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.storage/storageaccounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"storageaccount\",\r\n \"resourceIds\": [\r\n \"{storageaccount}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts\",\r\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-Egress\",\r\n \"aggregation\": 1,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Egress\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Storage Egress\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n },\r\n {\r\n \"type\": 10,\r\n \"content\": {\r\n \"chartId\": \"workbookdc8d463d-4a35-49c4-a9ad-1a4b23f8cadd\",\r\n \"version\": \"MetricsItem/2.0\",\r\n \"size\": 0,\r\n \"chartType\": 2,\r\n \"resourceType\": \"microsoft.storage/storageaccounts\",\r\n \"metricScope\": 0,\r\n \"resourceParameter\": \"storageaccount\",\r\n \"resourceIds\": [\r\n \"{storageaccount}\"\r\n ],\r\n \"timeContextFromParameter\": \"timerange\",\r\n \"timeContext\": {\r\n \"durationMs\": 0\r\n },\r\n \"metrics\": [\r\n {\r\n \"namespace\": \"microsoft.storage/storageaccounts\",\r\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-SuccessE2ELatency\",\r\n \"aggregation\": 4,\r\n \"splitBy\": null\r\n }\r\n ],\r\n \"title\": \"Storage Latency\",\r\n \"showOpenInMe\": true,\r\n \"timeBrushParameterName\": \"timerange\",\r\n \"timeBrushExportOnlyWhenBrushed\": true,\r\n \"gridSettings\": {\r\n \"rowLimit\": 10000\r\n }\r\n },\r\n \"customWidth\": \"50\",\r\n \"name\": \"Storage Latency\",\r\n \"styleSettings\": {\r\n \"showBorder\": true\r\n }\r\n }\r\n ]\r\n },\r\n \"conditionalVisibility\": {\r\n \"parameterName\": \"selTab\",\r\n \"comparison\": \"isEqualTo\",\r\n \"value\": \"Storage\"\r\n },\r\n \"name\": \"Storage Group\"\r\n }\r\n ],\r\n \"fallbackResourceIds\": [\r\n \"azure monitor\"\r\n ],\r\n \"styleSettings\": {\r\n \"paddingStyle\": \"narrow\",\r\n \"spacingStyle\": \"narrow\"\r\n },\r\n \"$schema\": \"https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json\"\r\n}", + "wookbookContents": "{\n \"version\": \"Notebook/1.0\",\n \"items\": [\n {\n \"type\": 1,\n \"content\": {\n \"json\": \"# Chat With Your Data Monitoring\"\n },\n \"name\": \"Heading\"\n },\n {\n \"type\": 9,\n \"content\": {\n \"version\": \"KqlParameterItem/1.0\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"parameters\": [\n {\n \"id\": \"b958a893-1fec-49c0-9487-5404949fa49d\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"appserviceplan\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/serverfarms'\\r\\n| summarize by id\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/serverFarms/{app-service-plan}\"\n },\n {\n \"id\": \"be0e9b6d-0022-413e-8f51-27c30d71f1a2\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"backendappservice\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{backend-app-service}\"\n },\n {\n \"id\": \"ed4452bd-c9f7-4662-816d-5be5a1f7ac3e\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"webappservice\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{web-app-service}\"\n },\n {\n \"id\": \"f2597276-1732-41e2-a8e7-3250adc62843\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"adminappservice\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Web/sites'\\r\\n| summarize by id\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Web/sites/{admin-app-service}\"\n },\n {\n \"id\": \"d2b7cfb5-2b5e-40e2-996c-471d76431957\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"eventgrid\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'microsoft.eventgrid/systemtopics'\\r\\n| summarize by id\\r\\n\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/systemTopics/{event-grid}\"\n },\n {\n \"id\": \"45dd012e-d365-40aa-8bbe-645fcc397f9f\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"loganalytics\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.OperationalInsights/workspaces'\\r\\n| summarize by id\\r\\n\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.OperationalInsights/workspaces/{log-analytics}\"\n },\n {\n \"id\": \"2c947381-754c-4edb-8e9c-d600b0f6a9bb\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"openai\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.CognitiveServices/accounts'\\r\\n| where kind == 'OpenAI'\\r\\n| summarize by id\\r\\n\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.CognitiveServices/accounts/{open-ai}\"\n },\n {\n \"id\": \"543a5643-4fae-417b-afa8-4fb441045021\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"aisearch\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Search/searchServices'\\r\\n| summarize by id\\r\\n\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Search/searchServices/{ai-search}\"\n },\n {\n \"id\": \"de9a1a63-4e15-404d-b056-f2f125fb6a7e\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"storageaccount\",\n \"type\": 5,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"query\": \"resources\\r\\n| where type =~ 'Microsoft.Storage/storageAccounts'\\r\\n| summarize by id\\r\\n\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"isHiddenWhenLocked\": true,\n \"typeSettings\": {\n \"additionalResourceOptions\": [],\n \"showDefault\": false\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\",\n \"value\": \"{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.Storage/storageAccounts/{storage-account}\"\n }\n ],\n \"style\": \"pills\",\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\"\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"never\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"show\"\n },\n \"name\": \"Resource Parameters\"\n },\n {\n \"type\": 9,\n \"content\": {\n \"version\": \"KqlParameterItem/1.0\",\n \"crossComponentResources\": [\n \"{subscription-id}\"\n ],\n \"parameters\": [\n {\n \"id\": \"c612fd9e-e4be-4739-855e-a545344709a4\",\n \"version\": \"KqlParameterItem/1.0\",\n \"name\": \"timerange\",\n \"label\": \"Time Range\",\n \"type\": 4,\n \"isRequired\": true,\n \"isGlobal\": true,\n \"typeSettings\": {\n \"selectableValues\": [\n {\n \"durationMs\": 300000\n },\n {\n \"durationMs\": 900000\n },\n {\n \"durationMs\": 1800000\n },\n {\n \"durationMs\": 3600000\n },\n {\n \"durationMs\": 14400000\n },\n {\n \"durationMs\": 43200000\n },\n {\n \"durationMs\": 86400000\n },\n {\n \"durationMs\": 172800000\n },\n {\n \"durationMs\": 259200000\n },\n {\n \"durationMs\": 604800000\n },\n {\n \"durationMs\": 1209600000\n },\n {\n \"durationMs\": 2419200000\n },\n {\n \"durationMs\": 2592000000\n },\n {\n \"durationMs\": 5184000000\n },\n {\n \"durationMs\": 7776000000\n }\n ],\n \"allowCustom\": true\n },\n \"timeContext\": {\n \"durationMs\": 86400000\n },\n \"value\": {\n \"durationMs\": 3600000\n }\n }\n ],\n \"style\": \"pills\",\n \"queryType\": 1,\n \"resourceType\": \"microsoft.resourcegraph/resources\"\n },\n \"name\": \"Time Picker\"\n },\n {\n \"type\": 11,\n \"content\": {\n \"version\": \"LinkItem/1.0\",\n \"style\": \"tabs\",\n \"links\": [\n {\n \"id\": \"60be91b1-8788-4b49-a8cd-34af2b0eb618\",\n \"cellValue\": \"selTab\",\n \"linkTarget\": \"parameter\",\n \"linkLabel\": \"App Operations\",\n \"subTarget\": \"Operations\",\n \"style\": \"link\"\n },\n {\n \"id\": \"c73d4e39-d3d4-4f60-89b7-1a05ed84ebbd\",\n \"cellValue\": \"selTab\",\n \"linkTarget\": \"parameter\",\n \"linkLabel\": \"App Resources\",\n \"subTarget\": \"Resources\",\n \"style\": \"link\"\n },\n {\n \"id\": \"cbfcb8a9-d229-4b10-a38a-d6826ac29e27\",\n \"cellValue\": \"selTab\",\n \"linkTarget\": \"parameter\",\n \"linkLabel\": \"Open AI\",\n \"subTarget\": \"Open AI\",\n \"style\": \"link\"\n },\n {\n \"id\": \"8c2e5ee1-49c8-4dbd-81cf-2baca35cbc61\",\n \"cellValue\": \"selTab\",\n \"linkTarget\": \"parameter\",\n \"linkLabel\": \"AI Search\",\n \"subTarget\": \"AI Search\",\n \"style\": \"link\"\n },\n {\n \"id\": \"e770e864-ada2-4af5-a5ed-28cca4b137eb\",\n \"cellValue\": \"selTab\",\n \"linkTarget\": \"parameter\",\n \"linkLabel\": \"Storage\",\n \"subTarget\": \"Storage\",\n \"style\": \"link\"\n }\n ]\n },\n \"name\": \"links - 4\"\n },\n {\n \"type\": 12,\n \"content\": {\n \"version\": \"NotebookGroup/1.0\",\n \"groupType\": \"editable\",\n \"items\": [\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"webappservice\",\n \"resourceIds\": [\n \"{webappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http2xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http3xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http4xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http5xx\",\n \"aggregation\": 1\n }\n ],\n \"title\": \"Web App Responses\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Web App Responses\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"webappservice\",\n \"resourceIds\": [\n \"{webappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Web App Response Times\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Web App Response Times\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"adminappservice\",\n \"resourceIds\": [\n \"{adminappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http2xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http3xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http4xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http5xx\",\n \"aggregation\": 1\n }\n ],\n \"title\": \"Admin App Responses\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Admin App Responses\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"adminappservice\",\n \"resourceIds\": [\n \"{adminappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Admin App Response Times\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Admin App Response Times\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"backendappservice\",\n \"resourceIds\": [\n \"{backendappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http2xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http3xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http4xx\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--Http5xx\",\n \"aggregation\": 1\n }\n ],\n \"title\": \"Backend Responses\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Backend Responses\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook6b31a3ff-2833-43dc-bf82-1782baa17863\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/sites\",\n \"metricScope\": 0,\n \"resourceParameter\": \"backendappservice\",\n \"resourceIds\": [\n \"{backendappservice}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.web/sites\",\n \"metric\": \"microsoft.web/sites--HttpResponseTime\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Backend Response Times\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Backend Response Times\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook9a7f88c8-6e80-41a3-9837-09d29d05a802\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.eventgrid/systemtopics\",\n \"metricScope\": 0,\n \"resourceParameter\": \"eventgrid\",\n \"resourceIds\": [\n \"{eventgrid}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishFailCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--MatchedEventCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DeliverySuccessCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DeadLetteredCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DeliveryAttemptFailCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DroppedEventCount\",\n \"aggregation\": 1\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--AdvancedFilterEvaluationCount\",\n \"aggregation\": 1\n }\n ],\n \"title\": \"Event Grid Events\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Event Grid Events\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook14a73dd8-6d4d-43ba-8bea-f7c159ffd85d\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.eventgrid/systemtopics\",\n \"metricScope\": 0,\n \"resourceParameter\": \"eventgrid\",\n \"resourceIds\": [\n \"{eventgrid}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 3600000\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessLatencyInMs\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--PublishSuccessLatencyInMs\",\n \"aggregation\": 3\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DestinationProcessingDurationInMs\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.eventgrid/systemtopics\",\n \"metric\": \"microsoft.eventgrid/systemtopics--DestinationProcessingDurationInMs\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Event Grid Latency\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Event Grid Latency\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 3,\n \"content\": {\n \"version\": \"KqlItem/1.0\",\n \"query\": \"AppExceptions\\r\\n | project TimeGenerated, AppRoleName, ExceptionType, OuterMessage\\r\\n\",\n \"size\": 0,\n \"showAnalytics\": true,\n \"title\": \"App Exceptions\",\n \"timeContextFromParameter\": \"timerange\",\n \"queryType\": 0,\n \"resourceType\": \"microsoft.operationalinsights/workspaces\",\n \"crossComponentResources\": [\n \"{loganalytics}\"\n ],\n \"gridSettings\": {\n \"sortBy\": [\n {\n \"itemKey\": \"TimeGenerated\",\n \"sortOrder\": 2\n }\n ]\n },\n \"sortBy\": [\n {\n \"itemKey\": \"TimeGenerated\",\n \"sortOrder\": 2\n }\n ]\n },\n \"name\": \"App Exceptions\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 3,\n \"content\": {\n \"version\": \"KqlItem/1.0\",\n \"query\": \"AppRequests\\r\\n | project TimeGenerated, AppRoleName, Name, Success, Url, PerformanceBucket\",\n \"size\": 0,\n \"showAnalytics\": true,\n \"title\": \"App Requests\",\n \"timeContextFromParameter\": \"timerange\",\n \"queryType\": 0,\n \"resourceType\": \"microsoft.operationalinsights/workspaces\",\n \"crossComponentResources\": [\n \"{loganalytics}\"\n ]\n },\n \"name\": \"App Requests\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n }\n ]\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"selTab\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"Operations\"\n },\n \"name\": \"Operations Group\"\n },\n {\n \"type\": 12,\n \"content\": {\n \"version\": \"NotebookGroup/1.0\",\n \"groupType\": \"editable\",\n \"items\": [\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookdf438966-1e39-4357-b905-15a0d9de5cf8\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/serverfarms\",\n \"metricScope\": 0,\n \"resourceParameter\": \"appserviceplan\",\n \"resourceIds\": [\n \"{appserviceplan}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--CpuPercentage\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--CpuPercentage\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"CPU Usage\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"CPU Usage\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook4188b464-c50d-4c92-ae63-4f129284888c\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/serverfarms\",\n \"metricScope\": 0,\n \"resourceParameter\": \"appserviceplan\",\n \"resourceIds\": [\n \"{appserviceplan}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--MemoryPercentage\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--MemoryPercentage\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Memory Usage\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Memory Usage\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookd7cc149c-bd48-432d-8343-6c6eebdee5d9\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/serverfarms\",\n \"metricScope\": 0,\n \"resourceParameter\": \"appserviceplan\",\n \"resourceIds\": [\n \"{appserviceplan}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--BytesReceived\",\n \"aggregation\": 1,\n \"splitBy\": null\n }\n ],\n \"title\": \"Data In\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Data In\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook54212fe0-54bb-4b55-9be0-efbd987d461b\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.web/serverfarms\",\n \"metricScope\": 0,\n \"resourceParameter\": \"appserviceplan\",\n \"resourceIds\": [\n \"{appserviceplan}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.web/serverfarms\",\n \"metric\": \"microsoft.web/serverfarms--BytesSent\",\n \"aggregation\": 1,\n \"splitBy\": null,\n \"columnName\": \"\"\n }\n ],\n \"title\": \"Data Out\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Data Out\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n }\n ]\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"selTab\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"Resources\"\n },\n \"name\": \"Resources Group\"\n },\n {\n \"type\": 12,\n \"content\": {\n \"version\": \"NotebookGroup/1.0\",\n \"groupType\": \"editable\",\n \"items\": [\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbooka838a7f8-a1e2-42c2-b8eb-2601e4486462\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"openai\",\n \"resourceIds\": [\n \"{openai}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"aggregation\": 1,\n \"splitBy\": null\n }\n ],\n \"title\": \"Open AI Requests by Deployment\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"formatters\": [\n {\n \"columnMatch\": \"Subscription\",\n \"formatter\": 5\n },\n {\n \"columnMatch\": \"Name\",\n \"formatter\": 13,\n \"formatOptions\": {\n \"linkTarget\": \"Resource\"\n }\n },\n {\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\n \"formatter\": 5\n },\n {\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"formatter\": 1,\n \"numberFormat\": {\n \"unit\": 0,\n \"options\": null\n }\n }\n ],\n \"rowLimit\": 10000,\n \"labelSettings\": [\n {\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"label\": \"Azure OpenAI Requests (Sum)\"\n },\n {\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\n \"label\": \"Azure OpenAI Requests Timeline\"\n }\n ]\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Open AI Requests by Deployment\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbooka838a7f8-a1e2-42c2-b8eb-2601e4486462\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"openai\",\n \"resourceIds\": [\n \"{openai}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"aggregation\": 1,\n \"splitBy\": \"ModelVersion\"\n }\n ],\n \"title\": \"Open AI Requests by Model Version\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"formatters\": [\n {\n \"columnMatch\": \"Subscription\",\n \"formatter\": 5\n },\n {\n \"columnMatch\": \"Name\",\n \"formatter\": 13,\n \"formatOptions\": {\n \"linkTarget\": \"Resource\"\n }\n },\n {\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\n \"formatter\": 5\n },\n {\n \"columnMatch\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"formatter\": 1,\n \"numberFormat\": {\n \"unit\": 0,\n \"options\": null\n }\n }\n ],\n \"rowLimit\": 10000,\n \"labelSettings\": [\n {\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests\",\n \"label\": \"Azure OpenAI Requests (Sum)\"\n },\n {\n \"columnId\": \"microsoft.cognitiveservices/accounts-Azure OpenAI HTTP Requests-AzureOpenAIRequests Timeline\",\n \"label\": \"Azure OpenAI Requests Timeline\"\n }\n ]\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Open AI Requests by Model Version\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"openai\",\n \"resourceIds\": [\n \"{openai}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-GeneratedTokens\",\n \"aggregation\": 7,\n \"splitBy\": null\n }\n ],\n \"title\": \"Generated Completions Tokens\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Generated Completions Tokens\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"openai\",\n \"resourceIds\": [\n \"{openai}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-TokenTransaction\",\n \"aggregation\": 7,\n \"splitBy\": null\n }\n ],\n \"title\": \"Processed Inference Tokens\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Processed Inference Tokens\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook5c797794-acb4-47a5-b92f-36abf913ab8e\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.cognitiveservices/accounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"openai\",\n \"resourceIds\": [\n \"{openai}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.cognitiveservices/accounts\",\n \"metric\": \"microsoft.cognitiveservices/accounts-Azure OpenAI Usage-ProcessedPromptTokens\",\n \"aggregation\": 7,\n \"splitBy\": null\n }\n ],\n \"title\": \"Processed Prompt Tokens\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Processed Prompt Tokens\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n }\n ]\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"selTab\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"Open AI\"\n },\n \"name\": \"Open AI Group\"\n },\n {\n \"type\": 12,\n \"content\": {\n \"version\": \"NotebookGroup/1.0\",\n \"groupType\": \"editable\",\n \"items\": [\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookacb9885c-d72e-468f-a567-655708cfec44\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.search/searchservices\",\n \"metricScope\": 0,\n \"resourceParameter\": \"aisearch\",\n \"resourceIds\": [\n \"{aisearch}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.search/searchservices\",\n \"metric\": \"microsoft.search/searchservices--SearchLatency\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.search/searchservices\",\n \"metric\": \"microsoft.search/searchservices--SearchLatency\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Search Latency\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Search Latency\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookc3418582-4b58-4016-8180-d3ecff43c408\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.search/searchservices\",\n \"metricScope\": 0,\n \"resourceParameter\": \"aisearch\",\n \"resourceIds\": [\n \"{aisearch}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.search/searchservices\",\n \"metric\": \"microsoft.search/searchservices--SearchQueriesPerSecond\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.search/searchservices\",\n \"metric\": \"microsoft.search/searchservices--SearchQueriesPerSecond\",\n \"aggregation\": 3\n }\n ],\n \"title\": \"Search Queries per second\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Search Queries per second\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook9e9aa03e-6125-4347-b768-ca7151d413e3\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.search/searchservices\",\n \"metricScope\": 0,\n \"resourceParameter\": \"aisearch\",\n \"resourceIds\": [\n \"{aisearch}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.search/searchservices\",\n \"metric\": \"microsoft.search/searchservices--ThrottledSearchQueriesPercentage\",\n \"aggregation\": 4,\n \"splitBy\": null\n }\n ],\n \"title\": \"Throttled Search Queries Percentage\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"showPin\": false,\n \"name\": \"Throttled Search Queries Percentage\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n }\n ]\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"selTab\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"AI Search\"\n },\n \"name\": \"Search Group\"\n },\n {\n \"type\": 12,\n \"content\": {\n \"version\": \"NotebookGroup/1.0\",\n \"groupType\": \"editable\",\n \"items\": [\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookd5a8891d-2021-47cb-a5aa-d92dd112aab0\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.storage/storageaccounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"storageaccount\",\n \"resourceIds\": [\n \"{storageaccount}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.storage/storageaccounts\",\n \"metric\": \"microsoft.storage/storageaccounts-Capacity-UsedCapacity\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-BlobCapacity\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueCapacity\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableCapacity\",\n \"aggregation\": 4\n }\n ],\n \"title\": \"Capacity\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Storage Capacity\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookd5a8891d-2021-47cb-a5aa-d92dd112aab0\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.storage/storageaccounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"storageaccount\",\n \"resourceIds\": [\n \"{storageaccount}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-ContainerCount\",\n \"aggregation\": 4,\n \"splitBy\": null\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/blobservices\",\n \"metric\": \"microsoft.storage/storageaccounts/blobservices-Capacity-BlobCount\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueCount\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/queueservices\",\n \"metric\": \"microsoft.storage/storageaccounts/queueservices-Capacity-QueueMessageCount\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableCount\",\n \"aggregation\": 4\n },\n {\n \"namespace\": \"microsoft.storage/storageaccounts/tableservices\",\n \"metric\": \"microsoft.storage/storageaccounts/tableservices-Capacity-TableEntityCount\",\n \"aggregation\": 4\n }\n ],\n \"title\": \"Counts\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Storage Counts\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook14f8930f-94fe-4c30-b21b-97e802e48f53\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.storage/storageaccounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"storageaccount\",\n \"resourceIds\": [\n \"{storageaccount}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.storage/storageaccounts\",\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-Ingress\",\n \"aggregation\": 1,\n \"splitBy\": null\n }\n ],\n \"title\": \"Ingress\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Storage Ingress\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbook14f8930f-94fe-4c30-b21b-97e802e48f53\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.storage/storageaccounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"storageaccount\",\n \"resourceIds\": [\n \"{storageaccount}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.storage/storageaccounts\",\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-Egress\",\n \"aggregation\": 1,\n \"splitBy\": null\n }\n ],\n \"title\": \"Egress\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Storage Egress\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n },\n {\n \"type\": 10,\n \"content\": {\n \"chartId\": \"workbookdc8d463d-4a35-49c4-a9ad-1a4b23f8cadd\",\n \"version\": \"MetricsItem/2.0\",\n \"size\": 0,\n \"chartType\": 2,\n \"resourceType\": \"microsoft.storage/storageaccounts\",\n \"metricScope\": 0,\n \"resourceParameter\": \"storageaccount\",\n \"resourceIds\": [\n \"{storageaccount}\"\n ],\n \"timeContextFromParameter\": \"timerange\",\n \"timeContext\": {\n \"durationMs\": 0\n },\n \"metrics\": [\n {\n \"namespace\": \"microsoft.storage/storageaccounts\",\n \"metric\": \"microsoft.storage/storageaccounts-Transaction-SuccessE2ELatency\",\n \"aggregation\": 4,\n \"splitBy\": null\n }\n ],\n \"title\": \"Storage Latency\",\n \"showOpenInMe\": true,\n \"timeBrushParameterName\": \"timerange\",\n \"timeBrushExportOnlyWhenBrushed\": true,\n \"gridSettings\": {\n \"rowLimit\": 10000\n }\n },\n \"customWidth\": \"50\",\n \"name\": \"Storage Latency\",\n \"styleSettings\": {\n \"showBorder\": true\n }\n }\n ]\n },\n \"conditionalVisibility\": {\n \"parameterName\": \"selTab\",\n \"comparison\": \"isEqualTo\",\n \"value\": \"Storage\"\n },\n \"name\": \"Storage Group\"\n }\n ],\n \"fallbackResourceIds\": [\n \"azure monitor\"\n ],\n \"styleSettings\": {\n \"paddingStyle\": \"narrow\",\n \"spacingStyle\": \"narrow\"\n },\n \"$schema\": \"https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json\"\n}", "wookbookContentsSubReplaced": "[replace(variables('wookbookContents'), '{subscription-id}', subscription().id)]", "wookbookContentsRGReplaced": "[replace(variables('wookbookContentsSubReplaced'), '{resource-group}', resourceGroup().name)]", "wookbookContentsAppServicePlanReplaced": "[replace(variables('wookbookContentsRGReplaced'), '{app-service-plan}', parameters('hostingPlanName'))]", @@ -6667,8 +6675,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10520241319603231084" + "version": "0.26.54.24096", + "templateHash": "9035761088187826811" } }, "parameters": { @@ -6830,8 +6838,10 @@ "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", "AZURE_OPENAI_RESOURCE": "[parameters('azureOpenAIResourceName')]", "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "DOCUMENT_PROCESSING_QUEUE_NAME": "[variables('queueName')]", "ORCHESTRATION_STRATEGY": "[parameters('orchestrationStrategy')]", "LOGLEVEL": "[parameters('logLevel')]" @@ -6844,8 +6854,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "101087404009946087" + "version": "0.26.54.24096", + "templateHash": "17849181092347628825" } }, "parameters": { @@ -7025,8 +7035,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "8846903019412097631" + "version": "0.26.54.24096", + "templateHash": "9397247865758471910" }, "description": "Creates an Azure Function in an existing Azure App Service plan." }, @@ -7233,8 +7243,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -7460,8 +7470,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -7556,8 +7566,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -7625,8 +7635,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -7694,8 +7704,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -7763,8 +7773,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -7832,8 +7842,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -7898,8 +7908,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -8047,8 +8057,10 @@ "AZURE_OPENAI_EMBEDDING_MODEL": "[parameters('azureOpenAIEmbeddingModel')]", "AZURE_OPENAI_RESOURCE": "[parameters('azureOpenAIResourceName')]", "AZURE_OPENAI_API_VERSION": "[parameters('azureOpenAIApiVersion')]", + "AZURE_RESOURCE_GROUP": "[variables('rgName')]", "AZURE_SEARCH_INDEX": "[parameters('azureSearchIndex')]", "AZURE_SEARCH_SERVICE": "[format('https://{0}.search.windows.net', parameters('azureAISearchName'))]", + "AZURE_SUBSCRIPTION_ID": "[subscription().subscriptionId]", "DOCUMENT_PROCESSING_QUEUE_NAME": "[variables('queueName')]", "ORCHESTRATION_STRATEGY": "[parameters('orchestrationStrategy')]", "LOGLEVEL": "[parameters('logLevel')]" @@ -8061,8 +8073,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "101087404009946087" + "version": "0.26.54.24096", + "templateHash": "17849181092347628825" } }, "parameters": { @@ -8242,8 +8254,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "8846903019412097631" + "version": "0.26.54.24096", + "templateHash": "9397247865758471910" }, "description": "Creates an Azure Function in an existing Azure App Service plan." }, @@ -8450,8 +8462,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "5404929427041984254" + "version": "0.26.54.24096", + "templateHash": "7503212004842481388" }, "description": "Creates an Azure App Service in an existing Azure App Service plan." }, @@ -8677,8 +8689,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "15901877046756643519" + "version": "0.26.54.24096", + "templateHash": "17055000515602849240" }, "description": "Updates app settings for an Azure App Service." }, @@ -8773,8 +8785,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -8842,8 +8854,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -8911,8 +8923,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -8980,8 +8992,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -9049,8 +9061,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -9115,8 +9127,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "7922086847377910894" + "version": "0.26.54.24096", + "templateHash": "4480412712998156633" }, "description": "Assigns an Azure Key Vault access policy." }, @@ -9220,8 +9232,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10580067567296932781" + "version": "0.26.54.24096", + "templateHash": "5605014717660667625" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -9371,8 +9383,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "10580067567296932781" + "version": "0.26.54.24096", + "templateHash": "5605014717660667625" }, "description": "Creates an Azure Cognitive Services instance." }, @@ -9525,8 +9537,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "17903656266919316099" + "version": "0.26.54.24096", + "templateHash": "16481205192586151834" } }, "parameters": { @@ -9654,8 +9666,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "246951497570111474" + "version": "0.26.54.24096", + "templateHash": "425644292909061969" }, "description": "Creates an Azure storage account." }, @@ -9879,8 +9891,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -9949,8 +9961,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -10019,8 +10031,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -10089,8 +10101,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.26.170.59819", - "templateHash": "2390256577307700589" + "version": "0.26.54.24096", + "templateHash": "5795525499710207356" }, "description": "Creates a role assignment for a service principal." }, @@ -10233,6 +10245,10 @@ "type": "string", "value": "[if(parameters('useKeyVault'), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', 'storekeys'), '2022-09-01').outputs.OPENAI_KEY_NAME.value, '')]" }, + "AZURE_RESOURCE_GROUP": { + "type": "string", + "value": "[variables('rgName')]" + }, "AZURE_SEARCH_KEY": { "type": "string", "value": "[if(parameters('useKeyVault'), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', 'storekeys'), '2022-09-01').outputs.SEARCH_KEY_NAME.value, '')]" @@ -10289,6 +10305,10 @@ "type": "string", "value": "[parameters('azureSearchIndex')]" }, + "AZURE_SPEECH_SERVICE_NAME": { + "type": "string", + "value": "[parameters('speechServiceName')]" + }, "AZURE_SPEECH_SERVICE_REGION": { "type": "string", "value": "[parameters('location')]" @@ -10297,6 +10317,10 @@ "type": "string", "value": "[if(parameters('useKeyVault'), reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, variables('rgName')), 'Microsoft.Resources/deployments', 'storekeys'), '2022-09-01').outputs.SPEECH_KEY_NAME.value, '')]" }, + "AZURE_SUBSCRIPTION_ID": { + "type": "string", + "value": "[subscription().subscriptionId]" + }, "AZURE_TENANT_ID": { "type": "string", "value": "[tenant().tenantId]" diff --git a/poetry.lock b/poetry.lock index 0a7d0a068..a9471f26c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -339,6 +339,36 @@ azure-core = ">=1.29.5,<2.0.0" isodate = ">=0.6.1" typing-extensions = ">=4.0.1" +[[package]] +name = "azure-mgmt-cognitiveservices" +version = "13.5.0" +description = "Microsoft Azure Cognitive Services Management Client Library for Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "azure-mgmt-cognitiveservices-13.5.0.zip", hash = "sha256:44af0b19b1f827e9cdea09c6054c1e66092a51c32bc1ef5a56dbd9b40bc57815"}, + {file = "azure_mgmt_cognitiveservices-13.5.0-py3-none-any.whl", hash = "sha256:f13e17e2283c802ed6b67e2fc70885224a216a713f921881e397dd29a29a13df"}, +] + +[package.dependencies] +azure-common = ">=1.1,<2.0" +azure-mgmt-core = ">=1.3.2,<2.0.0" +isodate = ">=0.6.1,<1.0.0" + +[[package]] +name = "azure-mgmt-core" +version = "1.4.0" +description = "Microsoft Azure Management Core Library for Python" +optional = false +python-versions = ">=3.7" +files = [ + {file = "azure-mgmt-core-1.4.0.zip", hash = "sha256:d195208340094f98e5a6661b781cde6f6a051e79ce317caabd8ff97030a9b3ae"}, + {file = "azure_mgmt_core-1.4.0-py3-none-any.whl", hash = "sha256:81071675f186a585555ef01816f2774d49c1c9024cb76e5720c3c0f6b337bb7d"}, +] + +[package.dependencies] +azure-core = ">=1.26.2,<2.0.0" + [[package]] name = "azure-monitor-opentelemetry" version = "1.4.0" @@ -4605,4 +4635,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "47f7983c30eecc07abf767cd3ef3be73597fb050ccce755595c496f0da88aded" +content-hash = "f4951bd2321d806a82a1e9a7ef5c8e15f8850467e0f166e1d2fe1adbaef260b3" diff --git a/pyproject.toml b/pyproject.toml index d1e762860..8a82dced4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ pandas = "2.2.2" azure-monitor-opentelemetry = "^1.4.0" opentelemetry-instrumentation-httpx = "^0.45b0" pillow = "10.3.0" +azure-mgmt-cognitiveservices = "^13.5.0" [tool.poetry.group.dev.dependencies] pytest = "^8.1.1"