侧边栏壁纸
博主头像
nivnek博主等级

道阻且长,行则将至

  • 累计撰写 21 篇文章
  • 累计创建 27 个标签
  • 累计收到 1 条评论

目 录CONTENT

文章目录

azure cli get the key info and endpoint info

kenvin
2024-01-22 / 1 评论 / 1 点赞 / 444 阅读 / 2627 字

Use azure cli to get key and endpoint info

In Azure, if you want to view the key and endpoint information of an Azure resource (such as the Azure Speech service) through the Azure CLI, you can use the following steps:

First, make sure you have the Azure CLI installed and are logged into your Azure account. You can use the following command to log in:

Prerequisites

Group and resource name

Once logged in, you’ll need to find the name of your Azure Speech service resource and the name of the resource group it’s in

Get Key info

Use the following command to view all key and endpoint information for the Azure Speech service:

az cognitiveservices account keys list --name YourResourceName --resource-group YourResourceGroupName

Replace YourResourceName and YourResourceGroupName with the name of your Azure Speech service resource and the resource group it belongs to.

This command will return a JSON object containing two keys (key1 and key2) that you can use for authentication.

Get endpoint info

To get endpoint information for the Azure Speech service, you can use the following command:

az cognitiveservices account show --name YourResourceName --resource-group YourResourceGroupName --query "properties.endpoint"

This will return the endpoint URL of your Azure Speech service.

Note that the output format of the command may be JSON, so you may need to extract specific values from the output.

Make sure you have enough permissions to execute the above commands, as they may require specific roles and permissions. If you are experiencing permission issues, please contact your Azure administrator or check your role assignment

1

评论区