From 12c08fa8d64f13daa772e6646d817895a0ef3cd0 Mon Sep 17 00:00:00 2001 From: RakeshMohan-MSFT <49954584+RakeshMohanMSFT@users.noreply.github.com> Date: Fri, 2 Sep 2022 08:50:13 +0530 Subject: [PATCH] =?UTF-8?q?{cognitiveservices}=20Fix=20#23056:=20Add=20mor?= =?UTF-8?q?e=20samples=20for=20user=20owned=20stora=E2=80=A6=20(#23754)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * {cognitiveservices} Fix #23056: Add more samples for user owned storage and user owned key vault for encryption Fix https://github.com/Azure/azure-cli/issues/23056 * {cognitiveservices} Fix #23056: Fixing build errors * {cognitiveservices} Fix #23056: Fix build errors * {cognitiveservices} Fix #23056: Fix build errors * {cognitiveservices} Fix #23056: Fix build errors --- .../cognitiveservices/_help.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py b/src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py index a12e34138bd..e77a24dcdb3 100644 --- a/src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py +++ b/src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py @@ -36,6 +36,25 @@ - name: Manage Azure Cognitive Services accounts. (autogenerated) text: az cognitiveservices account create --kind Face --location WestEurope --name myresource --resource-group myResourceGroup --sku S0 --subscription MySubscription --yes crafted: true + - name: Create a Text Analytics Cognitive Services account in West Europe without confirmation required and use customer owned storage. + text: | + az cognitiveservices account create -n myresource -g myResourceGroup --assign-identity --kind TextAnalytics --sku S -l WestEurope --yes + --storage '[ + { + "resourceId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + } + ]' + - name: Create a Text Analytics Cognitive Services account in West Europe without confirmation required and user Customer-managed encryption. + text: | + az cognitiveservices account create -n myresource -g myResourceGroup --assign-identity --kind TextAnalytics --sku S -l WestEurope --yes + --encryption '{ + "keySource": "Microsoft.KeyVault", + "keyVaultProperties": { + "keyName": "KeyName", + "keyVersion": "secretVersion", + "keyVaultUri": "https://issue23056kv.vault.azure.net/" + } + }' """ helps['cognitiveservices account delete'] = """