You can export all of the resources necessary for someone to recreate in their own
subscription by using the msbot export services command. The result of the command is a folder with QnAMaker and LUIS models exported
and a .bot.recipe file which are the instructions for msbot clone services to recreate.
msbot export services --folder folderName --bot your.bot | Option | Description |
|---|---|
| -b, --bot | path to bot file. If omitted, local folder will look for a .bot file |
| --secret | bot file secret password for encrypting service secrets |
| -f, --folder | folder to put the bot recipe into |
| --prefix | Append [msbot] prefix to all messages |
| --appId | (OPTIONAL) Application ID for an existing application, if not passed |
| then a new Application will be created | |
| --appSecret | (OPTIONAL) Application Secret for an existing application, if not |
| passed then a new Application will be created | |
| -h, --help | output usage information |
The msbot clone services command will take a .bot.recipe file and folder which was created via msbot export services and use it to recreate all of the services you need to run a project.
It will create a new Azure Resource Group and all of the services you need in that resource group and emit a new .bot file with all of the service data and secrets stored.
msbot clone services --folder folderName --name NewBot --luisAuthoringKey 000000000000000000 --location westus The msbot clone services command depends on and requires the following tools to be installed -
- Azure CLI version >= 2.0.52.
- Azure Bot Service extension version >= 0.4.2
- LUIS CLI if the the clone operation includes LUIS or Dispatch resources.
- QnA Maker CLI if the clone operation includes QnA Maker resources.
NOTE: msbot clone services does NOT encrypt the .bot file with a secret. If you want to secure your secrets you should do that via the msbot secret command after it has been created.
| Option | Description |
|---|---|
| -n, --name | name of new bot |
| -f, --folder | path to folder containing exported resources |
| -l, --location | location to create the bot service in (westus, ...) |
| --luisAuthoringKey | authoring key from the appropriate luisAuthoringRegion for luis resources |
| --luisAuthoringRegion | (OPTIONAL) [westus,westeurope,australiaeast] authoring region to put LUIS models into (default is based on location) |
| --luisPublishRegion | (OPTIONAL) region to publish LUIS models to (default fallback is based location luisAuthoringRegion) |
| --subscriptionId | (OPTIONAL) Azure subscriptionId to clone bot to, if not passed then current az account will be used |
| --insightsRegion | (OPTIONAL) region to create appInsights account in (default is based on location) |
| --groupName | (OPTIONAL) groupName for cloned bot, if not passed then new bot name will be used for the new group |
| --sdkLanguage | (OPTIONAL) language for bot [Csharp,Node] (Default:CSharp) |
| --sdkVersion | (OPTIONAL) SDK version for bot [v3,v4] (Default:v4) |
| --prefix | Append [msbot] prefix to all messages |
| --appId | (OPTIONAL) Application ID for an existing application, if not passed |
| then a new Application will be created | |
| --appSecret | (OPTIONAL) Application Secret for an existing application, if not |
| passed then a new Application will be created | |
| --proj-file | (OPTIONAL) auto publish the local project file to created bot service |
| --code-dir | (OPTIONAL) auto publish the folder path to created bot service |
| -q, --quiet | disable output |
| -e, --encryption | Enables bot file encryption |
| --verbose | Show commands |
| --force | Do not prompt for confirmation |
| -h, --help | output usage information |
NOTE: If you are explicitly passing in appSecret as an argument you need to escape any special characters in the password that might be interpreted by the shell to be a command.
- For Windows command prompt, enclose the appSecret in double quotes. e.g. msbot clone services --name xxxx --luisAuthoringKey xxxx --location xxxx --folder bot.recipt --appSecret "!|%gr%"
- For *Windows PowerShell, try passing in appSecret after the --% argument. e.g. msbot clone services --name xxxx --luisAuthoringKey xxxx --location xxxx --folder bot.recipt --% --appSecret "!|%gr%"
- For MacOS or Linux, enclose the appSecret in single quotes. e.g. msbot clone services --name xxxx --luisAuthoringKey xxxx --location xxxx --folder bot.recipt --appSecret '!|%gr%'