/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var util = require("util");

















var utils = require("../../../util/utils");
var VMClient = require("./vmClient");
var vmConstants = require("../../../util/vmConstants");

var $ = utils.getLocaleString;

exports.init = function(cli) {

  var vm = cli.category("vm").description($("Commands to manage your virtual machines"));


  vm.command("create [resource-group] [name] [location] [os-type]").description($("Create a virtual machine in a resource group")).usage("[options] <resource-group> <name> <location> <os-type>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-D, --nic-id <nic-id>", $(("the NIC identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/networkInterfaces/<nic-name>"))).option("-f, --nic-name <nic-name>", $(((((("the NIC name" + "\n     If this is an existing NIC then it must exists under the current resource group identified by resource-group") + "\n     A new NIC will be created if no NIC exists with name nic-name in the current resource group") + "\n     To create new NIC - subnet-id or vnet-name, vnet-address-prefix, subnet-name and vnet-subnet-address-prefix are required") + "\n     Please use nic-id to refer an existing NIC in a different resource group") + "\n     The parameter nic-name will be ignored when nic-id is specified"))).option("-I, --nic-ids <nic-ids>", $("the list of NIC identifiers separated by comma. In case of specifying multiple nics first one will be set as primary.")).option("-N, --nic-names <nic-names>", $((("the list of NIC names separated by comma. In case of specifying multiple nics first one will be set as primary." + "These NICs must exists in the same resource group as the VM. Please use nic-ids if that not the case. ") + "This parameter will be ignored if --nic-ids is specified"))).option("-l, --location <location>", $("the location")).option("-y, --os-type <os-type>", $("the operating system Type, valid values are Windows, Linux")).option("-Q, --image-urn <image-urn>", $(((((((("the image URN in the form publisherName:offer:skus:version.\n" + "                                               URN Aliases:\n") + "                                                 ") + (utils.getImageAliasList().join("\n                                                 "))) + "\n") + "\n      Or the source VHD link of a user image, e.g. https://foo.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/snap-bar.vhd") + "\n      Option '-d' can be used with this option to specify the destination storage location where the new OS VHD will be created and put to.") + "\n      In this case, OS profile credentials have to be specified, i.e. user name/password, or SSH keys, etc."))).option("-u, --admin-username <admin-username>", $(("the user name" + "\n      This parameter is valid for a VM created from an image (image-urn) and ignored when VM is based on an existing disk"))).option("-p, --admin-password <admin-password>", $(("the password" + "\n      This parameter is valid for a VM created from an image (image-urn) and ignored when VM is based on existing disk"))).option("-M, --ssh-publickey-file <openssh-rsa-file|pem-file>", $(("path to public key PEM file or SSH Public key file for SSH authentication" + "\n     This parameter is valid only when os-type is \"Linux\""))).option("-G, --generate-ssh-keys", $("Auto generate SSH keys, will be ignored if --ssh-publickey-file is specified. This parameter is valid only when os-type is \"Linux\"")).option("-z, --vm-size <vm-size>", $("the virtual machine size [Standard_DS1]")).option("-U, --public-ip-id <public-ip-id>", $(("the public ip identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/publicIPAddresses/<public-ip-name>"))).option("-i, --public-ip-name <public-ip-name>", $((((("the public ip name" + "\n     If this is an existing public IP then it must exists under the current resource group identified by resource-group") + "\n     A new public IP will be created if no public IP exists with name public-ip-name in the current resource group") + "\n     Please use public-ip-id to refer an existing public IP in a different resource group") + "\n     The parameter public-ip-name will be ignored when public-ip-id is specified"))).option("-w, --public-ip-domain-name <public-ip-domain-name>", $((("the public ip domain name" + "\n     This sets the DNS to <publicip-domain-name>.<location>.cloudapp.azure.com") + "\n     This parameter will be used only when creating new public IP"))).option("-m, --public-ip-allocation-method <public-ip-allocation-method>", $(("the public ip allocation method, valid values are \"Dynamic\"" + "\n     This parameter will be used only when creating new public IP"))).option("-t, --public-ip-idletimeout <public-ip-idletimeout>", $(("the public ip idle timeout specified in minutes" + "\n     This parameter will be used only when creating new public IP"))).option("-S, --subnet-id <subnet-id>", $(((("the subnet identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>") + "\n     Use this parameter if specified subnet exists only to avoid other vnet parameters to specify vnet and subnet you use") + "\n     If you need to use subnet and virtual network from another resource group (not the same as VM resource group), just enter appropriate subnet ID"))).option("-F, --vnet-name <vnet-name>", $((((((((("the virtual network name" + "\n     If this is an existing vnet then it must exists under the current resource group identified by resource-group") + "\n     If this is an existing vnet then vnet-subnet-name is required") + "\n          If no subnet exists with name vnet-subnet-name then a new subnet will be created") + "\n          To create new subnet - vnet-subnet-address-prefix is required") + "\n     A new vnet will be created if no vnet exists with name vnet-name in the current resource group") + "\n     To create new vnet - vnet-address-prefix, vnet-subnet-name and vnet-subnet-address-prefix are required") + "\n     Please use subnet-id to refer an existing subnet under a vnet in a different resource group") + "\n     vnet-name, vnet-address-prefix, vnet-subnet-name and vnet-subnet-address-prefix will be ignored when subnet-id is specified"))).option("-P, --vnet-address-prefix <vnet-address-prefix>", $("the virtual network address prefix in IPv4/CIDR format")).option("-j, --vnet-subnet-name <vnet-subnet-name>", $("the virtual network subnet name")).option("-k, --vnet-subnet-address-prefix <vnet-subnet-address-prefix>", $("the virtual network subnet address prefix in IPv4/CIDR format")).option("-r, --availset-name <availset-name>", $("the availability set name")).option("-o, --storage-account-name <storage-account-name>", $("the storage account name")).option("--storage-account-type <storage-account-type>", $("the storage account type for to-be-generated storage account, default Premium_LRS")).option("-R, --storage-account-container-name <storage-account-container-name>", $("the storage account container name [vhds]")).option("-d, --os-disk-vhd <os-disk-vhd>", $(((("name or url of the OS disk Vhd" + "\n     If this parameter is specified along with --image-urn ('-Q') parameter then OS disk created from the image will be stored in this vhd.") + "\n     If this parameter is specified without --image-urn ('-Q') parameter then this vhd must exists and will be used as a specialized OS disk image.") + "\n     If this parameter is specified without --image-urn ('-Q') parameter, OS profile credentials will be ignored, and the specialized credentials from the disk image will be used."))).option("-a, --data-disk-caching <data-disk-caching>", $("data disk caching, valid values are None, ReadOnly, ReadWrite")).option("-x, --data-disk-vhd <data-disk-vhd>", $("name or url of the data disk Vhd")).option("-e, --data-disk-size <data-disk-size>", $("data disk size in GB")).option("-Y, --data-disk-existing", $("Will use existing VHD if specified. Don't specify this param if you are creating data disk from a new VHD.")).option("-C, --custom-data <custom-data-file>", $("CustomData file")).option("-s, --subscription <subscription>", $("the subscription identifier")).option("--tags <tags>", $(("Tags to set to the virtual machine. Can be multiple. " + "In the format of 'name=value'. Name is required and value is optional. For example, --tags tag1=value1;tag2"))).option("--disable-boot-diagnostics", $("The switch parameter to disable the boot diagnostics (by default enabled) for VM.")).option("--boot-diagnostics-storage-uri <boot-diagnostics-storage-uri>", $(("Optional. Specify storage account URL for boot diagnostics. " + "In the format of 'https://your_stoage_account_name.blob.core.windows.net/'."))).option("--disable-bginfo-extension", $("The switch parameter to disable the BGInfo extension for VM.")).option("--disk-encryption-key-vault-id <disk-encryption-key-vault-id>", $("The OS disk encryption key vault ID.")).option("--disk-encryption-key-url <disk-encryption-key-url>", $("The OS disk encryption key secret URL.")).option("--key-encryption-key-vault-id <key-encryption-key-vault-id>", $("The vault reference Url for the OS disk encryption key.")).option("--key-encryption-key-url <key-encryption-key-url>", $("The Url of the master key used to encrypt the OS disk encryption key.")).option("--license-type <license-type>", $("The license type of the system; currently, only 'Windows_Sever' is supported.")).option("--plan-name <plan-name>", $("The plan name.")).option("--plan-publisher <plan-publisher-name>", $("The plan publisher ID.")).option("--plan-product <plan-product-name>", $("The plan product ID.")).option("--plan-promotion-code <plan-promotion-code>", $("The plan promotion code.")).execute(function __1(resourceGroup, name, location, osType, options, _) { var vmClient; var __frame = { name: "__1", line: 122 }; return __func(_, this, arguments, __1, 5, __frame, function __$__1() {




























































































      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Location name: "), location, __cb(_, __frame, 3, 33, function ___(__0, __3) { location = __3;
            return cli.interaction.promptIfNotGiven($("Operating system Type: "), osType, __cb(_, __frame, 4, 31, function ___(__0, __4) { osType = __4;
              location = utils.toLowerCaseAndRemoveSpace(location);

              if (((options.diskEncryptionKeyVaultId && !options.diskEncryptionKeyUrl) || (!options.diskEncryptionKeyVaultId && options.diskEncryptionKeyUrl))) {
                return _(new Error($("Both --disk-encryption-key-vault-id and --disk-encryption-key-url have to be specified, or neither of them."))); } ;


              if (((options.keyEncryptionKeyVaultId && !options.keyEncryptionKeyUrl) || (!options.keyEncryptionKeyVaultId && options.keyEncryptionKeyUrl))) {
                return _(new Error($("Both --key-encryption-key-vault-id and --key-encryption-key-url have to be specified, or neither of them."))); } ;


              if (((options.keyEncryptionKeyVaultId && options.keyEncryptionKeyUrl) && ((!options.diskEncryptionKeyVaultId || !options.diskEncryptionKeyUrl)))) {
                return _(new Error($("Options --disk-encryption-key-vault-id and --disk-encryption-key-url must also be specified for key encryption settings."))); } ;


              vmClient = new VMClient(cli, options.subscription);
              return vmClient.createVM(resourceGroup, name, location, osType, options, __cb(_, __frame, 20, 15, function __$__1() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }); });


  vm.command("quick-create [resource-group] [name] [location] [os-type] [image-urn] [admin-username] [admin-password]").description($("Create a virtual machine with default resources in a resource group")).usage("[options] <resource-group> <name> <location> <os-type> <image-urn> <admin-username> <admin-password>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-l, --location <location>", $("the location")).option("-y, --os-type <os-type>", $("the operating system Type, valid values are Windows, Linux")).option("-Q, --image-urn <image-urn>", $((((((("the image URN in the form \"publisherName:offer:skus:version\",\n" + "                                               URN Aliases:\n") + "                                                 ") + (utils.getImageAliasList().join("\n                                                 "))) + "\n") + "                                               or the VHD link of a user image,\n") + "                                               e.g. https://foo.blob.core.windows.net/bar/vhds/baz.vhd"))).option("-z, --vm-size <vm-size>", $("the virtual machine size [Standard_DS1]")).option("-u, --admin-username <admin-username>", $("the user name")).option("-p, --admin-password <admin-password>", $("the password, skipped if SSH public key file is specified for Linux VMs")).option("-M, --ssh-publickey-file <ssh-publickey-file>", $(("the path to public key file for SSH authentication,\n" + "                                               & this parameter is valid only when os-type is Linux."))).option("-w, --public-ip-domain-name <public-ip-domain-name>", $((("Optional -- the public ip domain name\n" + "                                               This sets the DNS to \"<publicip-domain-name>.<location>.cloudapp.azure.com\".\n") + "                                               This parameter will be used only when creating new public IP."))).option("-C, --custom-data <custom-data-file>", $("Optional -- CustomData file")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __2(resourceGroup, name, location, osType, imageUrn, adminUsername, adminPassword, options, _) { var vmClient; var __frame = { name: "__2", line: 167 }; return __func(_, this, arguments, __2, 8, __frame, function __$__2() {






















      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Location name: "), location, __cb(_, __frame, 3, 33, function ___(__0, __3) { location = __3;
            return cli.interaction.promptIfNotGiven($("Operating system Type [Windows, Linux]: "), osType, __cb(_, __frame, 4, 31, function ___(__0, __4) { osType = __4;
              return cli.interaction.promptIfNotGiven($("ImageURN (in the format of \"publisherName:offer:skus:version\") or a VHD link to the user image: "), imageUrn, __cb(_, __frame, 5, 33, function ___(__0, __5) { imageUrn = __5;
                return cli.interaction.promptIfNotGiven($("User name: "), adminUsername, __cb(_, __frame, 6, 38, function ___(__0, __6) { adminUsername = __6; return (function __$__2(__then) {

                    if (!options.sshPublickeyFile) {
                      return cli.interaction.promptPasswordIfNotGiven($("Password: "), adminPassword, __cb(_, __frame, 9, 40, function ___(__0, __7) { adminPassword = __7; __then(); }, true)); } else { __then(); } ; })(function __$__2() {

                    location = utils.toLowerCaseAndRemoveSpace(location);
                    vmClient = new VMClient(cli, options.subscription);
                    return vmClient.quickCreateVM(resourceGroup, name, location, osType, imageUrn, adminUsername, adminPassword, options, __cb(_, __frame, 13, 15, function __$__2() { _(); }, true)); }); }, true)); }, true)); }, true)); }, true)); }, true)); }, true)); }); });


  vm.command("list [resourceGroup]").description($("Get all virtual machines in a resource group")).usage("[options] <resource-group>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __3(resourceGroup, options, _) { var vmClient; var __frame = { name: "__3", line: 188 }; return __func(_, this, arguments, __3, 2, __frame, function __$__3() {





      vmClient = new VMClient(cli, options.subscription);
      return vmClient.listVM(resourceGroup, options, __cb(_, __frame, 2, 15, function __$__3() { _(); }, true)); }); });


  vm.command("list-ip-address [resourceGroup]").description($("Get all virtual machines and their corresponding IP addresses in subscription. If a resource group is specified it will list virtual machines and their corresponding IP addresses in specified resource group.")).usage("[options] [resource-group]").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __4(resourceGroup, options, _) { var vmClient; var __frame = { name: "__4", line: 198 }; return __func(_, this, arguments, __4, 2, __frame, function __$__4() {





      vmClient = new VMClient(cli, options.subscription);
      return vmClient.listIPAddress(resourceGroup, options, __cb(_, __frame, 2, 15, function __$__4() { _(); }, true)); }); });


  vm.command("show [resource-group] [name]").description($("Get a virtual machine in a resource group")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-d, --depth <depth>", $("the number of times to recurse, to recurse indefinitely pass \"full\". (valid only with --json option)")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __5(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__5", line: 210 }; return __func(_, this, arguments, __5, 3, __frame, function __$__5() {







      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.showVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__5() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("delete [resource-group] [name]").description($("Delete a virtual machine in a resource group")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __6(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__6", line: 224 }; return __func(_, this, arguments, __6, 3, __frame, function __$__6() {







      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.deleteVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__6() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("stop [resource-group] [name]").description($("Shutdown a virtual machine in a resource group")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __7(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__7", line: 237 }; return __func(_, this, arguments, __7, 3, __frame, function __$__7() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.stopVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__7() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("restart [resource-group] [name]").description($("Restart a virtual machine in a resource group")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __8(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__8", line: 250 }; return __func(_, this, arguments, __8, 3, __frame, function __$__8() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.restartVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__8() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("start [resource-group] [name]").description($("Start a virtual machine in a resource group")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __9(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__9", line: 263 }; return __func(_, this, arguments, __9, 3, __frame, function __$__9() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.startVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__9() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("deallocate [resource-group] [name]").description($("Shutdown a virtual machine in a resource group and release the compute resources")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __10(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__10", line: 276 }; return __func(_, this, arguments, __10, 3, __frame, function __$__10() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.deallocateVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__10() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("sizes").description($("Get all available virtual machine sizes")).usage("[options]").option("-l, --location <location>", $("the location name, use this to get the list of VM sizes available in a location")).option("-n, --vm-name <vm-name>", $("the virtual machine name, use this to get the list of VM sizes available for a specific VM")).option("-g, --resource-group <resourceGroup>", $("the resource group name, required when --vm-name is specified")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __11(options, _) { var vmClient; var __frame = { name: "__11", line: 290 }; return __func(_, this, arguments, __11, 1, __frame, function __$__11() {







      options.location = utils.toLowerCaseAndRemoveSpace(options.location);
      vmClient = new VMClient(cli, options.subscription);
      return vmClient.listVMSizesOrLocationVMSizes(options, __cb(_, __frame, 3, 15, function __$__11() { _(); }, true)); }); });


  vm.command("capture [resource-group] [name] [vhd-name-prefix]").description($("Capture a VM in a resource group as an OS Image or VM Image")).usage("[options] <resource-group> <name> <vhd-name-prefix>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-p, --vhd-name-prefix <vhd-name-prefix>", $("Captured virtual hard disk's name prefix")).option("-R, --storage-account-container-name <storage-account-container-name>", $("the storage account container name [vhds]")).option("-o, --overwrite", $("In case of conflict overwrite the target virtual hard disk if set to true.")).option("-t, --template-file-name <template-file-name>", $("Name of the file that will contain a template that can be used to create similar VMs.")).option("-s, --subscription <id>", $("the subscription id")).execute(function __12(resourceGroup, name, vhdNamePrefix, options, _) { var vmClient; var __frame = { name: "__12", line: 306 }; return __func(_, this, arguments, __12, 4, __frame, function __$__12() {










      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Virtual hard disk's name prefix: "), vhdNamePrefix, __cb(_, __frame, 3, 38, function ___(__0, __3) { vhdNamePrefix = __3;

            vmClient = new VMClient(cli, options.subscription);
            return vmClient.captureVM(resourceGroup, name, vhdNamePrefix, options, __cb(_, __frame, 6, 15, function __$__12() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  vm.command("generalize [resource-group] [name]").description($("Set the state of a VM in a resource group to Generalized.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __13(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__13", line: 321 }; return __func(_, this, arguments, __13, 3, __frame, function __$__13() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.generalizeVM(resourceGroup, name, options, __cb(_, __frame, 5, 15, function __$__13() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("get-instance-view [resource-group] [name]").description($("Get instance view of a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __14(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__14", line: 335 }; return __func(_, this, arguments, __14, 3, __frame, function __$__14() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.getInstanceView(resourceGroup, name, options, __cb(_, __frame, 5, 15, function __$__14() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("get-serial-output [resource-group] [name]").description($("Get serial output of a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).option("--max-length <max-length>", $("the max number of characters shown in one page of log output")).execute(function __15(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__15", line: 350 }; return __func(_, this, arguments, __15, 3, __frame, function __$__15() {







      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.getSerialOutput(resourceGroup, name, options, __cb(_, __frame, 5, 15, function __$__15() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("reset-access [resource-group] [name]").description($("Enables you to reset Remote Desktop Access or SSH settings on a Virtual Machine and to reset the password for the account that has administrator or sudo authority.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-u, --user-name <user-name>", $("the user name")).option("-p, --password <password>", $("the password")).option("-M, --ssh-key-file <ssh-key-file>", $("path to public key PEM file or SSH Public key file for SSH authentication (valid only when os-type is \"Linux\")")).option("-r, --reset-ssh", $("Reset the SSH configuration to default")).option("-E, --extension-version <version>", $("Version of VM Access extension [1.4]")).option("-e, --expiration <expiration>", $("password expiration")).option("-R, --remove-user <remove-user-name>", $("Remove a user account with specified name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __16(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__16", line: 371 }; return __func(_, this, arguments, __16, 3, __frame, function __$__16() {













      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.resetVMAccess(resourceGroup, name, options, __cb(_, __frame, 5, 15, function __$__16() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("enable-aem [resource-group] [name]").description($("Enable Azure Enhanced Monitoring Extension on a VM in a resource group")).usage("[options] <resource-group> <name>").option("-a, --diagnostic-storage-account-name <name>", $("storage account name")).option("-q, --quiet", $("quite mode(do not ask for confirmation)")).execute(function __17(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__17", line: 384 }; return __func(_, this, arguments, __17, 3, __frame, function __$__17() {





      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.enableAemVM(resourceGroup, name, options, __cb(_, __frame, 5, 15, function __$__17() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("set [resource-group] [name]").description($("Update a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-I, --nic-ids <nic-ids>", $("the list of NIC identifiers separated by comma. In case of specifying multiple nics first one will be set as primary.")).option("-N, --nic-names <nic-names>", $((("the list of NIC names separated by comma. In case of specifying multiple nics first one will be set as primary." + "These NICs must exists in the same resource group as the VM. Please use nic-ids if that not the case. ") + "This parameter will be ignored if --nic-ids is specified"))).option("-z, --vm-size <vm-size>", $("the virtual machine size")).option("-t, --tags <tags>", $(("Tags to set to the resource group. Can be multiple. " + "In the format of 'name=value'. Name is required and value is optional. For example, -t tag1=value1;tag2"))).option("-T, --no-tags", $("Remove all tags")).option("--new-os-disk-size <new-os-disk-size>", $("new OS disk size in GB")).option("-s, --subscription <subscription>", $("the subscription identifier")).option("--disable-boot-diagnostics", $("The switch parameter to disable the boot diagnostics for VM.")).option("--enable-boot-diagnostics", $("The switch parameter to enable the boot diagnostics for VM.")).option("--boot-diagnostics-storage-uri <boot-diagnostics-storage-uri>", $(("The storage account URL for boot diagnostics. " + "In the format of 'https://your_stoage_account_name.blob.core.windows.net/'."))).execute(function __18(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__18", line: 411 }; return __func(_, this, arguments, __18, 3, __frame, function __$__18() {



















      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.setVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__18() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("list-usage [location]").description($("Get usage of compute resources.")).usage("[options] <location>").option("-l, --location <location>", $("the location")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __19(location, options, _) { var vmClient; var __frame = { name: "__19", line: 423 }; return __func(_, this, arguments, __19, 2, __frame, function __$__19() {





      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        location = utils.toLowerCaseAndRemoveSpace(location);
        vmClient = new VMClient(cli, options.subscription);
        return vmClient.listComputeUsage(location, options, __cb(_, __frame, 4, 17, function __$__19() { _(); }, true)); }, true)); }); });


  vm.command("enable-diag [resource-group] [name]").description($("Enable diagnostics extension on a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-a, --storage-account-name <name>", $("the storage account name")).option("-c, --config-file <path>", $(("path for WadCfg config file" + " (collect basic metrics if not specified)"))).option("-e, --extension-version <version>", util.format($("Version of Diagnostics extension. Default values are [%s] for Windows and [%s] for Linux."), vmConstants.EXTENSIONS.IAAS_DIAG_VERSION, vmConstants.EXTENSIONS.LINUX_DIAG_VERSION)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __20(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__20", line: 440 }; return __func(_, this, arguments, __20, 3, __frame, function __$__20() {










      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.enableDiagVM(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__20() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("enable-disk-encryption [resource-group] [name]").description($("Enable azure disk encryption on a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-a, --aad-client-id <aad-client-id>", $("Client ID of AAD app with permissions to write secrets to KeyVault")).option("-p, --aad-client-secret <aad-client-secret>", $("Client Secret of AAD app with permissions to write secrets to KeyVault")).option("-c, --aad-client-cert-thumbprint <aad-client-cert-thumbprint>", $("Thumbprint of AAD app certificate with permissions to write secrets to KeyVault")).option("-k, --disk-encryption-key-vault-url <disk-encryption-key-vault-url>", $("URL of the KeyVault where generated encryption key will be placed to")).option("-r, --disk-encryption-key-vault-id <disk-encryption-key-vault-id>", $("ResourceID of the KeyVault where generated encryption key will be placed to")).option("-u, --key-encryption-key-url <key-encryption-key-url>", $("Versioned KeyVault URL of the KeyEncryptionKey used to encrypt the disk encryption key")).option("-i, --key-encryption-key-vault-id <key-encryption-key-vault-id>", $("ResourceID of the KeyVault containing the KeyEncryptionKey used to encrypt the disk encryption key")).option("-l, --key-encryption-algorithm <key-encryption-algorithm>", $("KeyEncryption Algorithm used to encrypt the volume encryption key")).option("-t, --volume-type <volume-type>", $("Type of the volume OS or Data or All to perform encryption operation")).option("-x, --sequence-version <sequence-version>", $("Sequence version of encryption operation. This must be incremented to perform repeated encryption operations on the same VM")).option("-b, --passphrase <passphrase>", $("Passphrase specified in parameter")).option("-q, --quiet", $("quiet mode, do not ask for confirmation")).option("-e, --extension-version <extension-version>", util.format($("Version of AzureDiskEncryption extension. Default values are [%s] for Windows"), vmConstants.EXTENSIONS.AZURE_DISK_ENCRYPTION_WINDOWS_EXTENSION_VERSION)).option("-s, --subscription <subscription>", $("the subscription identifier")).option("-d, --disable-auto-upgrade-minor-version", $("Disable auto-upgrade of minor version")).execute(function __21(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__21", line: 467 }; return __func(_, this, arguments, __21, 3, __frame, function __$__21() {




















      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.setAzureDiskEncryption(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__21() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("delete-backup [resource-group] [name]").description($("Deletes the backup for the vm")).usage("[options] <resource-group> <name>").option("-i, --identity <identity>", $("The identity of the backup")).execute(function __22(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__22", line: 478 }; return __func(_, this, arguments, __22, 3, __frame, function __$__22() {




      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.removeVMBackup(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__22() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("show-disk-encryption-status [resource-group] [name]").description($("Show azure disk encryption status of a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __23(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__23", line: 491 }; return __func(_, this, arguments, __23, 3, __frame, function __$__23() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.showAzureDiskEncryptionStatus(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__23() { _(); }, true)); }, true)); }, true)); }); });


  vm.command("disable-disk-encryption [resource-group] [name]").description($("Disable azure disk encryption on a VM in a resource group.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --name <name>", $("the virtual machine name")).option("-t, --volume-type <volume-type>", $("Type of the volume OS or Data or All to perform encryption operation")).option("-x, --sequence-version <sequence-version>", $("Sequence version of encryption operation. This must be incremented to perform repeated encryption operations on the same VM")).option("-q, --quiet", $("quiet mode, do not ask for confirmation")).option("-e, --extension-version <extension-version>", util.format($("Version of AzureDiskEncryption extension. Default values are [%s] for Windows"), vmConstants.EXTENSIONS.AZURE_DISK_ENCRYPTION_WINDOWS_EXTENSION_VERSION)).option("-s, --subscription <subscription>", $("the subscription identifier")).option("-d, --disable-auto-upgrade-minor-version", $("Disable auto-upgrade of minor version")).execute(function __24(resourceGroup, name, options, _) { var vmClient; var __frame = { name: "__24", line: 509 }; return __func(_, this, arguments, __24, 3, __frame, function __$__24() {











      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.disableAzureDiskEncryption(resourceGroup, name, options, __cb(_, __frame, 4, 15, function __$__24() { _(); }, true)); }, true)); }, true)); }); });


  var disk = vm.category("disk").description($("Commands to manage your Virtual Machine data disks"));


  disk.command("attach-new [resource-group] [vm-name] [size-in-gb] [vhd-name]").description($("Attach a new data-disk to a VM in a resource group")).usage("[options] <resource-group> <vm-name> <size-in-gb> [vhd-name]").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --vm-name <vm-name>", $("the virtual machine name")).option("-z, --size-in-gb <size-in-gb>", $("the disk size in GB")).option("-d, --vhd-name <vhd-name>", $("the name for the new VHD")).option("-c, --host-caching <name>", $("the caching behaviour of disk [None, ReadOnly, ReadWrite]")).option("-o, --storage-account-name <storageAccountName>", $("the storage account name")).option("-r, --storage-account-container-name <storageAccountContainerName>", $("the storage account container name [vhds]")).option("-l, --lun <lun>", $("zero based logical unit number of the data disk")).option("-s, --subscription <id>", $("the subscription id")).execute(function __25(resourceGroup, vmName, size, vhdName, options, _) { var vmClient; var __frame = { name: "__25", line: 531 }; return __func(_, this, arguments, __25, 5, __frame, function __$__25() {












      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;
          return cli.interaction.promptIfNotGiven($("Disk size in gb: "), size, __cb(_, __frame, 3, 31, function ___(__0, __3) { size = __3;
            vmClient = new VMClient(cli, options.subscription);
            return vmClient.attachNewDataDisk(resourceGroup, vmName, size, vhdName, options, __cb(_, __frame, 5, 17, function __$__25() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  disk.command("detach [resource-group] [vm-name] [lun]").description($("Detach a data-disk attached to a VM in a resource group")).usage("[options] <resource-group> <vm-name> <lun>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --vm-name <vm-name>", $("the virtual machine name")).option("-l, --lun <lun>", $("the data disk lun")).option("-s, --subscription <id>", $("the subscription id")).execute(function __26(resourceGroup, vmName, lun, options, _) { var vmClient; var __frame = { name: "__26", line: 546 }; return __func(_, this, arguments, __26, 4, __frame, function __$__26() {







      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;
          return cli.interaction.promptIfNotGiven($("Data disk lun: "), lun, __cb(_, __frame, 3, 30, function ___(__0, __3) { lun = __3;

            vmClient = new VMClient(cli, options.subscription);
            return vmClient.detachDataDisk(resourceGroup, vmName, lun, options, __cb(_, __frame, 6, 17, function __$__26() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  disk.command("attach [resource-group] [vm-name] [vhd-url]").description($("Attach a new data-disk to a VM in a resource group")).usage("[options] <resource-group> <vm-name> [vhd-url]").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --vm-name <vm-name>", $("the virtual machine name")).option("-d, --vhd-url <vhd-url>", $("the URL of existing VHD")).option("-c, --host-caching <name>", $("the caching behaviour of disk [None, ReadOnly, ReadWrite]")).option("-l, --lun <lun>", $("zero based logical unit number of the data disk")).option("-s, --subscription <id>", $("the subscription id")).execute(function __27(resourceGroup, vmName, vhdUrl, options, _) { var vmClient; var __frame = { name: "__27", line: 564 }; return __func(_, this, arguments, __27, 4, __frame, function __$__27() {









      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;
          return cli.interaction.promptIfNotGiven($("URL of existing VHD: "), vhdUrl, __cb(_, __frame, 3, 33, function ___(__0, __3) { vhdUrl = __3;

            vmClient = new VMClient(cli, options.subscription);
            return vmClient.attachDataDisk(resourceGroup, vmName, vhdUrl, options, __cb(_, __frame, 6, 17, function __$__27() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  disk.command("list [resource-group] [vm-name]").description($("Get all data disks of a VM in a resource group")).usage("[options] <resource-group> <vm-name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-n, --vm-name <vm-name>", $("the virtual machine name")).option("-s, --subscription <id>", $("the subscription id")).execute(function __28(resourceGroup, vmName, vhdUrl, options, _) { var vmClient; var __frame = { name: "__28", line: 579 }; return __func(_, this, arguments, __28, 4, __frame, function __$__28() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.listDataDisks(resourceGroup, vmName, options, __cb(_, __frame, 5, 17, function __$__28() { _(); }, true)); }, true)); }, true)); }); });


  var extension = vm.category("extension").description($("Commands to manage VM resource extensions"));


  extension.command("set [resource-group] [vm-name] [name] [publisher-name] [version]").description($("Enable/disable resource extensions for a VM in a resource group")).usage("[options] <resource-group> <vm-name> <name> <publisher-name> <version>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-m, --vm-name <vm-name>", $("the virtual machine name")).option("-n, --name <name>", $("the extension name")).option("-p, --publisher-name <publisher-name>", $("the publisher name")).option("-o, --version <version>", $("the extension version")).option("-r, --reference-name <reference-name>", $("extension's reference name")).option("-i, --public-config <public-config>", $("public configuration text")).option("-c, --public-config-path <public-config-path>", $("public configuration file path")).option("-f, --private-config <private-config>", $("private configuration text")).option("-e, --private-config-path <private-config-path>", $("private configuration file path")).option("-u, --uninstall", $("uninstall extension")).option("-t, --tags <tags>", $(("Tags to set to the resource group. Can be mutliple. " + "In the format of 'name=value'. Name is required and value is optional. For example, -t tag1=value1;tag2"))).option("-q, --quiet", $("quiet mode, do not ask for uninstall confirmation")).option("-U, --auto-upgrade-minor-version", $("Pick the highest minor version of the extension")).option("--force-update-tag <force-update-tag>", $(((("Sample input: RerunExtension. " + "Specifies that the extension should be run again with the same public or protected settings. ") + "The value can be any string different from the current value. If forceUpdateTag is not changed, ") + "updates to public or protected settings would still be applied by the handler."))).option("-s, --subscription <id>", $("the subscription id")).execute(function __29(resourceGroup, vmName, name, publisherName, version, options, _) { var vmClient; var __frame = { name: "__29", line: 613 }; return __func(_, this, arguments, __29, 6, __frame, function __$__29() {























      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;
          return cli.interaction.promptIfNotGiven($("VM Extension name: "), name, __cb(_, __frame, 3, 31, function ___(__0, __3) { name = __3;
            return cli.interaction.promptIfNotGiven($("VM Extension publisher name: "), publisherName, __cb(_, __frame, 4, 40, function ___(__0, __4) { publisherName = __4;
              return cli.interaction.promptIfNotGiven($("VM Extension version: "), version, __cb(_, __frame, 5, 34, function ___(__0, __5) { version = __5;

                vmClient = new VMClient(cli, options.subscription);
                return vmClient.setExtension(resourceGroup, vmName, name, publisherName, version, options, __cb(_, __frame, 8, 17, function __$__29() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }, true)); }); });


  extension.command("set-chef [resource-group] [vm-name]").description($("Enable/disable chef extension for a VM in a resource group")).usage("[options] <resource-group> <vm-name> ").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-m, --vm-name <vm-name>", $("the virtual machine name")).option("-o, --version <version>", $("the extension version")).option("-R, --run-list <run-list>", $("Runlist of roles/recipes to apply to VM")).option("-O, --validation-pem <validation-pem>", $("chef validation pem file path. Not required if -C or --client-pem option specified")).option("-c, --client-config <client-config>", $("chef client configuration file(i.e client.rb) path")).option("-C, --client-pem <client-pem>", $("chef client pem file path i.e required in validator less bootstrap")).option("-j, --bootstrap-options <bootstrap-json-attribute>", $("Bootstrap options in JSON format. Ex: -j '{\"chef_node_name\":\"test_node\"}'")).option("--bootstrap-version <number>", $("chef-client version to be installed")).option("--chef-service-interval <chef-service-interval>", $("It specifies the frequency (in minutes) at which the chef-service runs. Pass 0 if you don't want the chef-service to be installed on the target machine.")).option("--daemon <daemon>", $("Configures the chef-client service for unattended execution. The node platform to be Windows. Options: 'none' or 'service'. \n 'none' - Currently prevents the chef-client service from being configured as a service. \n 'service' - Configures the chef-client to run automatically in the background as a service.")).option("-u, --uninstall", $("uninstall extension")).option("-t, --tags <tags>", $(("Tags to set to the resource group. Can be multiple. " + "In the format of 'name=value'. Name is required and value is optional. For example, -t tag1=value1;tag2"))).option("-q, --quiet", $("quiet mode, do not ask for uninstall confirmation")).option("-s, --subscription <id>", $("the subscription id")).option("--secret <secret-key>", $("The secret key to use to encrypt data bag item values.")).option("--secret-file <secret-file>", $("A file containing the secret key to use to encrypt data bag item values.")).option("--json-attributes <json-attributes>", $("A JSON string to be added to the first run of chef-client. Ex: --json-attributes '{\"foo\" : \"bar\"}'")).execute(function __30(resourceGroup, vmName, options, _) { var vmClient; var __frame = { name: "__30", line: 646 }; return __func(_, this, arguments, __30, 3, __frame, function __$__30() {






















      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.setChefExtension(resourceGroup, vmName, options, __cb(_, __frame, 4, 17, function __$__30() { _(); }, true)); }, true)); }, true)); }); });


  extension.command("get [resource-group] [vm-name]").description($("Get extensions installed on a virtual machine in a resource group")).usage("[options] <resource-group> <vm-name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-m, --vm-name <vm-name>", $("the virtual machine name")).option("-s, --subscription <id>", $("the subscription id")).execute(function __31(resourceGroup, vmName, options, _) { var vmClient; var __frame = { name: "__31", line: 659 }; return __func(_, this, arguments, __31, 3, __frame, function __$__31() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.getExtensions(resourceGroup, vmName, options, __cb(_, __frame, 5, 17, function __$__31() { _(); }, true)); }, true)); }, true)); }); });


  extension.command("get-chef [resource-group] [vm-name]").description($("Get chef extension installed on a virtual machine in a resource group")).usage("[options] <resource-group> <vm-name>").option("-g, --resource-group <resource-group>", $("the resource group name")).option("-m, --vm-name <vm-name>", $("the virtual machine name")).option("-s, --subscription <id>", $("the subscription id")).execute(function __32(resourceGroup, vmName, options, _) { var vmClient; var __frame = { name: "__32", line: 673 }; return __func(_, this, arguments, __32, 3, __frame, function __$__32() {






      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), vmName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vmName = __2;

          vmClient = new VMClient(cli, options.subscription);
          return vmClient.getChefExtension(resourceGroup, vmName, options, __cb(_, __frame, 5, 17, function __$__32() { _(); }, true)); }, true)); }, true)); }); });


  var extensionImage = vm.category("extension-image").description($("Commands to query available VM resource extensions"));


  extensionImage.command("list-publishers [location]").description($("Lists virtual machine/extension image publishers")).usage("[options] <location>").option("-l, --location <location>", $("the location")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __33(location, options, _) { var vmClient; var __frame = { name: "__33", line: 689 }; return __func(_, this, arguments, __33, 2, __frame, function __$__33() {





      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        location = utils.toLowerCaseAndRemoveSpace(location);
        vmClient = new VMClient(cli, options.subscription);
        return vmClient.listVMImagePublishers(location, options, __cb(_, __frame, 4, 17, function __$__33() { _(); }, true)); }, true)); }); });


  extensionImage.command("list-types [location] [publisher]").description($("Lists virtual machine extension image types by a publisher")).usage("[options] <location> <publisher>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __34(location, publisher, options, _) { var vmClient; var __frame = { name: "__34", line: 702 }; return __func(_, this, arguments, __34, 3, __frame, function __$__34() {






      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          location = utils.toLowerCaseAndRemoveSpace(location);
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.listVMExtensionImageTypes(location, publisher, options, __cb(_, __frame, 5, 17, function __$__34() { _(); }, true)); }, true)); }, true)); }); });


  extensionImage.command("list-versions [location] [publisher] [typeName]").description($("Lists virtual machine extension image versions by publisher and type input")).usage("[options] <location> <publisher> <typeName>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-t, --typeName <typeName>", $("the type name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __35(location, publisher, typeName, options, _) { var vmClient; var __frame = { name: "__35", line: 717 }; return __func(_, this, arguments, __35, 4, __frame, function __$__35() {







      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          return cli.interaction.promptIfNotGiven($("TypeName: "), typeName, __cb(_, __frame, 3, 35, function ___(__0, __3) { typeName = __3;
            location = utils.toLowerCaseAndRemoveSpace(location);
            vmClient = new VMClient(cli, options.subscription);
            return vmClient.listVMExtensionImageVersions(location, publisher, typeName, options, __cb(_, __frame, 6, 17, function __$__35() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  extensionImage.command("list [location] [publisher] [typeName]").description($("Lists virtual machine extension images by publisher, and type input")).usage("[options] <location> <publisher> <typeName>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-t, --typeName <typeName>", $("the type name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __36(location, publisher, typeName, options, _) { var vmClient; var __frame = { name: "__36", line: 733 }; return __func(_, this, arguments, __36, 4, __frame, function __$__36() {







      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        location = utils.toLowerCaseAndRemoveSpace(location);
        vmClient = new VMClient(cli, options.subscription);
        return vmClient.listVMExtensionImages(location, publisher, typeName, options, __cb(_, __frame, 4, 17, function __$__36() { _(); }, true)); }, true)); }); });


  extensionImage.command("show [location] [publisher] [typeName] [version]").description($("Lists virtual machine extension image versions by publisher, type and version input")).usage("[options] <location> <publisher> <typeName> <version>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-t, --typeName <typeName>", $("the type name")).option("-v, --version <version>", $("the version")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __37(location, publisher, typeName, version, options, _) { var vmClient; var __frame = { name: "__37", line: 748 }; return __func(_, this, arguments, __37, 5, __frame, function __$__37() {








      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          return cli.interaction.promptIfNotGiven($("typeName: "), typeName, __cb(_, __frame, 3, 35, function ___(__0, __3) { typeName = __3;
            return cli.interaction.promptIfNotGiven($("version: "), version, __cb(_, __frame, 4, 34, function ___(__0, __4) { version = __4;
              location = utils.toLowerCaseAndRemoveSpace(location);
              vmClient = new VMClient(cli, options.subscription);
              return vmClient.getVMExtensionImage(location, publisher, typeName, version, options, __cb(_, __frame, 7, 17, function __$__37() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }); });



  var docker = vm.category("docker").description($("Commands to manage your Docker Virtual Machine"));


  docker.command("create [resource-group] [name] [location] [os-type]").description($("Create a Docker virtual machine in a resource group")).usage("[options] <resource-group> <name> <location> <os-type>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the virtual machine name")).option("-T, --docker-port <port>", util.format($("Port to use for docker [%s]"), vmConstants.EXTENSIONS.DOCKER_PORT)).option("-O, --docker-cert-dir <dir>", $("Directory containing docker certs [~/.docker/]")).option("-E, --docker-extension-version <version>", util.format($("Version of Docker Azure extension [%s]"), vmConstants.EXTENSIONS.DOCKER_VERSION_ARM)).option("-c, --docker-cert-cn [CN]", $("Docker server certificate's CN. Can be set if you are using --tlsverify option for Docker connections. Default value is [*]")).option("-D, --nic-id <nic-id>", $(("the NIC identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/networkInterfaces/<nic-name>"))).option("-f, --nic-name <nic-name>", $(((((("the NIC name" + "\n     If this is an existing NIC then it must exists under the current resource group identified by resource-group") + "\n     A new NIC will be created if no NIC exists with name nic-name in the current resource group") + "\n     To create new NIC - subnet-id or vnet-name, vnet-address-prefix, subnet-name and vnet-subnet-address-prefix are required") + "\n     Please use nic-id to refer an existing NIC in a different resource group") + "\n     The parameter nic-name will be ignored when nic-id is specified"))).option("-I, --nic-ids <nic-ids>", $("the list of NIC identifiers separated by comma. In case of specifying multiple nics first one will be set as primary.")).option("-N, --nic-names <nic-names>", $((("the list of NIC names separated by comma. In case of specifying multiple nics first one will be set as primary." + "These NICs must exists in the same resource group as the VM. Please use nic-ids if that not the case. ") + "This parameter will be ignored if --nic-ids is specified"))).option("-l, --location <location>", $("the location")).option("-y, --os-type <os-type>", $("the operating system Type, valid values are Windows, Linux")).option("-Q, --image-urn <image-urn>", $("the image URN in the form publisherName:offer:skus:version")).option("-u, --admin-username <admin-username>", $(("the user name" + "\n      This parameter is valid for a VM created from an image (image-urn) and ignored when VM is based on disk (os-disk-*)"))).option("-p, --admin-password <admin-password>", $(("the password" + "\n      This parameter is valid for a VM created from an image (image-urn) and ignored when VM is based on disk (os-disk-*)"))).option("-M, --ssh-publickey-file <openssh-rsa-file|pem-file>", $(("path to public key PEM file or SSH Public key file for SSH authentication" + "\n     This parameter is valid only when os-type is \"Linux\""))).option("-G, --generate-ssh-keys", $("Auto generate SSH keys, --ssh-publickey-file will be ignored. This parameter is valid only when os-type is \"Linux\"")).option("-z, --vm-size <vm-size>", $("the virtual machine size [Standard_A1]")).option("-U, --public-ip-id <public-ip-id>", $(("the public ip identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/publicIPAddresses/<public-ip-name>"))).option("-i, --public-ip-name <public-ip-name>", $((((("the public ip name" + "\n     If this is an existing public IP then it must exists under the current resource group identified by resource-group") + "\n     A new public IP will be created if no public IP exists with name public-ip-name in the current resource group") + "\n     Please use public-ip-id to refer an existing public IP in a different resource group") + "\n     The parameter public-ip-name will be ignored when public-ip-id is specified"))).option("-w, --public-ip-domain-name <public-ip-domain-name>", $((("the public ip domain name" + "\n     This sets the DNS to <publicip-domain-name>.<location>.cloudapp.azure.com") + "\n     This parameter will be used only when creating new public IP"))).option("-m, --public-ip-allocationmethod <public-ip-allocationmethod>", $(("the public ip allocation method, valid values are \"Dynamic\"" + "\n     This parameter will be used only when creating new public IP"))).option("-t, --public-ip-idletimeout <public-ip-idletimeout>", $(("the public ip idle timeout specified in minutes" + "\n     This parameter will be used only when creating new public IP"))).option("-S, --subnet-id <subnet-id>", $(("the subnet identifier" + "\n     e.g. /subscriptions/<subscriptipn-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>"))).option("-F, --vnet-name <vnet-name>", $((((((((("the virtual network name" + "\n     If this is an existing vnet then it must exists under the current resource group identified by resource-group") + "\n     If this is an existing vnet then vnet-subnet-name is required") + "\n          If no subnet exists with name vnet-subnet-name then a new subnet will be created") + "\n          To create new subnet vnet-subnet-address-prefix is required") + "\n     A new vnet will be created if no vnet exists with name vnet-name in the current resource group") + "\n     To create new vnet, vnet-address-prefix, vnet-subnet-name and vnet-subnet-address-prefix are required") + "\n     Please use subnet-id to refer an existing subnet under a vnet in a different resource group") + "\n     vnet-name, vnet-address-prefix, vnet-subnet-name and vnet-subnet-address-prefix will be ignored when subnet-id is specified"))).option("-P, --vnet-address-prefix <vnet-address-prefix>", $("the virtual network address prefix in IPv4/CIDR format")).option("-j, --vnet-subnet-name <vnet-subnet-name>", $("the virtual network subnet name")).option("-k, --vnet-subnet-address-prefix <vnet-subnet-address-prefix>", $("the virtual network subnet address prefix in IPv4/CIDR format")).option("-r, --availset-name <availset-name>", $("the availability set name")).option("-o, --storage-account-name <storage-account-name>", $("the storage account name")).option("-R, --storage-account-container-name <storage-account-container-name>", $("the storage account container name [vhds]")).option("-d, --os-disk-vhd <os-disk-vhd>", $((("name or url of the OS disk Vhd" + "\n     If this parameter is specified along with --image-urn parameter then OS disk created from the image will be stored in this vhd") + "\n     If this parameter is specified without --image-urn parameter then this vhd must exists and will be used as OS Disk"))).option("-a, --data-disk-caching <data-disk-caching>", $("data disk caching, valid values are None, ReadOnly, ReadWrite")).option("-x, --data-disk-vhd <data-disk-vhd>", $("name or url of the data disk Vhd")).option("-e, --data-disk-size <data-disk-size>", $("data disk size in GB")).option("-Y, --data-disk-existing", $("Will use existing VHD if specified. Don't specify this param if you are creating data disk from a new VHD.")).option("-C, --custom-data <custom-data-file>", $("CustomData file")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __38(resourceGroup, name, location, osType, options, _) { var vmClient; var __frame = { name: "__38", line: 834 }; return __func(_, this, arguments, __38, 5, __frame, function __$__38() {








































































      return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 40, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Virtual machine name: "), name, __cb(_, __frame, 2, 31, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Location name: "), location, __cb(_, __frame, 3, 35, function ___(__0, __3) { location = __3;
            return cli.interaction.promptIfNotGiven($("Operating system Type: "), osType, __cb(_, __frame, 4, 33, function ___(__0, __4) { osType = __4;
              location = utils.toLowerCaseAndRemoveSpace(location);
              vmClient = new VMClient(cli, options.subscription);
              return vmClient.createDockerVM(resourceGroup, name, location, osType, options, __cb(_, __frame, 7, 17, function __$__38() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }); });


  var image = vm.category("image").description($("Commands to manage VM images"));


  image.command("list-publishers [location]").description($("Lists virtual machines image publishers")).usage("[options] <location>").option("-l, --location <location>", $("the location")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __39(location, options, _) { var vmClient; var __frame = { name: "__39", line: 852 }; return __func(_, this, arguments, __39, 2, __frame, function __$__39() {





      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        location = utils.toLowerCaseAndRemoveSpace(location);
        vmClient = new VMClient(cli, options.subscription);
        return vmClient.listVMImagePublishers(location, options, __cb(_, __frame, 4, 17, function __$__39() { _(); }, true)); }, true)); }); });


  image.command("list-offers [location] [publisher]").description($("Lists virtual machines image offers by a publisher")).usage("[options] <location> <publisher>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __40(location, publisher, options, _) { var vmClient; var __frame = { name: "__40", line: 865 }; return __func(_, this, arguments, __40, 3, __frame, function __$__40() {






      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          location = utils.toLowerCaseAndRemoveSpace(location);
          vmClient = new VMClient(cli, options.subscription);
          return vmClient.listVMImageOffers(location, publisher, options, __cb(_, __frame, 5, 17, function __$__40() { _(); }, true)); }, true)); }, true)); }); });


  image.command("list-skus [location] [publisher] [offer]").description($("Lists virtual machines image skus for a specific offer from a publisher")).usage("[options] <location> <publisher> <offer>").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-o, --offer <offer>", $("the offer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __41(location, publisher, offer, options, _) { var vmClient; var __frame = { name: "__41", line: 880 }; return __func(_, this, arguments, __41, 4, __frame, function __$__41() {







      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          return cli.interaction.promptIfNotGiven($("Offer: "), offer, __cb(_, __frame, 3, 32, function ___(__0, __3) { offer = __3;
            location = utils.toLowerCaseAndRemoveSpace(location);
            vmClient = new VMClient(cli, options.subscription);
            return vmClient.listVMImageSkus(location, publisher, offer, options, __cb(_, __frame, 6, 17, function __$__41() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  image.command("list [location] [publisher] [offer] [sku]").description($("Lists the virtual machines images")).usage("[options] <location> <publisher> [offer] [sku]").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-o, --offer <offer>", $("the offer")).option("-k, --sku <sku>", $("the sku")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __42(location, publisher, offer, sku, options, _) { var vmClient, params; var __frame = { name: "__42", line: 897 }; return __func(_, this, arguments, __42, 5, __frame, function __$__42() {








      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          location = utils.toLowerCaseAndRemoveSpace(location);
          vmClient = new VMClient(cli, options.subscription);
          params = {
            location: location,
            publisher: publisher,
            offer: offer,
            sku: sku };


          return vmClient.listVMImages(params, options, __cb(_, __frame, 12, 17, function __$__42() { _(); }, true)); }, true)); }, true)); }); });


  image.command("show [location] [publisher] [offer] [sku] [version]").description($("Lists the virtual machines images")).usage("[options] <location> <publisher> [offer] [sku]").option("-l, --location <location>", $("the location")).option("-p, --publisher <publisher>", $("the publisher name")).option("-o, --offer <offer>", $("the offer")).option("-k, --sku <sku>", $("the sku")).option("-e, --version <version>", $("the version")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __43(location, publisher, offer, sku, version, options, _) { var vmClient, params; var __frame = { name: "__43", line: 921 }; return __func(_, this, arguments, __43, 6, __frame, function __$__43() {









      return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1;
        return cli.interaction.promptIfNotGiven($("Publisher: "), publisher, __cb(_, __frame, 2, 36, function ___(__0, __2) { publisher = __2;
          return cli.interaction.promptIfNotGiven($("Offer: "), offer, __cb(_, __frame, 3, 32, function ___(__0, __3) { offer = __3;
            return cli.interaction.promptIfNotGiven($("Sku: "), sku, __cb(_, __frame, 4, 30, function ___(__0, __4) { sku = __4;
              return cli.interaction.promptIfNotGiven($("Version: "), version, __cb(_, __frame, 5, 34, function ___(__0, __5) { version = __5;
                location = utils.toLowerCaseAndRemoveSpace(location);
                vmClient = new VMClient(cli, options.subscription);
                params = {
                  location: location,
                  publisher: publisher,
                  offer: offer,
                  sku: sku,
                  version: version };


                return vmClient.getVMImageDetails(params, options, __cb(_, __frame, 16, 17, function __$__43() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }, true)); }); });


  var secret = vm.category("secret").description($("Commands to manage VM secrets"));
  secret.command("add [resource-group] [name] [source-vault-id]").description($("Adds a secret to the VM")).usage("[options] <resource-group> <name> <source-vault-id>").option("-g, --resource-group <resource-group>", $("the resource group")).option("-n, --name <name>", $("the VM name")).option("-r, --source-vault-id <source-vault-id>", $("the source-vault-id")).option("-c, --certificate-url <certificate-url>", $("certificate-url")).option("-t, --certificate-store <certificate-store>", $("certificate-store")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __44(resourceGroup, name, sourceVaultId, options, _) { var vmClient, params; var __frame = { name: "__44", line: 950 }; return __func(_, this, arguments, __44, 4, __frame, function __$__44() {









      return cli.interaction.promptIfNotGiven($("Resource Group: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Source Vault Id: "), sourceVaultId, __cb(_, __frame, 3, 38, function ___(__0, __3) { sourceVaultId = __3;
            vmClient = new VMClient(cli, options.subscription);
            params = {
              group: resourceGroup,
              name: name,
              sourceVaultId: sourceVaultId };

            return vmClient.addSecret(params, options, __cb(_, __frame, 10, 15, function __$__44() { _(); }, true)); }, true)); }, true)); }, true)); }); });


  secret.description($("Commands to manage VM secrets"));
  secret.command("delete [resource-group] [name] [source-vault-id]").description($("Deletes a secret to the VM")).usage("[options] <resource-group> <name> <source-vault-id>").option("-g, --resource-group <resource-group>", $("the resource group")).option("-n, --name <name>", $("the VM name")).option("-r, --source-vault-id <source-vault-id>", $("the source-vault-id")).option("-c, --certificate-url <certificate-url>", $("certificate-url")).option("-t, --certificate-store <certificate-store>", $("certificate-store")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __45(resourceGroup, name, sourceVaultId, options, _) { var vmClient, params; var __frame = { name: "__45", line: 973 }; return __func(_, this, arguments, __45, 4, __frame, function __$__45() {









      return cli.interaction.promptIfNotGiven($("Resource Group: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
        return cli.interaction.promptIfNotGiven($("Name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2;
          return cli.interaction.promptIfNotGiven($("Source Vault Id: "), sourceVaultId, __cb(_, __frame, 3, 38, function ___(__0, __3) { sourceVaultId = __3;
            vmClient = new VMClient(cli, options.subscription);
            params = {
              group: resourceGroup,
              name: name,
              sourceVaultId: sourceVaultId };

            return vmClient.deleteSecret(params, options, __cb(_, __frame, 10, 15, function __$__45() { _(); }, true)); }, true)); }, true)); }, true)); }); });};
