Reputation: 3
I am trying to create a bot service using command New-AzureRmResource
i have a resourcegroup create - testRG
properties:
@{
Location = "global"
Properties = @{
MsaAppId = <<appid>>}
ResourceName = "test"
ResourceType = "Microsoft.BotService/botServices/"
ResourceGroupName = "testRG"
Force = $true
}
but i keep getting the following error:
InvalidBotData : Name: Name is required.
I tried adding 'Name' field to properties but that fails with the same error
I also tried using New-AzureRmResourceGroupDeployment with same details in my template file but i get the same error:
New-AzureRmResourceGroupDeployment : 1:33:48 PM - Resource Microsoft.BotService/botServices '...' failed with message
{
"error": {
"code": "InvalidBotData",
"message": "Name: Name is required. "
}
}
how can I directly create a bot service using powershell/any other scripting language without having to go to azure portal?
Upvotes: 0
Views: 543
Reputation: 42133
You could use azure CLI to create a bot. Enable the Azure CLI bot extension and create a new bot.
Please refer to the command below.
az bot create --resource-group "my-resource-group" --name "my-bot-name" --kind "my-resource-type" --description "description-of-my-bot"
I use the command to create a web type bot, it works fine on my side.
Check it in the portal.
For more details about the properties, refer to this link.
Upvotes: 1