diff --git a/lib/commands/arm/compute/availabilitySets._js b/lib/commands/arm/compute/availabilitySets._js index f9bea66273..4a5083a48d 100644 --- a/lib/commands/arm/compute/availabilitySets._js +++ b/lib/commands/arm/compute/availabilitySets._js @@ -29,7 +29,6 @@ azure availset config availability-set set --platform-fault-domain-count $platformFaultDomainCount --virtual-machines $virtualMachines --statuses $statuses ---managed $managed --sku $sku --id $id --name $name @@ -43,7 +42,6 @@ azure availset config availability-set delete --platform-fault-domain-count --virtual-machines --statuses ---managed --sku --id --name @@ -115,18 +113,23 @@ azure availset list-available-sizes */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } + exports.init = function (cli) { + + /* AvailabilitySets CreateOrUpdate --resource-group @@ -150,7 +153,6 @@ exports.init = function (cli) { "time":null } ], - "managed":null, "sku":{ "name":"", "tier":"", @@ -210,12 +212,12 @@ exports.init = function (cli) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"platformUpdateDomainCount\":null,\"platformFaultDomainCount\":null,\"virtualMachines\":[{\"id\":\"\"}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"managed\":null,\"sku\":{\"name\":\"\",\"tier\":\"\",\"capacity\":null},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"platformUpdateDomainCount\":null,\"platformFaultDomainCount\":null,\"virtualMachines\":[{\"id\":\"\"}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"sku\":{\"name\":\"\",\"tier\":\"\",\"capacity\":null},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'availabilitySetsCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"platformUpdateDomainCount\":null,\r\n\"platformFaultDomainCount\":null,\r\n\"virtualMachines\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"managed\":null,\r\n\"sku\":{\r\n\"name\":\"\",\r\n\"tier\":\"\",\r\n\"capacity\":null\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"platformUpdateDomainCount\":null,\r\n\"platformFaultDomainCount\":null,\r\n\"virtualMachines\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"sku\":{\r\n\"name\":\"\",\r\n\"tier\":\"\",\r\n\"capacity\":null\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -267,13 +269,13 @@ exports.init = function (cli) { }); //config set availability-set - var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.category('config') + var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet01 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet01 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet01.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.category('availability-set') + var setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet01 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet01.category('availability-set') .description($('Commands to configure availability-set of availset in config file.')); - setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet0.command('set') - .description($('Set availability-set in config string or files, e.g. \r\n{\r\n "platformUpdateDomainCount":null,\r\n "platformFaultDomainCount":null,\r\n "virtualMachines":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "managed":null,\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateAvailabilitySetsAvailabilitySet01.command('set') + .description($('Set availability-set in config string or files, e.g. \r\n{\r\n "platformUpdateDomainCount":null,\r\n "platformFaultDomainCount":null,\r\n "virtualMachines":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -281,7 +283,6 @@ exports.init = function (cli) { .option('--platform-fault-domain-count ', $('Set the platform-fault-domain-count value.')) .option('--virtual-machines ', $('Set the virtual-machines value.')) .option('--statuses ', $('Set the statuses value.')) - .option('--managed ', $('Set the managed value.')) .option('--sku ', $('Set the sku value.')) .option('--id ', $('Set the id value.')) .option('--name ', $('Set the name value.')) @@ -351,18 +352,6 @@ exports.init = function (cli) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.statuses}]); } - paramPath = options.path + '/' + 'managed'; - if (options.managed) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.managed); - cli.output.verbose('================================================'); - if (options.parse && options.managed) { - options.managed = JSON.parse(options.managed); - } - options.managed = JSON.parse(options.managed); - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.managed}]); - } paramPath = options.path + '/' + 'sku'; if (options.sku) { cli.output.verbose('================================================'); @@ -441,20 +430,19 @@ exports.init = function (cli) { }); //config delete availability-set - var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.category('config') + var catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet11 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsAvailabilitySet11 = catparametersCreateOrUpdateAvailabilitySetsAvailabilitySet11.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.category('availability-set') + var deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet11 = parametersCreateOrUpdateAvailabilitySetsAvailabilitySet11.category('availability-set') .description($('Commands to configure availability-set of availset in config file.')); - deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet1.command('delete') - .description($('Remove availability-set in config string or files, e.g. \r\n{\r\n "platformUpdateDomainCount":null,\r\n "platformFaultDomainCount":null,\r\n "virtualMachines":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "managed":null,\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateAvailabilitySetsAvailabilitySet11.command('delete') + .description($('Remove availability-set in config string or files, e.g. \r\n{\r\n "platformUpdateDomainCount":null,\r\n "platformFaultDomainCount":null,\r\n "virtualMachines":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--platform-update-domain-count', $('Remove the platform-update-domain-count value.')) .option('--platform-fault-domain-count', $('Remove the platform-fault-domain-count value.')) .option('--virtual-machines', $('Remove the virtual-machines value.')) .option('--statuses', $('Remove the statuses value.')) - .option('--managed', $('Remove the managed value.')) .option('--sku', $('Remove the sku value.')) .option('--id', $('Remove the id value.')) .option('--name', $('Remove the name value.')) @@ -476,7 +464,7 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.platformUpdateDomainCount || options.platformFaultDomainCount || options.virtualMachines || options.statuses || options.managed || options.sku || options.id || options.name || options.type || options.location || options.tags; + var anySubItem = false || options.platformUpdateDomainCount || options.platformFaultDomainCount || options.virtualMachines || options.statuses || options.sku || options.id || options.name || options.type || options.location || options.tags; if (anySubItem) { var subItemPath = null; if (options.platformUpdateDomainCount) { @@ -495,10 +483,6 @@ exports.init = function (cli) { subItemPath = options.path + '/statuses'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.managed) { - subItemPath = options.path + '/managed'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.sku) { subItemPath = options.path + '/sku'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -539,12 +523,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set virtual-machines - var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.category('config') + var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1 = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM = parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.category('virtual-machines') + var setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1 = parametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1.category('virtual-machines') .description($('Commands to configure virtual-machines of availset in config file.')); - setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM.command('set') + setparametersCreateOrUpdateAvailabilitySetsVirtualMachines0VM1.command('set') .description($('Set virtual-machines in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachines" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -598,12 +582,12 @@ exports.init = function (cli) { }); //config delete virtual-machines - var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.category('config') + var catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1 = catparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM = parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.category('virtual-machines') + var deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1 = parametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1.category('virtual-machines') .description($('Commands to configure virtual-machines of availset in config file.')); - deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM.command('delete') + deleteparametersCreateOrUpdateAvailabilitySetsVirtualMachines1VM1.command('delete') .description($('Remove virtual-machines in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachines" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -647,12 +631,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set statuses - var catparametersCreateOrUpdateAvailabilitySetsStatuses0S = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsStatuses0S = catparametersCreateOrUpdateAvailabilitySetsStatuses0S.category('config') + var catparametersCreateOrUpdateAvailabilitySetsStatuses0S1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsStatuses0S1 = catparametersCreateOrUpdateAvailabilitySetsStatuses0S1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var setparametersCreateOrUpdateAvailabilitySetsStatuses0S = parametersCreateOrUpdateAvailabilitySetsStatuses0S.category('statuses') + var setparametersCreateOrUpdateAvailabilitySetsStatuses0S1 = parametersCreateOrUpdateAvailabilitySetsStatuses0S1.category('statuses') .description($('Commands to configure statuses of availset in config file.')); - setparametersCreateOrUpdateAvailabilitySetsStatuses0S.command('set') + setparametersCreateOrUpdateAvailabilitySetsStatuses0S1.command('set') .description($('Set statuses in config string or files, e.g. \r\n {\r\n ...\r\n "statuses" : {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -754,12 +738,12 @@ exports.init = function (cli) { }); //config delete statuses - var catparametersCreateOrUpdateAvailabilitySetsStatuses1S = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsStatuses1S = catparametersCreateOrUpdateAvailabilitySetsStatuses1S.category('config') + var catparametersCreateOrUpdateAvailabilitySetsStatuses1S1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsStatuses1S1 = catparametersCreateOrUpdateAvailabilitySetsStatuses1S1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S = parametersCreateOrUpdateAvailabilitySetsStatuses1S.category('statuses') + var deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S1 = parametersCreateOrUpdateAvailabilitySetsStatuses1S1.category('statuses') .description($('Commands to configure statuses of availset in config file.')); - deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S.command('delete') + deleteparametersCreateOrUpdateAvailabilitySetsStatuses1S1.command('delete') .description($('Remove statuses in config string or files, e.g. \r\n {\r\n ...\r\n "statuses" : {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -823,12 +807,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set sku - var catparametersCreateOrUpdateAvailabilitySetsSku0S = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsSku0S = catparametersCreateOrUpdateAvailabilitySetsSku0S.category('config') + var catparametersCreateOrUpdateAvailabilitySetsSku0S1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsSku0S1 = catparametersCreateOrUpdateAvailabilitySetsSku0S1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var setparametersCreateOrUpdateAvailabilitySetsSku0S = parametersCreateOrUpdateAvailabilitySetsSku0S.category('sku') + var setparametersCreateOrUpdateAvailabilitySetsSku0S1 = parametersCreateOrUpdateAvailabilitySetsSku0S1.category('sku') .description($('Commands to configure sku of availset in config file.')); - setparametersCreateOrUpdateAvailabilitySetsSku0S.command('set') + setparametersCreateOrUpdateAvailabilitySetsSku0S1.command('set') .description($('Set sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -901,12 +885,12 @@ exports.init = function (cli) { }); //config delete sku - var catparametersCreateOrUpdateAvailabilitySetsSku1S = cli.category('availset'); - var parametersCreateOrUpdateAvailabilitySetsSku1S = catparametersCreateOrUpdateAvailabilitySetsSku1S.category('config') + var catparametersCreateOrUpdateAvailabilitySetsSku1S1 = cli.category('availset'); + var parametersCreateOrUpdateAvailabilitySetsSku1S1 = catparametersCreateOrUpdateAvailabilitySetsSku1S1.category('config') .description($('Commands to manage configuration of availability-sets in the parameter file.')); - var deleteparametersCreateOrUpdateAvailabilitySetsSku1S = parametersCreateOrUpdateAvailabilitySetsSku1S.category('sku') + var deleteparametersCreateOrUpdateAvailabilitySetsSku1S1 = parametersCreateOrUpdateAvailabilitySetsSku1S1.category('sku') .description($('Commands to configure sku of availset in config file.')); - deleteparametersCreateOrUpdateAvailabilitySetsSku1S.command('delete') + deleteparametersCreateOrUpdateAvailabilitySetsSku1S1.command('delete') .description($('Remove sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) diff --git a/lib/commands/arm/compute/containerServices._js b/lib/commands/arm/compute/containerServices._js index 23376e07da..357b60caa9 100644 --- a/lib/commands/arm/compute/containerServices._js +++ b/lib/commands/arm/compute/containerServices._js @@ -208,13 +208,15 @@ azure acs list */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } @@ -265,7 +267,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* ContainerServices CreateOrUpdate @@ -430,12 +435,12 @@ function display(cli, o) { }); //config set container-service - var catparametersCreateOrUpdateContainerServicesContainerService0 = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesContainerService0 = catparametersCreateOrUpdateContainerServicesContainerService0.category('config') + var catparametersCreateOrUpdateContainerServicesContainerService01 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesContainerService01 = catparametersCreateOrUpdateContainerServicesContainerService01.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesContainerService0 = parametersCreateOrUpdateContainerServicesContainerService0.category('container-service') + var setparametersCreateOrUpdateContainerServicesContainerService01 = parametersCreateOrUpdateContainerServicesContainerService01.category('container-service') .description($('Commands to configure container-service of acs in config file.')); - setparametersCreateOrUpdateContainerServicesContainerService0.command('set') + setparametersCreateOrUpdateContainerServicesContainerService01.command('set') .description($('Set container-service in config string or files, e.g. \r\n{\r\n "provisioningState":"",\r\n "orchestratorProfile":{\r\n "orchestratorType":""\r\n },\r\n "customProfile":{\r\n "orchestrator":""\r\n },\r\n "servicePrincipalProfile":{\r\n "clientId":"",\r\n "secret":""\r\n },\r\n "masterProfile":{\r\n "count":null,\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n },\r\n "agentPoolProfiles":[\r\n {\r\n "name":"",\r\n "count":"",\r\n "vmSize":"",\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ],\r\n "windowsProfile":{\r\n "adminUsername":"",\r\n "adminPassword":""\r\n },\r\n "linuxProfile":{\r\n "adminUsername":"",\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "diagnosticsProfile":{\r\n "vmDiagnostics":{\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -639,12 +644,12 @@ function display(cli, o) { }); //config delete container-service - var catparametersCreateOrUpdateContainerServicesContainerService1 = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesContainerService1 = catparametersCreateOrUpdateContainerServicesContainerService1.category('config') + var catparametersCreateOrUpdateContainerServicesContainerService11 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesContainerService11 = catparametersCreateOrUpdateContainerServicesContainerService11.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesContainerService1 = parametersCreateOrUpdateContainerServicesContainerService1.category('container-service') + var deleteparametersCreateOrUpdateContainerServicesContainerService11 = parametersCreateOrUpdateContainerServicesContainerService11.category('container-service') .description($('Commands to configure container-service of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesContainerService1.command('delete') + deleteparametersCreateOrUpdateContainerServicesContainerService11.command('delete') .description($('Remove container-service in config string or files, e.g. \r\n{\r\n "provisioningState":"",\r\n "orchestratorProfile":{\r\n "orchestratorType":""\r\n },\r\n "customProfile":{\r\n "orchestrator":""\r\n },\r\n "servicePrincipalProfile":{\r\n "clientId":"",\r\n "secret":""\r\n },\r\n "masterProfile":{\r\n "count":null,\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n },\r\n "agentPoolProfiles":[\r\n {\r\n "name":"",\r\n "count":"",\r\n "vmSize":"",\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ],\r\n "windowsProfile":{\r\n "adminUsername":"",\r\n "adminPassword":""\r\n },\r\n "linuxProfile":{\r\n "adminUsername":"",\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "diagnosticsProfile":{\r\n "vmDiagnostics":{\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -752,12 +757,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set orchestrator-profile - var catparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesOrchestratorProfile0OP = catparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP.category('config') + var catparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1 = catparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP = parametersCreateOrUpdateContainerServicesOrchestratorProfile0OP.category('orchestrator-profile') + var setparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1 = parametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1.category('orchestrator-profile') .description($('Commands to configure orchestrator-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP.command('set') + setparametersCreateOrUpdateContainerServicesOrchestratorProfile0OP1.command('set') .description($('Set orchestrator-profile in config string or files, e.g. \r\n {\r\n ...\r\n "orchestratorProfile" : {\r\n "orchestratorType":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -805,12 +810,12 @@ function display(cli, o) { }); //config delete orchestrator-profile - var catparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesOrchestratorProfile1OP = catparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP.category('config') + var catparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1 = catparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP = parametersCreateOrUpdateContainerServicesOrchestratorProfile1OP.category('orchestrator-profile') + var deleteparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1 = parametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1.category('orchestrator-profile') .description($('Commands to configure orchestrator-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP.command('delete') + deleteparametersCreateOrUpdateContainerServicesOrchestratorProfile1OP1.command('delete') .description($('Remove orchestrator-profile in config string or files, e.g. \r\n {\r\n ...\r\n "orchestratorProfile" : {\r\n "orchestratorType":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -853,12 +858,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set custom-profile - var catparametersCreateOrUpdateContainerServicesCustomProfile0CP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesCustomProfile0CP = catparametersCreateOrUpdateContainerServicesCustomProfile0CP.category('config') + var catparametersCreateOrUpdateContainerServicesCustomProfile0CP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesCustomProfile0CP1 = catparametersCreateOrUpdateContainerServicesCustomProfile0CP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesCustomProfile0CP = parametersCreateOrUpdateContainerServicesCustomProfile0CP.category('custom-profile') + var setparametersCreateOrUpdateContainerServicesCustomProfile0CP1 = parametersCreateOrUpdateContainerServicesCustomProfile0CP1.category('custom-profile') .description($('Commands to configure custom-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesCustomProfile0CP.command('set') + setparametersCreateOrUpdateContainerServicesCustomProfile0CP1.command('set') .description($('Set custom-profile in config string or files, e.g. \r\n {\r\n ...\r\n "customProfile" : {\r\n "orchestrator":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -906,12 +911,12 @@ function display(cli, o) { }); //config delete custom-profile - var catparametersCreateOrUpdateContainerServicesCustomProfile1CP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesCustomProfile1CP = catparametersCreateOrUpdateContainerServicesCustomProfile1CP.category('config') + var catparametersCreateOrUpdateContainerServicesCustomProfile1CP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesCustomProfile1CP1 = catparametersCreateOrUpdateContainerServicesCustomProfile1CP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesCustomProfile1CP = parametersCreateOrUpdateContainerServicesCustomProfile1CP.category('custom-profile') + var deleteparametersCreateOrUpdateContainerServicesCustomProfile1CP1 = parametersCreateOrUpdateContainerServicesCustomProfile1CP1.category('custom-profile') .description($('Commands to configure custom-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesCustomProfile1CP.command('delete') + deleteparametersCreateOrUpdateContainerServicesCustomProfile1CP1.command('delete') .description($('Remove custom-profile in config string or files, e.g. \r\n {\r\n ...\r\n "customProfile" : {\r\n "orchestrator":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -954,12 +959,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set service-principal-profile - var catparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP = catparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP.category('config') + var catparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1 = catparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP = parametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP.category('service-principal-profile') + var setparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1 = parametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1.category('service-principal-profile') .description($('Commands to configure service-principal-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP.command('set') + setparametersCreateOrUpdateContainerServicesServicePrincipalProfile0SPP1.command('set') .description($('Set service-principal-profile in config string or files, e.g. \r\n {\r\n ...\r\n "servicePrincipalProfile" : {\r\n "clientId":"",\r\n "secret":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1019,12 +1024,12 @@ function display(cli, o) { }); //config delete service-principal-profile - var catparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP = catparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP.category('config') + var catparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1 = catparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP = parametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP.category('service-principal-profile') + var deleteparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1 = parametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1.category('service-principal-profile') .description($('Commands to configure service-principal-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP.command('delete') + deleteparametersCreateOrUpdateContainerServicesServicePrincipalProfile1SPP1.command('delete') .description($('Remove service-principal-profile in config string or files, e.g. \r\n {\r\n ...\r\n "servicePrincipalProfile" : {\r\n "clientId":"",\r\n "secret":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1072,12 +1077,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set master-profile - var catparametersCreateOrUpdateContainerServicesMasterProfile0MP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesMasterProfile0MP = catparametersCreateOrUpdateContainerServicesMasterProfile0MP.category('config') + var catparametersCreateOrUpdateContainerServicesMasterProfile0MP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesMasterProfile0MP1 = catparametersCreateOrUpdateContainerServicesMasterProfile0MP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesMasterProfile0MP = parametersCreateOrUpdateContainerServicesMasterProfile0MP.category('master-profile') + var setparametersCreateOrUpdateContainerServicesMasterProfile0MP1 = parametersCreateOrUpdateContainerServicesMasterProfile0MP1.category('master-profile') .description($('Commands to configure master-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesMasterProfile0MP.command('set') + setparametersCreateOrUpdateContainerServicesMasterProfile0MP1.command('set') .description($('Set master-profile in config string or files, e.g. \r\n {\r\n ...\r\n "masterProfile" : {\r\n "count":null,\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1149,12 +1154,12 @@ function display(cli, o) { }); //config delete master-profile - var catparametersCreateOrUpdateContainerServicesMasterProfile1MP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesMasterProfile1MP = catparametersCreateOrUpdateContainerServicesMasterProfile1MP.category('config') + var catparametersCreateOrUpdateContainerServicesMasterProfile1MP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesMasterProfile1MP1 = catparametersCreateOrUpdateContainerServicesMasterProfile1MP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesMasterProfile1MP = parametersCreateOrUpdateContainerServicesMasterProfile1MP.category('master-profile') + var deleteparametersCreateOrUpdateContainerServicesMasterProfile1MP1 = parametersCreateOrUpdateContainerServicesMasterProfile1MP1.category('master-profile') .description($('Commands to configure master-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesMasterProfile1MP.command('delete') + deleteparametersCreateOrUpdateContainerServicesMasterProfile1MP1.command('delete') .description($('Remove master-profile in config string or files, e.g. \r\n {\r\n ...\r\n "masterProfile" : {\r\n "count":null,\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1207,12 +1212,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set agent-pool-profiles - var catparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP = catparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP.category('config') + var catparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1 = catparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP = parametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP.category('agent-pool-profiles') + var setparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1 = parametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1.category('agent-pool-profiles') .description($('Commands to configure agent-pool-profiles of acs in config file.')); - setparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP.command('set') + setparametersCreateOrUpdateContainerServicesAgentPoolProfiles0APP1.command('set') .description($('Set agent-pool-profiles in config string or files, e.g. \r\n {\r\n ...\r\n "agentPoolProfiles" : {\r\n "name":"",\r\n "count":"",\r\n "vmSize":"",\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1314,12 +1319,12 @@ function display(cli, o) { }); //config delete agent-pool-profiles - var catparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP = catparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP.category('config') + var catparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1 = catparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP = parametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP.category('agent-pool-profiles') + var deleteparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1 = parametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1.category('agent-pool-profiles') .description($('Commands to configure agent-pool-profiles of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP.command('delete') + deleteparametersCreateOrUpdateContainerServicesAgentPoolProfiles1APP1.command('delete') .description($('Remove agent-pool-profiles in config string or files, e.g. \r\n {\r\n ...\r\n "agentPoolProfiles" : {\r\n "name":"",\r\n "count":"",\r\n "vmSize":"",\r\n "dnsPrefix":"",\r\n "fqdn":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1383,12 +1388,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set windows-profile - var catparametersCreateOrUpdateContainerServicesWindowsProfile0WP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesWindowsProfile0WP = catparametersCreateOrUpdateContainerServicesWindowsProfile0WP.category('config') + var catparametersCreateOrUpdateContainerServicesWindowsProfile0WP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesWindowsProfile0WP1 = catparametersCreateOrUpdateContainerServicesWindowsProfile0WP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesWindowsProfile0WP = parametersCreateOrUpdateContainerServicesWindowsProfile0WP.category('windows-profile') + var setparametersCreateOrUpdateContainerServicesWindowsProfile0WP1 = parametersCreateOrUpdateContainerServicesWindowsProfile0WP1.category('windows-profile') .description($('Commands to configure windows-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesWindowsProfile0WP.command('set') + setparametersCreateOrUpdateContainerServicesWindowsProfile0WP1.command('set') .description($('Set windows-profile in config string or files, e.g. \r\n {\r\n ...\r\n "windowsProfile" : {\r\n "adminUsername":"",\r\n "adminPassword":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1448,12 +1453,12 @@ function display(cli, o) { }); //config delete windows-profile - var catparametersCreateOrUpdateContainerServicesWindowsProfile1WP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesWindowsProfile1WP = catparametersCreateOrUpdateContainerServicesWindowsProfile1WP.category('config') + var catparametersCreateOrUpdateContainerServicesWindowsProfile1WP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesWindowsProfile1WP1 = catparametersCreateOrUpdateContainerServicesWindowsProfile1WP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesWindowsProfile1WP = parametersCreateOrUpdateContainerServicesWindowsProfile1WP.category('windows-profile') + var deleteparametersCreateOrUpdateContainerServicesWindowsProfile1WP1 = parametersCreateOrUpdateContainerServicesWindowsProfile1WP1.category('windows-profile') .description($('Commands to configure windows-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesWindowsProfile1WP.command('delete') + deleteparametersCreateOrUpdateContainerServicesWindowsProfile1WP1.command('delete') .description($('Remove windows-profile in config string or files, e.g. \r\n {\r\n ...\r\n "windowsProfile" : {\r\n "adminUsername":"",\r\n "adminPassword":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1501,12 +1506,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set linux-profile - var catparametersCreateOrUpdateContainerServicesLinuxProfile0LP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesLinuxProfile0LP = catparametersCreateOrUpdateContainerServicesLinuxProfile0LP.category('config') + var catparametersCreateOrUpdateContainerServicesLinuxProfile0LP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesLinuxProfile0LP1 = catparametersCreateOrUpdateContainerServicesLinuxProfile0LP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesLinuxProfile0LP = parametersCreateOrUpdateContainerServicesLinuxProfile0LP.category('linux-profile') + var setparametersCreateOrUpdateContainerServicesLinuxProfile0LP1 = parametersCreateOrUpdateContainerServicesLinuxProfile0LP1.category('linux-profile') .description($('Commands to configure linux-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesLinuxProfile0LP.command('set') + setparametersCreateOrUpdateContainerServicesLinuxProfile0LP1.command('set') .description($('Set linux-profile in config string or files, e.g. \r\n {\r\n ...\r\n "linuxProfile" : {\r\n "adminUsername":"",\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1566,12 +1571,12 @@ function display(cli, o) { }); //config delete linux-profile - var catparametersCreateOrUpdateContainerServicesLinuxProfile1LP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesLinuxProfile1LP = catparametersCreateOrUpdateContainerServicesLinuxProfile1LP.category('config') + var catparametersCreateOrUpdateContainerServicesLinuxProfile1LP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesLinuxProfile1LP1 = catparametersCreateOrUpdateContainerServicesLinuxProfile1LP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesLinuxProfile1LP = parametersCreateOrUpdateContainerServicesLinuxProfile1LP.category('linux-profile') + var deleteparametersCreateOrUpdateContainerServicesLinuxProfile1LP1 = parametersCreateOrUpdateContainerServicesLinuxProfile1LP1.category('linux-profile') .description($('Commands to configure linux-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesLinuxProfile1LP.command('delete') + deleteparametersCreateOrUpdateContainerServicesLinuxProfile1LP1.command('delete') .description($('Remove linux-profile in config string or files, e.g. \r\n {\r\n ...\r\n "linuxProfile" : {\r\n "adminUsername":"",\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1619,12 +1624,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set ssh - var catparametersCreateOrUpdateContainerServicesSsh0LPs = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesSsh0LPs = catparametersCreateOrUpdateContainerServicesSsh0LPs.category('config') + var catparametersCreateOrUpdateContainerServicesSsh0LPs1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesSsh0LPs1 = catparametersCreateOrUpdateContainerServicesSsh0LPs1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesSsh0LPs = parametersCreateOrUpdateContainerServicesSsh0LPs.category('ssh') + var setparametersCreateOrUpdateContainerServicesSsh0LPs1 = parametersCreateOrUpdateContainerServicesSsh0LPs1.category('ssh') .description($('Commands to configure ssh of acs in config file.')); - setparametersCreateOrUpdateContainerServicesSsh0LPs.command('set') + setparametersCreateOrUpdateContainerServicesSsh0LPs1.command('set') .description($('Set ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1672,12 +1677,12 @@ function display(cli, o) { }); //config delete ssh - var catparametersCreateOrUpdateContainerServicesSsh1LPs = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesSsh1LPs = catparametersCreateOrUpdateContainerServicesSsh1LPs.category('config') + var catparametersCreateOrUpdateContainerServicesSsh1LPs1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesSsh1LPs1 = catparametersCreateOrUpdateContainerServicesSsh1LPs1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesSsh1LPs = parametersCreateOrUpdateContainerServicesSsh1LPs.category('ssh') + var deleteparametersCreateOrUpdateContainerServicesSsh1LPs1 = parametersCreateOrUpdateContainerServicesSsh1LPs1.category('ssh') .description($('Commands to configure ssh of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesSsh1LPs.command('delete') + deleteparametersCreateOrUpdateContainerServicesSsh1LPs1.command('delete') .description($('Remove ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1720,12 +1725,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set public-keys - var catparametersCreateOrUpdateContainerServicesPublicKeys0LPspK = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesPublicKeys0LPspK = catparametersCreateOrUpdateContainerServicesPublicKeys0LPspK.category('config') + var catparametersCreateOrUpdateContainerServicesPublicKeys0LPspK1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesPublicKeys0LPspK1 = catparametersCreateOrUpdateContainerServicesPublicKeys0LPspK1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesPublicKeys0LPspK = parametersCreateOrUpdateContainerServicesPublicKeys0LPspK.category('public-keys') + var setparametersCreateOrUpdateContainerServicesPublicKeys0LPspK1 = parametersCreateOrUpdateContainerServicesPublicKeys0LPspK1.category('public-keys') .description($('Commands to configure public-keys of acs in config file.')); - setparametersCreateOrUpdateContainerServicesPublicKeys0LPspK.command('set') + setparametersCreateOrUpdateContainerServicesPublicKeys0LPspK1.command('set') .description($('Set public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1779,12 +1784,12 @@ function display(cli, o) { }); //config delete public-keys - var catparametersCreateOrUpdateContainerServicesPublicKeys1LPspK = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesPublicKeys1LPspK = catparametersCreateOrUpdateContainerServicesPublicKeys1LPspK.category('config') + var catparametersCreateOrUpdateContainerServicesPublicKeys1LPspK1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesPublicKeys1LPspK1 = catparametersCreateOrUpdateContainerServicesPublicKeys1LPspK1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesPublicKeys1LPspK = parametersCreateOrUpdateContainerServicesPublicKeys1LPspK.category('public-keys') + var deleteparametersCreateOrUpdateContainerServicesPublicKeys1LPspK1 = parametersCreateOrUpdateContainerServicesPublicKeys1LPspK1.category('public-keys') .description($('Commands to configure public-keys of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesPublicKeys1LPspK.command('delete') + deleteparametersCreateOrUpdateContainerServicesPublicKeys1LPspK1.command('delete') .description($('Remove public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1828,12 +1833,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set diagnostics-profile - var catparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP = catparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP.category('config') + var catparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1 = catparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP = parametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP.category('diagnostics-profile') + var setparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1 = parametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1.category('diagnostics-profile') .description($('Commands to configure diagnostics-profile of acs in config file.')); - setparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP.command('set') + setparametersCreateOrUpdateContainerServicesDiagnosticsProfile0DP1.command('set') .description($('Set diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "vmDiagnostics":{\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1881,12 +1886,12 @@ function display(cli, o) { }); //config delete diagnostics-profile - var catparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP = catparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP.category('config') + var catparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1 = catparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP = parametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP.category('diagnostics-profile') + var deleteparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1 = parametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1.category('diagnostics-profile') .description($('Commands to configure diagnostics-profile of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP.command('delete') + deleteparametersCreateOrUpdateContainerServicesDiagnosticsProfile1DP1.command('delete') .description($('Remove diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "vmDiagnostics":{\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1929,12 +1934,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set vm-diagnostics - var catparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD = catparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD.category('config') + var catparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1 = catparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var setparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD = parametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD.category('vm-diagnostics') + var setparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1 = parametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1.category('vm-diagnostics') .description($('Commands to configure vm-diagnostics of acs in config file.')); - setparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD.command('set') + setparametersCreateOrUpdateContainerServicesVmDiagnostics0DPvD1.command('set') .description($('Set vm-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "vmDiagnostics" : {\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1994,12 +1999,12 @@ function display(cli, o) { }); //config delete vm-diagnostics - var catparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD = cli.category('acs'); - var parametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD = catparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD.category('config') + var catparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1 = cli.category('acs'); + var parametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1 = catparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1.category('config') .description($('Commands to manage configuration of container-services in the parameter file.')); - var deleteparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD = parametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD.category('vm-diagnostics') + var deleteparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1 = parametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1.category('vm-diagnostics') .description($('Commands to configure vm-diagnostics of acs in config file.')); - deleteparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD.command('delete') + deleteparametersCreateOrUpdateContainerServicesVmDiagnostics1DPvD1.command('delete') .description($('Remove vm-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "vmDiagnostics" : {\r\n "enabled":false,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) diff --git a/lib/commands/arm/compute/disks._js b/lib/commands/arm/compute/disks._js index a451ec324f..86ad0d43f1 100644 --- a/lib/commands/arm/compute/disks._js +++ b/lib/commands/arm/compute/disks._js @@ -25,13 +25,13 @@ Generated Command List: azure managed-disk config disk set --parameter-file $f --parse ---account-type $accountType +--managed-by $managedBy +--sku $sku --time-created $timeCreated --os-type $osType --creation-data $creationData --disk-size-g-b $diskSizeGB --encryption-settings $encryptionSettings ---owner-id $ownerId --provisioning-state $provisioningState --id $id --name $name @@ -41,13 +41,13 @@ azure managed-disk config disk set azure managed-disk config disk delete --parameter-file $f ---account-type +--managed-by +--sku --time-created --os-type --creation-data --disk-size-g-b --encryption-settings ---owner-id --provisioning-state --id --name @@ -55,6 +55,17 @@ azure managed-disk config disk delete --location --tags +azure managed-disk config sku set +--parameter-file $f +--parse +--name $name +--tier $tier + +azure managed-disk config sku delete +--parameter-file $f +--name +--tier + azure managed-disk config creation-data set --parameter-file $f --parse @@ -127,8 +138,14 @@ azure managed-disk config key-encryption-key delete --source-vault --key-url -azure managed-disk config source-vault delete +azure managed-disk config key-encryption-key-source-vault set --parameter-file $f +--parse +--id $id + +azure managed-disk config key-encryption-key-source-vault delete +--parameter-file $f +--id azure managed-disk create --resource-group $p0 @@ -183,49 +200,19 @@ azure managed-disk revoke-access azure managed-disk update-parameters disk-update set --parameter-file $f --parse ---account-type $accountType --os-type $osType ---creation-data $creationData --disk-size-g-b $diskSizeGB --encryption-settings $encryptionSettings --tags $tags +--sku $sku azure managed-disk update-parameters disk-update delete --parameter-file $f ---account-type --os-type ---creation-data --disk-size-g-b --encryption-settings --tags - -azure managed-disk update-parameters creation-data set ---parameter-file $f ---parse ---create-option $createOption ---storage-account-id $storageAccountId ---image-reference $imageReference ---source-uri $sourceUri ---source-resource-id $sourceResourceId - -azure managed-disk update-parameters creation-data delete ---parameter-file $f ---create-option ---storage-account-id ---image-reference ---source-uri ---source-resource-id - -azure managed-disk update-parameters image-reference set ---parameter-file $f ---parse ---id $id ---lun $lun - -azure managed-disk update-parameters image-reference delete ---parameter-file $f ---id ---lun +--sku azure managed-disk update-parameters encryption-settings set --parameter-file $f @@ -271,8 +258,25 @@ azure managed-disk update-parameters key-encryption-key delete --source-vault --key-url -azure managed-disk update-parameters source-vault delete +azure managed-disk update-parameters key-encryption-key-source-vault set +--parameter-file $f +--parse +--id $id + +azure managed-disk update-parameters key-encryption-key-source-vault delete +--parameter-file $f +--id + +azure managed-disk update-parameters sku set +--parameter-file $f +--parse +--name $name +--tier $tier + +azure managed-disk update-parameters sku delete --parameter-file $f +--name +--tier azure managed-disk update --resource-group $p0 @@ -289,13 +293,15 @@ azure managed-disk update-parameters patch */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } @@ -346,7 +352,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* Disks CreateOrUpdate @@ -355,7 +364,11 @@ function display(cli, o) { --disk ============================================= { - "accountType":null, + "managedBy":"", + "sku":{ + "name":null, + "tier":"" + }, "timeCreated":null, "osType":null, "creationData":{ @@ -384,7 +397,6 @@ function display(cli, o) { "keyUrl":"" } }, - "ownerId":"", "provisioningState":"", "id":null, "name":null, @@ -440,12 +452,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"accountType\":null,\"timeCreated\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"ownerId\":\"\",\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"managedBy\":\"\",\"sku\":{\"name\":null,\"tier\":\"\"},\"timeCreated\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'disksCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"accountType\":null,\r\n\"timeCreated\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"ownerId\":\"\",\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"managedBy\":\"\",\r\n\"sku\":{\r\n\"name\":null,\r\n\"tier\":\"\"\r\n},\r\n\"timeCreated\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -497,23 +509,23 @@ function display(cli, o) { }); //config set disk - var catparametersCreateOrUpdateDisksDisk0 = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksDisk0 = catparametersCreateOrUpdateDisksDisk0.category('config') + var catparametersCreateOrUpdateDisksDisk01 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksDisk01 = catparametersCreateOrUpdateDisksDisk01.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksDisk0 = parametersCreateOrUpdateDisksDisk0.category('disk') + var setparametersCreateOrUpdateDisksDisk01 = parametersCreateOrUpdateDisksDisk01.category('disk') .description($('Commands to configure disk of managed-disk in config file.')); - setparametersCreateOrUpdateDisksDisk0.command('set') - .description($('Set disk in config string or files, e.g. \r\n{\r\n "accountType":null,\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "ownerId":"",\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateDisksDisk01.command('set') + .description($('Set disk in config string or files, e.g. \r\n{\r\n "managedBy":"",\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n },\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--account-type ', $('Set the account-type value.')) + .option('--managed-by ', $('Set the managed-by value.')) + .option('--sku ', $('Set the sku value.')) .option('--time-created ', $('Set the time-created value.')) .option('--os-type ', $('Set the os-type value.')) .option('--creation-data ', $('Set the creation-data value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) .option('--encryption-settings ', $('Set the encryption-settings value.')) - .option('--owner-id ', $('Set the owner-id value.')) .option('--provisioning-state ', $('Set the provisioning-state value.')) .option('--id ', $('Set the id value.')) .option('--name ', $('Set the name value.')) @@ -539,16 +551,27 @@ function display(cli, o) { if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'accountType'; - if (options.accountType) { + var paramPath = options.path + '/' + 'managedBy'; + if (options.managedBy) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.accountType); + cli.output.verbose('Value : ' + options.managedBy); cli.output.verbose('================================================'); - if (options.parse && options.accountType) { - options.accountType = JSON.parse(options.accountType); + if (options.parse && options.managedBy) { + options.managedBy = JSON.parse(options.managedBy); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.accountType}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.managedBy}]); + } + paramPath = options.path + '/' + 'sku'; + if (options.sku) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.sku); + cli.output.verbose('================================================'); + if (options.parse && options.sku) { + options.sku = JSON.parse(options.sku); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sku}]); } paramPath = options.path + '/' + 'timeCreated'; if (options.timeCreated) { @@ -605,17 +628,6 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.encryptionSettings}]); } - paramPath = options.path + '/' + 'ownerId'; - if (options.ownerId) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.ownerId); - cli.output.verbose('================================================'); - if (options.parse && options.ownerId) { - options.ownerId = JSON.parse(options.ownerId); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.ownerId}]); - } paramPath = options.path + '/' + 'provisioningState'; if (options.provisioningState) { cli.output.verbose('================================================'); @@ -694,22 +706,22 @@ function display(cli, o) { }); //config delete disk - var catparametersCreateOrUpdateDisksDisk1 = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksDisk1 = catparametersCreateOrUpdateDisksDisk1.category('config') + var catparametersCreateOrUpdateDisksDisk11 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksDisk11 = catparametersCreateOrUpdateDisksDisk11.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksDisk1 = parametersCreateOrUpdateDisksDisk1.category('disk') + var deleteparametersCreateOrUpdateDisksDisk11 = parametersCreateOrUpdateDisksDisk11.category('disk') .description($('Commands to configure disk of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksDisk1.command('delete') - .description($('Remove disk in config string or files, e.g. \r\n{\r\n "accountType":null,\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "ownerId":"",\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateDisksDisk11.command('delete') + .description($('Remove disk in config string or files, e.g. \r\n{\r\n "managedBy":"",\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n },\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--account-type', $('Remove the account-type value.')) + .option('--managed-by', $('Remove the managed-by value.')) + .option('--sku', $('Remove the sku value.')) .option('--time-created', $('Remove the time-created value.')) .option('--os-type', $('Remove the os-type value.')) .option('--creation-data', $('Remove the creation-data value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) .option('--encryption-settings', $('Remove the encryption-settings value.')) - .option('--owner-id', $('Remove the owner-id value.')) .option('--provisioning-state', $('Remove the provisioning-state value.')) .option('--id', $('Remove the id value.')) .option('--name', $('Remove the name value.')) @@ -731,11 +743,15 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.accountType || options.timeCreated || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.ownerId || options.provisioningState || options.id || options.name || options.type || options.location || options.tags; + var anySubItem = false || options.managedBy || options.sku || options.timeCreated || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.provisioningState || options.id || options.name || options.type || options.location || options.tags; if (anySubItem) { var subItemPath = null; - if (options.accountType) { - subItemPath = options.path + '/accountType'; + if (options.managedBy) { + subItemPath = options.path + '/managedBy'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.sku) { + subItemPath = options.path + '/sku'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } if (options.timeCreated) { @@ -758,10 +774,6 @@ function display(cli, o) { subItemPath = options.path + '/encryptionSettings'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.ownerId) { - subItemPath = options.path + '/ownerId'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.provisioningState) { subItemPath = options.path + '/provisioningState'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -801,13 +813,131 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); + //config set sku + var catparametersCreateOrUpdateDisksSku0S1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSku0S1 = catparametersCreateOrUpdateDisksSku0S1.category('config') + .description($('Commands to manage configuration of disks in the parameter file.')); + var setparametersCreateOrUpdateDisksSku0S1 = parametersCreateOrUpdateDisksSku0S1.category('sku') + .description($('Commands to configure sku of managed-disk in config file.')); + setparametersCreateOrUpdateDisksSku0S1.command('set') + .description($('Set sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--name ', $('Set the name value.')) + .option('--tier ', $('Set the tier value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/sku'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'name'; + if (options.name) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.name); + cli.output.verbose('================================================'); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); + } + paramPath = options.path + '/' + 'tier'; + if (options.tier) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.tier); + cli.output.verbose('================================================'); + if (options.parse && options.tier) { + options.tier = JSON.parse(options.tier); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tier}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete sku + var catparametersCreateOrUpdateDisksSku1S1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSku1S1 = catparametersCreateOrUpdateDisksSku1S1.category('config') + .description($('Commands to manage configuration of disks in the parameter file.')); + var deleteparametersCreateOrUpdateDisksSku1S1 = parametersCreateOrUpdateDisksSku1S1.category('sku') + .description($('Commands to configure sku of managed-disk in config file.')); + deleteparametersCreateOrUpdateDisksSku1S1.command('delete') + .description($('Remove sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--name', $('Remove the name value.')) + .option('--tier', $('Remove the tier value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/sku'; + var anySubItem = false || options.name || options.tier; + if (anySubItem) { + var subItemPath = null; + if (options.name) { + subItemPath = options.path + '/name'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.tier) { + subItemPath = options.path + '/tier'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); //config set creation-data - var catparametersCreateOrUpdateDisksCreationData0CD = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksCreationData0CD = catparametersCreateOrUpdateDisksCreationData0CD.category('config') + var catparametersCreateOrUpdateDisksCreationData0CD1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksCreationData0CD1 = catparametersCreateOrUpdateDisksCreationData0CD1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksCreationData0CD = parametersCreateOrUpdateDisksCreationData0CD.category('creation-data') + var setparametersCreateOrUpdateDisksCreationData0CD1 = parametersCreateOrUpdateDisksCreationData0CD1.category('creation-data') .description($('Commands to configure creation-data of managed-disk in config file.')); - setparametersCreateOrUpdateDisksCreationData0CD.command('set') + setparametersCreateOrUpdateDisksCreationData0CD1.command('set') .description($('Set creation-data in config string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -903,12 +1033,12 @@ function display(cli, o) { }); //config delete creation-data - var catparametersCreateOrUpdateDisksCreationData1CD = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksCreationData1CD = catparametersCreateOrUpdateDisksCreationData1CD.category('config') + var catparametersCreateOrUpdateDisksCreationData1CD1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksCreationData1CD1 = catparametersCreateOrUpdateDisksCreationData1CD1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksCreationData1CD = parametersCreateOrUpdateDisksCreationData1CD.category('creation-data') + var deleteparametersCreateOrUpdateDisksCreationData1CD1 = parametersCreateOrUpdateDisksCreationData1CD1.category('creation-data') .description($('Commands to configure creation-data of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksCreationData1CD.command('delete') + deleteparametersCreateOrUpdateDisksCreationData1CD1.command('delete') .description($('Remove creation-data in config string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -971,12 +1101,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set image-reference - var catparametersCreateOrUpdateDisksImageReference0CDiR = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksImageReference0CDiR = catparametersCreateOrUpdateDisksImageReference0CDiR.category('config') + var catparametersCreateOrUpdateDisksImageReference0CDiR1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksImageReference0CDiR1 = catparametersCreateOrUpdateDisksImageReference0CDiR1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksImageReference0CDiR = parametersCreateOrUpdateDisksImageReference0CDiR.category('image-reference') + var setparametersCreateOrUpdateDisksImageReference0CDiR1 = parametersCreateOrUpdateDisksImageReference0CDiR1.category('image-reference') .description($('Commands to configure image-reference of managed-disk in config file.')); - setparametersCreateOrUpdateDisksImageReference0CDiR.command('set') + setparametersCreateOrUpdateDisksImageReference0CDiR1.command('set') .description($('Set image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1036,12 +1166,12 @@ function display(cli, o) { }); //config delete image-reference - var catparametersCreateOrUpdateDisksImageReference1CDiR = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksImageReference1CDiR = catparametersCreateOrUpdateDisksImageReference1CDiR.category('config') + var catparametersCreateOrUpdateDisksImageReference1CDiR1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksImageReference1CDiR1 = catparametersCreateOrUpdateDisksImageReference1CDiR1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksImageReference1CDiR = parametersCreateOrUpdateDisksImageReference1CDiR.category('image-reference') + var deleteparametersCreateOrUpdateDisksImageReference1CDiR1 = parametersCreateOrUpdateDisksImageReference1CDiR1.category('image-reference') .description($('Commands to configure image-reference of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksImageReference1CDiR.command('delete') + deleteparametersCreateOrUpdateDisksImageReference1CDiR1.command('delete') .description($('Remove image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1089,12 +1219,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set encryption-settings - var catparametersCreateOrUpdateDisksEncryptionSettings0ES = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksEncryptionSettings0ES = catparametersCreateOrUpdateDisksEncryptionSettings0ES.category('config') + var catparametersCreateOrUpdateDisksEncryptionSettings0ES1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksEncryptionSettings0ES1 = catparametersCreateOrUpdateDisksEncryptionSettings0ES1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksEncryptionSettings0ES = parametersCreateOrUpdateDisksEncryptionSettings0ES.category('encryption-settings') + var setparametersCreateOrUpdateDisksEncryptionSettings0ES1 = parametersCreateOrUpdateDisksEncryptionSettings0ES1.category('encryption-settings') .description($('Commands to configure encryption-settings of managed-disk in config file.')); - setparametersCreateOrUpdateDisksEncryptionSettings0ES.command('set') + setparametersCreateOrUpdateDisksEncryptionSettings0ES1.command('set') .description($('Set encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1167,12 +1297,12 @@ function display(cli, o) { }); //config delete encryption-settings - var catparametersCreateOrUpdateDisksEncryptionSettings1ES = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksEncryptionSettings1ES = catparametersCreateOrUpdateDisksEncryptionSettings1ES.category('config') + var catparametersCreateOrUpdateDisksEncryptionSettings1ES1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksEncryptionSettings1ES1 = catparametersCreateOrUpdateDisksEncryptionSettings1ES1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksEncryptionSettings1ES = parametersCreateOrUpdateDisksEncryptionSettings1ES.category('encryption-settings') + var deleteparametersCreateOrUpdateDisksEncryptionSettings1ES1 = parametersCreateOrUpdateDisksEncryptionSettings1ES1.category('encryption-settings') .description($('Commands to configure encryption-settings of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksEncryptionSettings1ES.command('delete') + deleteparametersCreateOrUpdateDisksEncryptionSettings1ES1.command('delete') .description($('Remove encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1225,12 +1355,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set disk-encryption-key - var catparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK = catparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK.category('config') + var catparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1 = catparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK = parametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK.category('disk-encryption-key') + var setparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1 = parametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of managed-disk in config file.')); - setparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK.command('set') + setparametersCreateOrUpdateDisksDiskEncryptionKey0ESdEK1.command('set') .description($('Set disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1290,12 +1420,12 @@ function display(cli, o) { }); //config delete disk-encryption-key - var catparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK = catparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK.category('config') + var catparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1 = catparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK = parametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK.category('disk-encryption-key') + var deleteparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1 = parametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK.command('delete') + deleteparametersCreateOrUpdateDisksDiskEncryptionKey1ESdEK1.command('delete') .description($('Remove disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1343,12 +1473,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set source-vault - var catparametersCreateOrUpdateDisksSourceVault0ESdEKsV = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksSourceVault0ESdEKsV = catparametersCreateOrUpdateDisksSourceVault0ESdEKsV.category('config') + var catparametersCreateOrUpdateDisksSourceVault0ESdEKsV1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSourceVault0ESdEKsV1 = catparametersCreateOrUpdateDisksSourceVault0ESdEKsV1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksSourceVault0ESdEKsV = parametersCreateOrUpdateDisksSourceVault0ESdEKsV.category('source-vault') + var setparametersCreateOrUpdateDisksSourceVault0ESdEKsV1 = parametersCreateOrUpdateDisksSourceVault0ESdEKsV1.category('source-vault') .description($('Commands to configure source-vault of managed-disk in config file.')); - setparametersCreateOrUpdateDisksSourceVault0ESdEKsV.command('set') + setparametersCreateOrUpdateDisksSourceVault0ESdEKsV1.command('set') .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1396,12 +1526,12 @@ function display(cli, o) { }); //config delete source-vault - var catparametersCreateOrUpdateDisksSourceVault1ESdEKsV = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksSourceVault1ESdEKsV = catparametersCreateOrUpdateDisksSourceVault1ESdEKsV.category('config') + var catparametersCreateOrUpdateDisksSourceVault1ESdEKsV1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSourceVault1ESdEKsV1 = catparametersCreateOrUpdateDisksSourceVault1ESdEKsV1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksSourceVault1ESdEKsV = parametersCreateOrUpdateDisksSourceVault1ESdEKsV.category('source-vault') + var deleteparametersCreateOrUpdateDisksSourceVault1ESdEKsV1 = parametersCreateOrUpdateDisksSourceVault1ESdEKsV1.category('source-vault') .description($('Commands to configure source-vault of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksSourceVault1ESdEKsV.command('delete') + deleteparametersCreateOrUpdateDisksSourceVault1ESdEKsV1.command('delete') .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1444,12 +1574,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set key-encryption-key - var catparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK = catparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK.category('config') + var catparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1 = catparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK = parametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK.category('key-encryption-key') + var setparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1 = parametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of managed-disk in config file.')); - setparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK.command('set') + setparametersCreateOrUpdateDisksKeyEncryptionKey0ESkEK1.command('set') .description($('Set key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1509,12 +1639,12 @@ function display(cli, o) { }); //config delete key-encryption-key - var catparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK = catparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK.category('config') + var catparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1 = catparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK = parametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK.category('key-encryption-key') + var deleteparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1 = parametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK.command('delete') + deleteparametersCreateOrUpdateDisksKeyEncryptionKey1ESkEK1.command('delete') .description($('Remove key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1561,16 +1691,70 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete source-vault - var catparametersCreateOrUpdateDisksSourceVault1ESkEKsV1 = cli.category('managed-disk'); - var parametersCreateOrUpdateDisksSourceVault1ESkEKsV1 = catparametersCreateOrUpdateDisksSourceVault1ESkEKsV1.category('config') + //config set key-encryption-key-source-vault + var catparametersCreateOrUpdateDisksSourceVault0ESkEKsV2 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSourceVault0ESkEKsV2 = catparametersCreateOrUpdateDisksSourceVault0ESkEKsV2.category('config') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersCreateOrUpdateDisksSourceVault1ESkEKsV1 = parametersCreateOrUpdateDisksSourceVault1ESkEKsV1.category('source-vault') - .description($('Commands to configure source-vault of managed-disk in config file.')); - deleteparametersCreateOrUpdateDisksSourceVault1ESkEKsV1.command('delete') - .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateDisksSourceVault0ESkEKsV2 = parametersCreateOrUpdateDisksSourceVault0ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-disk in config file.')); + setparametersCreateOrUpdateDisksSourceVault0ESkEKsV2.command('set') + .description($('Set key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'id'; + if (options.id) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.id); + cli.output.verbose('================================================'); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete key-encryption-key-source-vault + var catparametersCreateOrUpdateDisksSourceVault1ESkEKsV2 = cli.category('managed-disk'); + var parametersCreateOrUpdateDisksSourceVault1ESkEKsV2 = catparametersCreateOrUpdateDisksSourceVault1ESkEKsV2.category('config') + .description($('Commands to manage configuration of disks in the parameter file.')); + var deleteparametersCreateOrUpdateDisksSourceVault1ESkEKsV2 = parametersCreateOrUpdateDisksSourceVault1ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-disk in config file.')); + deleteparametersCreateOrUpdateDisksSourceVault1ESkEKsV2.command('delete') + .description($('Remove key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) + .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1586,6 +1770,17 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; + var anySubItem = false || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -1777,12 +1972,12 @@ function display(cli, o) { }); //grant-access-parameters set grant-access-data - var catparametersGrantAccessDisksGrantAccessData0 = cli.category('managed-disk'); - var parametersGrantAccessDisksGrantAccessData0 = catparametersGrantAccessDisksGrantAccessData0.category('grant-access-parameters') + var catparametersGrantAccessDisksGrantAccessData01 = cli.category('managed-disk'); + var parametersGrantAccessDisksGrantAccessData01 = catparametersGrantAccessDisksGrantAccessData01.category('grant-access-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersGrantAccessDisksGrantAccessData0 = parametersGrantAccessDisksGrantAccessData0.category('grant-access-data') + var setparametersGrantAccessDisksGrantAccessData01 = parametersGrantAccessDisksGrantAccessData01.category('grant-access-data') .description($('Commands to configure grant-access-data of managed-disk in grant-access-parameters file.')); - setparametersGrantAccessDisksGrantAccessData0.command('set') + setparametersGrantAccessDisksGrantAccessData01.command('set') .description($('Set grant-access-data in grant-access-parameters string or files, e.g. \r\n{\r\n "access":"",\r\n "durationInSeconds":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1843,12 +2038,12 @@ function display(cli, o) { }); //grant-access-parameters delete grant-access-data - var catparametersGrantAccessDisksGrantAccessData1 = cli.category('managed-disk'); - var parametersGrantAccessDisksGrantAccessData1 = catparametersGrantAccessDisksGrantAccessData1.category('grant-access-parameters') + var catparametersGrantAccessDisksGrantAccessData11 = cli.category('managed-disk'); + var parametersGrantAccessDisksGrantAccessData11 = catparametersGrantAccessDisksGrantAccessData11.category('grant-access-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersGrantAccessDisksGrantAccessData1 = parametersGrantAccessDisksGrantAccessData1.category('grant-access-data') + var deleteparametersGrantAccessDisksGrantAccessData11 = parametersGrantAccessDisksGrantAccessData11.category('grant-access-data') .description($('Commands to configure grant-access-data of managed-disk in grant-access-parameters file.')); - deleteparametersGrantAccessDisksGrantAccessData1.command('delete') + deleteparametersGrantAccessDisksGrantAccessData11.command('delete') .description($('Remove grant-access-data in grant-access-parameters string or files, e.g. \r\n{\r\n "access":"",\r\n "durationInSeconds":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1978,18 +2173,7 @@ function display(cli, o) { --disk ============================================= { - "accountType":null, "osType":null, - "creationData":{ - "createOption":"", - "storageAccountId":"", - "imageReference":{ - "id":"", - "lun":null - }, - "sourceUri":"", - "sourceResourceId":"" - }, "diskSizeGB":null, "encryptionSettings":{ "enabled":null, @@ -2007,6 +2191,10 @@ function display(cli, o) { } }, "tags":{ + }, + "sku":{ + "name":null, + "tier":"" } } */ @@ -2056,12 +2244,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"accountType\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"tags\":{}}', _); + cli.output.verbose('{\"osType\":null,\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"tags\":{},\"sku\":{\"name\":null,\"tier\":\"\"}}', _); var filePath = 'disksUpdate_update.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"accountType\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"osType\":null,\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"tags\":{\r\n},\r\n\"sku\":{\r\n\"name\":null,\r\n\"tier\":\"\"\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -2113,22 +2301,21 @@ function display(cli, o) { }); //update-parameters set disk-update - var catparametersUpdateDisksDiskUpdate0 = cli.category('managed-disk'); - var parametersUpdateDisksDiskUpdate0 = catparametersUpdateDisksDiskUpdate0.category('update-parameters') + var catparametersUpdateDisksDiskUpdate01 = cli.category('managed-disk'); + var parametersUpdateDisksDiskUpdate01 = catparametersUpdateDisksDiskUpdate01.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksDiskUpdate0 = parametersUpdateDisksDiskUpdate0.category('disk-update') + var setparametersUpdateDisksDiskUpdate01 = parametersUpdateDisksDiskUpdate01.category('disk-update') .description($('Commands to configure disk-update of managed-disk in update-parameters file.')); - setparametersUpdateDisksDiskUpdate0.command('set') - .description($('Set disk-update in update-parameters string or files, e.g. \r\n{\r\n "accountType":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersUpdateDisksDiskUpdate01.command('set') + .description($('Set disk-update in update-parameters string or files, e.g. \r\n{\r\n "osType":null,\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n },\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--account-type ', $('Set the account-type value.')) .option('--os-type ', $('Set the os-type value.')) - .option('--creation-data ', $('Set the creation-data value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) .option('--encryption-settings ', $('Set the encryption-settings value.')) .option('--tags ', $('Set the tags value.')) + .option('--sku ', $('Set the sku value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2148,18 +2335,7 @@ function display(cli, o) { if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'accountType'; - if (options.accountType) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.accountType); - cli.output.verbose('================================================'); - if (options.parse && options.accountType) { - options.accountType = JSON.parse(options.accountType); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.accountType}]); - } - paramPath = options.path + '/' + 'osType'; + var paramPath = options.path + '/' + 'osType'; if (options.osType) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); @@ -2170,17 +2346,6 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.osType}]); } - paramPath = options.path + '/' + 'creationData'; - if (options.creationData) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.creationData); - cli.output.verbose('================================================'); - if (options.parse && options.creationData) { - options.creationData = JSON.parse(options.creationData); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.creationData}]); - } paramPath = options.path + '/' + 'diskSizeGB'; if (options.diskSizeGB) { cli.output.verbose('================================================'); @@ -2214,6 +2379,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tags}]); } + paramPath = options.path + '/' + 'sku'; + if (options.sku) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.sku); + cli.output.verbose('================================================'); + if (options.parse && options.sku) { + options.sku = JSON.parse(options.sku); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sku}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -2226,21 +2402,20 @@ function display(cli, o) { }); //update-parameters delete disk-update - var catparametersUpdateDisksDiskUpdate1 = cli.category('managed-disk'); - var parametersUpdateDisksDiskUpdate1 = catparametersUpdateDisksDiskUpdate1.category('update-parameters') + var catparametersUpdateDisksDiskUpdate11 = cli.category('managed-disk'); + var parametersUpdateDisksDiskUpdate11 = catparametersUpdateDisksDiskUpdate11.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksDiskUpdate1 = parametersUpdateDisksDiskUpdate1.category('disk-update') + var deleteparametersUpdateDisksDiskUpdate11 = parametersUpdateDisksDiskUpdate11.category('disk-update') .description($('Commands to configure disk-update of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksDiskUpdate1.command('delete') - .description($('Remove disk-update in update-parameters string or files, e.g. \r\n{\r\n "accountType":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersUpdateDisksDiskUpdate11.command('delete') + .description($('Remove disk-update in update-parameters string or files, e.g. \r\n{\r\n "osType":null,\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n },\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--account-type', $('Remove the account-type value.')) .option('--os-type', $('Remove the os-type value.')) - .option('--creation-data', $('Remove the creation-data value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) .option('--encryption-settings', $('Remove the encryption-settings value.')) .option('--tags', $('Remove the tags value.')) + .option('--sku', $('Remove the sku value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2256,21 +2431,13 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.accountType || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.tags; + var anySubItem = false || options.osType || options.diskSizeGB || options.encryptionSettings || options.tags || options.sku; if (anySubItem) { var subItemPath = null; - if (options.accountType) { - subItemPath = options.path + '/accountType'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.osType) { subItemPath = options.path + '/osType'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.creationData) { - subItemPath = options.path + '/creationData'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.diskSizeGB) { subItemPath = options.path + '/diskSizeGB'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -2283,6 +2450,10 @@ function display(cli, o) { subItemPath = options.path + '/tags'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.sku) { + subItemPath = options.path + '/sku'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } } else { jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); @@ -2298,22 +2469,20 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set creation-data - var catparametersUpdateDisksCreationData0CD = cli.category('managed-disk'); - var parametersUpdateDisksCreationData0CD = catparametersUpdateDisksCreationData0CD.category('update-parameters') + //update-parameters set encryption-settings + var catparametersUpdateDisksEncryptionSettings0ES1 = cli.category('managed-disk'); + var parametersUpdateDisksEncryptionSettings0ES1 = catparametersUpdateDisksEncryptionSettings0ES1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksCreationData0CD = parametersUpdateDisksCreationData0CD.category('creation-data') - .description($('Commands to configure creation-data of managed-disk in update-parameters file.')); - setparametersUpdateDisksCreationData0CD.command('set') - .description($('Set creation-data in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksEncryptionSettings0ES1 = parametersUpdateDisksEncryptionSettings0ES1.category('encryption-settings') + .description($('Commands to configure encryption-settings of managed-disk in update-parameters file.')); + setparametersUpdateDisksEncryptionSettings0ES1.command('set') + .description($('Set encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--create-option ', $('Set the create-option value.')) - .option('--storage-account-id ', $('Set the storage-account-id value.')) - .option('--image-reference ', $('Set the image-reference value.')) - .option('--source-uri ', $('Set the source-uri value.')) - .option('--source-resource-id ', $('Set the source-resource-id value.')) + .option('--enabled ', $('Set the enabled value.')) + .option('--disk-encryption-key ', $('Set the disk-encryption-key value.')) + .option('--key-encryption-key ', $('Set the key-encryption-key value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2328,65 +2497,44 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/creationData'; + options.path = '/encryptionSettings'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'createOption'; - if (options.createOption) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.createOption); - cli.output.verbose('================================================'); - if (options.parse && options.createOption) { - options.createOption = JSON.parse(options.createOption); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.createOption}]); - } - paramPath = options.path + '/' + 'storageAccountId'; - if (options.storageAccountId) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.storageAccountId); - cli.output.verbose('================================================'); - if (options.parse && options.storageAccountId) { - options.storageAccountId = JSON.parse(options.storageAccountId); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountId}]); - } - paramPath = options.path + '/' + 'imageReference'; - if (options.imageReference) { + var paramPath = options.path + '/' + 'enabled'; + if (options.enabled) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.imageReference); + cli.output.verbose('Value : ' + options.enabled); cli.output.verbose('================================================'); - if (options.parse && options.imageReference) { - options.imageReference = JSON.parse(options.imageReference); + if (options.parse && options.enabled) { + options.enabled = JSON.parse(options.enabled); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.imageReference}]); + options.enabled = JSON.parse(options.enabled); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.enabled}]); } - paramPath = options.path + '/' + 'sourceUri'; - if (options.sourceUri) { + paramPath = options.path + '/' + 'diskEncryptionKey'; + if (options.diskEncryptionKey) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceUri); + cli.output.verbose('Value : ' + options.diskEncryptionKey); cli.output.verbose('================================================'); - if (options.parse && options.sourceUri) { - options.sourceUri = JSON.parse(options.sourceUri); + if (options.parse && options.diskEncryptionKey) { + options.diskEncryptionKey = JSON.parse(options.diskEncryptionKey); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceUri}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskEncryptionKey}]); } - paramPath = options.path + '/' + 'sourceResourceId'; - if (options.sourceResourceId) { + paramPath = options.path + '/' + 'keyEncryptionKey'; + if (options.keyEncryptionKey) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceResourceId); + cli.output.verbose('Value : ' + options.keyEncryptionKey); cli.output.verbose('================================================'); - if (options.parse && options.sourceResourceId) { - options.sourceResourceId = JSON.parse(options.sourceResourceId); + if (options.parse && options.keyEncryptionKey) { + options.keyEncryptionKey = JSON.parse(options.keyEncryptionKey); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceResourceId}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyEncryptionKey}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2399,21 +2547,19 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete creation-data - var catparametersUpdateDisksCreationData1CD = cli.category('managed-disk'); - var parametersUpdateDisksCreationData1CD = catparametersUpdateDisksCreationData1CD.category('update-parameters') + //update-parameters delete encryption-settings + var catparametersUpdateDisksEncryptionSettings1ES1 = cli.category('managed-disk'); + var parametersUpdateDisksEncryptionSettings1ES1 = catparametersUpdateDisksEncryptionSettings1ES1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksCreationData1CD = parametersUpdateDisksCreationData1CD.category('creation-data') - .description($('Commands to configure creation-data of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksCreationData1CD.command('delete') - .description($('Remove creation-data in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksEncryptionSettings1ES1 = parametersUpdateDisksEncryptionSettings1ES1.category('encryption-settings') + .description($('Commands to configure encryption-settings of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksEncryptionSettings1ES1.command('delete') + .description($('Remove encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--create-option', $('Remove the create-option value.')) - .option('--storage-account-id', $('Remove the storage-account-id value.')) - .option('--image-reference', $('Remove the image-reference value.')) - .option('--source-uri', $('Remove the source-uri value.')) - .option('--source-resource-id', $('Remove the source-resource-id value.')) + .option('--enabled', $('Remove the enabled value.')) + .option('--disk-encryption-key', $('Remove the disk-encryption-key value.')) + .option('--key-encryption-key', $('Remove the key-encryption-key value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2428,28 +2574,20 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/creationData'; - var anySubItem = false || options.createOption || options.storageAccountId || options.imageReference || options.sourceUri || options.sourceResourceId; + options.path = '/encryptionSettings'; + var anySubItem = false || options.enabled || options.diskEncryptionKey || options.keyEncryptionKey; if (anySubItem) { var subItemPath = null; - if (options.createOption) { - subItemPath = options.path + '/createOption'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.storageAccountId) { - subItemPath = options.path + '/storageAccountId'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.imageReference) { - subItemPath = options.path + '/imageReference'; + if (options.enabled) { + subItemPath = options.path + '/enabled'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.sourceUri) { - subItemPath = options.path + '/sourceUri'; + if (options.diskEncryptionKey) { + subItemPath = options.path + '/diskEncryptionKey'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.sourceResourceId) { - subItemPath = options.path + '/sourceResourceId'; + if (options.keyEncryptionKey) { + subItemPath = options.path + '/keyEncryptionKey'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2467,19 +2605,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set image-reference - var catparametersUpdateDisksImageReference0CDiR = cli.category('managed-disk'); - var parametersUpdateDisksImageReference0CDiR = catparametersUpdateDisksImageReference0CDiR.category('update-parameters') + //update-parameters set disk-encryption-key + var catparametersUpdateDisksDiskEncryptionKey0ESdEK1 = cli.category('managed-disk'); + var parametersUpdateDisksDiskEncryptionKey0ESdEK1 = catparametersUpdateDisksDiskEncryptionKey0ESdEK1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksImageReference0CDiR = parametersUpdateDisksImageReference0CDiR.category('image-reference') - .description($('Commands to configure image-reference of managed-disk in update-parameters file.')); - setparametersUpdateDisksImageReference0CDiR.command('set') - .description($('Set image-reference in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksDiskEncryptionKey0ESdEK1 = parametersUpdateDisksDiskEncryptionKey0ESdEK1.category('disk-encryption-key') + .description($('Commands to configure disk-encryption-key of managed-disk in update-parameters file.')); + setparametersUpdateDisksDiskEncryptionKey0ESdEK1.command('set') + .description($('Set disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--id ', $('Set the id value.')) - .option('--lun ', $('Set the lun value.')) + .option('--source-vault ', $('Set the source-vault value.')) + .option('--secret-url ', $('Set the secret-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2494,32 +2632,32 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/creationData/imageReference'; + options.path = '/encryptionSettings/diskEncryptionKey'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'id'; - if (options.id) { + var paramPath = options.path + '/' + 'sourceVault'; + if (options.sourceVault) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.id); + cli.output.verbose('Value : ' + options.sourceVault); cli.output.verbose('================================================'); - if (options.parse && options.id) { - options.id = JSON.parse(options.id); + if (options.parse && options.sourceVault) { + options.sourceVault = JSON.parse(options.sourceVault); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); } - paramPath = options.path + '/' + 'lun'; - if (options.lun) { + paramPath = options.path + '/' + 'secretUrl'; + if (options.secretUrl) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.lun); + cli.output.verbose('Value : ' + options.secretUrl); cli.output.verbose('================================================'); - if (options.parse && options.lun) { - options.lun = JSON.parse(options.lun); + if (options.parse && options.secretUrl) { + options.secretUrl = JSON.parse(options.secretUrl); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.lun}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.secretUrl}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2532,18 +2670,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete image-reference - var catparametersUpdateDisksImageReference1CDiR = cli.category('managed-disk'); - var parametersUpdateDisksImageReference1CDiR = catparametersUpdateDisksImageReference1CDiR.category('update-parameters') + //update-parameters delete disk-encryption-key + var catparametersUpdateDisksDiskEncryptionKey1ESdEK1 = cli.category('managed-disk'); + var parametersUpdateDisksDiskEncryptionKey1ESdEK1 = catparametersUpdateDisksDiskEncryptionKey1ESdEK1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksImageReference1CDiR = parametersUpdateDisksImageReference1CDiR.category('image-reference') - .description($('Commands to configure image-reference of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksImageReference1CDiR.command('delete') - .description($('Remove image-reference in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksDiskEncryptionKey1ESdEK1 = parametersUpdateDisksDiskEncryptionKey1ESdEK1.category('disk-encryption-key') + .description($('Commands to configure disk-encryption-key of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksDiskEncryptionKey1ESdEK1.command('delete') + .description($('Remove disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--id', $('Remove the id value.')) - .option('--lun', $('Remove the lun value.')) + .option('--source-vault', $('Remove the source-vault value.')) + .option('--secret-url', $('Remove the secret-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2558,16 +2696,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/creationData/imageReference'; - var anySubItem = false || options.id || options.lun; + options.path = '/encryptionSettings/diskEncryptionKey'; + var anySubItem = false || options.sourceVault || options.secretUrl; if (anySubItem) { var subItemPath = null; - if (options.id) { - subItemPath = options.path + '/id'; + if (options.sourceVault) { + subItemPath = options.path + '/sourceVault'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.lun) { - subItemPath = options.path + '/lun'; + if (options.secretUrl) { + subItemPath = options.path + '/secretUrl'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2585,20 +2723,18 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set encryption-settings - var catparametersUpdateDisksEncryptionSettings0ES = cli.category('managed-disk'); - var parametersUpdateDisksEncryptionSettings0ES = catparametersUpdateDisksEncryptionSettings0ES.category('update-parameters') + //update-parameters set source-vault + var catparametersUpdateDisksSourceVault0ESdEKsV1 = cli.category('managed-disk'); + var parametersUpdateDisksSourceVault0ESdEKsV1 = catparametersUpdateDisksSourceVault0ESdEKsV1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksEncryptionSettings0ES = parametersUpdateDisksEncryptionSettings0ES.category('encryption-settings') - .description($('Commands to configure encryption-settings of managed-disk in update-parameters file.')); - setparametersUpdateDisksEncryptionSettings0ES.command('set') - .description($('Set encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksSourceVault0ESdEKsV1 = parametersUpdateDisksSourceVault0ESdEKsV1.category('source-vault') + .description($('Commands to configure source-vault of managed-disk in update-parameters file.')); + setparametersUpdateDisksSourceVault0ESdEKsV1.command('set') + .description($('Set source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--enabled ', $('Set the enabled value.')) - .option('--disk-encryption-key ', $('Set the disk-encryption-key value.')) - .option('--key-encryption-key ', $('Set the key-encryption-key value.')) + .option('--id ', $('Set the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2613,44 +2749,21 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings'; + options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'enabled'; - if (options.enabled) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.enabled); - cli.output.verbose('================================================'); - if (options.parse && options.enabled) { - options.enabled = JSON.parse(options.enabled); - } - options.enabled = JSON.parse(options.enabled); - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.enabled}]); - } - paramPath = options.path + '/' + 'diskEncryptionKey'; - if (options.diskEncryptionKey) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.diskEncryptionKey); - cli.output.verbose('================================================'); - if (options.parse && options.diskEncryptionKey) { - options.diskEncryptionKey = JSON.parse(options.diskEncryptionKey); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskEncryptionKey}]); - } - paramPath = options.path + '/' + 'keyEncryptionKey'; - if (options.keyEncryptionKey) { + var paramPath = options.path + '/' + 'id'; + if (options.id) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.keyEncryptionKey); + cli.output.verbose('Value : ' + options.id); cli.output.verbose('================================================'); - if (options.parse && options.keyEncryptionKey) { - options.keyEncryptionKey = JSON.parse(options.keyEncryptionKey); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyEncryptionKey}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2663,19 +2776,17 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete encryption-settings - var catparametersUpdateDisksEncryptionSettings1ES = cli.category('managed-disk'); - var parametersUpdateDisksEncryptionSettings1ES = catparametersUpdateDisksEncryptionSettings1ES.category('update-parameters') + //update-parameters delete source-vault + var catparametersUpdateDisksSourceVault1ESdEKsV1 = cli.category('managed-disk'); + var parametersUpdateDisksSourceVault1ESdEKsV1 = catparametersUpdateDisksSourceVault1ESdEKsV1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksEncryptionSettings1ES = parametersUpdateDisksEncryptionSettings1ES.category('encryption-settings') - .description($('Commands to configure encryption-settings of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksEncryptionSettings1ES.command('delete') - .description($('Remove encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksSourceVault1ESdEKsV1 = parametersUpdateDisksSourceVault1ESdEKsV1.category('source-vault') + .description($('Commands to configure source-vault of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksSourceVault1ESdEKsV1.command('delete') + .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--enabled', $('Remove the enabled value.')) - .option('--disk-encryption-key', $('Remove the disk-encryption-key value.')) - .option('--key-encryption-key', $('Remove the key-encryption-key value.')) + .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2690,20 +2801,12 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings'; - var anySubItem = false || options.enabled || options.diskEncryptionKey || options.keyEncryptionKey; + options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; - if (options.enabled) { - subItemPath = options.path + '/enabled'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.diskEncryptionKey) { - subItemPath = options.path + '/diskEncryptionKey'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.keyEncryptionKey) { - subItemPath = options.path + '/keyEncryptionKey'; + if (options.id) { + subItemPath = options.path + '/id'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2721,19 +2824,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set disk-encryption-key - var catparametersUpdateDisksDiskEncryptionKey0ESdEK = cli.category('managed-disk'); - var parametersUpdateDisksDiskEncryptionKey0ESdEK = catparametersUpdateDisksDiskEncryptionKey0ESdEK.category('update-parameters') + //update-parameters set key-encryption-key + var catparametersUpdateDisksKeyEncryptionKey0ESkEK1 = cli.category('managed-disk'); + var parametersUpdateDisksKeyEncryptionKey0ESkEK1 = catparametersUpdateDisksKeyEncryptionKey0ESkEK1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksDiskEncryptionKey0ESdEK = parametersUpdateDisksDiskEncryptionKey0ESdEK.category('disk-encryption-key') - .description($('Commands to configure disk-encryption-key of managed-disk in update-parameters file.')); - setparametersUpdateDisksDiskEncryptionKey0ESdEK.command('set') - .description($('Set disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksKeyEncryptionKey0ESkEK1 = parametersUpdateDisksKeyEncryptionKey0ESkEK1.category('key-encryption-key') + .description($('Commands to configure key-encryption-key of managed-disk in update-parameters file.')); + setparametersUpdateDisksKeyEncryptionKey0ESkEK1.command('set') + .description($('Set key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--source-vault ', $('Set the source-vault value.')) - .option('--secret-url ', $('Set the secret-url value.')) + .option('--key-url ', $('Set the key-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2748,7 +2851,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/diskEncryptionKey'; + options.path = '/encryptionSettings/keyEncryptionKey'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); @@ -2764,16 +2867,16 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); } - paramPath = options.path + '/' + 'secretUrl'; - if (options.secretUrl) { + paramPath = options.path + '/' + 'keyUrl'; + if (options.keyUrl) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.secretUrl); + cli.output.verbose('Value : ' + options.keyUrl); cli.output.verbose('================================================'); - if (options.parse && options.secretUrl) { - options.secretUrl = JSON.parse(options.secretUrl); + if (options.parse && options.keyUrl) { + options.keyUrl = JSON.parse(options.keyUrl); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.secretUrl}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyUrl}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2786,18 +2889,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete disk-encryption-key - var catparametersUpdateDisksDiskEncryptionKey1ESdEK = cli.category('managed-disk'); - var parametersUpdateDisksDiskEncryptionKey1ESdEK = catparametersUpdateDisksDiskEncryptionKey1ESdEK.category('update-parameters') + //update-parameters delete key-encryption-key + var catparametersUpdateDisksKeyEncryptionKey1ESkEK1 = cli.category('managed-disk'); + var parametersUpdateDisksKeyEncryptionKey1ESkEK1 = catparametersUpdateDisksKeyEncryptionKey1ESkEK1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksDiskEncryptionKey1ESdEK = parametersUpdateDisksDiskEncryptionKey1ESdEK.category('disk-encryption-key') - .description($('Commands to configure disk-encryption-key of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksDiskEncryptionKey1ESdEK.command('delete') - .description($('Remove disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksKeyEncryptionKey1ESkEK1 = parametersUpdateDisksKeyEncryptionKey1ESkEK1.category('key-encryption-key') + .description($('Commands to configure key-encryption-key of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksKeyEncryptionKey1ESkEK1.command('delete') + .description($('Remove key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--source-vault', $('Remove the source-vault value.')) - .option('--secret-url', $('Remove the secret-url value.')) + .option('--key-url', $('Remove the key-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2812,16 +2915,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/diskEncryptionKey'; - var anySubItem = false || options.sourceVault || options.secretUrl; + options.path = '/encryptionSettings/keyEncryptionKey'; + var anySubItem = false || options.sourceVault || options.keyUrl; if (anySubItem) { var subItemPath = null; if (options.sourceVault) { subItemPath = options.path + '/sourceVault'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.secretUrl) { - subItemPath = options.path + '/secretUrl'; + if (options.keyUrl) { + subItemPath = options.path + '/keyUrl'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2839,14 +2942,14 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set source-vault - var catparametersUpdateDisksSourceVault0ESdEKsV = cli.category('managed-disk'); - var parametersUpdateDisksSourceVault0ESdEKsV = catparametersUpdateDisksSourceVault0ESdEKsV.category('update-parameters') + //update-parameters set key-encryption-key-source-vault + var catparametersUpdateDisksSourceVault0ESkEKsV2 = cli.category('managed-disk'); + var parametersUpdateDisksSourceVault0ESkEKsV2 = catparametersUpdateDisksSourceVault0ESkEKsV2.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksSourceVault0ESdEKsV = parametersUpdateDisksSourceVault0ESdEKsV.category('source-vault') - .description($('Commands to configure source-vault of managed-disk in update-parameters file.')); - setparametersUpdateDisksSourceVault0ESdEKsV.command('set') - .description($('Set source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksSourceVault0ESkEKsV2 = parametersUpdateDisksSourceVault0ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-disk in update-parameters file.')); + setparametersUpdateDisksSourceVault0ESkEKsV2.command('set') + .description($('Set key-encryption-key-source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -2865,7 +2968,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); @@ -2892,14 +2995,14 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete source-vault - var catparametersUpdateDisksSourceVault1ESdEKsV = cli.category('managed-disk'); - var parametersUpdateDisksSourceVault1ESdEKsV = catparametersUpdateDisksSourceVault1ESdEKsV.category('update-parameters') + //update-parameters delete key-encryption-key-source-vault + var catparametersUpdateDisksSourceVault1ESkEKsV2 = cli.category('managed-disk'); + var parametersUpdateDisksSourceVault1ESkEKsV2 = catparametersUpdateDisksSourceVault1ESkEKsV2.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksSourceVault1ESdEKsV = parametersUpdateDisksSourceVault1ESdEKsV.category('source-vault') - .description($('Commands to configure source-vault of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksSourceVault1ESdEKsV.command('delete') - .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksSourceVault1ESkEKsV2 = parametersUpdateDisksSourceVault1ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksSourceVault1ESkEKsV2.command('delete') + .description($('Remove key-encryption-key-source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--id', $('Remove the id value.')) @@ -2917,7 +3020,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; @@ -2940,19 +3043,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set key-encryption-key - var catparametersUpdateDisksKeyEncryptionKey0ESkEK = cli.category('managed-disk'); - var parametersUpdateDisksKeyEncryptionKey0ESkEK = catparametersUpdateDisksKeyEncryptionKey0ESkEK.category('update-parameters') + //update-parameters set sku + var catparametersUpdateDisksSku0S1 = cli.category('managed-disk'); + var parametersUpdateDisksSku0S1 = catparametersUpdateDisksSku0S1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var setparametersUpdateDisksKeyEncryptionKey0ESkEK = parametersUpdateDisksKeyEncryptionKey0ESkEK.category('key-encryption-key') - .description($('Commands to configure key-encryption-key of managed-disk in update-parameters file.')); - setparametersUpdateDisksKeyEncryptionKey0ESkEK.command('set') - .description($('Set key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateDisksSku0S1 = parametersUpdateDisksSku0S1.category('sku') + .description($('Commands to configure sku of managed-disk in update-parameters file.')); + setparametersUpdateDisksSku0S1.command('set') + .description($('Set sku in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--source-vault ', $('Set the source-vault value.')) - .option('--key-url ', $('Set the key-url value.')) + .option('--name ', $('Set the name value.')) + .option('--tier ', $('Set the tier value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2967,32 +3070,32 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/keyEncryptionKey'; + options.path = '/sku'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'sourceVault'; - if (options.sourceVault) { + var paramPath = options.path + '/' + 'name'; + if (options.name) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceVault); + cli.output.verbose('Value : ' + options.name); cli.output.verbose('================================================'); - if (options.parse && options.sourceVault) { - options.sourceVault = JSON.parse(options.sourceVault); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); } - paramPath = options.path + '/' + 'keyUrl'; - if (options.keyUrl) { + paramPath = options.path + '/' + 'tier'; + if (options.tier) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.keyUrl); + cli.output.verbose('Value : ' + options.tier); cli.output.verbose('================================================'); - if (options.parse && options.keyUrl) { - options.keyUrl = JSON.parse(options.keyUrl); + if (options.parse && options.tier) { + options.tier = JSON.parse(options.tier); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyUrl}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tier}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3005,18 +3108,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete key-encryption-key - var catparametersUpdateDisksKeyEncryptionKey1ESkEK = cli.category('managed-disk'); - var parametersUpdateDisksKeyEncryptionKey1ESkEK = catparametersUpdateDisksKeyEncryptionKey1ESkEK.category('update-parameters') + //update-parameters delete sku + var catparametersUpdateDisksSku1S1 = cli.category('managed-disk'); + var parametersUpdateDisksSku1S1 = catparametersUpdateDisksSku1S1.category('update-parameters') .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksKeyEncryptionKey1ESkEK = parametersUpdateDisksKeyEncryptionKey1ESkEK.category('key-encryption-key') - .description($('Commands to configure key-encryption-key of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksKeyEncryptionKey1ESkEK.command('delete') - .description($('Remove key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateDisksSku1S1 = parametersUpdateDisksSku1S1.category('sku') + .description($('Commands to configure sku of managed-disk in update-parameters file.')); + deleteparametersUpdateDisksSku1S1.command('delete') + .description($('Remove sku in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--source-vault', $('Remove the source-vault value.')) - .option('--key-url', $('Remove the key-url value.')) + .option('--name', $('Remove the name value.')) + .option('--tier', $('Remove the tier value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -3031,16 +3134,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/keyEncryptionKey'; - var anySubItem = false || options.sourceVault || options.keyUrl; + options.path = '/sku'; + var anySubItem = false || options.name || options.tier; if (anySubItem) { var subItemPath = null; - if (options.sourceVault) { - subItemPath = options.path + '/sourceVault'; + if (options.name) { + subItemPath = options.path + '/name'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.keyUrl) { - subItemPath = options.path + '/keyUrl'; + if (options.tier) { + subItemPath = options.path + '/tier'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -3058,42 +3161,6 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters delete source-vault - var catparametersUpdateDisksSourceVault1ESkEKsV1 = cli.category('managed-disk'); - var parametersUpdateDisksSourceVault1ESkEKsV1 = catparametersUpdateDisksSourceVault1ESkEKsV1.category('update-parameters') - .description($('Commands to manage configuration of disks in the parameter file.')); - var deleteparametersUpdateDisksSourceVault1ESkEKsV1 = parametersUpdateDisksSourceVault1ESkEKsV1.category('source-vault') - .description($('Commands to configure source-vault of managed-disk in update-parameters file.')); - deleteparametersUpdateDisksSourceVault1ESkEKsV1.command('delete') - .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) - .usage('[options]') - .option('--parameter-file ', $('The parameter file path.')) - .execute(function(options, _) { - cli.output.verbose(JSON.stringify(options), _); - if (!options.parameterFile) { - options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); - } - - cli.output.verbose('====================================='); - cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); - cli.output.verbose('====================================='); - var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); - var parametersObj = JSON.parse(fileContent); - cli.output.verbose('JSON object:'); - cli.output.verbose(JSON.stringify(parametersObj)); - options.operation = 'remove'; - options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; - - var updatedContent = JSON.stringify(parametersObj); - cli.output.verbose('====================================='); - cli.output.verbose('JSON object (updated):'); - cli.output.verbose(JSON.stringify(parametersObj)); - cli.output.verbose('====================================='); - fs.writeFileSync(options.parameterFile, beautify(updatedContent)); - cli.output.verbose('====================================='); - cli.output.verbose('Parameter file updated at: ' + options.parameterFile); - cli.output.verbose('====================================='); - }); diff --git a/lib/commands/arm/compute/images._js b/lib/commands/arm/compute/images._js index 72156dd61f..bd0f5963e9 100644 --- a/lib/commands/arm/compute/images._js +++ b/lib/commands/arm/compute/images._js @@ -75,6 +75,7 @@ azure managed-image config os-disk set --blob-uri $blobUri --caching $caching --disk-size-g-b $diskSizeGB +--storage-account-type $storageAccountType azure managed-image config os-disk delete --parameter-file $f @@ -85,6 +86,7 @@ azure managed-image config os-disk delete --blob-uri --caching --disk-size-g-b +--storage-account-type azure managed-image config snapshot set --parameter-file $f @@ -115,6 +117,7 @@ azure managed-image config data-disks set --blob-uri $blobUri --caching $caching --disk-size-g-b $diskSizeGB +--storage-account-type $storageAccountType azure managed-image config data-disks delete --parameter-file $f @@ -125,25 +128,26 @@ azure managed-image config data-disks delete --blob-uri --caching --disk-size-g-b +--storage-account-type -azure managed-image config snapshot set +azure managed-image config data-disks-snapshot set --parameter-file $f --data-disks-index $i --parse --id $id -azure managed-image config snapshot delete +azure managed-image config data-disks-snapshot delete --parameter-file $f --data-disks-index $pdata-disks-index --id -azure managed-image config managed-disk set +azure managed-image config data-disks-managed-disk set --parameter-file $f --data-disks-index $i --parse --id $id -azure managed-image config managed-disk delete +azure managed-image config data-disks-managed-disk delete --parameter-file $f --data-disks-index $pdata-disks-index --id @@ -175,13 +179,15 @@ azure managed-image list */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } @@ -232,7 +238,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* Images CreateOrUpdate @@ -246,7 +255,7 @@ function display(cli, o) { }, "storageProfile":{ "osDisk":{ - "osType":null, + "osType":"", "osState":"", "snapshot":{ "id":"" @@ -256,7 +265,8 @@ function display(cli, o) { }, "blobUri":"", "caching":null, - "diskSizeGB":null + "diskSizeGB":null, + "storageAccountType":null }, "dataDisks":[ { @@ -269,7 +279,8 @@ function display(cli, o) { }, "blobUri":"", "caching":null, - "diskSizeGB":null + "diskSizeGB":null, + "storageAccountType":null } ] }, @@ -328,12 +339,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"sourceVirtualMachine\":{\"id\":\"\"},\"storageProfile\":{\"osDisk\":{\"osType\":null,\"osState\":\"\",\"snapshot\":{\"id\":\"\"},\"managedDisk\":{\"id\":\"\"},\"blobUri\":\"\",\"caching\":null,\"diskSizeGB\":null},\"dataDisks\":[{\"lun\":\"\",\"snapshot\":{\"id\":\"\"},\"managedDisk\":{\"id\":\"\"},\"blobUri\":\"\",\"caching\":null,\"diskSizeGB\":null}]},\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"sourceVirtualMachine\":{\"id\":\"\"},\"storageProfile\":{\"osDisk\":{\"osType\":\"\",\"osState\":\"\",\"snapshot\":{\"id\":\"\"},\"managedDisk\":{\"id\":\"\"},\"blobUri\":\"\",\"caching\":null,\"diskSizeGB\":null,\"storageAccountType\":null},\"dataDisks\":[{\"lun\":\"\",\"snapshot\":{\"id\":\"\"},\"managedDisk\":{\"id\":\"\"},\"blobUri\":\"\",\"caching\":null,\"diskSizeGB\":null,\"storageAccountType\":null}]},\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'imagesCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"sourceVirtualMachine\":{\r\n\"id\":\"\"\r\n},\r\n\"storageProfile\":{\r\n\"osDisk\":{\r\n\"osType\":null,\r\n\"osState\":\"\",\r\n\"snapshot\":{\r\n\"id\":\"\"\r\n},\r\n\"managedDisk\":{\r\n\"id\":\"\"\r\n},\r\n\"blobUri\":\"\",\r\n\"caching\":null,\r\n\"diskSizeGB\":null\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"lun\":\"\",\r\n\"snapshot\":{\r\n\"id\":\"\"\r\n},\r\n\"managedDisk\":{\r\n\"id\":\"\"\r\n},\r\n\"blobUri\":\"\",\r\n\"caching\":null,\r\n\"diskSizeGB\":null\r\n}\r\n]\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"sourceVirtualMachine\":{\r\n\"id\":\"\"\r\n},\r\n\"storageProfile\":{\r\n\"osDisk\":{\r\n\"osType\":\"\",\r\n\"osState\":\"\",\r\n\"snapshot\":{\r\n\"id\":\"\"\r\n},\r\n\"managedDisk\":{\r\n\"id\":\"\"\r\n},\r\n\"blobUri\":\"\",\r\n\"caching\":null,\r\n\"diskSizeGB\":null,\r\n\"storageAccountType\":null\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"lun\":\"\",\r\n\"snapshot\":{\r\n\"id\":\"\"\r\n},\r\n\"managedDisk\":{\r\n\"id\":\"\"\r\n},\r\n\"blobUri\":\"\",\r\n\"caching\":null,\r\n\"diskSizeGB\":null,\r\n\"storageAccountType\":null\r\n}\r\n]\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -385,13 +396,13 @@ function display(cli, o) { }); //config set image - var catparametersCreateOrUpdateImagesImage0 = cli.category('managed-image'); - var parametersCreateOrUpdateImagesImage0 = catparametersCreateOrUpdateImagesImage0.category('config') + var catparametersCreateOrUpdateImagesImage01 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesImage01 = catparametersCreateOrUpdateImagesImage01.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesImage0 = parametersCreateOrUpdateImagesImage0.category('image') + var setparametersCreateOrUpdateImagesImage01 = parametersCreateOrUpdateImagesImage01.category('image') .description($('Commands to configure image of managed-image in config file.')); - setparametersCreateOrUpdateImagesImage0.command('set') - .description($('Set image in config string or files, e.g. \r\n{\r\n "sourceVirtualMachine":{\r\n "id":""\r\n },\r\n "storageProfile":{\r\n "osDisk":{\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ]\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateImagesImage01.command('set') + .description($('Set image in config string or files, e.g. \r\n{\r\n "sourceVirtualMachine":{\r\n "id":""\r\n },\r\n "storageProfile":{\r\n "osDisk":{\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ]\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -522,13 +533,13 @@ function display(cli, o) { }); //config delete image - var catparametersCreateOrUpdateImagesImage1 = cli.category('managed-image'); - var parametersCreateOrUpdateImagesImage1 = catparametersCreateOrUpdateImagesImage1.category('config') + var catparametersCreateOrUpdateImagesImage11 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesImage11 = catparametersCreateOrUpdateImagesImage11.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesImage1 = parametersCreateOrUpdateImagesImage1.category('image') + var deleteparametersCreateOrUpdateImagesImage11 = parametersCreateOrUpdateImagesImage11.category('image') .description($('Commands to configure image of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesImage1.command('delete') - .description($('Remove image in config string or files, e.g. \r\n{\r\n "sourceVirtualMachine":{\r\n "id":""\r\n },\r\n "storageProfile":{\r\n "osDisk":{\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ]\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateImagesImage11.command('delete') + .description($('Remove image in config string or files, e.g. \r\n{\r\n "sourceVirtualMachine":{\r\n "id":""\r\n },\r\n "storageProfile":{\r\n "osDisk":{\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ]\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--source-virtual-machine', $('Remove the source-virtual-machine value.')) @@ -605,12 +616,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set source-virtual-machine - var catparametersCreateOrUpdateImagesSourceVirtualMachine0SVM = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSourceVirtualMachine0SVM = catparametersCreateOrUpdateImagesSourceVirtualMachine0SVM.category('config') + var catparametersCreateOrUpdateImagesSourceVirtualMachine0SVM1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSourceVirtualMachine0SVM1 = catparametersCreateOrUpdateImagesSourceVirtualMachine0SVM1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesSourceVirtualMachine0SVM = parametersCreateOrUpdateImagesSourceVirtualMachine0SVM.category('source-virtual-machine') + var setparametersCreateOrUpdateImagesSourceVirtualMachine0SVM1 = parametersCreateOrUpdateImagesSourceVirtualMachine0SVM1.category('source-virtual-machine') .description($('Commands to configure source-virtual-machine of managed-image in config file.')); - setparametersCreateOrUpdateImagesSourceVirtualMachine0SVM.command('set') + setparametersCreateOrUpdateImagesSourceVirtualMachine0SVM1.command('set') .description($('Set source-virtual-machine in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVirtualMachine" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -658,12 +669,12 @@ function display(cli, o) { }); //config delete source-virtual-machine - var catparametersCreateOrUpdateImagesSourceVirtualMachine1SVM = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSourceVirtualMachine1SVM = catparametersCreateOrUpdateImagesSourceVirtualMachine1SVM.category('config') + var catparametersCreateOrUpdateImagesSourceVirtualMachine1SVM1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSourceVirtualMachine1SVM1 = catparametersCreateOrUpdateImagesSourceVirtualMachine1SVM1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesSourceVirtualMachine1SVM = parametersCreateOrUpdateImagesSourceVirtualMachine1SVM.category('source-virtual-machine') + var deleteparametersCreateOrUpdateImagesSourceVirtualMachine1SVM1 = parametersCreateOrUpdateImagesSourceVirtualMachine1SVM1.category('source-virtual-machine') .description($('Commands to configure source-virtual-machine of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesSourceVirtualMachine1SVM.command('delete') + deleteparametersCreateOrUpdateImagesSourceVirtualMachine1SVM1.command('delete') .description($('Remove source-virtual-machine in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVirtualMachine" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -706,13 +717,13 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set storage-profile - var catparametersCreateOrUpdateImagesStorageProfile0SP = cli.category('managed-image'); - var parametersCreateOrUpdateImagesStorageProfile0SP = catparametersCreateOrUpdateImagesStorageProfile0SP.category('config') + var catparametersCreateOrUpdateImagesStorageProfile0SP1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesStorageProfile0SP1 = catparametersCreateOrUpdateImagesStorageProfile0SP1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesStorageProfile0SP = parametersCreateOrUpdateImagesStorageProfile0SP.category('storage-profile') + var setparametersCreateOrUpdateImagesStorageProfile0SP1 = parametersCreateOrUpdateImagesStorageProfile0SP1.category('storage-profile') .description($('Commands to configure storage-profile of managed-image in config file.')); - setparametersCreateOrUpdateImagesStorageProfile0SP.command('set') - .description($('Set storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "osDisk":{\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateImagesStorageProfile0SP1.command('set') + .description($('Set storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "osDisk":{\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -771,13 +782,13 @@ function display(cli, o) { }); //config delete storage-profile - var catparametersCreateOrUpdateImagesStorageProfile1SP = cli.category('managed-image'); - var parametersCreateOrUpdateImagesStorageProfile1SP = catparametersCreateOrUpdateImagesStorageProfile1SP.category('config') + var catparametersCreateOrUpdateImagesStorageProfile1SP1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesStorageProfile1SP1 = catparametersCreateOrUpdateImagesStorageProfile1SP1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesStorageProfile1SP = parametersCreateOrUpdateImagesStorageProfile1SP.category('storage-profile') + var deleteparametersCreateOrUpdateImagesStorageProfile1SP1 = parametersCreateOrUpdateImagesStorageProfile1SP1.category('storage-profile') .description($('Commands to configure storage-profile of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesStorageProfile1SP.command('delete') - .description($('Remove storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "osDisk":{\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateImagesStorageProfile1SP1.command('delete') + .description($('Remove storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "osDisk":{\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--os-disk', $('Remove the os-disk value.')) @@ -824,13 +835,13 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set os-disk - var catparametersCreateOrUpdateImagesOsDisk0SPoD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesOsDisk0SPoD = catparametersCreateOrUpdateImagesOsDisk0SPoD.category('config') + var catparametersCreateOrUpdateImagesOsDisk0SPoD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesOsDisk0SPoD1 = catparametersCreateOrUpdateImagesOsDisk0SPoD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesOsDisk0SPoD = parametersCreateOrUpdateImagesOsDisk0SPoD.category('os-disk') + var setparametersCreateOrUpdateImagesOsDisk0SPoD1 = parametersCreateOrUpdateImagesOsDisk0SPoD1.category('os-disk') .description($('Commands to configure os-disk of managed-image in config file.')); - setparametersCreateOrUpdateImagesOsDisk0SPoD.command('set') - .description($('Set os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateImagesOsDisk0SPoD1.command('set') + .description($('Set os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -841,6 +852,7 @@ function display(cli, o) { .option('--blob-uri ', $('Set the blob-uri value.')) .option('--caching ', $('Set the caching value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) + .option('--storage-account-type ', $('Set the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -937,6 +949,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskSizeGB}]); } + paramPath = options.path + '/' + 'storageAccountType'; + if (options.storageAccountType) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.storageAccountType); + cli.output.verbose('================================================'); + if (options.parse && options.storageAccountType) { + options.storageAccountType = JSON.parse(options.storageAccountType); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountType}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -949,13 +972,13 @@ function display(cli, o) { }); //config delete os-disk - var catparametersCreateOrUpdateImagesOsDisk1SPoD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesOsDisk1SPoD = catparametersCreateOrUpdateImagesOsDisk1SPoD.category('config') + var catparametersCreateOrUpdateImagesOsDisk1SPoD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesOsDisk1SPoD1 = catparametersCreateOrUpdateImagesOsDisk1SPoD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesOsDisk1SPoD = parametersCreateOrUpdateImagesOsDisk1SPoD.category('os-disk') + var deleteparametersCreateOrUpdateImagesOsDisk1SPoD1 = parametersCreateOrUpdateImagesOsDisk1SPoD1.category('os-disk') .description($('Commands to configure os-disk of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesOsDisk1SPoD.command('delete') - .description($('Remove os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":null,\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateImagesOsDisk1SPoD1.command('delete') + .description($('Remove os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":"",\r\n "osState":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--os-type', $('Remove the os-type value.')) @@ -965,6 +988,7 @@ function display(cli, o) { .option('--blob-uri', $('Remove the blob-uri value.')) .option('--caching', $('Remove the caching value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) + .option('--storage-account-type', $('Remove the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -980,7 +1004,7 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/osDisk'; - var anySubItem = false || options.osType || options.osState || options.snapshot || options.managedDisk || options.blobUri || options.caching || options.diskSizeGB; + var anySubItem = false || options.osType || options.osState || options.snapshot || options.managedDisk || options.blobUri || options.caching || options.diskSizeGB || options.storageAccountType; if (anySubItem) { var subItemPath = null; if (options.osType) { @@ -1011,6 +1035,10 @@ function display(cli, o) { subItemPath = options.path + '/diskSizeGB'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.storageAccountType) { + subItemPath = options.path + '/storageAccountType'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } } else { jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); @@ -1027,12 +1055,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set snapshot - var catparametersCreateOrUpdateImagesSnapshot0SPoDs = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSnapshot0SPoDs = catparametersCreateOrUpdateImagesSnapshot0SPoDs.category('config') + var catparametersCreateOrUpdateImagesSnapshot0SPoDs1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSnapshot0SPoDs1 = catparametersCreateOrUpdateImagesSnapshot0SPoDs1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesSnapshot0SPoDs = parametersCreateOrUpdateImagesSnapshot0SPoDs.category('snapshot') + var setparametersCreateOrUpdateImagesSnapshot0SPoDs1 = parametersCreateOrUpdateImagesSnapshot0SPoDs1.category('snapshot') .description($('Commands to configure snapshot of managed-image in config file.')); - setparametersCreateOrUpdateImagesSnapshot0SPoDs.command('set') + setparametersCreateOrUpdateImagesSnapshot0SPoDs1.command('set') .description($('Set snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1080,12 +1108,12 @@ function display(cli, o) { }); //config delete snapshot - var catparametersCreateOrUpdateImagesSnapshot1SPoDs = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSnapshot1SPoDs = catparametersCreateOrUpdateImagesSnapshot1SPoDs.category('config') + var catparametersCreateOrUpdateImagesSnapshot1SPoDs1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSnapshot1SPoDs1 = catparametersCreateOrUpdateImagesSnapshot1SPoDs1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesSnapshot1SPoDs = parametersCreateOrUpdateImagesSnapshot1SPoDs.category('snapshot') + var deleteparametersCreateOrUpdateImagesSnapshot1SPoDs1 = parametersCreateOrUpdateImagesSnapshot1SPoDs1.category('snapshot') .description($('Commands to configure snapshot of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesSnapshot1SPoDs.command('delete') + deleteparametersCreateOrUpdateImagesSnapshot1SPoDs1.command('delete') .description($('Remove snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1128,12 +1156,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set managed-disk - var catparametersCreateOrUpdateImagesManagedDisk0SPoDmD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesManagedDisk0SPoDmD = catparametersCreateOrUpdateImagesManagedDisk0SPoDmD.category('config') + var catparametersCreateOrUpdateImagesManagedDisk0SPoDmD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesManagedDisk0SPoDmD1 = catparametersCreateOrUpdateImagesManagedDisk0SPoDmD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesManagedDisk0SPoDmD = parametersCreateOrUpdateImagesManagedDisk0SPoDmD.category('managed-disk') + var setparametersCreateOrUpdateImagesManagedDisk0SPoDmD1 = parametersCreateOrUpdateImagesManagedDisk0SPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of managed-image in config file.')); - setparametersCreateOrUpdateImagesManagedDisk0SPoDmD.command('set') + setparametersCreateOrUpdateImagesManagedDisk0SPoDmD1.command('set') .description($('Set managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1181,12 +1209,12 @@ function display(cli, o) { }); //config delete managed-disk - var catparametersCreateOrUpdateImagesManagedDisk1SPoDmD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesManagedDisk1SPoDmD = catparametersCreateOrUpdateImagesManagedDisk1SPoDmD.category('config') + var catparametersCreateOrUpdateImagesManagedDisk1SPoDmD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesManagedDisk1SPoDmD1 = catparametersCreateOrUpdateImagesManagedDisk1SPoDmD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesManagedDisk1SPoDmD = parametersCreateOrUpdateImagesManagedDisk1SPoDmD.category('managed-disk') + var deleteparametersCreateOrUpdateImagesManagedDisk1SPoDmD1 = parametersCreateOrUpdateImagesManagedDisk1SPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesManagedDisk1SPoDmD.command('delete') + deleteparametersCreateOrUpdateImagesManagedDisk1SPoDmD1.command('delete') .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1229,13 +1257,13 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set data-disks - var catparametersCreateOrUpdateImagesDataDisks0SPdD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesDataDisks0SPdD = catparametersCreateOrUpdateImagesDataDisks0SPdD.category('config') + var catparametersCreateOrUpdateImagesDataDisks0SPdD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesDataDisks0SPdD1 = catparametersCreateOrUpdateImagesDataDisks0SPdD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesDataDisks0SPdD = parametersCreateOrUpdateImagesDataDisks0SPdD.category('data-disks') + var setparametersCreateOrUpdateImagesDataDisks0SPdD1 = parametersCreateOrUpdateImagesDataDisks0SPdD1.category('data-disks') .description($('Commands to configure data-disks of managed-image in config file.')); - setparametersCreateOrUpdateImagesDataDisks0SPdD.command('set') - .description($('Set data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateImagesDataDisks0SPdD1.command('set') + .description($('Set data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) @@ -1247,6 +1275,7 @@ function display(cli, o) { .option('--blob-uri ', $('Set the blob-uri value.')) .option('--caching ', $('Set the caching value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) + .option('--storage-account-type ', $('Set the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1336,6 +1365,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskSizeGB}]); } + paramPath = options.path + '/' + 'storageAccountType'; + if (options.storageAccountType) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.storageAccountType); + cli.output.verbose('================================================'); + if (options.parse && options.storageAccountType) { + options.storageAccountType = JSON.parse(options.storageAccountType); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountType}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -1348,13 +1388,13 @@ function display(cli, o) { }); //config delete data-disks - var catparametersCreateOrUpdateImagesDataDisks1SPdD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesDataDisks1SPdD = catparametersCreateOrUpdateImagesDataDisks1SPdD.category('config') + var catparametersCreateOrUpdateImagesDataDisks1SPdD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesDataDisks1SPdD1 = catparametersCreateOrUpdateImagesDataDisks1SPdD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesDataDisks1SPdD = parametersCreateOrUpdateImagesDataDisks1SPdD.category('data-disks') + var deleteparametersCreateOrUpdateImagesDataDisks1SPdD1 = parametersCreateOrUpdateImagesDataDisks1SPdD1.category('data-disks') .description($('Commands to configure data-disks of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesDataDisks1SPdD.command('delete') - .description($('Remove data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateImagesDataDisks1SPdD1.command('delete') + .description($('Remove data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "snapshot":{\r\n "id":""\r\n },\r\n "managedDisk":{\r\n "id":""\r\n },\r\n "blobUri":"",\r\n "caching":null,\r\n "diskSizeGB":null,\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) @@ -1364,6 +1404,7 @@ function display(cli, o) { .option('--blob-uri', $('Remove the blob-uri value.')) .option('--caching', $('Remove the caching value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) + .option('--storage-account-type', $('Remove the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1379,7 +1420,7 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/dataDisks' + (options.index ? ('/' + options.index) : ''); - var anySubItem = false || options.lun || options.snapshot || options.managedDisk || options.blobUri || options.caching || options.diskSizeGB; + var anySubItem = false || options.lun || options.snapshot || options.managedDisk || options.blobUri || options.caching || options.diskSizeGB || options.storageAccountType; if (anySubItem) { var subItemPath = null; if (options.lun) { @@ -1406,6 +1447,10 @@ function display(cli, o) { subItemPath = options.path + '/diskSizeGB'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.storageAccountType) { + subItemPath = options.path + '/storageAccountType'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } } else { jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); @@ -1421,14 +1466,14 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set snapshot - var catparametersCreateOrUpdateImagesSnapshot0SPdDDIs = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSnapshot0SPdDDIs = catparametersCreateOrUpdateImagesSnapshot0SPdDDIs.category('config') + //config set data-disks-snapshot + var catparametersCreateOrUpdateImagesSnapshot0SPdDDIs1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSnapshot0SPdDDIs1 = catparametersCreateOrUpdateImagesSnapshot0SPdDDIs1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesSnapshot0SPdDDIs = parametersCreateOrUpdateImagesSnapshot0SPdDDIs.category('snapshot') - .description($('Commands to configure snapshot of managed-image in config file.')); - setparametersCreateOrUpdateImagesSnapshot0SPdDDIs.command('set') - .description($('Set snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateImagesSnapshot0SPdDDIs1 = parametersCreateOrUpdateImagesSnapshot0SPdDDIs1.category('data-disks-snapshot') + .description($('Commands to configure data-disks-snapshot of managed-image in config file.')); + setparametersCreateOrUpdateImagesSnapshot0SPdDDIs1.command('set') + .description($('Set data-disks-snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) @@ -1475,14 +1520,14 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete snapshot - var catparametersCreateOrUpdateImagesSnapshot1SPdDDIs = cli.category('managed-image'); - var parametersCreateOrUpdateImagesSnapshot1SPdDDIs = catparametersCreateOrUpdateImagesSnapshot1SPdDDIs.category('config') + //config delete data-disks-snapshot + var catparametersCreateOrUpdateImagesSnapshot1SPdDDIs1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesSnapshot1SPdDDIs1 = catparametersCreateOrUpdateImagesSnapshot1SPdDDIs1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesSnapshot1SPdDDIs = parametersCreateOrUpdateImagesSnapshot1SPdDDIs.category('snapshot') - .description($('Commands to configure snapshot of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesSnapshot1SPdDDIs.command('delete') - .description($('Remove snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateImagesSnapshot1SPdDDIs1 = parametersCreateOrUpdateImagesSnapshot1SPdDDIs1.category('data-disks-snapshot') + .description($('Commands to configure data-disks-snapshot of managed-image in config file.')); + deleteparametersCreateOrUpdateImagesSnapshot1SPdDDIs1.command('delete') + .description($('Remove data-disks-snapshot in config string or files, e.g. \r\n {\r\n ...\r\n "snapshot" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) @@ -1524,14 +1569,14 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set managed-disk - var catparametersCreateOrUpdateImagesManagedDisk0SPdDDImD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesManagedDisk0SPdDDImD = catparametersCreateOrUpdateImagesManagedDisk0SPdDDImD.category('config') + //config set data-disks-managed-disk + var catparametersCreateOrUpdateImagesManagedDisk0SPdDDImD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesManagedDisk0SPdDDImD1 = catparametersCreateOrUpdateImagesManagedDisk0SPdDDImD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var setparametersCreateOrUpdateImagesManagedDisk0SPdDDImD = parametersCreateOrUpdateImagesManagedDisk0SPdDDImD.category('managed-disk') - .description($('Commands to configure managed-disk of managed-image in config file.')); - setparametersCreateOrUpdateImagesManagedDisk0SPdDDImD.command('set') - .description($('Set managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateImagesManagedDisk0SPdDDImD1 = parametersCreateOrUpdateImagesManagedDisk0SPdDDImD1.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of managed-image in config file.')); + setparametersCreateOrUpdateImagesManagedDisk0SPdDDImD1.command('set') + .description($('Set data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) @@ -1578,14 +1623,14 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete managed-disk - var catparametersCreateOrUpdateImagesManagedDisk1SPdDDImD = cli.category('managed-image'); - var parametersCreateOrUpdateImagesManagedDisk1SPdDDImD = catparametersCreateOrUpdateImagesManagedDisk1SPdDDImD.category('config') + //config delete data-disks-managed-disk + var catparametersCreateOrUpdateImagesManagedDisk1SPdDDImD1 = cli.category('managed-image'); + var parametersCreateOrUpdateImagesManagedDisk1SPdDDImD1 = catparametersCreateOrUpdateImagesManagedDisk1SPdDDImD1.category('config') .description($('Commands to manage configuration of images in the parameter file.')); - var deleteparametersCreateOrUpdateImagesManagedDisk1SPdDDImD = parametersCreateOrUpdateImagesManagedDisk1SPdDDImD.category('managed-disk') - .description($('Commands to configure managed-disk of managed-image in config file.')); - deleteparametersCreateOrUpdateImagesManagedDisk1SPdDDImD.command('delete') - .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateImagesManagedDisk1SPdDDImD1 = parametersCreateOrUpdateImagesManagedDisk1SPdDDImD1.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of managed-image in config file.')); + deleteparametersCreateOrUpdateImagesManagedDisk1SPdDDImD1.command('delete') + .description($('Remove data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) diff --git a/lib/commands/arm/compute/snapshots._js b/lib/commands/arm/compute/snapshots._js index 4baf54cdde..3d3beb524f 100644 --- a/lib/commands/arm/compute/snapshots._js +++ b/lib/commands/arm/compute/snapshots._js @@ -25,13 +25,12 @@ Generated Command List: azure managed-snapshot config snapshot set --parameter-file $f --parse ---account-type $accountType +--sku $sku --time-created $timeCreated --os-type $osType --creation-data $creationData --disk-size-g-b $diskSizeGB --encryption-settings $encryptionSettings ---owner-id $ownerId --provisioning-state $provisioningState --id $id --name $name @@ -41,13 +40,12 @@ azure managed-snapshot config snapshot set azure managed-snapshot config snapshot delete --parameter-file $f ---account-type +--sku --time-created --os-type --creation-data --disk-size-g-b --encryption-settings ---owner-id --provisioning-state --id --name @@ -55,6 +53,17 @@ azure managed-snapshot config snapshot delete --location --tags +azure managed-snapshot config sku set +--parameter-file $f +--parse +--name $name +--tier $tier + +azure managed-snapshot config sku delete +--parameter-file $f +--name +--tier + azure managed-snapshot config creation-data set --parameter-file $f --parse @@ -127,8 +136,14 @@ azure managed-snapshot config key-encryption-key delete --source-vault --key-url -azure managed-snapshot config source-vault delete +azure managed-snapshot config key-encryption-key-source-vault set --parameter-file $f +--parse +--id $id + +azure managed-snapshot config key-encryption-key-source-vault delete +--parameter-file $f +--id azure managed-snapshot create --resource-group $p0 @@ -183,49 +198,19 @@ azure managed-snapshot revoke-access azure managed-snapshot update-parameters snapshot-update set --parameter-file $f --parse ---account-type $accountType --os-type $osType ---creation-data $creationData --disk-size-g-b $diskSizeGB --encryption-settings $encryptionSettings --tags $tags +--sku $sku azure managed-snapshot update-parameters snapshot-update delete --parameter-file $f ---account-type --os-type ---creation-data --disk-size-g-b --encryption-settings --tags - -azure managed-snapshot update-parameters creation-data set ---parameter-file $f ---parse ---create-option $createOption ---storage-account-id $storageAccountId ---image-reference $imageReference ---source-uri $sourceUri ---source-resource-id $sourceResourceId - -azure managed-snapshot update-parameters creation-data delete ---parameter-file $f ---create-option ---storage-account-id ---image-reference ---source-uri ---source-resource-id - -azure managed-snapshot update-parameters image-reference set ---parameter-file $f ---parse ---id $id ---lun $lun - -azure managed-snapshot update-parameters image-reference delete ---parameter-file $f ---id ---lun +--sku azure managed-snapshot update-parameters encryption-settings set --parameter-file $f @@ -271,8 +256,25 @@ azure managed-snapshot update-parameters key-encryption-key delete --source-vault --key-url -azure managed-snapshot update-parameters source-vault delete +azure managed-snapshot update-parameters key-encryption-key-source-vault set +--parameter-file $f +--parse +--id $id + +azure managed-snapshot update-parameters key-encryption-key-source-vault delete +--parameter-file $f +--id + +azure managed-snapshot update-parameters sku set +--parameter-file $f +--parse +--name $name +--tier $tier + +azure managed-snapshot update-parameters sku delete --parameter-file $f +--name +--tier azure managed-snapshot update --resource-group $p0 @@ -289,13 +291,15 @@ azure managed-snapshot update-parameters patch */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } @@ -346,7 +350,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* Snapshots CreateOrUpdate @@ -355,7 +362,10 @@ function display(cli, o) { --snapshot ============================================= { - "accountType":null, + "sku":{ + "name":null, + "tier":"" + }, "timeCreated":null, "osType":null, "creationData":{ @@ -384,7 +394,6 @@ function display(cli, o) { "keyUrl":"" } }, - "ownerId":"", "provisioningState":"", "id":null, "name":null, @@ -440,12 +449,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"accountType\":null,\"timeCreated\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"ownerId\":\"\",\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"sku\":{\"name\":null,\"tier\":\"\"},\"timeCreated\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"provisioningState\":\"\",\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'snapshotsCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"accountType\":null,\r\n\"timeCreated\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"ownerId\":\"\",\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"sku\":{\r\n\"name\":null,\r\n\"tier\":\"\"\r\n},\r\n\"timeCreated\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -497,23 +506,22 @@ function display(cli, o) { }); //config set snapshot - var catparametersCreateOrUpdateSnapshotsSnapshot0 = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsSnapshot0 = catparametersCreateOrUpdateSnapshotsSnapshot0.category('config') + var catparametersCreateOrUpdateSnapshotsSnapshot01 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSnapshot01 = catparametersCreateOrUpdateSnapshotsSnapshot01.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsSnapshot0 = parametersCreateOrUpdateSnapshotsSnapshot0.category('snapshot') + var setparametersCreateOrUpdateSnapshotsSnapshot01 = parametersCreateOrUpdateSnapshotsSnapshot01.category('snapshot') .description($('Commands to configure snapshot of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsSnapshot0.command('set') - .description($('Set snapshot in config string or files, e.g. \r\n{\r\n "accountType":null,\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "ownerId":"",\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateSnapshotsSnapshot01.command('set') + .description($('Set snapshot in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n },\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--account-type ', $('Set the account-type value.')) + .option('--sku ', $('Set the sku value.')) .option('--time-created ', $('Set the time-created value.')) .option('--os-type ', $('Set the os-type value.')) .option('--creation-data ', $('Set the creation-data value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) .option('--encryption-settings ', $('Set the encryption-settings value.')) - .option('--owner-id ', $('Set the owner-id value.')) .option('--provisioning-state ', $('Set the provisioning-state value.')) .option('--id ', $('Set the id value.')) .option('--name ', $('Set the name value.')) @@ -539,16 +547,16 @@ function display(cli, o) { if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'accountType'; - if (options.accountType) { + var paramPath = options.path + '/' + 'sku'; + if (options.sku) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.accountType); + cli.output.verbose('Value : ' + options.sku); cli.output.verbose('================================================'); - if (options.parse && options.accountType) { - options.accountType = JSON.parse(options.accountType); + if (options.parse && options.sku) { + options.sku = JSON.parse(options.sku); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.accountType}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sku}]); } paramPath = options.path + '/' + 'timeCreated'; if (options.timeCreated) { @@ -605,17 +613,6 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.encryptionSettings}]); } - paramPath = options.path + '/' + 'ownerId'; - if (options.ownerId) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.ownerId); - cli.output.verbose('================================================'); - if (options.parse && options.ownerId) { - options.ownerId = JSON.parse(options.ownerId); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.ownerId}]); - } paramPath = options.path + '/' + 'provisioningState'; if (options.provisioningState) { cli.output.verbose('================================================'); @@ -694,22 +691,21 @@ function display(cli, o) { }); //config delete snapshot - var catparametersCreateOrUpdateSnapshotsSnapshot1 = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsSnapshot1 = catparametersCreateOrUpdateSnapshotsSnapshot1.category('config') + var catparametersCreateOrUpdateSnapshotsSnapshot11 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSnapshot11 = catparametersCreateOrUpdateSnapshotsSnapshot11.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsSnapshot1 = parametersCreateOrUpdateSnapshotsSnapshot1.category('snapshot') + var deleteparametersCreateOrUpdateSnapshotsSnapshot11 = parametersCreateOrUpdateSnapshotsSnapshot11.category('snapshot') .description($('Commands to configure snapshot of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsSnapshot1.command('delete') - .description($('Remove snapshot in config string or files, e.g. \r\n{\r\n "accountType":null,\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "ownerId":"",\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateSnapshotsSnapshot11.command('delete') + .description($('Remove snapshot in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n },\r\n "timeCreated":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "provisioningState":"",\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--account-type', $('Remove the account-type value.')) + .option('--sku', $('Remove the sku value.')) .option('--time-created', $('Remove the time-created value.')) .option('--os-type', $('Remove the os-type value.')) .option('--creation-data', $('Remove the creation-data value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) .option('--encryption-settings', $('Remove the encryption-settings value.')) - .option('--owner-id', $('Remove the owner-id value.')) .option('--provisioning-state', $('Remove the provisioning-state value.')) .option('--id', $('Remove the id value.')) .option('--name', $('Remove the name value.')) @@ -731,11 +727,11 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.accountType || options.timeCreated || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.ownerId || options.provisioningState || options.id || options.name || options.type || options.location || options.tags; + var anySubItem = false || options.sku || options.timeCreated || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.provisioningState || options.id || options.name || options.type || options.location || options.tags; if (anySubItem) { var subItemPath = null; - if (options.accountType) { - subItemPath = options.path + '/accountType'; + if (options.sku) { + subItemPath = options.path + '/sku'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } if (options.timeCreated) { @@ -758,10 +754,6 @@ function display(cli, o) { subItemPath = options.path + '/encryptionSettings'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.ownerId) { - subItemPath = options.path + '/ownerId'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.provisioningState) { subItemPath = options.path + '/provisioningState'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -801,13 +793,131 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); + //config set sku + var catparametersCreateOrUpdateSnapshotsSku0S1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSku0S1 = catparametersCreateOrUpdateSnapshotsSku0S1.category('config') + .description($('Commands to manage configuration of snapshots in the parameter file.')); + var setparametersCreateOrUpdateSnapshotsSku0S1 = parametersCreateOrUpdateSnapshotsSku0S1.category('sku') + .description($('Commands to configure sku of managed-snapshot in config file.')); + setparametersCreateOrUpdateSnapshotsSku0S1.command('set') + .description($('Set sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--name ', $('Set the name value.')) + .option('--tier ', $('Set the tier value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/sku'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'name'; + if (options.name) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.name); + cli.output.verbose('================================================'); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); + } + paramPath = options.path + '/' + 'tier'; + if (options.tier) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.tier); + cli.output.verbose('================================================'); + if (options.parse && options.tier) { + options.tier = JSON.parse(options.tier); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tier}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete sku + var catparametersCreateOrUpdateSnapshotsSku1S1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSku1S1 = catparametersCreateOrUpdateSnapshotsSku1S1.category('config') + .description($('Commands to manage configuration of snapshots in the parameter file.')); + var deleteparametersCreateOrUpdateSnapshotsSku1S1 = parametersCreateOrUpdateSnapshotsSku1S1.category('sku') + .description($('Commands to configure sku of managed-snapshot in config file.')); + deleteparametersCreateOrUpdateSnapshotsSku1S1.command('delete') + .description($('Remove sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--name', $('Remove the name value.')) + .option('--tier', $('Remove the tier value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/sku'; + var anySubItem = false || options.name || options.tier; + if (anySubItem) { + var subItemPath = null; + if (options.name) { + subItemPath = options.path + '/name'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.tier) { + subItemPath = options.path + '/tier'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); //config set creation-data - var catparametersCreateOrUpdateSnapshotsCreationData0CD = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsCreationData0CD = catparametersCreateOrUpdateSnapshotsCreationData0CD.category('config') + var catparametersCreateOrUpdateSnapshotsCreationData0CD1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsCreationData0CD1 = catparametersCreateOrUpdateSnapshotsCreationData0CD1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsCreationData0CD = parametersCreateOrUpdateSnapshotsCreationData0CD.category('creation-data') + var setparametersCreateOrUpdateSnapshotsCreationData0CD1 = parametersCreateOrUpdateSnapshotsCreationData0CD1.category('creation-data') .description($('Commands to configure creation-data of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsCreationData0CD.command('set') + setparametersCreateOrUpdateSnapshotsCreationData0CD1.command('set') .description($('Set creation-data in config string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -903,12 +1013,12 @@ function display(cli, o) { }); //config delete creation-data - var catparametersCreateOrUpdateSnapshotsCreationData1CD = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsCreationData1CD = catparametersCreateOrUpdateSnapshotsCreationData1CD.category('config') + var catparametersCreateOrUpdateSnapshotsCreationData1CD1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsCreationData1CD1 = catparametersCreateOrUpdateSnapshotsCreationData1CD1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsCreationData1CD = parametersCreateOrUpdateSnapshotsCreationData1CD.category('creation-data') + var deleteparametersCreateOrUpdateSnapshotsCreationData1CD1 = parametersCreateOrUpdateSnapshotsCreationData1CD1.category('creation-data') .description($('Commands to configure creation-data of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsCreationData1CD.command('delete') + deleteparametersCreateOrUpdateSnapshotsCreationData1CD1.command('delete') .description($('Remove creation-data in config string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -971,12 +1081,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set image-reference - var catparametersCreateOrUpdateSnapshotsImageReference0CDiR = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsImageReference0CDiR = catparametersCreateOrUpdateSnapshotsImageReference0CDiR.category('config') + var catparametersCreateOrUpdateSnapshotsImageReference0CDiR1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsImageReference0CDiR1 = catparametersCreateOrUpdateSnapshotsImageReference0CDiR1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsImageReference0CDiR = parametersCreateOrUpdateSnapshotsImageReference0CDiR.category('image-reference') + var setparametersCreateOrUpdateSnapshotsImageReference0CDiR1 = parametersCreateOrUpdateSnapshotsImageReference0CDiR1.category('image-reference') .description($('Commands to configure image-reference of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsImageReference0CDiR.command('set') + setparametersCreateOrUpdateSnapshotsImageReference0CDiR1.command('set') .description($('Set image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1036,12 +1146,12 @@ function display(cli, o) { }); //config delete image-reference - var catparametersCreateOrUpdateSnapshotsImageReference1CDiR = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsImageReference1CDiR = catparametersCreateOrUpdateSnapshotsImageReference1CDiR.category('config') + var catparametersCreateOrUpdateSnapshotsImageReference1CDiR1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsImageReference1CDiR1 = catparametersCreateOrUpdateSnapshotsImageReference1CDiR1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsImageReference1CDiR = parametersCreateOrUpdateSnapshotsImageReference1CDiR.category('image-reference') + var deleteparametersCreateOrUpdateSnapshotsImageReference1CDiR1 = parametersCreateOrUpdateSnapshotsImageReference1CDiR1.category('image-reference') .description($('Commands to configure image-reference of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsImageReference1CDiR.command('delete') + deleteparametersCreateOrUpdateSnapshotsImageReference1CDiR1.command('delete') .description($('Remove image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1089,12 +1199,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set encryption-settings - var catparametersCreateOrUpdateSnapshotsEncryptionSettings0ES = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsEncryptionSettings0ES = catparametersCreateOrUpdateSnapshotsEncryptionSettings0ES.category('config') + var catparametersCreateOrUpdateSnapshotsEncryptionSettings0ES1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsEncryptionSettings0ES1 = catparametersCreateOrUpdateSnapshotsEncryptionSettings0ES1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsEncryptionSettings0ES = parametersCreateOrUpdateSnapshotsEncryptionSettings0ES.category('encryption-settings') + var setparametersCreateOrUpdateSnapshotsEncryptionSettings0ES1 = parametersCreateOrUpdateSnapshotsEncryptionSettings0ES1.category('encryption-settings') .description($('Commands to configure encryption-settings of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsEncryptionSettings0ES.command('set') + setparametersCreateOrUpdateSnapshotsEncryptionSettings0ES1.command('set') .description($('Set encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1167,12 +1277,12 @@ function display(cli, o) { }); //config delete encryption-settings - var catparametersCreateOrUpdateSnapshotsEncryptionSettings1ES = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsEncryptionSettings1ES = catparametersCreateOrUpdateSnapshotsEncryptionSettings1ES.category('config') + var catparametersCreateOrUpdateSnapshotsEncryptionSettings1ES1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsEncryptionSettings1ES1 = catparametersCreateOrUpdateSnapshotsEncryptionSettings1ES1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsEncryptionSettings1ES = parametersCreateOrUpdateSnapshotsEncryptionSettings1ES.category('encryption-settings') + var deleteparametersCreateOrUpdateSnapshotsEncryptionSettings1ES1 = parametersCreateOrUpdateSnapshotsEncryptionSettings1ES1.category('encryption-settings') .description($('Commands to configure encryption-settings of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsEncryptionSettings1ES.command('delete') + deleteparametersCreateOrUpdateSnapshotsEncryptionSettings1ES1.command('delete') .description($('Remove encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1225,12 +1335,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set disk-encryption-key - var catparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK = catparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK.category('config') + var catparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1 = catparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK = parametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK.category('disk-encryption-key') + var setparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1 = parametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK.command('set') + setparametersCreateOrUpdateSnapshotsDiskEncryptionKey0ESdEK1.command('set') .description($('Set disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1290,12 +1400,12 @@ function display(cli, o) { }); //config delete disk-encryption-key - var catparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK = catparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK.category('config') + var catparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1 = catparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK = parametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK.category('disk-encryption-key') + var deleteparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1 = parametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK.command('delete') + deleteparametersCreateOrUpdateSnapshotsDiskEncryptionKey1ESdEK1.command('delete') .description($('Remove disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1343,12 +1453,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set source-vault - var catparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV = catparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV.category('config') + var catparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1 = catparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV = parametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV.category('source-vault') + var setparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1 = parametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1.category('source-vault') .description($('Commands to configure source-vault of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV.command('set') + setparametersCreateOrUpdateSnapshotsSourceVault0ESdEKsV1.command('set') .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1396,12 +1506,12 @@ function display(cli, o) { }); //config delete source-vault - var catparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV = catparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV.category('config') + var catparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1 = catparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV = parametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV.category('source-vault') + var deleteparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1 = parametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1.category('source-vault') .description($('Commands to configure source-vault of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV.command('delete') + deleteparametersCreateOrUpdateSnapshotsSourceVault1ESdEKsV1.command('delete') .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1444,12 +1554,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set key-encryption-key - var catparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK = catparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK.category('config') + var catparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1 = catparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK = parametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK.category('key-encryption-key') + var setparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1 = parametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of managed-snapshot in config file.')); - setparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK.command('set') + setparametersCreateOrUpdateSnapshotsKeyEncryptionKey0ESkEK1.command('set') .description($('Set key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1509,12 +1619,12 @@ function display(cli, o) { }); //config delete key-encryption-key - var catparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK = catparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK.category('config') + var catparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1 = catparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK = parametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK.category('key-encryption-key') + var deleteparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1 = parametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK.command('delete') + deleteparametersCreateOrUpdateSnapshotsKeyEncryptionKey1ESkEK1.command('delete') .description($('Remove key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1561,16 +1671,70 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete source-vault - var catparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1 = cli.category('managed-snapshot'); - var parametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1 = catparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1.category('config') + //config set key-encryption-key-source-vault + var catparametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2 = catparametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2.category('config') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1 = parametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1.category('source-vault') - .description($('Commands to configure source-vault of managed-snapshot in config file.')); - deleteparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV1.command('delete') - .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2 = parametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-snapshot in config file.')); + setparametersCreateOrUpdateSnapshotsSourceVault0ESkEKsV2.command('set') + .description($('Set key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'id'; + if (options.id) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.id); + cli.output.verbose('================================================'); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete key-encryption-key-source-vault + var catparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2 = cli.category('managed-snapshot'); + var parametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2 = catparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2.category('config') + .description($('Commands to manage configuration of snapshots in the parameter file.')); + var deleteparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2 = parametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-snapshot in config file.')); + deleteparametersCreateOrUpdateSnapshotsSourceVault1ESkEKsV2.command('delete') + .description($('Remove key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) + .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1586,6 +1750,17 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; + var anySubItem = false || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -1777,12 +1952,12 @@ function display(cli, o) { }); //grant-access-parameters set grant-access-data - var catparametersGrantAccessSnapshotsGrantAccessData0 = cli.category('managed-snapshot'); - var parametersGrantAccessSnapshotsGrantAccessData0 = catparametersGrantAccessSnapshotsGrantAccessData0.category('grant-access-parameters') + var catparametersGrantAccessSnapshotsGrantAccessData01 = cli.category('managed-snapshot'); + var parametersGrantAccessSnapshotsGrantAccessData01 = catparametersGrantAccessSnapshotsGrantAccessData01.category('grant-access-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersGrantAccessSnapshotsGrantAccessData0 = parametersGrantAccessSnapshotsGrantAccessData0.category('grant-access-data') + var setparametersGrantAccessSnapshotsGrantAccessData01 = parametersGrantAccessSnapshotsGrantAccessData01.category('grant-access-data') .description($('Commands to configure grant-access-data of managed-snapshot in grant-access-parameters file.')); - setparametersGrantAccessSnapshotsGrantAccessData0.command('set') + setparametersGrantAccessSnapshotsGrantAccessData01.command('set') .description($('Set grant-access-data in grant-access-parameters string or files, e.g. \r\n{\r\n "access":"",\r\n "durationInSeconds":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1843,12 +2018,12 @@ function display(cli, o) { }); //grant-access-parameters delete grant-access-data - var catparametersGrantAccessSnapshotsGrantAccessData1 = cli.category('managed-snapshot'); - var parametersGrantAccessSnapshotsGrantAccessData1 = catparametersGrantAccessSnapshotsGrantAccessData1.category('grant-access-parameters') + var catparametersGrantAccessSnapshotsGrantAccessData11 = cli.category('managed-snapshot'); + var parametersGrantAccessSnapshotsGrantAccessData11 = catparametersGrantAccessSnapshotsGrantAccessData11.category('grant-access-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersGrantAccessSnapshotsGrantAccessData1 = parametersGrantAccessSnapshotsGrantAccessData1.category('grant-access-data') + var deleteparametersGrantAccessSnapshotsGrantAccessData11 = parametersGrantAccessSnapshotsGrantAccessData11.category('grant-access-data') .description($('Commands to configure grant-access-data of managed-snapshot in grant-access-parameters file.')); - deleteparametersGrantAccessSnapshotsGrantAccessData1.command('delete') + deleteparametersGrantAccessSnapshotsGrantAccessData11.command('delete') .description($('Remove grant-access-data in grant-access-parameters string or files, e.g. \r\n{\r\n "access":"",\r\n "durationInSeconds":""\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1978,18 +2153,7 @@ function display(cli, o) { --snapshot ============================================= { - "accountType":null, "osType":null, - "creationData":{ - "createOption":"", - "storageAccountId":"", - "imageReference":{ - "id":"", - "lun":null - }, - "sourceUri":"", - "sourceResourceId":"" - }, "diskSizeGB":null, "encryptionSettings":{ "enabled":null, @@ -2007,6 +2171,10 @@ function display(cli, o) { } }, "tags":{ + }, + "sku":{ + "name":null, + "tier":"" } } */ @@ -2056,12 +2224,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"accountType\":null,\"osType\":null,\"creationData\":{\"createOption\":\"\",\"storageAccountId\":\"\",\"imageReference\":{\"id\":\"\",\"lun\":null},\"sourceUri\":\"\",\"sourceResourceId\":\"\"},\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"tags\":{}}', _); + cli.output.verbose('{\"osType\":null,\"diskSizeGB\":null,\"encryptionSettings\":{\"enabled\":null,\"diskEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"secretUrl\":\"\"},\"keyEncryptionKey\":{\"sourceVault\":{\"id\":\"\"},\"keyUrl\":\"\"}},\"tags\":{},\"sku\":{\"name\":null,\"tier\":\"\"}}', _); var filePath = 'snapshotsUpdate_update.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"accountType\":null,\r\n\"osType\":null,\r\n\"creationData\":{\r\n\"createOption\":\"\",\r\n\"storageAccountId\":\"\",\r\n\"imageReference\":{\r\n\"id\":\"\",\r\n\"lun\":null\r\n},\r\n\"sourceUri\":\"\",\r\n\"sourceResourceId\":\"\"\r\n},\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"osType\":null,\r\n\"diskSizeGB\":null,\r\n\"encryptionSettings\":{\r\n\"enabled\":null,\r\n\"diskEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"secretUrl\":\"\"\r\n},\r\n\"keyEncryptionKey\":{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"keyUrl\":\"\"\r\n}\r\n},\r\n\"tags\":{\r\n},\r\n\"sku\":{\r\n\"name\":null,\r\n\"tier\":\"\"\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -2113,22 +2281,21 @@ function display(cli, o) { }); //update-parameters set snapshot-update - var catparametersUpdateSnapshotsSnapshotUpdate0 = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsSnapshotUpdate0 = catparametersUpdateSnapshotsSnapshotUpdate0.category('update-parameters') + var catparametersUpdateSnapshotsSnapshotUpdate01 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSnapshotUpdate01 = catparametersUpdateSnapshotsSnapshotUpdate01.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsSnapshotUpdate0 = parametersUpdateSnapshotsSnapshotUpdate0.category('snapshot-update') + var setparametersUpdateSnapshotsSnapshotUpdate01 = parametersUpdateSnapshotsSnapshotUpdate01.category('snapshot-update') .description($('Commands to configure snapshot-update of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsSnapshotUpdate0.command('set') - .description($('Set snapshot-update in update-parameters string or files, e.g. \r\n{\r\n "accountType":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersUpdateSnapshotsSnapshotUpdate01.command('set') + .description($('Set snapshot-update in update-parameters string or files, e.g. \r\n{\r\n "osType":null,\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n },\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--account-type ', $('Set the account-type value.')) .option('--os-type ', $('Set the os-type value.')) - .option('--creation-data ', $('Set the creation-data value.')) .option('--disk-size-g-b ', $('Set the disk-size-g-b value.')) .option('--encryption-settings ', $('Set the encryption-settings value.')) .option('--tags ', $('Set the tags value.')) + .option('--sku ', $('Set the sku value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2148,18 +2315,7 @@ function display(cli, o) { if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'accountType'; - if (options.accountType) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.accountType); - cli.output.verbose('================================================'); - if (options.parse && options.accountType) { - options.accountType = JSON.parse(options.accountType); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.accountType}]); - } - paramPath = options.path + '/' + 'osType'; + var paramPath = options.path + '/' + 'osType'; if (options.osType) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); @@ -2170,17 +2326,6 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.osType}]); } - paramPath = options.path + '/' + 'creationData'; - if (options.creationData) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.creationData); - cli.output.verbose('================================================'); - if (options.parse && options.creationData) { - options.creationData = JSON.parse(options.creationData); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.creationData}]); - } paramPath = options.path + '/' + 'diskSizeGB'; if (options.diskSizeGB) { cli.output.verbose('================================================'); @@ -2214,6 +2359,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tags}]); } + paramPath = options.path + '/' + 'sku'; + if (options.sku) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.sku); + cli.output.verbose('================================================'); + if (options.parse && options.sku) { + options.sku = JSON.parse(options.sku); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sku}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -2226,21 +2382,20 @@ function display(cli, o) { }); //update-parameters delete snapshot-update - var catparametersUpdateSnapshotsSnapshotUpdate1 = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsSnapshotUpdate1 = catparametersUpdateSnapshotsSnapshotUpdate1.category('update-parameters') + var catparametersUpdateSnapshotsSnapshotUpdate11 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSnapshotUpdate11 = catparametersUpdateSnapshotsSnapshotUpdate11.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsSnapshotUpdate1 = parametersUpdateSnapshotsSnapshotUpdate1.category('snapshot-update') + var deleteparametersUpdateSnapshotsSnapshotUpdate11 = parametersUpdateSnapshotsSnapshotUpdate11.category('snapshot-update') .description($('Commands to configure snapshot-update of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsSnapshotUpdate1.command('delete') - .description($('Remove snapshot-update in update-parameters string or files, e.g. \r\n{\r\n "accountType":null,\r\n "osType":null,\r\n "creationData":{\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n },\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersUpdateSnapshotsSnapshotUpdate11.command('delete') + .description($('Remove snapshot-update in update-parameters string or files, e.g. \r\n{\r\n "osType":null,\r\n "diskSizeGB":null,\r\n "encryptionSettings":{\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n },\r\n "tags":{\r\n },\r\n "sku":{\r\n "name":null,\r\n "tier":""\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--account-type', $('Remove the account-type value.')) .option('--os-type', $('Remove the os-type value.')) - .option('--creation-data', $('Remove the creation-data value.')) .option('--disk-size-g-b', $('Remove the disk-size-g-b value.')) .option('--encryption-settings', $('Remove the encryption-settings value.')) .option('--tags', $('Remove the tags value.')) + .option('--sku', $('Remove the sku value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2256,21 +2411,13 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.accountType || options.osType || options.creationData || options.diskSizeGB || options.encryptionSettings || options.tags; + var anySubItem = false || options.osType || options.diskSizeGB || options.encryptionSettings || options.tags || options.sku; if (anySubItem) { var subItemPath = null; - if (options.accountType) { - subItemPath = options.path + '/accountType'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.osType) { subItemPath = options.path + '/osType'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.creationData) { - subItemPath = options.path + '/creationData'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.diskSizeGB) { subItemPath = options.path + '/diskSizeGB'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -2283,7 +2430,11 @@ function display(cli, o) { subItemPath = options.path + '/tags'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - } + if (options.sku) { + subItemPath = options.path + '/sku'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } else { jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); } @@ -2298,22 +2449,20 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set creation-data - var catparametersUpdateSnapshotsCreationData0CD = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsCreationData0CD = catparametersUpdateSnapshotsCreationData0CD.category('update-parameters') + //update-parameters set encryption-settings + var catparametersUpdateSnapshotsEncryptionSettings0ES1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsEncryptionSettings0ES1 = catparametersUpdateSnapshotsEncryptionSettings0ES1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsCreationData0CD = parametersUpdateSnapshotsCreationData0CD.category('creation-data') - .description($('Commands to configure creation-data of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsCreationData0CD.command('set') - .description($('Set creation-data in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsEncryptionSettings0ES1 = parametersUpdateSnapshotsEncryptionSettings0ES1.category('encryption-settings') + .description($('Commands to configure encryption-settings of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsEncryptionSettings0ES1.command('set') + .description($('Set encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--create-option ', $('Set the create-option value.')) - .option('--storage-account-id ', $('Set the storage-account-id value.')) - .option('--image-reference ', $('Set the image-reference value.')) - .option('--source-uri ', $('Set the source-uri value.')) - .option('--source-resource-id ', $('Set the source-resource-id value.')) + .option('--enabled ', $('Set the enabled value.')) + .option('--disk-encryption-key ', $('Set the disk-encryption-key value.')) + .option('--key-encryption-key ', $('Set the key-encryption-key value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2328,65 +2477,44 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/creationData'; + options.path = '/encryptionSettings'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'createOption'; - if (options.createOption) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.createOption); - cli.output.verbose('================================================'); - if (options.parse && options.createOption) { - options.createOption = JSON.parse(options.createOption); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.createOption}]); - } - paramPath = options.path + '/' + 'storageAccountId'; - if (options.storageAccountId) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.storageAccountId); - cli.output.verbose('================================================'); - if (options.parse && options.storageAccountId) { - options.storageAccountId = JSON.parse(options.storageAccountId); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountId}]); - } - paramPath = options.path + '/' + 'imageReference'; - if (options.imageReference) { + var paramPath = options.path + '/' + 'enabled'; + if (options.enabled) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.imageReference); + cli.output.verbose('Value : ' + options.enabled); cli.output.verbose('================================================'); - if (options.parse && options.imageReference) { - options.imageReference = JSON.parse(options.imageReference); + if (options.parse && options.enabled) { + options.enabled = JSON.parse(options.enabled); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.imageReference}]); + options.enabled = JSON.parse(options.enabled); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.enabled}]); } - paramPath = options.path + '/' + 'sourceUri'; - if (options.sourceUri) { + paramPath = options.path + '/' + 'diskEncryptionKey'; + if (options.diskEncryptionKey) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceUri); + cli.output.verbose('Value : ' + options.diskEncryptionKey); cli.output.verbose('================================================'); - if (options.parse && options.sourceUri) { - options.sourceUri = JSON.parse(options.sourceUri); + if (options.parse && options.diskEncryptionKey) { + options.diskEncryptionKey = JSON.parse(options.diskEncryptionKey); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceUri}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskEncryptionKey}]); } - paramPath = options.path + '/' + 'sourceResourceId'; - if (options.sourceResourceId) { + paramPath = options.path + '/' + 'keyEncryptionKey'; + if (options.keyEncryptionKey) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceResourceId); + cli.output.verbose('Value : ' + options.keyEncryptionKey); cli.output.verbose('================================================'); - if (options.parse && options.sourceResourceId) { - options.sourceResourceId = JSON.parse(options.sourceResourceId); + if (options.parse && options.keyEncryptionKey) { + options.keyEncryptionKey = JSON.parse(options.keyEncryptionKey); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceResourceId}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyEncryptionKey}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2399,21 +2527,19 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete creation-data - var catparametersUpdateSnapshotsCreationData1CD = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsCreationData1CD = catparametersUpdateSnapshotsCreationData1CD.category('update-parameters') + //update-parameters delete encryption-settings + var catparametersUpdateSnapshotsEncryptionSettings1ES1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsEncryptionSettings1ES1 = catparametersUpdateSnapshotsEncryptionSettings1ES1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsCreationData1CD = parametersUpdateSnapshotsCreationData1CD.category('creation-data') - .description($('Commands to configure creation-data of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsCreationData1CD.command('delete') - .description($('Remove creation-data in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "creationData" : {\r\n "createOption":"",\r\n "storageAccountId":"",\r\n "imageReference":{\r\n "id":"",\r\n "lun":null\r\n },\r\n "sourceUri":"",\r\n "sourceResourceId":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsEncryptionSettings1ES1 = parametersUpdateSnapshotsEncryptionSettings1ES1.category('encryption-settings') + .description($('Commands to configure encryption-settings of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsEncryptionSettings1ES1.command('delete') + .description($('Remove encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--create-option', $('Remove the create-option value.')) - .option('--storage-account-id', $('Remove the storage-account-id value.')) - .option('--image-reference', $('Remove the image-reference value.')) - .option('--source-uri', $('Remove the source-uri value.')) - .option('--source-resource-id', $('Remove the source-resource-id value.')) + .option('--enabled', $('Remove the enabled value.')) + .option('--disk-encryption-key', $('Remove the disk-encryption-key value.')) + .option('--key-encryption-key', $('Remove the key-encryption-key value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2428,28 +2554,20 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/creationData'; - var anySubItem = false || options.createOption || options.storageAccountId || options.imageReference || options.sourceUri || options.sourceResourceId; + options.path = '/encryptionSettings'; + var anySubItem = false || options.enabled || options.diskEncryptionKey || options.keyEncryptionKey; if (anySubItem) { var subItemPath = null; - if (options.createOption) { - subItemPath = options.path + '/createOption'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.storageAccountId) { - subItemPath = options.path + '/storageAccountId'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.imageReference) { - subItemPath = options.path + '/imageReference'; + if (options.enabled) { + subItemPath = options.path + '/enabled'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.sourceUri) { - subItemPath = options.path + '/sourceUri'; + if (options.diskEncryptionKey) { + subItemPath = options.path + '/diskEncryptionKey'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.sourceResourceId) { - subItemPath = options.path + '/sourceResourceId'; + if (options.keyEncryptionKey) { + subItemPath = options.path + '/keyEncryptionKey'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2467,19 +2585,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set image-reference - var catparametersUpdateSnapshotsImageReference0CDiR = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsImageReference0CDiR = catparametersUpdateSnapshotsImageReference0CDiR.category('update-parameters') + //update-parameters set disk-encryption-key + var catparametersUpdateSnapshotsDiskEncryptionKey0ESdEK1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsDiskEncryptionKey0ESdEK1 = catparametersUpdateSnapshotsDiskEncryptionKey0ESdEK1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsImageReference0CDiR = parametersUpdateSnapshotsImageReference0CDiR.category('image-reference') - .description($('Commands to configure image-reference of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsImageReference0CDiR.command('set') - .description($('Set image-reference in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsDiskEncryptionKey0ESdEK1 = parametersUpdateSnapshotsDiskEncryptionKey0ESdEK1.category('disk-encryption-key') + .description($('Commands to configure disk-encryption-key of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsDiskEncryptionKey0ESdEK1.command('set') + .description($('Set disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--id ', $('Set the id value.')) - .option('--lun ', $('Set the lun value.')) + .option('--source-vault ', $('Set the source-vault value.')) + .option('--secret-url ', $('Set the secret-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2494,32 +2612,32 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/creationData/imageReference'; + options.path = '/encryptionSettings/diskEncryptionKey'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'id'; - if (options.id) { + var paramPath = options.path + '/' + 'sourceVault'; + if (options.sourceVault) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.id); + cli.output.verbose('Value : ' + options.sourceVault); cli.output.verbose('================================================'); - if (options.parse && options.id) { - options.id = JSON.parse(options.id); + if (options.parse && options.sourceVault) { + options.sourceVault = JSON.parse(options.sourceVault); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); } - paramPath = options.path + '/' + 'lun'; - if (options.lun) { + paramPath = options.path + '/' + 'secretUrl'; + if (options.secretUrl) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.lun); + cli.output.verbose('Value : ' + options.secretUrl); cli.output.verbose('================================================'); - if (options.parse && options.lun) { - options.lun = JSON.parse(options.lun); + if (options.parse && options.secretUrl) { + options.secretUrl = JSON.parse(options.secretUrl); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.lun}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.secretUrl}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2532,18 +2650,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete image-reference - var catparametersUpdateSnapshotsImageReference1CDiR = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsImageReference1CDiR = catparametersUpdateSnapshotsImageReference1CDiR.category('update-parameters') + //update-parameters delete disk-encryption-key + var catparametersUpdateSnapshotsDiskEncryptionKey1ESdEK1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsDiskEncryptionKey1ESdEK1 = catparametersUpdateSnapshotsDiskEncryptionKey1ESdEK1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsImageReference1CDiR = parametersUpdateSnapshotsImageReference1CDiR.category('image-reference') - .description($('Commands to configure image-reference of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsImageReference1CDiR.command('delete') - .description($('Remove image-reference in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "id":"",\r\n "lun":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsDiskEncryptionKey1ESdEK1 = parametersUpdateSnapshotsDiskEncryptionKey1ESdEK1.category('disk-encryption-key') + .description($('Commands to configure disk-encryption-key of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsDiskEncryptionKey1ESdEK1.command('delete') + .description($('Remove disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--id', $('Remove the id value.')) - .option('--lun', $('Remove the lun value.')) + .option('--source-vault', $('Remove the source-vault value.')) + .option('--secret-url', $('Remove the secret-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2558,16 +2676,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/creationData/imageReference'; - var anySubItem = false || options.id || options.lun; + options.path = '/encryptionSettings/diskEncryptionKey'; + var anySubItem = false || options.sourceVault || options.secretUrl; if (anySubItem) { var subItemPath = null; - if (options.id) { - subItemPath = options.path + '/id'; + if (options.sourceVault) { + subItemPath = options.path + '/sourceVault'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.lun) { - subItemPath = options.path + '/lun'; + if (options.secretUrl) { + subItemPath = options.path + '/secretUrl'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2585,20 +2703,18 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set encryption-settings - var catparametersUpdateSnapshotsEncryptionSettings0ES = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsEncryptionSettings0ES = catparametersUpdateSnapshotsEncryptionSettings0ES.category('update-parameters') + //update-parameters set source-vault + var catparametersUpdateSnapshotsSourceVault0ESdEKsV1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSourceVault0ESdEKsV1 = catparametersUpdateSnapshotsSourceVault0ESdEKsV1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsEncryptionSettings0ES = parametersUpdateSnapshotsEncryptionSettings0ES.category('encryption-settings') - .description($('Commands to configure encryption-settings of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsEncryptionSettings0ES.command('set') - .description($('Set encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsSourceVault0ESdEKsV1 = parametersUpdateSnapshotsSourceVault0ESdEKsV1.category('source-vault') + .description($('Commands to configure source-vault of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsSourceVault0ESdEKsV1.command('set') + .description($('Set source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--enabled ', $('Set the enabled value.')) - .option('--disk-encryption-key ', $('Set the disk-encryption-key value.')) - .option('--key-encryption-key ', $('Set the key-encryption-key value.')) + .option('--id ', $('Set the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2613,44 +2729,21 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings'; + options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'enabled'; - if (options.enabled) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.enabled); - cli.output.verbose('================================================'); - if (options.parse && options.enabled) { - options.enabled = JSON.parse(options.enabled); - } - options.enabled = JSON.parse(options.enabled); - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.enabled}]); - } - paramPath = options.path + '/' + 'diskEncryptionKey'; - if (options.diskEncryptionKey) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.diskEncryptionKey); - cli.output.verbose('================================================'); - if (options.parse && options.diskEncryptionKey) { - options.diskEncryptionKey = JSON.parse(options.diskEncryptionKey); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diskEncryptionKey}]); - } - paramPath = options.path + '/' + 'keyEncryptionKey'; - if (options.keyEncryptionKey) { + var paramPath = options.path + '/' + 'id'; + if (options.id) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.keyEncryptionKey); + cli.output.verbose('Value : ' + options.id); cli.output.verbose('================================================'); - if (options.parse && options.keyEncryptionKey) { - options.keyEncryptionKey = JSON.parse(options.keyEncryptionKey); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyEncryptionKey}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2663,19 +2756,17 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete encryption-settings - var catparametersUpdateSnapshotsEncryptionSettings1ES = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsEncryptionSettings1ES = catparametersUpdateSnapshotsEncryptionSettings1ES.category('update-parameters') + //update-parameters delete source-vault + var catparametersUpdateSnapshotsSourceVault1ESdEKsV1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSourceVault1ESdEKsV1 = catparametersUpdateSnapshotsSourceVault1ESdEKsV1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsEncryptionSettings1ES = parametersUpdateSnapshotsEncryptionSettings1ES.category('encryption-settings') - .description($('Commands to configure encryption-settings of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsEncryptionSettings1ES.command('delete') - .description($('Remove encryption-settings in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "enabled":null,\r\n "diskEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n },\r\n "keyEncryptionKey":{\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsSourceVault1ESdEKsV1 = parametersUpdateSnapshotsSourceVault1ESdEKsV1.category('source-vault') + .description($('Commands to configure source-vault of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsSourceVault1ESdEKsV1.command('delete') + .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--enabled', $('Remove the enabled value.')) - .option('--disk-encryption-key', $('Remove the disk-encryption-key value.')) - .option('--key-encryption-key', $('Remove the key-encryption-key value.')) + .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2690,20 +2781,12 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings'; - var anySubItem = false || options.enabled || options.diskEncryptionKey || options.keyEncryptionKey; + options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; - if (options.enabled) { - subItemPath = options.path + '/enabled'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.diskEncryptionKey) { - subItemPath = options.path + '/diskEncryptionKey'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.keyEncryptionKey) { - subItemPath = options.path + '/keyEncryptionKey'; + if (options.id) { + subItemPath = options.path + '/id'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2721,19 +2804,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set disk-encryption-key - var catparametersUpdateSnapshotsDiskEncryptionKey0ESdEK = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsDiskEncryptionKey0ESdEK = catparametersUpdateSnapshotsDiskEncryptionKey0ESdEK.category('update-parameters') + //update-parameters set key-encryption-key + var catparametersUpdateSnapshotsKeyEncryptionKey0ESkEK1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsKeyEncryptionKey0ESkEK1 = catparametersUpdateSnapshotsKeyEncryptionKey0ESkEK1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsDiskEncryptionKey0ESdEK = parametersUpdateSnapshotsDiskEncryptionKey0ESdEK.category('disk-encryption-key') - .description($('Commands to configure disk-encryption-key of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsDiskEncryptionKey0ESdEK.command('set') - .description($('Set disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsKeyEncryptionKey0ESkEK1 = parametersUpdateSnapshotsKeyEncryptionKey0ESkEK1.category('key-encryption-key') + .description($('Commands to configure key-encryption-key of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsKeyEncryptionKey0ESkEK1.command('set') + .description($('Set key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--source-vault ', $('Set the source-vault value.')) - .option('--secret-url ', $('Set the secret-url value.')) + .option('--key-url ', $('Set the key-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2748,7 +2831,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/diskEncryptionKey'; + options.path = '/encryptionSettings/keyEncryptionKey'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); @@ -2764,16 +2847,16 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); } - paramPath = options.path + '/' + 'secretUrl'; - if (options.secretUrl) { + paramPath = options.path + '/' + 'keyUrl'; + if (options.keyUrl) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.secretUrl); + cli.output.verbose('Value : ' + options.keyUrl); cli.output.verbose('================================================'); - if (options.parse && options.secretUrl) { - options.secretUrl = JSON.parse(options.secretUrl); + if (options.parse && options.keyUrl) { + options.keyUrl = JSON.parse(options.keyUrl); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.secretUrl}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyUrl}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -2786,18 +2869,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete disk-encryption-key - var catparametersUpdateSnapshotsDiskEncryptionKey1ESdEK = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsDiskEncryptionKey1ESdEK = catparametersUpdateSnapshotsDiskEncryptionKey1ESdEK.category('update-parameters') + //update-parameters delete key-encryption-key + var catparametersUpdateSnapshotsKeyEncryptionKey1ESkEK1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsKeyEncryptionKey1ESkEK1 = catparametersUpdateSnapshotsKeyEncryptionKey1ESkEK1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsDiskEncryptionKey1ESdEK = parametersUpdateSnapshotsDiskEncryptionKey1ESdEK.category('disk-encryption-key') - .description($('Commands to configure disk-encryption-key of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsDiskEncryptionKey1ESdEK.command('delete') - .description($('Remove disk-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "secretUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsKeyEncryptionKey1ESkEK1 = parametersUpdateSnapshotsKeyEncryptionKey1ESkEK1.category('key-encryption-key') + .description($('Commands to configure key-encryption-key of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsKeyEncryptionKey1ESkEK1.command('delete') + .description($('Remove key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--source-vault', $('Remove the source-vault value.')) - .option('--secret-url', $('Remove the secret-url value.')) + .option('--key-url', $('Remove the key-url value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2812,16 +2895,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/diskEncryptionKey'; - var anySubItem = false || options.sourceVault || options.secretUrl; + options.path = '/encryptionSettings/keyEncryptionKey'; + var anySubItem = false || options.sourceVault || options.keyUrl; if (anySubItem) { var subItemPath = null; if (options.sourceVault) { subItemPath = options.path + '/sourceVault'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.secretUrl) { - subItemPath = options.path + '/secretUrl'; + if (options.keyUrl) { + subItemPath = options.path + '/keyUrl'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -2839,14 +2922,14 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set source-vault - var catparametersUpdateSnapshotsSourceVault0ESdEKsV = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsSourceVault0ESdEKsV = catparametersUpdateSnapshotsSourceVault0ESdEKsV.category('update-parameters') + //update-parameters set key-encryption-key-source-vault + var catparametersUpdateSnapshotsSourceVault0ESkEKsV2 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSourceVault0ESkEKsV2 = catparametersUpdateSnapshotsSourceVault0ESkEKsV2.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsSourceVault0ESdEKsV = parametersUpdateSnapshotsSourceVault0ESdEKsV.category('source-vault') - .description($('Commands to configure source-vault of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsSourceVault0ESdEKsV.command('set') - .description($('Set source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsSourceVault0ESkEKsV2 = parametersUpdateSnapshotsSourceVault0ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsSourceVault0ESkEKsV2.command('set') + .description($('Set key-encryption-key-source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -2865,7 +2948,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); @@ -2892,14 +2975,14 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete source-vault - var catparametersUpdateSnapshotsSourceVault1ESdEKsV = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsSourceVault1ESdEKsV = catparametersUpdateSnapshotsSourceVault1ESdEKsV.category('update-parameters') + //update-parameters delete key-encryption-key-source-vault + var catparametersUpdateSnapshotsSourceVault1ESkEKsV2 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSourceVault1ESkEKsV2 = catparametersUpdateSnapshotsSourceVault1ESkEKsV2.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsSourceVault1ESdEKsV = parametersUpdateSnapshotsSourceVault1ESdEKsV.category('source-vault') - .description($('Commands to configure source-vault of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsSourceVault1ESdEKsV.command('delete') - .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsSourceVault1ESkEKsV2 = parametersUpdateSnapshotsSourceVault1ESkEKsV2.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsSourceVault1ESkEKsV2.command('delete') + .description($('Remove key-encryption-key-source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--id', $('Remove the id value.')) @@ -2917,7 +3000,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/diskEncryptionKey/sourceVault'; + options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; @@ -2940,19 +3023,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters set key-encryption-key - var catparametersUpdateSnapshotsKeyEncryptionKey0ESkEK = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsKeyEncryptionKey0ESkEK = catparametersUpdateSnapshotsKeyEncryptionKey0ESkEK.category('update-parameters') + //update-parameters set sku + var catparametersUpdateSnapshotsSku0S1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSku0S1 = catparametersUpdateSnapshotsSku0S1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var setparametersUpdateSnapshotsKeyEncryptionKey0ESkEK = parametersUpdateSnapshotsKeyEncryptionKey0ESkEK.category('key-encryption-key') - .description($('Commands to configure key-encryption-key of managed-snapshot in update-parameters file.')); - setparametersUpdateSnapshotsKeyEncryptionKey0ESkEK.command('set') - .description($('Set key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersUpdateSnapshotsSku0S1 = parametersUpdateSnapshotsSku0S1.category('sku') + .description($('Commands to configure sku of managed-snapshot in update-parameters file.')); + setparametersUpdateSnapshotsSku0S1.command('set') + .description($('Set sku in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--source-vault ', $('Set the source-vault value.')) - .option('--key-url ', $('Set the key-url value.')) + .option('--name ', $('Set the name value.')) + .option('--tier ', $('Set the tier value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2967,32 +3050,32 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/encryptionSettings/keyEncryptionKey'; + options.path = '/sku'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - var paramPath = options.path + '/' + 'sourceVault'; - if (options.sourceVault) { + var paramPath = options.path + '/' + 'name'; + if (options.name) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.sourceVault); + cli.output.verbose('Value : ' + options.name); cli.output.verbose('================================================'); - if (options.parse && options.sourceVault) { - options.sourceVault = JSON.parse(options.sourceVault); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.sourceVault}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); } - paramPath = options.path + '/' + 'keyUrl'; - if (options.keyUrl) { + paramPath = options.path + '/' + 'tier'; + if (options.tier) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.keyUrl); + cli.output.verbose('Value : ' + options.tier); cli.output.verbose('================================================'); - if (options.parse && options.keyUrl) { - options.keyUrl = JSON.parse(options.keyUrl); + if (options.parse && options.tier) { + options.tier = JSON.parse(options.tier); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.keyUrl}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tier}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3005,18 +3088,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //update-parameters delete key-encryption-key - var catparametersUpdateSnapshotsKeyEncryptionKey1ESkEK = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsKeyEncryptionKey1ESkEK = catparametersUpdateSnapshotsKeyEncryptionKey1ESkEK.category('update-parameters') + //update-parameters delete sku + var catparametersUpdateSnapshotsSku1S1 = cli.category('managed-snapshot'); + var parametersUpdateSnapshotsSku1S1 = catparametersUpdateSnapshotsSku1S1.category('update-parameters') .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsKeyEncryptionKey1ESkEK = parametersUpdateSnapshotsKeyEncryptionKey1ESkEK.category('key-encryption-key') - .description($('Commands to configure key-encryption-key of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsKeyEncryptionKey1ESkEK.command('delete') - .description($('Remove key-encryption-key in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "keyUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersUpdateSnapshotsSku1S1 = parametersUpdateSnapshotsSku1S1.category('sku') + .description($('Commands to configure sku of managed-snapshot in update-parameters file.')); + deleteparametersUpdateSnapshotsSku1S1.command('delete') + .description($('Remove sku in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":null,\r\n "tier":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--source-vault', $('Remove the source-vault value.')) - .option('--key-url', $('Remove the key-url value.')) + .option('--name', $('Remove the name value.')) + .option('--tier', $('Remove the tier value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -3031,16 +3114,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/encryptionSettings/keyEncryptionKey'; - var anySubItem = false || options.sourceVault || options.keyUrl; + options.path = '/sku'; + var anySubItem = false || options.name || options.tier; if (anySubItem) { var subItemPath = null; - if (options.sourceVault) { - subItemPath = options.path + '/sourceVault'; + if (options.name) { + subItemPath = options.path + '/name'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - if (options.keyUrl) { - subItemPath = options.path + '/keyUrl'; + if (options.tier) { + subItemPath = options.path + '/tier'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -3058,42 +3141,6 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //update-parameters delete source-vault - var catparametersUpdateSnapshotsSourceVault1ESkEKsV1 = cli.category('managed-snapshot'); - var parametersUpdateSnapshotsSourceVault1ESkEKsV1 = catparametersUpdateSnapshotsSourceVault1ESkEKsV1.category('update-parameters') - .description($('Commands to manage configuration of snapshots in the parameter file.')); - var deleteparametersUpdateSnapshotsSourceVault1ESkEKsV1 = parametersUpdateSnapshotsSourceVault1ESkEKsV1.category('source-vault') - .description($('Commands to configure source-vault of managed-snapshot in update-parameters file.')); - deleteparametersUpdateSnapshotsSourceVault1ESkEKsV1.command('delete') - .description($('Remove source-vault in update-parameters string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) - .usage('[options]') - .option('--parameter-file ', $('The parameter file path.')) - .execute(function(options, _) { - cli.output.verbose(JSON.stringify(options), _); - if (!options.parameterFile) { - options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); - } - - cli.output.verbose('====================================='); - cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); - cli.output.verbose('====================================='); - var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); - var parametersObj = JSON.parse(fileContent); - cli.output.verbose('JSON object:'); - cli.output.verbose(JSON.stringify(parametersObj)); - options.operation = 'remove'; - options.path = '/encryptionSettings/keyEncryptionKey/sourceVault'; - - var updatedContent = JSON.stringify(parametersObj); - cli.output.verbose('====================================='); - cli.output.verbose('JSON object (updated):'); - cli.output.verbose(JSON.stringify(parametersObj)); - cli.output.verbose('====================================='); - fs.writeFileSync(options.parameterFile, beautify(updatedContent)); - cli.output.verbose('====================================='); - cli.output.verbose('Parameter file updated at: ' + options.parameterFile); - cli.output.verbose('====================================='); - }); diff --git a/lib/commands/arm/compute/virtualMachineScaleSetVMs._js b/lib/commands/arm/compute/virtualMachineScaleSetVMs._js index 9cf8522e7d..42a9be9083 100644 --- a/lib/commands/arm/compute/virtualMachineScaleSetVMs._js +++ b/lib/commands/arm/compute/virtualMachineScaleSetVMs._js @@ -75,10 +75,12 @@ azure vmssvm start */ 'use strict'; + var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function capitalize(str) { +var $ = utils.getLocaleString; +function capitalize(str) { if (str && str.length >= 1) { return str.charAt(0).toUpperCase() + str.slice(1); } @@ -125,7 +127,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* VirtualMachineScaleSetVMs Deallocate diff --git a/lib/commands/arm/compute/virtualMachineScaleSets._js b/lib/commands/arm/compute/virtualMachineScaleSets._js index 1b6620c8a8..8b470b75ed 100644 --- a/lib/commands/arm/compute/virtualMachineScaleSets._js +++ b/lib/commands/arm/compute/virtualMachineScaleSets._js @@ -28,10 +28,13 @@ azure vmss config virtual-machine-scale-set set --sku $sku --plan $plan --upgrade-policy $upgradePolicy +--recovery-policy $recoveryPolicy --virtual-machine-profile $virtualMachineProfile --provisioning-state $provisioningState --overprovision $overprovision +--unique-id $uniqueId --single-placement-group $singlePlacementGroup +--identity $identity --id $id --name $name --type $type @@ -43,10 +46,13 @@ azure vmss config virtual-machine-scale-set delete --sku --plan --upgrade-policy +--recovery-policy --virtual-machine-profile --provisioning-state --overprovision +--unique-id --single-placement-group +--identity --id --name --type @@ -90,20 +96,33 @@ azure vmss config upgrade-policy delete --parameter-file $f --mode +azure vmss config recovery-policy set +--parameter-file $f +--parse +--mode $mode + +azure vmss config recovery-policy delete +--parameter-file $f +--mode + azure vmss config virtual-machine-profile set --parameter-file $f --parse --os-profile $osProfile --storage-profile $storageProfile --network-profile $networkProfile +--diagnostics-profile $diagnosticsProfile --extension-profile $extensionProfile +--license-type $licenseType azure vmss config virtual-machine-profile delete --parameter-file $f --os-profile --storage-profile --network-profile +--diagnostics-profile --extension-profile +--license-type azure vmss config os-profile set --parameter-file $f @@ -360,9 +379,16 @@ azure vmss config data-disks delete --disk-size-g-b --managed-disk -azure vmss config managed-disk delete +azure vmss config data-disks-managed-disk set +--parameter-file $f +--data-disks-index $i +--parse +--storage-account-type $storageAccountType + +azure vmss config data-disks-managed-disk delete --parameter-file $f --data-disks-index $pdata-disks-index +--storage-account-type azure vmss config network-profile set --parameter-file $f @@ -380,6 +406,8 @@ azure vmss config network-interface-configurations set --parse --name $name --primary $primary +--network-security-group $networkSecurityGroup +--dns-settings $dnsSettings --ip-configurations $ipConfigurations --id $id @@ -388,9 +416,45 @@ azure vmss config network-interface-configurations delete --index $pindex --name --primary +--network-security-group +--dns-settings --ip-configurations --id +azure vmss config network-security-group set +--parameter-file $f +--network-interface-configurations-index $i +--parse +--id $id + +azure vmss config network-security-group delete +--parameter-file $f +--network-interface-configurations-index $pnetwork-interface-configurations-index +--id + +azure vmss config dns-settings set +--parameter-file $f +--network-interface-configurations-index $i +--parse +--dns-servers $dnsServers + +azure vmss config dns-settings delete +--parameter-file $f +--network-interface-configurations-index $pnetwork-interface-configurations-index +--dns-servers + +azure vmss config dns-servers set +--parameter-file $f +--index $i +--network-interface-configurations-index $i +--value $v +--parse + +azure vmss config dns-servers delete +--parameter-file $f +--index $pindex +--network-interface-configurations-index $pnetwork-interface-configurations-index + azure vmss config ip-configurations set --parameter-file $f --index $i @@ -399,6 +463,8 @@ azure vmss config ip-configurations set --parse --name $name --subnet $subnet +--public-ip-address-configuration $publicIPAddressConfiguration +--private-ip-address-version $privateIPAddressVersion --application-gateway-backend-address-pools $applicationGatewayBackendAddressPools --load-balancer-backend-address-pools $loadBalancerBackendAddressPools --load-balancer-inbound-nat-pools $loadBalancerInboundNatPools @@ -410,6 +476,8 @@ azure vmss config ip-configurations delete --network-interface-configurations-index $pnetwork-interface-configurations-index --name --subnet +--public-ip-address-configuration +--private-ip-address-version --application-gateway-backend-address-pools --load-balancer-backend-address-pools --load-balancer-inbound-nat-pools @@ -428,6 +496,36 @@ azure vmss config subnet delete --network-interface-configurations-index $pnetwork-interface-configurations-index --id +azure vmss config public-ip-address-configuration set +--parameter-file $f +--ip-configurations-index $i +--network-interface-configurations-index $i +--parse +--name $name +--idle-timeout-in-minutes $idleTimeoutInMinutes +--dns-settings $dnsSettings + +azure vmss config public-ip-address-configuration delete +--parameter-file $f +--ip-configurations-index $pip-configurations-index +--network-interface-configurations-index $pnetwork-interface-configurations-index +--name +--idle-timeout-in-minutes +--dns-settings + +azure vmss config public-ip-address-configuration-dns-settings set +--parameter-file $f +--ip-configurations-index $i +--network-interface-configurations-index $i +--parse +--domain-name-label $domainNameLabel + +azure vmss config public-ip-address-configuration-dns-settings delete +--parameter-file $f +--ip-configurations-index $pip-configurations-index +--network-interface-configurations-index $pnetwork-interface-configurations-index +--domain-name-label + azure vmss config application-gateway-backend-address-pools set --parameter-file $f --index $i @@ -476,6 +574,26 @@ azure vmss config load-balancer-inbound-nat-pools delete --network-interface-configurations-index $pnetwork-interface-configurations-index --id +azure vmss config diagnostics-profile set +--parameter-file $f +--parse +--boot-diagnostics $bootDiagnostics + +azure vmss config diagnostics-profile delete +--parameter-file $f +--boot-diagnostics + +azure vmss config boot-diagnostics set +--parameter-file $f +--parse +--enabled $enabled +--storage-uri $storageUri + +azure vmss config boot-diagnostics delete +--parameter-file $f +--enabled +--storage-uri + azure vmss config extension-profile set --parameter-file $f --parse @@ -513,6 +631,19 @@ azure vmss config extensions delete --provisioning-state --id +azure vmss config identity set +--parameter-file $f +--parse +--principal-id $principalId +--tenant-id $tenantId +--type $type + +azure vmss config identity delete +--parameter-file $f +--principal-id +--tenant-id +--type + azure vmss create --resource-group $p0 --name $p1 @@ -585,13 +716,15 @@ azure vmss update-instances */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } @@ -642,7 +775,10 @@ function display(cli, o) { } cli.output.data(str); } -}exports.init = function (cli) { +} +exports.init = function (cli) { + + /* VirtualMachineScaleSets CreateOrUpdate @@ -665,6 +801,9 @@ function display(cli, o) { "upgradePolicy":{ "mode":null }, + "recoveryPolicy":{ + "mode":null + }, "virtualMachineProfile":{ "osProfile":{ "computerNamePrefix":"", @@ -758,12 +897,28 @@ function display(cli, o) { { "name":"", "primary":null, + "networkSecurityGroup":{ + "id":"" + }, + "dnsSettings":{ + "dnsServers":[ + "" + ] + }, "ipConfigurations":[ { "name":"", "subnet":{ "id":"" }, + "publicIPAddressConfiguration":{ + "name":"", + "idleTimeoutInMinutes":null, + "dnsSettings":{ + "domainNameLabel":"" + } + }, + "privateIPAddressVersion":"", "applicationGatewayBackendAddressPools":[ { "id":"" @@ -786,6 +941,12 @@ function display(cli, o) { } ] }, + "diagnosticsProfile":{ + "bootDiagnostics":{ + "enabled":null, + "storageUri":"" + } + }, "extensionProfile":{ "extensions":[ { @@ -802,11 +963,18 @@ function display(cli, o) { "id":null } ] - } + }, + "licenseType":"" }, "provisioningState":"", "overprovision":null, + "uniqueId":"", "singlePlacementGroup":null, + "identity":{ + "principalId":"", + "tenantId":"", + "type":null + }, "id":null, "name":null, "type":null, @@ -861,12 +1029,12 @@ function display(cli, o) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"sku\":{\"name\":\"\",\"tier\":\"\",\"capacity\":null},\"plan\":{\"name\":\"\",\"publisher\":\"\",\"product\":\"\",\"promotionCode\":\"\"},\"upgradePolicy\":{\"mode\":null},\"virtualMachineProfile\":{\"osProfile\":{\"computerNamePrefix\":\"\",\"adminUsername\":\"\",\"adminPassword\":\"\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":null,\"enableAutomaticUpdates\":null,\"timeZone\":\"\",\"additionalUnattendContent\":[{\"passName\":null,\"componentName\":null,\"settingName\":null,\"content\":\"\"}],\"winRM\":{\"listeners\":[{\"protocol\":null,\"certificateUrl\":\"\"}]}},\"linuxConfiguration\":{\"disablePasswordAuthentication\":null,\"ssh\":{\"publicKeys\":[{\"path\":\"\",\"keyData\":\"\"}]}},\"secrets\":[{\"sourceVault\":{\"id\":\"\"},\"vaultCertificates\":[{\"certificateUrl\":\"\",\"certificateStore\":\"\"}]}]},\"storageProfile\":{\"imageReference\":{\"publisher\":\"\",\"offer\":\"\",\"sku\":\"\",\"version\":\"\",\"id\":\"\"},\"osDisk\":{\"name\":\"\",\"caching\":null,\"createOption\":\"\",\"osType\":null,\"image\":{\"uri\":\"\"},\"vhdContainers\":[\"\"],\"managedDisk\":{\"storageAccountType\":null}},\"dataDisks\":[{\"name\":\"\",\"lun\":\"\",\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null}}]},\"networkProfile\":{\"networkInterfaceConfigurations\":[{\"name\":\"\",\"primary\":null,\"ipConfigurations\":[{\"name\":\"\",\"subnet\":{\"id\":\"\"},\"applicationGatewayBackendAddressPools\":[{\"id\":\"\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"\"}],\"id\":\"\"}],\"id\":\"\"}]},\"extensionProfile\":{\"extensions\":[{\"name\":\"\",\"publisher\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"autoUpgradeMinorVersion\":null,\"settings\":{},\"protectedSettings\":{},\"provisioningState\":\"\",\"id\":null}]}},\"provisioningState\":\"\",\"overprovision\":null,\"singlePlacementGroup\":null,\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"sku\":{\"name\":\"\",\"tier\":\"\",\"capacity\":null},\"plan\":{\"name\":\"\",\"publisher\":\"\",\"product\":\"\",\"promotionCode\":\"\"},\"upgradePolicy\":{\"mode\":null},\"recoveryPolicy\":{\"mode\":null},\"virtualMachineProfile\":{\"osProfile\":{\"computerNamePrefix\":\"\",\"adminUsername\":\"\",\"adminPassword\":\"\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":null,\"enableAutomaticUpdates\":null,\"timeZone\":\"\",\"additionalUnattendContent\":[{\"passName\":null,\"componentName\":null,\"settingName\":null,\"content\":\"\"}],\"winRM\":{\"listeners\":[{\"protocol\":null,\"certificateUrl\":\"\"}]}},\"linuxConfiguration\":{\"disablePasswordAuthentication\":null,\"ssh\":{\"publicKeys\":[{\"path\":\"\",\"keyData\":\"\"}]}},\"secrets\":[{\"sourceVault\":{\"id\":\"\"},\"vaultCertificates\":[{\"certificateUrl\":\"\",\"certificateStore\":\"\"}]}]},\"storageProfile\":{\"imageReference\":{\"publisher\":\"\",\"offer\":\"\",\"sku\":\"\",\"version\":\"\",\"id\":\"\"},\"osDisk\":{\"name\":\"\",\"caching\":null,\"createOption\":\"\",\"osType\":null,\"image\":{\"uri\":\"\"},\"vhdContainers\":[\"\"],\"managedDisk\":{\"storageAccountType\":null}},\"dataDisks\":[{\"name\":\"\",\"lun\":\"\",\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null}}]},\"networkProfile\":{\"networkInterfaceConfigurations\":[{\"name\":\"\",\"primary\":null,\"networkSecurityGroup\":{\"id\":\"\"},\"dnsSettings\":{\"dnsServers\":[\"\"]},\"ipConfigurations\":[{\"name\":\"\",\"subnet\":{\"id\":\"\"},\"publicIPAddressConfiguration\":{\"name\":\"\",\"idleTimeoutInMinutes\":null,\"dnsSettings\":{\"domainNameLabel\":\"\"}},\"privateIPAddressVersion\":\"\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"\"}],\"id\":\"\"}],\"id\":\"\"}]},\"diagnosticsProfile\":{\"bootDiagnostics\":{\"enabled\":null,\"storageUri\":\"\"}},\"extensionProfile\":{\"extensions\":[{\"name\":\"\",\"publisher\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"autoUpgradeMinorVersion\":null,\"settings\":{},\"protectedSettings\":{},\"provisioningState\":\"\",\"id\":null}]},\"licenseType\":\"\"},\"provisioningState\":\"\",\"overprovision\":null,\"uniqueId\":\"\",\"singlePlacementGroup\":null,\"identity\":{\"principalId\":\"\",\"tenantId\":\"\",\"type\":null},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'virtualMachineScaleSetsCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"sku\":{\r\n\"name\":\"\",\r\n\"tier\":\"\",\r\n\"capacity\":null\r\n},\r\n\"plan\":{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"product\":\"\",\r\n\"promotionCode\":\"\"\r\n},\r\n\"upgradePolicy\":{\r\n\"mode\":null\r\n},\r\n\"virtualMachineProfile\":{\r\n\"osProfile\":{\r\n\"computerNamePrefix\":\"\",\r\n\"adminUsername\":\"\",\r\n\"adminPassword\":\"\",\r\n\"customData\":\"\",\r\n\"windowsConfiguration\":{\r\n\"provisionVMAgent\":null,\r\n\"enableAutomaticUpdates\":null,\r\n\"timeZone\":\"\",\r\n\"additionalUnattendContent\":[\r\n{\r\n\"passName\":null,\r\n\"componentName\":null,\r\n\"settingName\":null,\r\n\"content\":\"\"\r\n}\r\n],\r\n\"winRM\":{\r\n\"listeners\":[\r\n{\r\n\"protocol\":null,\r\n\"certificateUrl\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"linuxConfiguration\":{\r\n\"disablePasswordAuthentication\":null,\r\n\"ssh\":{\r\n\"publicKeys\":[\r\n{\r\n\"path\":\"\",\r\n\"keyData\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"secrets\":[\r\n{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"vaultCertificates\":[\r\n{\r\n\"certificateUrl\":\"\",\r\n\"certificateStore\":\"\"\r\n}\r\n]\r\n}\r\n]\r\n},\r\n\"storageProfile\":{\r\n\"imageReference\":{\r\n\"publisher\":\"\",\r\n\"offer\":\"\",\r\n\"sku\":\"\",\r\n\"version\":\"\",\r\n\"id\":\"\"\r\n},\r\n\"osDisk\":{\r\n\"name\":\"\",\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"osType\":null,\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"vhdContainers\":[\r\n\"\"\r\n],\r\n\"managedDisk\":{\r\n\"storageAccountType\":null\r\n}\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"name\":\"\",\r\n\"lun\":\"\",\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null\r\n}\r\n}\r\n]\r\n},\r\n\"networkProfile\":{\r\n\"networkInterfaceConfigurations\":[\r\n{\r\n\"name\":\"\",\r\n\"primary\":null,\r\n\"ipConfigurations\":[\r\n{\r\n\"name\":\"\",\r\n\"subnet\":{\r\n\"id\":\"\"\r\n},\r\n\"applicationGatewayBackendAddressPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"loadBalancerBackendAddressPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"loadBalancerInboundNatPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"id\":\"\"\r\n}\r\n],\r\n\"id\":\"\"\r\n}\r\n]\r\n},\r\n\"extensionProfile\":{\r\n\"extensions\":[\r\n{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"autoUpgradeMinorVersion\":null,\r\n\"settings\":{\r\n},\r\n\"protectedSettings\":{\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null\r\n}\r\n]\r\n}\r\n},\r\n\"provisioningState\":\"\",\r\n\"overprovision\":null,\r\n\"singlePlacementGroup\":null,\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"sku\":{\r\n\"name\":\"\",\r\n\"tier\":\"\",\r\n\"capacity\":null\r\n},\r\n\"plan\":{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"product\":\"\",\r\n\"promotionCode\":\"\"\r\n},\r\n\"upgradePolicy\":{\r\n\"mode\":null\r\n},\r\n\"recoveryPolicy\":{\r\n\"mode\":null\r\n},\r\n\"virtualMachineProfile\":{\r\n\"osProfile\":{\r\n\"computerNamePrefix\":\"\",\r\n\"adminUsername\":\"\",\r\n\"adminPassword\":\"\",\r\n\"customData\":\"\",\r\n\"windowsConfiguration\":{\r\n\"provisionVMAgent\":null,\r\n\"enableAutomaticUpdates\":null,\r\n\"timeZone\":\"\",\r\n\"additionalUnattendContent\":[\r\n{\r\n\"passName\":null,\r\n\"componentName\":null,\r\n\"settingName\":null,\r\n\"content\":\"\"\r\n}\r\n],\r\n\"winRM\":{\r\n\"listeners\":[\r\n{\r\n\"protocol\":null,\r\n\"certificateUrl\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"linuxConfiguration\":{\r\n\"disablePasswordAuthentication\":null,\r\n\"ssh\":{\r\n\"publicKeys\":[\r\n{\r\n\"path\":\"\",\r\n\"keyData\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"secrets\":[\r\n{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"vaultCertificates\":[\r\n{\r\n\"certificateUrl\":\"\",\r\n\"certificateStore\":\"\"\r\n}\r\n]\r\n}\r\n]\r\n},\r\n\"storageProfile\":{\r\n\"imageReference\":{\r\n\"publisher\":\"\",\r\n\"offer\":\"\",\r\n\"sku\":\"\",\r\n\"version\":\"\",\r\n\"id\":\"\"\r\n},\r\n\"osDisk\":{\r\n\"name\":\"\",\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"osType\":null,\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"vhdContainers\":[\r\n\"\"\r\n],\r\n\"managedDisk\":{\r\n\"storageAccountType\":null\r\n}\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"name\":\"\",\r\n\"lun\":\"\",\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null\r\n}\r\n}\r\n]\r\n},\r\n\"networkProfile\":{\r\n\"networkInterfaceConfigurations\":[\r\n{\r\n\"name\":\"\",\r\n\"primary\":null,\r\n\"networkSecurityGroup\":{\r\n\"id\":\"\"\r\n},\r\n\"dnsSettings\":{\r\n\"dnsServers\":[\r\n\"\"\r\n]\r\n},\r\n\"ipConfigurations\":[\r\n{\r\n\"name\":\"\",\r\n\"subnet\":{\r\n\"id\":\"\"\r\n},\r\n\"publicIPAddressConfiguration\":{\r\n\"name\":\"\",\r\n\"idleTimeoutInMinutes\":null,\r\n\"dnsSettings\":{\r\n\"domainNameLabel\":\"\"\r\n}\r\n},\r\n\"privateIPAddressVersion\":\"\",\r\n\"applicationGatewayBackendAddressPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"loadBalancerBackendAddressPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"loadBalancerInboundNatPools\":[\r\n{\r\n\"id\":\"\"\r\n}\r\n],\r\n\"id\":\"\"\r\n}\r\n],\r\n\"id\":\"\"\r\n}\r\n]\r\n},\r\n\"diagnosticsProfile\":{\r\n\"bootDiagnostics\":{\r\n\"enabled\":null,\r\n\"storageUri\":\"\"\r\n}\r\n},\r\n\"extensionProfile\":{\r\n\"extensions\":[\r\n{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"autoUpgradeMinorVersion\":null,\r\n\"settings\":{\r\n},\r\n\"protectedSettings\":{\r\n},\r\n\"provisioningState\":\"\",\r\n\"id\":null\r\n}\r\n]\r\n},\r\n\"licenseType\":\"\"\r\n},\r\n\"provisioningState\":\"\",\r\n\"overprovision\":null,\r\n\"uniqueId\":\"\",\r\n\"singlePlacementGroup\":null,\r\n\"identity\":{\r\n\"principalId\":\"\",\r\n\"tenantId\":\"\",\r\n\"type\":null\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -918,23 +1086,26 @@ function display(cli, o) { }); //config set virtual-machine-scale-set - var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0 = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0.category('virtual-machine-scale-set') + var setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01.category('virtual-machine-scale-set') .description($('Commands to configure virtual-machine-scale-set of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet0.command('set') - .description($('Set virtual-machine-scale-set in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "upgradePolicy":{\r\n "mode":null\r\n },\r\n "virtualMachineProfile":{\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n },\r\n "provisioningState":"",\r\n "overprovision":null,\r\n "singlePlacementGroup":null,\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet01.command('set') + .description($('Set virtual-machine-scale-set in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "upgradePolicy":{\r\n "mode":null\r\n },\r\n "recoveryPolicy":{\r\n "mode":null\r\n },\r\n "virtualMachineProfile":{\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n },\r\n "licenseType":""\r\n },\r\n "provisioningState":"",\r\n "overprovision":null,\r\n "uniqueId":"",\r\n "singlePlacementGroup":null,\r\n "identity":{\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--sku ', $('Set the sku value.')) .option('--plan ', $('Set the plan value.')) .option('--upgrade-policy ', $('Set the upgrade-policy value.')) + .option('--recovery-policy ', $('Set the recovery-policy value.')) .option('--virtual-machine-profile ', $('Set the virtual-machine-profile value.')) .option('--provisioning-state ', $('Set the provisioning-state value.')) .option('--overprovision ', $('Set the overprovision value.')) + .option('--unique-id ', $('Set the unique-id value.')) .option('--single-placement-group ', $('Set the single-placement-group value.')) + .option('--identity ', $('Set the identity value.')) .option('--id ', $('Set the id value.')) .option('--name ', $('Set the name value.')) .option('--type ', $('Set the type value.')) @@ -992,6 +1163,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.upgradePolicy}]); } + paramPath = options.path + '/' + 'recoveryPolicy'; + if (options.recoveryPolicy) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.recoveryPolicy); + cli.output.verbose('================================================'); + if (options.parse && options.recoveryPolicy) { + options.recoveryPolicy = JSON.parse(options.recoveryPolicy); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.recoveryPolicy}]); + } paramPath = options.path + '/' + 'virtualMachineProfile'; if (options.virtualMachineProfile) { cli.output.verbose('================================================'); @@ -1026,6 +1208,17 @@ function display(cli, o) { options.overprovision = JSON.parse(options.overprovision); jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.overprovision}]); } + paramPath = options.path + '/' + 'uniqueId'; + if (options.uniqueId) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.uniqueId); + cli.output.verbose('================================================'); + if (options.parse && options.uniqueId) { + options.uniqueId = JSON.parse(options.uniqueId); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.uniqueId}]); + } paramPath = options.path + '/' + 'singlePlacementGroup'; if (options.singlePlacementGroup) { cli.output.verbose('================================================'); @@ -1038,6 +1231,17 @@ function display(cli, o) { options.singlePlacementGroup = JSON.parse(options.singlePlacementGroup); jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.singlePlacementGroup}]); } + paramPath = options.path + '/' + 'identity'; + if (options.identity) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.identity); + cli.output.verbose('================================================'); + if (options.parse && options.identity) { + options.identity = JSON.parse(options.identity); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.identity}]); + } paramPath = options.path + '/' + 'id'; if (options.id) { cli.output.verbose('================================================'); @@ -1105,22 +1309,25 @@ function display(cli, o) { }); //config delete virtual-machine-scale-set - var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1 = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1.category('virtual-machine-scale-set') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11.category('virtual-machine-scale-set') .description($('Commands to configure virtual-machine-scale-set of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet1.command('delete') - .description($('Remove virtual-machine-scale-set in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "upgradePolicy":{\r\n "mode":null\r\n },\r\n "virtualMachineProfile":{\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n },\r\n "provisioningState":"",\r\n "overprovision":null,\r\n "singlePlacementGroup":null,\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineScaleSet11.command('delete') + .description($('Remove virtual-machine-scale-set in config string or files, e.g. \r\n{\r\n "sku":{\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n },\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "upgradePolicy":{\r\n "mode":null\r\n },\r\n "recoveryPolicy":{\r\n "mode":null\r\n },\r\n "virtualMachineProfile":{\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n },\r\n "licenseType":""\r\n },\r\n "provisioningState":"",\r\n "overprovision":null,\r\n "uniqueId":"",\r\n "singlePlacementGroup":null,\r\n "identity":{\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--sku', $('Remove the sku value.')) .option('--plan', $('Remove the plan value.')) .option('--upgrade-policy', $('Remove the upgrade-policy value.')) + .option('--recovery-policy', $('Remove the recovery-policy value.')) .option('--virtual-machine-profile', $('Remove the virtual-machine-profile value.')) .option('--provisioning-state', $('Remove the provisioning-state value.')) .option('--overprovision', $('Remove the overprovision value.')) + .option('--unique-id', $('Remove the unique-id value.')) .option('--single-placement-group', $('Remove the single-placement-group value.')) + .option('--identity', $('Remove the identity value.')) .option('--id', $('Remove the id value.')) .option('--name', $('Remove the name value.')) .option('--type', $('Remove the type value.')) @@ -1141,7 +1348,7 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.sku || options.plan || options.upgradePolicy || options.virtualMachineProfile || options.provisioningState || options.overprovision || options.singlePlacementGroup || options.id || options.name || options.type || options.location || options.tags; + var anySubItem = false || options.sku || options.plan || options.upgradePolicy || options.recoveryPolicy || options.virtualMachineProfile || options.provisioningState || options.overprovision || options.uniqueId || options.singlePlacementGroup || options.identity || options.id || options.name || options.type || options.location || options.tags; if (anySubItem) { var subItemPath = null; if (options.sku) { @@ -1156,6 +1363,10 @@ function display(cli, o) { subItemPath = options.path + '/upgradePolicy'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.recoveryPolicy) { + subItemPath = options.path + '/recoveryPolicy'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.virtualMachineProfile) { subItemPath = options.path + '/virtualMachineProfile'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -1168,10 +1379,18 @@ function display(cli, o) { subItemPath = options.path + '/overprovision'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.uniqueId) { + subItemPath = options.path + '/uniqueId'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.singlePlacementGroup) { subItemPath = options.path + '/singlePlacementGroup'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.identity) { + subItemPath = options.path + '/identity'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.id) { subItemPath = options.path + '/id'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -1208,12 +1427,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set sku - var catparametersCreateOrUpdateVirtualMachineScaleSetsSku0S = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSku0S = catparametersCreateOrUpdateVirtualMachineScaleSetsSku0S.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSku0S1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSku0S1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSku0S1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsSku0S = parametersCreateOrUpdateVirtualMachineScaleSetsSku0S.category('sku') + var setparametersCreateOrUpdateVirtualMachineScaleSetsSku0S1 = parametersCreateOrUpdateVirtualMachineScaleSetsSku0S1.category('sku') .description($('Commands to configure sku of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsSku0S.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsSku0S1.command('set') .description($('Set sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1286,12 +1505,12 @@ function display(cli, o) { }); //config delete sku - var catparametersCreateOrUpdateVirtualMachineScaleSetsSku1S = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSku1S = catparametersCreateOrUpdateVirtualMachineScaleSetsSku1S.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSku1S1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSku1S1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSku1S1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSku1S = parametersCreateOrUpdateVirtualMachineScaleSetsSku1S.category('sku') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSku1S1 = parametersCreateOrUpdateVirtualMachineScaleSetsSku1S1.category('sku') .description($('Commands to configure sku of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsSku1S.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsSku1S1.command('delete') .description($('Remove sku in config string or files, e.g. \r\n {\r\n ...\r\n "sku" : {\r\n "name":"",\r\n "tier":"",\r\n "capacity":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1344,12 +1563,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set plan - var catparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsPlan0P = catparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P = parametersCreateOrUpdateVirtualMachineScaleSetsPlan0P.category('plan') + var setparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1 = parametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1.category('plan') .description($('Commands to configure plan of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsPlan0P1.command('set') .description($('Set plan in config string or files, e.g. \r\n {\r\n ...\r\n "plan" : {\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1433,12 +1652,12 @@ function display(cli, o) { }); //config delete plan - var catparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsPlan1P = catparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P = parametersCreateOrUpdateVirtualMachineScaleSetsPlan1P.category('plan') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1 = parametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1.category('plan') .description($('Commands to configure plan of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsPlan1P1.command('delete') .description($('Remove plan in config string or files, e.g. \r\n {\r\n ...\r\n "plan" : {\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1496,12 +1715,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set upgrade-policy - var catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP = catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP = parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP.category('upgrade-policy') + var setparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1 = parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1.category('upgrade-policy') .description($('Commands to configure upgrade-policy of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy0UP1.command('set') .description($('Set upgrade-policy in config string or files, e.g. \r\n {\r\n ...\r\n "upgradePolicy" : {\r\n "mode":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1549,12 +1768,12 @@ function display(cli, o) { }); //config delete upgrade-policy - var catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP = catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP = parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP.category('upgrade-policy') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1 = parametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1.category('upgrade-policy') .description($('Commands to configure upgrade-policy of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsUpgradePolicy1UP1.command('delete') .description($('Remove upgrade-policy in config string or files, e.g. \r\n {\r\n ...\r\n "upgradePolicy" : {\r\n "mode":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1596,21 +1815,124 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); + //config set recovery-policy + var catparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1 = parametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1.category('recovery-policy') + .description($('Commands to configure recovery-policy of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy0RP1.command('set') + .description($('Set recovery-policy in config string or files, e.g. \r\n {\r\n ...\r\n "recoveryPolicy" : {\r\n "mode":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--mode ', $('Set the mode value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/recoveryPolicy'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'mode'; + if (options.mode) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.mode); + cli.output.verbose('================================================'); + if (options.parse && options.mode) { + options.mode = JSON.parse(options.mode); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.mode}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete recovery-policy + var catparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1 = parametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1.category('recovery-policy') + .description($('Commands to configure recovery-policy of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsRecoveryPolicy1RP1.command('delete') + .description($('Remove recovery-policy in config string or files, e.g. \r\n {\r\n ...\r\n "recoveryPolicy" : {\r\n "mode":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--mode', $('Remove the mode value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/recoveryPolicy'; + var anySubItem = false || options.mode; + if (anySubItem) { + var subItemPath = null; + if (options.mode) { + subItemPath = options.path + '/mode'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); //config set virtual-machine-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP.category('virtual-machine-profile') + var setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1.category('virtual-machine-profile') .description($('Commands to configure virtual-machine-profile of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP.command('set') - .description($('Set virtual-machine-profile in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachineProfile" : {\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile0VMP1.command('set') + .description($('Set virtual-machine-profile in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachineProfile" : {\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n },\r\n "licenseType":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--os-profile ', $('Set the os-profile value.')) .option('--storage-profile ', $('Set the storage-profile value.')) .option('--network-profile ', $('Set the network-profile value.')) + .option('--diagnostics-profile ', $('Set the diagnostics-profile value.')) .option('--extension-profile ', $('Set the extension-profile value.')) + .option('--license-type ', $('Set the license-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1663,6 +1985,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.networkProfile}]); } + paramPath = options.path + '/' + 'diagnosticsProfile'; + if (options.diagnosticsProfile) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.diagnosticsProfile); + cli.output.verbose('================================================'); + if (options.parse && options.diagnosticsProfile) { + options.diagnosticsProfile = JSON.parse(options.diagnosticsProfile); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.diagnosticsProfile}]); + } paramPath = options.path + '/' + 'extensionProfile'; if (options.extensionProfile) { cli.output.verbose('================================================'); @@ -1674,6 +2007,17 @@ function display(cli, o) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.extensionProfile}]); } + paramPath = options.path + '/' + 'licenseType'; + if (options.licenseType) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.licenseType); + cli.output.verbose('================================================'); + if (options.parse && options.licenseType) { + options.licenseType = JSON.parse(options.licenseType); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.licenseType}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -1686,19 +2030,21 @@ function display(cli, o) { }); //config delete virtual-machine-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP.category('virtual-machine-profile') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1 = parametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1.category('virtual-machine-profile') .description($('Commands to configure virtual-machine-profile of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP.command('delete') - .description($('Remove virtual-machine-profile in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachineProfile" : {\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachineScaleSetsVirtualMachineProfile1VMP1.command('delete') + .description($('Remove virtual-machine-profile in config string or files, e.g. \r\n {\r\n ...\r\n "virtualMachineProfile" : {\r\n "osProfile":{\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "extensionProfile":{\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n },\r\n "licenseType":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--os-profile', $('Remove the os-profile value.')) .option('--storage-profile', $('Remove the storage-profile value.')) .option('--network-profile', $('Remove the network-profile value.')) + .option('--diagnostics-profile', $('Remove the diagnostics-profile value.')) .option('--extension-profile', $('Remove the extension-profile value.')) + .option('--license-type', $('Remove the license-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -1714,7 +2060,7 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/virtualMachineProfile'; - var anySubItem = false || options.osProfile || options.storageProfile || options.networkProfile || options.extensionProfile; + var anySubItem = false || options.osProfile || options.storageProfile || options.networkProfile || options.diagnosticsProfile || options.extensionProfile || options.licenseType; if (anySubItem) { var subItemPath = null; if (options.osProfile) { @@ -1729,10 +2075,18 @@ function display(cli, o) { subItemPath = options.path + '/networkProfile'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.diagnosticsProfile) { + subItemPath = options.path + '/diagnosticsProfile'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.extensionProfile) { subItemPath = options.path + '/extensionProfile'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.licenseType) { + subItemPath = options.path + '/licenseType'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } } else { jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); @@ -1749,12 +2103,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set os-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP = catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP = parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP.category('os-profile') + var setparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1 = parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1.category('os-profile') .description($('Commands to configure os-profile of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile0VMPoP1.command('set') .description($('Set os-profile in config string or files, e.g. \r\n {\r\n ...\r\n "osProfile" : {\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1874,12 +2228,12 @@ function display(cli, o) { }); //config delete os-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP = catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP = parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP.category('os-profile') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1 = parametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1.category('os-profile') .description($('Commands to configure os-profile of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsProfile1VMPoP1.command('delete') .description($('Remove os-profile in config string or files, e.g. \r\n {\r\n ...\r\n "osProfile" : {\r\n "computerNamePrefix":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1952,12 +2306,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set windows-configuration - var catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC = catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC = parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC.category('windows-configuration') + var setparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1 = parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1.category('windows-configuration') .description($('Commands to configure windows-configuration of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration0VMPoPwC1.command('set') .description($('Set windows-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "windowsConfiguration" : {\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2055,12 +2409,12 @@ function display(cli, o) { }); //config delete windows-configuration - var catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC = catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC = parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC.category('windows-configuration') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1 = parametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1.category('windows-configuration') .description($('Commands to configure windows-configuration of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsWindowsConfiguration1VMPoPwC1.command('delete') .description($('Remove windows-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "windowsConfiguration" : {\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2123,12 +2477,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set additional-unattend-content - var catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC = catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC = parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC.category('additional-unattend-content') + var setparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1 = parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1.category('additional-unattend-content') .description($('Commands to configure additional-unattend-content of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent0VMPoPwCaUC1.command('set') .description($('Set additional-unattend-content in config string or files, e.g. \r\n {\r\n ...\r\n "additionalUnattendContent" : {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2218,12 +2572,12 @@ function display(cli, o) { }); //config delete additional-unattend-content - var catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC = catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC = parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC.category('additional-unattend-content') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1 = parametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1.category('additional-unattend-content') .description($('Commands to configure additional-unattend-content of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsAdditionalUnattendContent1VMPoPwCaUC1.command('delete') .description($('Remove additional-unattend-content in config string or files, e.g. \r\n {\r\n ...\r\n "additionalUnattendContent" : {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2282,12 +2636,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set win-rm - var catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM = catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1 = catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM = parametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM.category('win-rm') + var setparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1 = parametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1.category('win-rm') .description($('Commands to configure win-rm of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsWinRM0VMPoPwCwRM1.command('set') .description($('Set win-rm in config string or files, e.g. \r\n {\r\n ...\r\n "winRM" : {\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2335,12 +2689,12 @@ function display(cli, o) { }); //config delete win-rm - var catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM = catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1 = catparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM = parametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM.category('win-rm') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1 = parametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1.category('win-rm') .description($('Commands to configure win-rm of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsWinRM1VMPoPwCwRM1.command('delete') .description($('Remove win-rm in config string or files, e.g. \r\n {\r\n ...\r\n "winRM" : {\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2383,12 +2737,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set listeners - var catparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl = catparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1 = catparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl = parametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl.category('listeners') + var setparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1 = parametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1.category('listeners') .description($('Commands to configure listeners of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsListeners0VMPoPwCwRMl1.command('set') .description($('Set listeners in config string or files, e.g. \r\n {\r\n ...\r\n "listeners" : {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2454,12 +2808,12 @@ function display(cli, o) { }); //config delete listeners - var catparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl = catparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1 = catparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl = parametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl.category('listeners') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1 = parametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1.category('listeners') .description($('Commands to configure listeners of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsListeners1VMPoPwCwRMl1.command('delete') .description($('Remove listeners in config string or files, e.g. \r\n {\r\n ...\r\n "listeners" : {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2508,12 +2862,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set linux-configuration - var catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC = catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC = parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC.category('linux-configuration') + var setparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1 = parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1.category('linux-configuration') .description($('Commands to configure linux-configuration of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration0VMPoPlC1.command('set') .description($('Set linux-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "linuxConfiguration" : {\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2574,12 +2928,12 @@ function display(cli, o) { }); //config delete linux-configuration - var catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC = catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC = parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC.category('linux-configuration') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1 = parametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1.category('linux-configuration') .description($('Commands to configure linux-configuration of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsLinuxConfiguration1VMPoPlC1.command('delete') .description($('Remove linux-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "linuxConfiguration" : {\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2627,12 +2981,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set ssh - var catparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs = catparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs = parametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs.category('ssh') + var setparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1.category('ssh') .description($('Commands to configure ssh of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsSsh0VMPoPlCs1.command('set') .description($('Set ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2680,12 +3034,12 @@ function display(cli, o) { }); //config delete ssh - var catparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs = catparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs = parametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs.category('ssh') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1.category('ssh') .description($('Commands to configure ssh of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsSsh1VMPoPlCs1.command('delete') .description($('Remove ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2728,12 +3082,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set public-keys - var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK = parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK.category('public-keys') + var setparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1 = parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1.category('public-keys') .description($('Commands to configure public-keys of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys0VMPoPlCspK1.command('set') .description($('Set public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2799,12 +3153,12 @@ function display(cli, o) { }); //config delete public-keys - var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK = parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK.category('public-keys') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1 = parametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1.category('public-keys') .description($('Commands to configure public-keys of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicKeys1VMPoPlCspK1.command('delete') .description($('Remove public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2853,12 +3207,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set secrets - var catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs = catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs = parametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs.category('secrets') + var setparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1.category('secrets') .description($('Commands to configure secrets of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsSecrets0VMPoPs1.command('set') .description($('Set secrets in config string or files, e.g. \r\n {\r\n ...\r\n "secrets" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2924,12 +3278,12 @@ function display(cli, o) { }); //config delete secrets - var catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs = catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs = parametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs.category('secrets') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1.category('secrets') .description($('Commands to configure secrets of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsSecrets1VMPoPs1.command('delete') .description($('Remove secrets in config string or files, e.g. \r\n {\r\n ...\r\n "secrets" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2978,12 +3332,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set source-vault - var catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV = catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV = parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV.category('source-vault') + var setparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1 = parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1.category('source-vault') .description($('Commands to configure source-vault of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault0VMPoPsIsV1.command('set') .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3032,12 +3386,12 @@ function display(cli, o) { }); //config delete source-vault - var catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV = catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV = parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV.category('source-vault') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1 = parametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1.category('source-vault') .description($('Commands to configure source-vault of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsSourceVault1VMPoPsIsV1.command('delete') .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3081,12 +3435,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set vault-certificates - var catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC = catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC = parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC.category('vault-certificates') + var setparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1 = parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1.category('vault-certificates') .description($('Commands to configure vault-certificates of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates0VMPoPsIvC1.command('set') .description($('Set vault-certificates in config string or files, e.g. \r\n {\r\n ...\r\n "vaultCertificates" : {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3153,12 +3507,12 @@ function display(cli, o) { }); //config delete vault-certificates - var catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC = catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC = parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC.category('vault-certificates') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1 = parametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1.category('vault-certificates') .description($('Commands to configure vault-certificates of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsVaultCertificates1VMPoPsIvC1.command('delete') .description($('Remove vault-certificates in config string or files, e.g. \r\n {\r\n ...\r\n "vaultCertificates" : {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3208,12 +3562,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set storage-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP = catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP = parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP.category('storage-profile') + var setparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1 = parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1.category('storage-profile') .description($('Commands to configure storage-profile of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile0VMPsP1.command('set') .description($('Set storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3285,12 +3639,12 @@ function display(cli, o) { }); //config delete storage-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP = catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP = parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP.category('storage-profile') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1 = parametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1.category('storage-profile') .description($('Commands to configure storage-profile of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsStorageProfile1VMPsP1.command('delete') .description($('Remove storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3343,12 +3697,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set image-reference - var catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR = catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1 = catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR = parametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR.category('image-reference') + var setparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1 = parametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1.category('image-reference') .description($('Commands to configure image-reference of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsImageReference0VMPsPiR1.command('set') .description($('Set image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3444,12 +3798,12 @@ function display(cli, o) { }); //config delete image-reference - var catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR = catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1 = catparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR = parametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR.category('image-reference') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1 = parametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1.category('image-reference') .description($('Commands to configure image-reference of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsImageReference1VMPsPiR1.command('delete') .description($('Remove image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3512,12 +3866,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set os-disk - var catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD = catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD = parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD.category('os-disk') + var setparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1 = parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1.category('os-disk') .description($('Commands to configure os-disk of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk0VMPsPoD1.command('set') .description($('Set os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3637,12 +3991,12 @@ function display(cli, o) { }); //config delete os-disk - var catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD = catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD = parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD.category('os-disk') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1 = parametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1.category('os-disk') .description($('Commands to configure os-disk of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsOsDisk1VMPsPoD1.command('delete') .description($('Remove os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "name":"",\r\n "caching":null,\r\n "createOption":"",\r\n "osType":null,\r\n "image":{\r\n "uri":""\r\n },\r\n "vhdContainers":[\r\n ""\r\n ],\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3715,12 +4069,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set image - var catparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi = catparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1 = catparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi = parametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi.category('image') + var setparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1 = parametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1.category('image') .description($('Commands to configure image of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsImage0VMPsPoDi1.command('set') .description($('Set image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3768,12 +4122,12 @@ function display(cli, o) { }); //config delete image - var catparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi = catparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1 = catparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi = parametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi.category('image') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1 = parametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1.category('image') .description($('Commands to configure image of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsImage1VMPsPoDi1.command('delete') .description($('Remove image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3816,12 +4170,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set vhd-containers - var catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC = catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC = parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC.category('vhd-containers') + var setparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1 = parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1.category('vhd-containers') .description($('Commands to configure vhd-containers of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers0VMPsPoDvC1.command('set') .description($('Set vhd-containers in config string or files, e.g. \r\n {\r\n ...\r\n "vhdContainers" : ""\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3863,12 +4217,12 @@ function display(cli, o) { }); //config delete vhd-containers - var catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC = catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC = parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC.category('vhd-containers') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1 = parametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1.category('vhd-containers') .description($('Commands to configure vhd-containers of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsVhdContainers1VMPsPoDvC1.command('delete') .description($('Remove vhd-containers in config string or files, e.g. \r\n {\r\n ...\r\n "vhdContainers" : ""\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3901,12 +4255,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set managed-disk - var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD.category('managed-disk') + var setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1 = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPoDmD1.command('set') .description($('Set managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3954,12 +4308,12 @@ function display(cli, o) { }); //config delete managed-disk - var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD.category('managed-disk') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1 = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPoDmD1.command('delete') .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4002,12 +4356,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set data-disks - var catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD = catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD = parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD.category('data-disks') + var setparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1 = parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1.category('data-disks') .description($('Commands to configure data-disks of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks0VMPsPdD1.command('set') .description($('Set data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4121,12 +4475,12 @@ function display(cli, o) { }); //config delete data-disks - var catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD = catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD = parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD.category('data-disks') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1 = parametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1.category('data-disks') .description($('Commands to configure data-disks of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsDataDisks1VMPsPdD1.command('delete') .description($('Remove data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "name":"",\r\n "lun":"",\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4194,17 +4548,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete managed-disk - var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1 = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1.category('config') + //config set data-disks-managed-disk + var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2 = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1 = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1.category('managed-disk') - .description($('Commands to configure managed-disk of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD1.command('delete') - .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2 = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk0VMPsPdDDImD2.command('set') + .description($('Set data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--storage-account-type ', $('Set the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -4218,10 +4574,23 @@ function display(cli, o) { var parametersObj = JSON.parse(fileContent); cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); - options.operation = 'remove'; + options.operation = 'replace'; options.path = '/virtualMachineProfile/storageProfile/dataDisks/' + options.dataDisksIndex + '/managedDisk'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); - + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'storageAccountType'; + if (options.storageAccountType) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.storageAccountType); + cli.output.verbose('================================================'); + if (options.parse && options.storageAccountType) { + options.storageAccountType = JSON.parse(options.storageAccountType); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountType}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); cli.output.verbose('JSON object (updated):'); @@ -4232,18 +4601,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set network-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP.category('config') + + //config delete data-disks-managed-disk + var catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2 = catparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP.category('network-profile') - .description($('Commands to configure network-profile of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP.command('set') - .description($('Set network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2 = parametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsManagedDisk1VMPsPdDDImD2.command('delete') + .description($('Remove data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--network-interface-configurations ', $('Set the network-interface-configurations value.')) + .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--storage-account-type', $('Remove the storage-account-type value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -4257,11 +4627,60 @@ function display(cli, o) { var parametersObj = JSON.parse(fileContent); cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); - options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile'; - var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); - if (typeof error !== 'undefined') { - jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/storageProfile/dataDisks/' + options.dataDisksIndex + '/managedDisk'; + var anySubItem = false || options.storageAccountType; + if (anySubItem) { + var subItemPath = null; + if (options.storageAccountType) { + subItemPath = options.path + '/storageAccountType'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set network-profile + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1.category('network-profile') + .description($('Commands to configure network-profile of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile0VMPnP1.command('set') + .description($('Set network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--network-interface-configurations ', $('Set the network-interface-configurations value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } var paramPath = options.path + '/' + 'networkInterfaceConfigurations'; if (options.networkInterfaceConfigurations) { @@ -4286,13 +4705,13 @@ function display(cli, o) { }); //config delete network-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP.category('network-profile') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1.category('network-profile') .description($('Commands to configure network-profile of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP.command('delete') - .description($('Remove network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkProfile1VMPnP1.command('delete') + .description($('Remove network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaceConfigurations":[\r\n {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--network-interface-configurations', $('Remove the network-interface-configurations value.')) @@ -4334,13 +4753,13 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set network-interface-configurations - var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC.category('network-interface-configurations') + var setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1.category('network-interface-configurations') .description($('Commands to configure network-interface-configurations of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC.command('set') - .description($('Set network-interface-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaceConfigurations" : {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations0VMPnPnIC1.command('set') + .description($('Set network-interface-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaceConfigurations" : {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) @@ -4348,6 +4767,8 @@ function display(cli, o) { .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--name ', $('Set the name value.')) .option('--primary ', $('Set the primary value.')) + .option('--network-security-group ', $('Set the network-security-group value.')) + .option('--dns-settings ', $('Set the dns-settings value.')) .option('--ip-configurations ', $('Set the ip-configurations value.')) .option('--id ', $('Set the id value.')) .execute(function(options, _) { @@ -4396,6 +4817,28 @@ function display(cli, o) { options.primary = JSON.parse(options.primary); jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.primary}]); } + paramPath = options.path + '/' + 'networkSecurityGroup'; + if (options.networkSecurityGroup) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.networkSecurityGroup); + cli.output.verbose('================================================'); + if (options.parse && options.networkSecurityGroup) { + options.networkSecurityGroup = JSON.parse(options.networkSecurityGroup); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.networkSecurityGroup}]); + } + paramPath = options.path + '/' + 'dnsSettings'; + if (options.dnsSettings) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.dnsSettings); + cli.output.verbose('================================================'); + if (options.parse && options.dnsSettings) { + options.dnsSettings = JSON.parse(options.dnsSettings); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.dnsSettings}]); + } paramPath = options.path + '/' + 'ipConfigurations'; if (options.ipConfigurations) { cli.output.verbose('================================================'); @@ -4430,18 +4873,20 @@ function display(cli, o) { }); //config delete network-interface-configurations - var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC.category('network-interface-configurations') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1.category('network-interface-configurations') .description($('Commands to configure network-interface-configurations of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC.command('delete') - .description($('Remove network-interface-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaceConfigurations" : {\r\n "name":"",\r\n "primary":null,\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkInterfaceConfigurations1VMPnPnIC1.command('delete') + .description($('Remove network-interface-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaceConfigurations" : {\r\n "name":"",\r\n "primary":null,\r\n "networkSecurityGroup":{\r\n "id":""\r\n },\r\n "dnsSettings":{\r\n "dnsServers":[\r\n ""\r\n ]\r\n },\r\n "ipConfigurations":[\r\n {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) .option('--name', $('Remove the name value.')) .option('--primary', $('Remove the primary value.')) + .option('--network-security-group', $('Remove the network-security-group value.')) + .option('--dns-settings', $('Remove the dns-settings value.')) .option('--ip-configurations', $('Remove the ip-configurations value.')) .option('--id', $('Remove the id value.')) .execute(function(options, _) { @@ -4459,7 +4904,7 @@ function display(cli, o) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations' + (options.index ? ('/' + options.index) : ''); - var anySubItem = false || options.name || options.primary || options.ipConfigurations || options.id; + var anySubItem = false || options.name || options.primary || options.networkSecurityGroup || options.dnsSettings || options.ipConfigurations || options.id; if (anySubItem) { var subItemPath = null; if (options.name) { @@ -4470,6 +4915,14 @@ function display(cli, o) { subItemPath = options.path + '/primary'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.networkSecurityGroup) { + subItemPath = options.path + '/networkSecurityGroup'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.dnsSettings) { + subItemPath = options.path + '/dnsSettings'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.ipConfigurations) { subItemPath = options.path + '/ipConfigurations'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -4493,25 +4946,18 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set ip-configurations - var catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC = catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC.category('config') + //config set network-security-group + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC = parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC.category('ip-configurations') - .description($('Commands to configure ip-configurations of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC.command('set') - .description($('Set ip-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "ipConfigurations" : {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1.category('network-security-group') + .description($('Commands to configure network-security-group of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup0VMPnPnICICInSG1.command('set') + .description($('Set network-security-group in config string or files, e.g. \r\n {\r\n ...\r\n "networkSecurityGroup" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--index ', $('Indexer: index.')) .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--value ', $('The input string value for the indexed item.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--name ', $('Set the name value.')) - .option('--subnet ', $('Set the subnet value.')) - .option('--application-gateway-backend-address-pools ', $('Set the application-gateway-backend-address-pools value.')) - .option('--load-balancer-backend-address-pools ', $('Set the load-balancer-backend-address-pools value.')) - .option('--load-balancer-inbound-nat-pools ', $('Set the load-balancer-inbound-nat-pools value.')) .option('--id ', $('Set the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); @@ -4527,71 +4973,890 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations' + (options.index ? ('/' + options.index) : ''); + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/networkSecurityGroup'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - if (options.value) { - cli.output.verbose(options.value); - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); - } - var paramPath = options.path + '/' + 'name'; - if (options.name) { + var paramPath = options.path + '/' + 'id'; + if (options.id) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.name); + cli.output.verbose('Value : ' + options.id); cli.output.verbose('================================================'); - if (options.parse && options.name) { - options.name = JSON.parse(options.name); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); } - paramPath = options.path + '/' + 'subnet'; - if (options.subnet) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.subnet); - cli.output.verbose('================================================'); - if (options.parse && options.subnet) { - options.subnet = JSON.parse(options.subnet); + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete network-security-group + var catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1 = catparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1 = parametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1.category('network-security-group') + .description($('Commands to configure network-security-group of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsNetworkSecurityGroup1VMPnPnICICInSG1.command('delete') + .description($('Remove network-security-group in config string or files, e.g. \r\n {\r\n ...\r\n "networkSecurityGroup" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--id', $('Remove the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/networkSecurityGroup'; + var anySubItem = false || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.subnet}]); } - paramPath = options.path + '/' + 'applicationGatewayBackendAddressPools'; - if (options.applicationGatewayBackendAddressPools) { + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set dns-settings + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1.category('dns-settings') + .description($('Commands to configure dns-settings of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIdS1.command('set') + .description($('Set dns-settings in config string or files, e.g. \r\n {\r\n ...\r\n "dnsSettings" : {\r\n "dnsServers":[\r\n ""\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--dns-servers ', $('Set the dns-servers value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/dnsSettings'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'dnsServers'; + if (options.dnsServers) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.applicationGatewayBackendAddressPools); + cli.output.verbose('Value : ' + options.dnsServers); cli.output.verbose('================================================'); - if (options.parse && options.applicationGatewayBackendAddressPools) { - options.applicationGatewayBackendAddressPools = JSON.parse(options.applicationGatewayBackendAddressPools); + if (options.parse && options.dnsServers) { + options.dnsServers = JSON.parse(options.dnsServers); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.applicationGatewayBackendAddressPools}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.dnsServers}]); } - paramPath = options.path + '/' + 'loadBalancerBackendAddressPools'; - if (options.loadBalancerBackendAddressPools) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.loadBalancerBackendAddressPools); - cli.output.verbose('================================================'); - if (options.parse && options.loadBalancerBackendAddressPools) { - options.loadBalancerBackendAddressPools = JSON.parse(options.loadBalancerBackendAddressPools); + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete dns-settings + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1.category('dns-settings') + .description($('Commands to configure dns-settings of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIdS1.command('delete') + .description($('Remove dns-settings in config string or files, e.g. \r\n {\r\n ...\r\n "dnsSettings" : {\r\n "dnsServers":[\r\n ""\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--dns-servers', $('Remove the dns-servers value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/dnsSettings'; + var anySubItem = false || options.dnsServers; + if (anySubItem) { + var subItemPath = null; + if (options.dnsServers) { + subItemPath = options.path + '/dnsServers'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.loadBalancerBackendAddressPools}]); } - paramPath = options.path + '/' + 'loadBalancerInboundNatPools'; - if (options.loadBalancerInboundNatPools) { - cli.output.verbose('================================================'); - cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.loadBalancerInboundNatPools); - cli.output.verbose('================================================'); - if (options.parse && options.loadBalancerInboundNatPools) { - options.loadBalancerInboundNatPools = JSON.parse(options.loadBalancerInboundNatPools); - } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.loadBalancerInboundNatPools}]); + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set dns-servers + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1.category('dns-servers') + .description($('Commands to configure dns-servers of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers0VMPnPnICICIdSdS1.command('set') + .description($('Set dns-servers in config string or files, e.g. \r\n {\r\n ...\r\n "dnsServers" : ""\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--value ', $('The input string value for the indexed item.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/dnsSettings/dnsServers' + (options.index ? ('/' + options.index) : ''); + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + if (options.value) { + cli.output.verbose(options.value); + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete dns-servers + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1.category('dns-servers') + .description($('Commands to configure dns-servers of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsServers1VMPnPnICICIdSdS1.command('delete') + .description($('Remove dns-servers in config string or files, e.g. \r\n {\r\n ...\r\n "dnsServers" : ""\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/dnsSettings/dnsServers' + (options.index ? ('/' + options.index) : ''); + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set ip-configurations + var catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1 = parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1.category('ip-configurations') + .description($('Commands to configure ip-configurations of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations0VMPnPnICICIiC1.command('set') + .description($('Set ip-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "ipConfigurations" : {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--value ', $('The input string value for the indexed item.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--name ', $('Set the name value.')) + .option('--subnet ', $('Set the subnet value.')) + .option('--public-ip-address-configuration ', $('Set the public-ip-address-configuration value.')) + .option('--private-ip-address-version ', $('Set the private-ip-address-version value.')) + .option('--application-gateway-backend-address-pools ', $('Set the application-gateway-backend-address-pools value.')) + .option('--load-balancer-backend-address-pools ', $('Set the load-balancer-backend-address-pools value.')) + .option('--load-balancer-inbound-nat-pools ', $('Set the load-balancer-inbound-nat-pools value.')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations' + (options.index ? ('/' + options.index) : ''); + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + if (options.value) { + cli.output.verbose(options.value); + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); + } + var paramPath = options.path + '/' + 'name'; + if (options.name) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.name); + cli.output.verbose('================================================'); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); + } + paramPath = options.path + '/' + 'subnet'; + if (options.subnet) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.subnet); + cli.output.verbose('================================================'); + if (options.parse && options.subnet) { + options.subnet = JSON.parse(options.subnet); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.subnet}]); + } + paramPath = options.path + '/' + 'publicIPAddressConfiguration'; + if (options.publicIPAddressConfiguration) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.publicIPAddressConfiguration); + cli.output.verbose('================================================'); + if (options.parse && options.publicIPAddressConfiguration) { + options.publicIPAddressConfiguration = JSON.parse(options.publicIPAddressConfiguration); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.publicIPAddressConfiguration}]); + } + paramPath = options.path + '/' + 'privateIPAddressVersion'; + if (options.privateIPAddressVersion) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.privateIPAddressVersion); + cli.output.verbose('================================================'); + if (options.parse && options.privateIPAddressVersion) { + options.privateIPAddressVersion = JSON.parse(options.privateIPAddressVersion); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.privateIPAddressVersion}]); + } + paramPath = options.path + '/' + 'applicationGatewayBackendAddressPools'; + if (options.applicationGatewayBackendAddressPools) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.applicationGatewayBackendAddressPools); + cli.output.verbose('================================================'); + if (options.parse && options.applicationGatewayBackendAddressPools) { + options.applicationGatewayBackendAddressPools = JSON.parse(options.applicationGatewayBackendAddressPools); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.applicationGatewayBackendAddressPools}]); + } + paramPath = options.path + '/' + 'loadBalancerBackendAddressPools'; + if (options.loadBalancerBackendAddressPools) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.loadBalancerBackendAddressPools); + cli.output.verbose('================================================'); + if (options.parse && options.loadBalancerBackendAddressPools) { + options.loadBalancerBackendAddressPools = JSON.parse(options.loadBalancerBackendAddressPools); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.loadBalancerBackendAddressPools}]); + } + paramPath = options.path + '/' + 'loadBalancerInboundNatPools'; + if (options.loadBalancerInboundNatPools) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.loadBalancerInboundNatPools); + cli.output.verbose('================================================'); + if (options.parse && options.loadBalancerInboundNatPools) { + options.loadBalancerInboundNatPools = JSON.parse(options.loadBalancerInboundNatPools); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.loadBalancerInboundNatPools}]); + } + paramPath = options.path + '/' + 'id'; + if (options.id) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.id); + cli.output.verbose('================================================'); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete ip-configurations + var catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1 = parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1.category('ip-configurations') + .description($('Commands to configure ip-configurations of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC1.command('delete') + .description($('Remove ip-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "ipConfigurations" : {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "publicIPAddressConfiguration":{\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n },\r\n "privateIPAddressVersion":"",\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--name', $('Remove the name value.')) + .option('--subnet', $('Remove the subnet value.')) + .option('--public-ip-address-configuration', $('Remove the public-ip-address-configuration value.')) + .option('--private-ip-address-version', $('Remove the private-ip-address-version value.')) + .option('--application-gateway-backend-address-pools', $('Remove the application-gateway-backend-address-pools value.')) + .option('--load-balancer-backend-address-pools', $('Remove the load-balancer-backend-address-pools value.')) + .option('--load-balancer-inbound-nat-pools', $('Remove the load-balancer-inbound-nat-pools value.')) + .option('--id', $('Remove the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations' + (options.index ? ('/' + options.index) : ''); + var anySubItem = false || options.name || options.subnet || options.publicIPAddressConfiguration || options.privateIPAddressVersion || options.applicationGatewayBackendAddressPools || options.loadBalancerBackendAddressPools || options.loadBalancerInboundNatPools || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.name) { + subItemPath = options.path + '/name'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.subnet) { + subItemPath = options.path + '/subnet'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.publicIPAddressConfiguration) { + subItemPath = options.path + '/publicIPAddressConfiguration'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.privateIPAddressVersion) { + subItemPath = options.path + '/privateIPAddressVersion'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.applicationGatewayBackendAddressPools) { + subItemPath = options.path + '/applicationGatewayBackendAddressPools'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.loadBalancerBackendAddressPools) { + subItemPath = options.path + '/loadBalancerBackendAddressPools'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.loadBalancerInboundNatPools) { + subItemPath = options.path + '/loadBalancerInboundNatPools'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set subnet + var catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1.category('subnet') + .description($('Commands to configure subnet of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs1.command('set') + .description($('Set subnet in config string or files, e.g. \r\n {\r\n ...\r\n "subnet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/subnet'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'id'; + if (options.id) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.id); + cli.output.verbose('================================================'); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete subnet + var catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1 = catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1 = parametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1.category('subnet') + .description($('Commands to configure subnet of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs1.command('delete') + .description($('Remove subnet in config string or files, e.g. \r\n {\r\n ...\r\n "subnet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--id', $('Remove the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/subnet'; + var anySubItem = false || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set public-ip-address-configuration + var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1 = parametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1.category('public-ip-address-configuration') + .description($('Commands to configure public-ip-address-configuration of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration0VMPnPnICICIiCCIpIPAC1.command('set') + .description($('Set public-ip-address-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "publicIPAddressConfiguration" : {\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--name ', $('Set the name value.')) + .option('--idle-timeout-in-minutes ', $('Set the idle-timeout-in-minutes value.')) + .option('--dns-settings ', $('Set the dns-settings value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/publicIPAddressConfiguration'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'name'; + if (options.name) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.name); + cli.output.verbose('================================================'); + if (options.parse && options.name) { + options.name = JSON.parse(options.name); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.name}]); + } + paramPath = options.path + '/' + 'idleTimeoutInMinutes'; + if (options.idleTimeoutInMinutes) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.idleTimeoutInMinutes); + cli.output.verbose('================================================'); + if (options.parse && options.idleTimeoutInMinutes) { + options.idleTimeoutInMinutes = JSON.parse(options.idleTimeoutInMinutes); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.idleTimeoutInMinutes}]); + } + paramPath = options.path + '/' + 'dnsSettings'; + if (options.dnsSettings) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.dnsSettings); + cli.output.verbose('================================================'); + if (options.parse && options.dnsSettings) { + options.dnsSettings = JSON.parse(options.dnsSettings); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.dnsSettings}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete public-ip-address-configuration + var catparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1 = catparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1 = parametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1.category('public-ip-address-configuration') + .description($('Commands to configure public-ip-address-configuration of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsPublicIPAddressConfiguration1VMPnPnICICIiCCIpIPAC1.command('delete') + .description($('Remove public-ip-address-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "publicIPAddressConfiguration" : {\r\n "name":"",\r\n "idleTimeoutInMinutes":null,\r\n "dnsSettings":{\r\n "domainNameLabel":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--name', $('Remove the name value.')) + .option('--idle-timeout-in-minutes', $('Remove the idle-timeout-in-minutes value.')) + .option('--dns-settings', $('Remove the dns-settings value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/publicIPAddressConfiguration'; + var anySubItem = false || options.name || options.idleTimeoutInMinutes || options.dnsSettings; + if (anySubItem) { + var subItemPath = null; + if (options.name) { + subItemPath = options.path + '/name'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.idleTimeoutInMinutes) { + subItemPath = options.path + '/idleTimeoutInMinutes'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.dnsSettings) { + subItemPath = options.path + '/dnsSettings'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set public-ip-address-configuration-dns-settings + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1.category('public-ip-address-configuration-dns-settings') + .description($('Commands to configure public-ip-address-configuration-dns-settings of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings0VMPnPnICICIiCCIpIPACdS1.command('set') + .description($('Set public-ip-address-configuration-dns-settings in config string or files, e.g. \r\n {\r\n ...\r\n "dnsSettings" : {\r\n "domainNameLabel":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--domain-name-label ', $('Set the domain-name-label value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/publicIPAddressConfiguration/dnsSettings'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'domainNameLabel'; + if (options.domainNameLabel) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.domainNameLabel); + cli.output.verbose('================================================'); + if (options.parse && options.domainNameLabel) { + options.domainNameLabel = JSON.parse(options.domainNameLabel); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.domainNameLabel}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete public-ip-address-configuration-dns-settings + var catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1 = parametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1.category('public-ip-address-configuration-dns-settings') + .description($('Commands to configure public-ip-address-configuration-dns-settings of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsDnsSettings1VMPnPnICICIiCCIpIPACdS1.command('delete') + .description($('Remove public-ip-address-configuration-dns-settings in config string or files, e.g. \r\n {\r\n ...\r\n "dnsSettings" : {\r\n "domainNameLabel":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--domain-name-label', $('Remove the domain-name-label value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/publicIPAddressConfiguration/dnsSettings'; + var anySubItem = false || options.domainNameLabel; + if (anySubItem) { + var subItemPath = null; + if (options.domainNameLabel) { + subItemPath = options.path + '/domainNameLabel'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config set application-gateway-backend-address-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1 = parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1.category('application-gateway-backend-address-pools') + .description($('Commands to configure application-gateway-backend-address-pools of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP1.command('set') + .description($('Set application-gateway-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "applicationGatewayBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) + .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--value ', $('The input string value for the indexed item.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/applicationGatewayBackendAddressPools' + (options.index ? ('/' + options.index) : ''); + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + if (options.value) { + cli.output.verbose(options.value); + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); } - paramPath = options.path + '/' + 'id'; + var paramPath = options.path + '/' + 'id'; if (options.id) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); @@ -4613,23 +5878,19 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete ip-configurations - var catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC = catparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC.category('config') + //config delete application-gateway-backend-address-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC = parametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC.category('ip-configurations') - .description($('Commands to configure ip-configurations of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsIpConfigurations1VMPnPnICICIiC.command('delete') - .description($('Remove ip-configurations in config string or files, e.g. \r\n {\r\n ...\r\n "ipConfigurations" : {\r\n "name":"",\r\n "subnet":{\r\n "id":""\r\n },\r\n "applicationGatewayBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerBackendAddressPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "loadBalancerInboundNatPools":[\r\n {\r\n "id":""\r\n }\r\n ],\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1 = parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1.category('application-gateway-backend-address-pools') + .description($('Commands to configure application-gateway-backend-address-pools of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP1.command('delete') + .description($('Remove application-gateway-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "applicationGatewayBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) + .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--name', $('Remove the name value.')) - .option('--subnet', $('Remove the subnet value.')) - .option('--application-gateway-backend-address-pools', $('Remove the application-gateway-backend-address-pools value.')) - .option('--load-balancer-backend-address-pools', $('Remove the load-balancer-backend-address-pools value.')) - .option('--load-balancer-inbound-nat-pools', $('Remove the load-balancer-inbound-nat-pools value.')) .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); @@ -4645,30 +5906,10 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations' + (options.index ? ('/' + options.index) : ''); - var anySubItem = false || options.name || options.subnet || options.applicationGatewayBackendAddressPools || options.loadBalancerBackendAddressPools || options.loadBalancerInboundNatPools || options.id; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/applicationGatewayBackendAddressPools' + (options.index ? ('/' + options.index) : ''); + var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; - if (options.name) { - subItemPath = options.path + '/name'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.subnet) { - subItemPath = options.path + '/subnet'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.applicationGatewayBackendAddressPools) { - subItemPath = options.path + '/applicationGatewayBackendAddressPools'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.loadBalancerBackendAddressPools) { - subItemPath = options.path + '/loadBalancerBackendAddressPools'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } - if (options.loadBalancerInboundNatPools) { - subItemPath = options.path + '/loadBalancerInboundNatPools'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); - } if (options.id) { subItemPath = options.path + '/id'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -4688,18 +5929,20 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set subnet - var catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs = catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs.category('config') + //config set load-balancer-backend-address-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs = parametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs.category('subnet') - .description($('Commands to configure subnet of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsSubnet0VMPnPnICICIiCCIs.command('set') - .description($('Set subnet in config string or files, e.g. \r\n {\r\n ...\r\n "subnet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1 = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1.category('load-balancer-backend-address-pools') + .description($('Commands to configure load-balancer-backend-address-pools of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP1.command('set') + .description($('Set load-balancer-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) + .option('--value ', $('The input string value for the indexed item.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) .option('--id ', $('Set the id value.')) .execute(function(options, _) { @@ -4716,11 +5959,15 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/subnet'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerBackendAddressPools' + (options.index ? ('/' + options.index) : ''); var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } + if (options.value) { + cli.output.verbose(options.value); + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); + } var paramPath = options.path + '/' + 'id'; if (options.id) { cli.output.verbose('================================================'); @@ -4743,16 +5990,17 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete subnet - var catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs = catparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs.category('config') + //config delete load-balancer-backend-address-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs = parametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs.category('subnet') - .description($('Commands to configure subnet of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsSubnet1VMPnPnICICIiCCIs.command('delete') - .description($('Remove subnet in config string or files, e.g. \r\n {\r\n ...\r\n "subnet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1 = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1.category('load-balancer-backend-address-pools') + .description($('Commands to configure load-balancer-backend-address-pools of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP1.command('delete') + .description($('Remove load-balancer-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) + .option('--index ', $('Indexer: index.')) .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) .option('--id', $('Remove the id value.')) @@ -4770,7 +6018,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/subnet'; + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerBackendAddressPools' + (options.index ? ('/' + options.index) : ''); var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; @@ -4793,14 +6041,14 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set application-gateway-backend-address-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP = catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP.category('config') + //config set load-balancer-inbound-nat-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP = parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP.category('application-gateway-backend-address-pools') - .description($('Commands to configure application-gateway-backend-address-pools of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools0VMPnPnICICIiCCIaGBAP.command('set') - .description($('Set application-gateway-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "applicationGatewayBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1 = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1.category('load-balancer-inbound-nat-pools') + .description($('Commands to configure load-balancer-inbound-nat-pools of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP1.command('set') + .description($('Set load-balancer-inbound-nat-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerInboundNatPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) @@ -4823,7 +6071,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/applicationGatewayBackendAddressPools' + (options.index ? ('/' + options.index) : ''); + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerInboundNatPools' + (options.index ? ('/' + options.index) : ''); var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); @@ -4854,14 +6102,14 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete application-gateway-backend-address-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP = catparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP.category('config') + //config delete load-balancer-inbound-nat-pools + var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP = parametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP.category('application-gateway-backend-address-pools') - .description($('Commands to configure application-gateway-backend-address-pools of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsApplicationGatewayBackendAddressPools1VMPnPnICICIiCCIaGBAP.command('delete') - .description($('Remove application-gateway-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "applicationGatewayBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1 = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1.category('load-balancer-inbound-nat-pools') + .description($('Commands to configure load-balancer-inbound-nat-pools of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP1.command('delete') + .description($('Remove load-balancer-inbound-nat-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerInboundNatPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) @@ -4882,7 +6130,7 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/applicationGatewayBackendAddressPools' + (options.index ? ('/' + options.index) : ''); + options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerInboundNatPools' + (options.index ? ('/' + options.index) : ''); var anySubItem = false || options.id; if (anySubItem) { var subItemPath = null; @@ -4905,22 +6153,18 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set load-balancer-backend-address-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP.category('config') + //config set diagnostics-profile + var catparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP.category('load-balancer-backend-address-pools') - .description($('Commands to configure load-balancer-backend-address-pools of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools0VMPnPnICICIiCCIlBBAP.command('set') - .description($('Set load-balancer-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1 = parametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1.category('diagnostics-profile') + .description($('Commands to configure diagnostics-profile of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile0VMPdP1.command('set') + .description($('Set diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--index ', $('Indexer: index.')) - .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) - .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--value ', $('The input string value for the indexed item.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--id ', $('Set the id value.')) + .option('--boot-diagnostics ', $('Set the boot-diagnostics value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -4935,25 +6179,21 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerBackendAddressPools' + (options.index ? ('/' + options.index) : ''); + options.path = '/virtualMachineProfile/diagnosticsProfile'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - if (options.value) { - cli.output.verbose(options.value); - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); - } - var paramPath = options.path + '/' + 'id'; - if (options.id) { + var paramPath = options.path + '/' + 'bootDiagnostics'; + if (options.bootDiagnostics) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.id); + cli.output.verbose('Value : ' + options.bootDiagnostics); cli.output.verbose('================================================'); - if (options.parse && options.id) { - options.id = JSON.parse(options.id); + if (options.parse && options.bootDiagnostics) { + options.bootDiagnostics = JSON.parse(options.bootDiagnostics); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.bootDiagnostics}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -4966,20 +6206,17 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete load-balancer-backend-address-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP.category('config') + //config delete diagnostics-profile + var catparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP.category('load-balancer-backend-address-pools') - .description($('Commands to configure load-balancer-backend-address-pools of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerBackendAddressPools1VMPnPnICICIiCCIlBBAP.command('delete') - .description($('Remove load-balancer-backend-address-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerBackendAddressPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1 = parametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1.category('diagnostics-profile') + .description($('Commands to configure diagnostics-profile of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsDiagnosticsProfile1VMPdP1.command('delete') + .description($('Remove diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--index ', $('Indexer: index.')) - .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) - .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--id', $('Remove the id value.')) + .option('--boot-diagnostics', $('Remove the boot-diagnostics value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -4994,12 +6231,12 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerBackendAddressPools' + (options.index ? ('/' + options.index) : ''); - var anySubItem = false || options.id; + options.path = '/virtualMachineProfile/diagnosticsProfile'; + var anySubItem = false || options.bootDiagnostics; if (anySubItem) { var subItemPath = null; - if (options.id) { - subItemPath = options.path + '/id'; + if (options.bootDiagnostics) { + subItemPath = options.path + '/bootDiagnostics'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -5017,22 +6254,19 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set load-balancer-inbound-nat-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP.category('config') + //config set boot-diagnostics + var catparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP.category('load-balancer-inbound-nat-pools') - .description($('Commands to configure load-balancer-inbound-nat-pools of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools0VMPnPnICICIiCCIlBINP.command('set') - .description($('Set load-balancer-inbound-nat-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerInboundNatPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1 = parametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1.category('boot-diagnostics') + .description($('Commands to configure boot-diagnostics of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics0VMPdPbD1.command('set') + .description($('Set boot-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "bootDiagnostics" : {\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--index ', $('Indexer: index.')) - .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) - .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--value ', $('The input string value for the indexed item.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) - .option('--id ', $('Set the id value.')) + .option('--enabled ', $('Set the enabled value.')) + .option('--storage-uri ', $('Set the storage-uri value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -5047,25 +6281,33 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'replace'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerInboundNatPools' + (options.index ? ('/' + options.index) : ''); + options.path = '/virtualMachineProfile/diagnosticsProfile/bootDiagnostics'; var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); if (typeof error !== 'undefined') { jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); } - if (options.value) { - cli.output.verbose(options.value); - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path, value: options.value}]); + var paramPath = options.path + '/' + 'enabled'; + if (options.enabled) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.enabled); + cli.output.verbose('================================================'); + if (options.parse && options.enabled) { + options.enabled = JSON.parse(options.enabled); + } + options.enabled = JSON.parse(options.enabled); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.enabled}]); } - var paramPath = options.path + '/' + 'id'; - if (options.id) { + paramPath = options.path + '/' + 'storageUri'; + if (options.storageUri) { cli.output.verbose('================================================'); cli.output.verbose('Path : ' + paramPath); - cli.output.verbose('Value : ' + options.id); + cli.output.verbose('Value : ' + options.storageUri); cli.output.verbose('================================================'); - if (options.parse && options.id) { - options.id = JSON.parse(options.id); + if (options.parse && options.storageUri) { + options.storageUri = JSON.parse(options.storageUri); } - jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageUri}]); } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -5078,20 +6320,18 @@ function display(cli, o) { cli.output.verbose('====================================='); }); - //config delete load-balancer-inbound-nat-pools - var catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP = catparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP.category('config') + //config delete boot-diagnostics + var catparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1 = catparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP = parametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP.category('load-balancer-inbound-nat-pools') - .description($('Commands to configure load-balancer-inbound-nat-pools of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsLoadBalancerInboundNatPools1VMPnPnICICIiCCIlBINP.command('delete') - .description($('Remove load-balancer-inbound-nat-pools in config string or files, e.g. \r\n {\r\n ...\r\n "loadBalancerInboundNatPools" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1 = parametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1.category('boot-diagnostics') + .description($('Commands to configure boot-diagnostics of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsBootDiagnostics1VMPdPbD1.command('delete') + .description($('Remove boot-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "bootDiagnostics" : {\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) - .option('--index ', $('Indexer: index.')) - .option('--ip-configurations-index ', $('Indexer: ip-configurations-index.')) - .option('--network-interface-configurations-index ', $('Indexer: network-interface-configurations-index.')) - .option('--id', $('Remove the id value.')) + .option('--enabled', $('Remove the enabled value.')) + .option('--storage-uri', $('Remove the storage-uri value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -5106,12 +6346,16 @@ function display(cli, o) { cli.output.verbose('JSON object:'); cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; - options.path = '/virtualMachineProfile/networkProfile/networkInterfaceConfigurations/' + options.networkInterfaceConfigurationsIndex + '/ipConfigurations/' + options.ipConfigurationsIndex + '/loadBalancerInboundNatPools' + (options.index ? ('/' + options.index) : ''); - var anySubItem = false || options.id; + options.path = '/virtualMachineProfile/diagnosticsProfile/bootDiagnostics'; + var anySubItem = false || options.enabled || options.storageUri; if (anySubItem) { var subItemPath = null; - if (options.id) { - subItemPath = options.path + '/id'; + if (options.enabled) { + subItemPath = options.path + '/enabled'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.storageUri) { + subItemPath = options.path + '/storageUri'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } } @@ -5130,12 +6374,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set extension-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP = parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP.category('extension-profile') + var setparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1 = parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1.category('extension-profile') .description($('Commands to configure extension-profile of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile0VMPeP1.command('set') .description($('Set extension-profile in config string or files, e.g. \r\n {\r\n ...\r\n "extensionProfile" : {\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5183,12 +6427,12 @@ function display(cli, o) { }); //config delete extension-profile - var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1 = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP = parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP.category('extension-profile') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1 = parametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1.category('extension-profile') .description($('Commands to configure extension-profile of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensionProfile1VMPeP1.command('delete') .description($('Remove extension-profile in config string or files, e.g. \r\n {\r\n ...\r\n "extensionProfile" : {\r\n "extensions":[\r\n {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5231,12 +6475,12 @@ function display(cli, o) { cli.output.verbose('====================================='); }); //config set extensions - var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1 = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe = parametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe.category('extensions') + var setparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1 = parametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1.category('extensions') .description($('Commands to configure extensions of vmss in config file.')); - setparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe.command('set') + setparametersCreateOrUpdateVirtualMachineScaleSetsExtensions0VMPePe1.command('set') .description($('Set extensions in config string or files, e.g. \r\n {\r\n ...\r\n "extensions" : {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5387,12 +6631,12 @@ function display(cli, o) { }); //config delete extensions - var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe = cli.category('vmss'); - var parametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe.category('config') + var catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1 = catparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1.category('config') .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe = parametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe.category('extensions') + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1 = parametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1.category('extensions') .description($('Commands to configure extensions of vmss in config file.')); - deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe.command('delete') + deleteparametersCreateOrUpdateVirtualMachineScaleSetsExtensions1VMPePe1.command('delete') .description($('Remove extensions in config string or files, e.g. \r\n {\r\n ...\r\n "extensions" : {\r\n "name":"",\r\n "publisher":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "id":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5475,6 +6719,141 @@ function display(cli, o) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); + //config set identity + var catparametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1 = catparametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1 = parametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1.category('identity') + .description($('Commands to configure identity of vmss in config file.')); + setparametersCreateOrUpdateVirtualMachineScaleSetsIdentity0I1.command('set') + .description($('Set identity in config string or files, e.g. \r\n {\r\n ...\r\n "identity" : {\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--principal-id ', $('Set the principal-id value.')) + .option('--tenant-id ', $('Set the tenant-id value.')) + .option('--type ', $('Set the type value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/identity'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'principalId'; + if (options.principalId) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.principalId); + cli.output.verbose('================================================'); + if (options.parse && options.principalId) { + options.principalId = JSON.parse(options.principalId); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.principalId}]); + } + paramPath = options.path + '/' + 'tenantId'; + if (options.tenantId) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.tenantId); + cli.output.verbose('================================================'); + if (options.parse && options.tenantId) { + options.tenantId = JSON.parse(options.tenantId); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.tenantId}]); + } + paramPath = options.path + '/' + 'type'; + if (options.type) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.type); + cli.output.verbose('================================================'); + if (options.parse && options.type) { + options.type = JSON.parse(options.type); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.type}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete identity + var catparametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1 = cli.category('vmss'); + var parametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1 = catparametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1.category('config') + .description($('Commands to manage configuration of virtual-machine-scale-sets in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1 = parametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1.category('identity') + .description($('Commands to configure identity of vmss in config file.')); + deleteparametersCreateOrUpdateVirtualMachineScaleSetsIdentity1I1.command('delete') + .description($('Remove identity in config string or files, e.g. \r\n {\r\n ...\r\n "identity" : {\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--principal-id', $('Remove the principal-id value.')) + .option('--tenant-id', $('Remove the tenant-id value.')) + .option('--type', $('Remove the type value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'remove'; + options.path = '/identity'; + var anySubItem = false || options.principalId || options.tenantId || options.type; + if (anySubItem) { + var subItemPath = null; + if (options.principalId) { + subItemPath = options.path + '/principalId'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.tenantId) { + subItemPath = options.path + '/tenantId'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.type) { + subItemPath = options.path + '/type'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } + + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); /* VirtualMachineScaleSets Deallocate diff --git a/lib/commands/arm/compute/virtualMachines._js b/lib/commands/arm/compute/virtualMachines._js index b93f564303..3eec7d3a5b 100644 --- a/lib/commands/arm/compute/virtualMachines._js +++ b/lib/commands/arm/compute/virtualMachines._js @@ -41,6 +41,7 @@ azure vm config virtual-machine set --license-type $licenseType --vm-id $vmId --resources $resources +--identity $identity --id $id --name $name --type $type @@ -61,6 +62,7 @@ azure vm config virtual-machine delete --license-type --vm-id --resources +--identity --id --name --type @@ -190,12 +192,12 @@ azure vm config key-encryption-key delete --key-url --source-vault -azure vm config source-vault set +azure vm config key-encryption-key-source-vault set --parameter-file $f --parse --id $id -azure vm config source-vault delete +azure vm config key-encryption-key-source-vault delete --parameter-file $f --id @@ -208,8 +210,14 @@ azure vm config vhd delete --parameter-file $f --uri +azure vm config image set +--parameter-file $f +--parse +--uri $uri + azure vm config image delete --parameter-file $f +--uri azure vm config managed-disk set --parameter-file $f @@ -248,17 +256,40 @@ azure vm config data-disks delete --disk-size-g-b --managed-disk -azure vm config vhd delete +azure vm config data-disks-vhd set +--parameter-file $f +--data-disks-index $i +--parse +--uri $uri + +azure vm config data-disks-vhd delete --parameter-file $f --data-disks-index $pdata-disks-index +--uri -azure vm config image delete +azure vm config data-disks-image set +--parameter-file $f +--data-disks-index $i +--parse +--uri $uri + +azure vm config data-disks-image delete --parameter-file $f --data-disks-index $pdata-disks-index +--uri -azure vm config managed-disk delete +azure vm config data-disks-managed-disk set +--parameter-file $f +--data-disks-index $i +--parse +--storage-account-type $storageAccountType +--id $id + +azure vm config data-disks-managed-disk delete --parameter-file $f --data-disks-index $pdata-disks-index +--storage-account-type +--id azure vm config os-profile set --parameter-file $f @@ -387,13 +418,13 @@ azure vm config secrets delete --source-vault --vault-certificates -azure vm config source-vault set +azure vm config secrets-source-vault set --parameter-file $f --secrets-index $i --parse --id $id -azure vm config source-vault delete +azure vm config secrets-source-vault delete --parameter-file $f --secrets-index $psecrets-index --id @@ -473,6 +504,7 @@ azure vm config instance-view set --platform-fault-domain $platformFaultDomain --rdp-thumb-print $rdpThumbPrint --vm-agent $vmAgent +--maintenance-redeploy-status $maintenanceRedeployStatus --disks $disks --extensions $extensions --boot-diagnostics $bootDiagnostics @@ -484,6 +516,7 @@ azure vm config instance-view delete --platform-fault-domain --rdp-thumb-print --vm-agent +--maintenance-redeploy-status --disks --extensions --boot-diagnostics @@ -542,10 +575,41 @@ azure vm config statuses set --index $i --value $v --parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time azure vm config statuses delete --parameter-file $f --index $pindex +--code +--level +--display-status +--message +--time + +azure vm config maintenance-redeploy-status set +--parameter-file $f +--parse +--is-customer-initiated-maintenance-allowed $isCustomerInitiatedMaintenanceAllowed +--pre-maintenance-window-start-time $preMaintenanceWindowStartTime +--pre-maintenance-window-end-time $preMaintenanceWindowEndTime +--maintenance-window-start-time $maintenanceWindowStartTime +--maintenance-window-end-time $maintenanceWindowEndTime +--last-operation-result-code $lastOperationResultCode +--last-operation-message $lastOperationMessage + +azure vm config maintenance-redeploy-status delete +--parameter-file $f +--is-customer-initiated-maintenance-allowed +--pre-maintenance-window-start-time +--pre-maintenance-window-end-time +--maintenance-window-start-time +--maintenance-window-end-time +--last-operation-result-code +--last-operation-message azure vm config disks set --parameter-file $f @@ -561,17 +625,27 @@ azure vm config disks delete --name --statuses -azure vm config statuses set +azure vm config disks-statuses set --parameter-file $f --index $i --disks-index $i --value $v --parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time -azure vm config statuses delete +azure vm config disks-statuses delete --parameter-file $f --index $pindex --disks-index $pdisks-index +--code +--level +--display-status +--message +--time azure vm config extensions set --parameter-file $f @@ -599,44 +673,74 @@ azure vm config substatuses set --extensions-index $i --value $v --parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time azure vm config substatuses delete --parameter-file $f --index $pindex --extensions-index $pextensions-index +--code +--level +--display-status +--message +--time -azure vm config statuses set +azure vm config extensions-statuses set --parameter-file $f --index $i --extensions-index $i --value $v --parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time -azure vm config statuses delete +azure vm config extensions-statuses delete --parameter-file $f --index $pindex --extensions-index $pextensions-index +--code +--level +--display-status +--message +--time -azure vm config boot-diagnostics set +azure vm config instance-view-boot-diagnostics set --parameter-file $f --parse --console-screenshot-blob-uri $consoleScreenshotBlobUri --serial-console-log-blob-uri $serialConsoleLogBlobUri -azure vm config boot-diagnostics delete +azure vm config instance-view-boot-diagnostics delete --parameter-file $f --console-screenshot-blob-uri --serial-console-log-blob-uri -azure vm config statuses set +azure vm config instance-view-statuses set --parameter-file $f --index $i --value $v --parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time -azure vm config statuses delete +azure vm config instance-view-statuses delete --parameter-file $f --index $pindex +--code +--level +--display-status +--message +--time azure vm config resources set --parameter-file $f @@ -676,9 +780,81 @@ azure vm config resources delete --location --tags -azure vm config instance-view delete +azure vm config resources-instance-view set +--parameter-file $f +--resources-index $i +--parse +--name $name +--type $type +--type-handler-version $typeHandlerVersion +--substatuses $substatuses +--statuses $statuses + +azure vm config resources-instance-view delete +--parameter-file $f +--resources-index $presources-index +--name +--type +--type-handler-version +--substatuses +--statuses + +azure vm config instance-view-substatuses set +--parameter-file $f +--index $i +--resources-index $i +--value $v +--parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time + +azure vm config instance-view-substatuses delete +--parameter-file $f +--index $pindex +--resources-index $presources-index +--code +--level +--display-status +--message +--time + +azure vm config instance-view-statuses set +--parameter-file $f +--index $i +--resources-index $i +--value $v +--parse +--code $code +--level $level +--display-status $displayStatus +--message $message +--time $time + +azure vm config instance-view-statuses delete --parameter-file $f +--index $pindex --resources-index $presources-index +--code +--level +--display-status +--message +--time + +azure vm config identity set +--parameter-file $f +--parse +--principal-id $principalId +--tenant-id $tenantId +--type $type + +azure vm config identity delete +--parameter-file $f +--principal-id +--tenant-id +--type azure vm create-or-update --resource-group $p0 @@ -692,25 +868,71 @@ azure vm config generate azure vm config patch --parameter-file $f +azure vm perform-maintenance +--resource-group $p0 +--vm-name $p1 + azure vm redeploy --resource-group $p0 --vm-name $p1 +azure vm run-command-parameters run-command-input set +--parameter-file $f +--parse +--command-id $commandId +--parameters $parameters + +azure vm run-command-parameters run-command-input delete +--parameter-file $f +--command-id +--parameters + +azure vm run-command-parameters parameters set +--parameter-file $f +--index $i +--value $v +--parse +--name $name +--value $value + +azure vm run-command-parameters parameters delete +--parameter-file $f +--index $pindex +--name +--value + +azure vm run-command +--resource-group $p0 +--vm-name $p1 +--parameters $p2 +--parameter-file $f + +azure vm run-command-parameters generate +--parameter-file $f + +azure vm run-command-parameters patch +--parameter-file $f + */ -'use strict';var fs = require('fs'); +'use strict'; +var fs = require('fs'); var jsonpatch = require('fast-json-patch'); var profile = require('../../../util/profile'); var utils = require('../../../util/utils'); -var $ = utils.getLocaleString;function beautify(jsonText) { +var $ = utils.getLocaleString; +function beautify(jsonText) { var obj = JSON.parse(jsonText); return JSON.stringify(obj, null, 2); } + exports.init = function (cli) { + + /* VirtualMachines ConvertToManagedDisks --resource-group @@ -916,6 +1138,15 @@ exports.init = function (cli) { } ] }, + "maintenanceRedeployStatus":{ + "isCustomerInitiatedMaintenanceAllowed":null, + "preMaintenanceWindowStartTime":null, + "preMaintenanceWindowEndTime":null, + "maintenanceWindowStartTime":null, + "maintenanceWindowEndTime":null, + "lastOperationResultCode":null, + "lastOperationMessage":"" + }, "disks":[ { "name":"", @@ -1014,6 +1245,11 @@ exports.init = function (cli) { } } ], + "identity":{ + "principalId":"", + "tenantId":"", + "type":null + }, "id":null, "name":null, "type":null, @@ -1068,12 +1304,12 @@ exports.init = function (cli) { .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .execute(function(options, _) { - cli.output.verbose('{\"plan\":{\"name\":\"\",\"publisher\":\"\",\"product\":\"\",\"promotionCode\":\"\"},\"hardwareProfile\":{\"vmSize\":\"\"},\"storageProfile\":{\"imageReference\":{\"publisher\":\"\",\"offer\":\"\",\"sku\":\"\",\"version\":\"\",\"id\":\"\"},\"osDisk\":{\"osType\":null,\"encryptionSettings\":{\"diskEncryptionKey\":{\"secretUrl\":\"\",\"sourceVault\":{\"id\":\"\"}},\"keyEncryptionKey\":{\"keyUrl\":\"\",\"sourceVault\":{\"id\":\"\"}},\"enabled\":null},\"name\":\"\",\"vhd\":{\"uri\":\"\"},\"image\":{\"uri\":\"\"},\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null,\"id\":\"\"}},\"dataDisks\":[{\"lun\":\"\",\"name\":\"\",\"vhd\":{\"uri\":\"\"},\"image\":{\"uri\":\"\"},\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null,\"id\":\"\"}}]},\"osProfile\":{\"computerName\":\"\",\"adminUsername\":\"\",\"adminPassword\":\"\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":null,\"enableAutomaticUpdates\":null,\"timeZone\":\"\",\"additionalUnattendContent\":[{\"passName\":null,\"componentName\":null,\"settingName\":null,\"content\":\"\"}],\"winRM\":{\"listeners\":[{\"protocol\":null,\"certificateUrl\":\"\"}]}},\"linuxConfiguration\":{\"disablePasswordAuthentication\":null,\"ssh\":{\"publicKeys\":[{\"path\":\"\",\"keyData\":\"\"}]}},\"secrets\":[{\"sourceVault\":{\"id\":\"\"},\"vaultCertificates\":[{\"certificateUrl\":\"\",\"certificateStore\":\"\"}]}]},\"networkProfile\":{\"networkInterfaces\":[{\"primary\":null,\"id\":\"\"}]},\"diagnosticsProfile\":{\"bootDiagnostics\":{\"enabled\":null,\"storageUri\":\"\"}},\"availabilitySet\":{\"id\":\"\"},\"provisioningState\":\"\",\"instanceView\":{\"platformUpdateDomain\":null,\"platformFaultDomain\":null,\"rdpThumbPrint\":\"\",\"vmAgent\":{\"vmAgentVersion\":\"\",\"extensionHandlers\":[{\"type\":\"\",\"typeHandlerVersion\":\"\",\"status\":{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"disks\":[{\"name\":\"\",\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]}],\"extensions\":[{\"name\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"substatuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]}],\"bootDiagnostics\":{\"consoleScreenshotBlobUri\":\"\",\"serialConsoleLogBlobUri\":\"\"},\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"licenseType\":\"\",\"vmId\":\"\",\"resources\":[{\"forceUpdateTag\":\"\",\"publisher\":\"\",\"virtualMachineExtensionType\":\"\",\"typeHandlerVersion\":\"\",\"autoUpgradeMinorVersion\":null,\"settings\":{},\"protectedSettings\":{},\"provisioningState\":\"\",\"instanceView\":{\"name\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"substatuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}],\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); + cli.output.verbose('{\"plan\":{\"name\":\"\",\"publisher\":\"\",\"product\":\"\",\"promotionCode\":\"\"},\"hardwareProfile\":{\"vmSize\":\"\"},\"storageProfile\":{\"imageReference\":{\"publisher\":\"\",\"offer\":\"\",\"sku\":\"\",\"version\":\"\",\"id\":\"\"},\"osDisk\":{\"osType\":null,\"encryptionSettings\":{\"diskEncryptionKey\":{\"secretUrl\":\"\",\"sourceVault\":{\"id\":\"\"}},\"keyEncryptionKey\":{\"keyUrl\":\"\",\"sourceVault\":{\"id\":\"\"}},\"enabled\":null},\"name\":\"\",\"vhd\":{\"uri\":\"\"},\"image\":{\"uri\":\"\"},\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null,\"id\":\"\"}},\"dataDisks\":[{\"lun\":\"\",\"name\":\"\",\"vhd\":{\"uri\":\"\"},\"image\":{\"uri\":\"\"},\"caching\":null,\"createOption\":\"\",\"diskSizeGB\":null,\"managedDisk\":{\"storageAccountType\":null,\"id\":\"\"}}]},\"osProfile\":{\"computerName\":\"\",\"adminUsername\":\"\",\"adminPassword\":\"\",\"customData\":\"\",\"windowsConfiguration\":{\"provisionVMAgent\":null,\"enableAutomaticUpdates\":null,\"timeZone\":\"\",\"additionalUnattendContent\":[{\"passName\":null,\"componentName\":null,\"settingName\":null,\"content\":\"\"}],\"winRM\":{\"listeners\":[{\"protocol\":null,\"certificateUrl\":\"\"}]}},\"linuxConfiguration\":{\"disablePasswordAuthentication\":null,\"ssh\":{\"publicKeys\":[{\"path\":\"\",\"keyData\":\"\"}]}},\"secrets\":[{\"sourceVault\":{\"id\":\"\"},\"vaultCertificates\":[{\"certificateUrl\":\"\",\"certificateStore\":\"\"}]}]},\"networkProfile\":{\"networkInterfaces\":[{\"primary\":null,\"id\":\"\"}]},\"diagnosticsProfile\":{\"bootDiagnostics\":{\"enabled\":null,\"storageUri\":\"\"}},\"availabilitySet\":{\"id\":\"\"},\"provisioningState\":\"\",\"instanceView\":{\"platformUpdateDomain\":null,\"platformFaultDomain\":null,\"rdpThumbPrint\":\"\",\"vmAgent\":{\"vmAgentVersion\":\"\",\"extensionHandlers\":[{\"type\":\"\",\"typeHandlerVersion\":\"\",\"status\":{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"maintenanceRedeployStatus\":{\"isCustomerInitiatedMaintenanceAllowed\":null,\"preMaintenanceWindowStartTime\":null,\"preMaintenanceWindowEndTime\":null,\"maintenanceWindowStartTime\":null,\"maintenanceWindowEndTime\":null,\"lastOperationResultCode\":null,\"lastOperationMessage\":\"\"},\"disks\":[{\"name\":\"\",\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]}],\"extensions\":[{\"name\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"substatuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]}],\"bootDiagnostics\":{\"consoleScreenshotBlobUri\":\"\",\"serialConsoleLogBlobUri\":\"\"},\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"licenseType\":\"\",\"vmId\":\"\",\"resources\":[{\"forceUpdateTag\":\"\",\"publisher\":\"\",\"virtualMachineExtensionType\":\"\",\"typeHandlerVersion\":\"\",\"autoUpgradeMinorVersion\":null,\"settings\":{},\"protectedSettings\":{},\"provisioningState\":\"\",\"instanceView\":{\"name\":\"\",\"type\":\"\",\"typeHandlerVersion\":\"\",\"substatuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}],\"statuses\":[{\"code\":\"\",\"level\":null,\"displayStatus\":\"\",\"message\":\"\",\"time\":null}]},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}],\"identity\":{\"principalId\":\"\",\"tenantId\":\"\",\"type\":null},\"id\":null,\"name\":null,\"type\":null,\"location\":\"\",\"tags\":{}}', _); var filePath = 'virtualMachinesCreateOrUpdate_createOrUpdate.json'; if (options.parameterFile) { filePath = options.parameterFile; } - fs.writeFileSync(filePath, beautify('{\r\n\"plan\":{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"product\":\"\",\r\n\"promotionCode\":\"\"\r\n},\r\n\"hardwareProfile\":{\r\n\"vmSize\":\"\"\r\n},\r\n\"storageProfile\":{\r\n\"imageReference\":{\r\n\"publisher\":\"\",\r\n\"offer\":\"\",\r\n\"sku\":\"\",\r\n\"version\":\"\",\r\n\"id\":\"\"\r\n},\r\n\"osDisk\":{\r\n\"osType\":null,\r\n\"encryptionSettings\":{\r\n\"diskEncryptionKey\":{\r\n\"secretUrl\":\"\",\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n}\r\n},\r\n\"keyEncryptionKey\":{\r\n\"keyUrl\":\"\",\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n}\r\n},\r\n\"enabled\":null\r\n},\r\n\"name\":\"\",\r\n\"vhd\":{\r\n\"uri\":\"\"\r\n},\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null,\r\n\"id\":\"\"\r\n}\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"lun\":\"\",\r\n\"name\":\"\",\r\n\"vhd\":{\r\n\"uri\":\"\"\r\n},\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null,\r\n\"id\":\"\"\r\n}\r\n}\r\n]\r\n},\r\n\"osProfile\":{\r\n\"computerName\":\"\",\r\n\"adminUsername\":\"\",\r\n\"adminPassword\":\"\",\r\n\"customData\":\"\",\r\n\"windowsConfiguration\":{\r\n\"provisionVMAgent\":null,\r\n\"enableAutomaticUpdates\":null,\r\n\"timeZone\":\"\",\r\n\"additionalUnattendContent\":[\r\n{\r\n\"passName\":null,\r\n\"componentName\":null,\r\n\"settingName\":null,\r\n\"content\":\"\"\r\n}\r\n],\r\n\"winRM\":{\r\n\"listeners\":[\r\n{\r\n\"protocol\":null,\r\n\"certificateUrl\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"linuxConfiguration\":{\r\n\"disablePasswordAuthentication\":null,\r\n\"ssh\":{\r\n\"publicKeys\":[\r\n{\r\n\"path\":\"\",\r\n\"keyData\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"secrets\":[\r\n{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"vaultCertificates\":[\r\n{\r\n\"certificateUrl\":\"\",\r\n\"certificateStore\":\"\"\r\n}\r\n]\r\n}\r\n]\r\n},\r\n\"networkProfile\":{\r\n\"networkInterfaces\":[\r\n{\r\n\"primary\":null,\r\n\"id\":\"\"\r\n}\r\n]\r\n},\r\n\"diagnosticsProfile\":{\r\n\"bootDiagnostics\":{\r\n\"enabled\":null,\r\n\"storageUri\":\"\"\r\n}\r\n},\r\n\"availabilitySet\":{\r\n\"id\":\"\"\r\n},\r\n\"provisioningState\":\"\",\r\n\"instanceView\":{\r\n\"platformUpdateDomain\":null,\r\n\"platformFaultDomain\":null,\r\n\"rdpThumbPrint\":\"\",\r\n\"vmAgent\":{\r\n\"vmAgentVersion\":\"\",\r\n\"extensionHandlers\":[\r\n{\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"status\":{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"disks\":[\r\n{\r\n\"name\":\"\",\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n}\r\n],\r\n\"extensions\":[\r\n{\r\n\"name\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"substatuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n}\r\n],\r\n\"bootDiagnostics\":{\r\n\"consoleScreenshotBlobUri\":\"\",\r\n\"serialConsoleLogBlobUri\":\"\"\r\n},\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"licenseType\":\"\",\r\n\"vmId\":\"\",\r\n\"resources\":[\r\n{\r\n\"forceUpdateTag\":\"\",\r\n\"publisher\":\"\",\r\n\"virtualMachineExtensionType\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"autoUpgradeMinorVersion\":null,\r\n\"settings\":{\r\n},\r\n\"protectedSettings\":{\r\n},\r\n\"provisioningState\":\"\",\r\n\"instanceView\":{\r\n\"name\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"substatuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}\r\n],\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); + fs.writeFileSync(filePath, beautify('{\r\n\"plan\":{\r\n\"name\":\"\",\r\n\"publisher\":\"\",\r\n\"product\":\"\",\r\n\"promotionCode\":\"\"\r\n},\r\n\"hardwareProfile\":{\r\n\"vmSize\":\"\"\r\n},\r\n\"storageProfile\":{\r\n\"imageReference\":{\r\n\"publisher\":\"\",\r\n\"offer\":\"\",\r\n\"sku\":\"\",\r\n\"version\":\"\",\r\n\"id\":\"\"\r\n},\r\n\"osDisk\":{\r\n\"osType\":null,\r\n\"encryptionSettings\":{\r\n\"diskEncryptionKey\":{\r\n\"secretUrl\":\"\",\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n}\r\n},\r\n\"keyEncryptionKey\":{\r\n\"keyUrl\":\"\",\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n}\r\n},\r\n\"enabled\":null\r\n},\r\n\"name\":\"\",\r\n\"vhd\":{\r\n\"uri\":\"\"\r\n},\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null,\r\n\"id\":\"\"\r\n}\r\n},\r\n\"dataDisks\":[\r\n{\r\n\"lun\":\"\",\r\n\"name\":\"\",\r\n\"vhd\":{\r\n\"uri\":\"\"\r\n},\r\n\"image\":{\r\n\"uri\":\"\"\r\n},\r\n\"caching\":null,\r\n\"createOption\":\"\",\r\n\"diskSizeGB\":null,\r\n\"managedDisk\":{\r\n\"storageAccountType\":null,\r\n\"id\":\"\"\r\n}\r\n}\r\n]\r\n},\r\n\"osProfile\":{\r\n\"computerName\":\"\",\r\n\"adminUsername\":\"\",\r\n\"adminPassword\":\"\",\r\n\"customData\":\"\",\r\n\"windowsConfiguration\":{\r\n\"provisionVMAgent\":null,\r\n\"enableAutomaticUpdates\":null,\r\n\"timeZone\":\"\",\r\n\"additionalUnattendContent\":[\r\n{\r\n\"passName\":null,\r\n\"componentName\":null,\r\n\"settingName\":null,\r\n\"content\":\"\"\r\n}\r\n],\r\n\"winRM\":{\r\n\"listeners\":[\r\n{\r\n\"protocol\":null,\r\n\"certificateUrl\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"linuxConfiguration\":{\r\n\"disablePasswordAuthentication\":null,\r\n\"ssh\":{\r\n\"publicKeys\":[\r\n{\r\n\"path\":\"\",\r\n\"keyData\":\"\"\r\n}\r\n]\r\n}\r\n},\r\n\"secrets\":[\r\n{\r\n\"sourceVault\":{\r\n\"id\":\"\"\r\n},\r\n\"vaultCertificates\":[\r\n{\r\n\"certificateUrl\":\"\",\r\n\"certificateStore\":\"\"\r\n}\r\n]\r\n}\r\n]\r\n},\r\n\"networkProfile\":{\r\n\"networkInterfaces\":[\r\n{\r\n\"primary\":null,\r\n\"id\":\"\"\r\n}\r\n]\r\n},\r\n\"diagnosticsProfile\":{\r\n\"bootDiagnostics\":{\r\n\"enabled\":null,\r\n\"storageUri\":\"\"\r\n}\r\n},\r\n\"availabilitySet\":{\r\n\"id\":\"\"\r\n},\r\n\"provisioningState\":\"\",\r\n\"instanceView\":{\r\n\"platformUpdateDomain\":null,\r\n\"platformFaultDomain\":null,\r\n\"rdpThumbPrint\":\"\",\r\n\"vmAgent\":{\r\n\"vmAgentVersion\":\"\",\r\n\"extensionHandlers\":[\r\n{\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"status\":{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"maintenanceRedeployStatus\":{\r\n\"isCustomerInitiatedMaintenanceAllowed\":null,\r\n\"preMaintenanceWindowStartTime\":null,\r\n\"preMaintenanceWindowEndTime\":null,\r\n\"maintenanceWindowStartTime\":null,\r\n\"maintenanceWindowEndTime\":null,\r\n\"lastOperationResultCode\":null,\r\n\"lastOperationMessage\":\"\"\r\n},\r\n\"disks\":[\r\n{\r\n\"name\":\"\",\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n}\r\n],\r\n\"extensions\":[\r\n{\r\n\"name\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"substatuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n}\r\n],\r\n\"bootDiagnostics\":{\r\n\"consoleScreenshotBlobUri\":\"\",\r\n\"serialConsoleLogBlobUri\":\"\"\r\n},\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"licenseType\":\"\",\r\n\"vmId\":\"\",\r\n\"resources\":[\r\n{\r\n\"forceUpdateTag\":\"\",\r\n\"publisher\":\"\",\r\n\"virtualMachineExtensionType\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"autoUpgradeMinorVersion\":null,\r\n\"settings\":{\r\n},\r\n\"protectedSettings\":{\r\n},\r\n\"provisioningState\":\"\",\r\n\"instanceView\":{\r\n\"name\":\"\",\r\n\"type\":\"\",\r\n\"typeHandlerVersion\":\"\",\r\n\"substatuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n],\r\n\"statuses\":[\r\n{\r\n\"code\":\"\",\r\n\"level\":null,\r\n\"displayStatus\":\"\",\r\n\"message\":\"\",\r\n\"time\":null\r\n}\r\n]\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}\r\n],\r\n\"identity\":{\r\n\"principalId\":\"\",\r\n\"tenantId\":\"\",\r\n\"type\":null\r\n},\r\n\"id\":null,\r\n\"name\":null,\r\n\"type\":null,\r\n\"location\":\"\",\r\n\"tags\":{\r\n}\r\n}')); cli.output.verbose('====================================='); cli.output.verbose('Parameter file output to: ' + filePath); cli.output.verbose('====================================='); @@ -1125,13 +1361,13 @@ exports.init = function (cli) { }); //config set virtual-machine - var catparametersCreateOrUpdateVirtualMachinesVirtualMachine0 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVirtualMachine0 = catparametersCreateOrUpdateVirtualMachinesVirtualMachine0.category('config') + var catparametersCreateOrUpdateVirtualMachinesVirtualMachine01 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVirtualMachine01 = catparametersCreateOrUpdateVirtualMachinesVirtualMachine01.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesVirtualMachine0 = parametersCreateOrUpdateVirtualMachinesVirtualMachine0.category('virtual-machine') + var setparametersCreateOrUpdateVirtualMachinesVirtualMachine01 = parametersCreateOrUpdateVirtualMachinesVirtualMachine01.category('virtual-machine') .description($('Commands to configure virtual-machine of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesVirtualMachine0.command('set') - .description($('Set virtual-machine in config string or files, e.g. \r\n{\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "hardwareProfile":{\r\n "vmSize":""\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n },\r\n "osProfile":{\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "availabilitySet":{\r\n "id":""\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "licenseType":"",\r\n "vmId":"",\r\n "resources":[\r\n {\r\n "forceUpdateTag":"",\r\n "publisher":"",\r\n "virtualMachineExtensionType":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n }\r\n ],\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateVirtualMachinesVirtualMachine01.command('set') + .description($('Set virtual-machine in config string or files, e.g. \r\n{\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "hardwareProfile":{\r\n "vmSize":""\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n },\r\n "osProfile":{\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "availabilitySet":{\r\n "id":""\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "maintenanceRedeployStatus":{\r\n "isCustomerInitiatedMaintenanceAllowed":null,\r\n "preMaintenanceWindowStartTime":null,\r\n "preMaintenanceWindowEndTime":null,\r\n "maintenanceWindowStartTime":null,\r\n "maintenanceWindowEndTime":null,\r\n "lastOperationResultCode":null,\r\n "lastOperationMessage":""\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "licenseType":"",\r\n "vmId":"",\r\n "resources":[\r\n {\r\n "forceUpdateTag":"",\r\n "publisher":"",\r\n "virtualMachineExtensionType":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n }\r\n ],\r\n "identity":{\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -1147,6 +1383,7 @@ exports.init = function (cli) { .option('--license-type ', $('Set the license-type value.')) .option('--vm-id ', $('Set the vm-id value.')) .option('--resources ', $('Set the resources value.')) + .option('--identity ', $('Set the identity value.')) .option('--id ', $('Set the id value.')) .option('--name ', $('Set the name value.')) .option('--type ', $('Set the type value.')) @@ -1303,6 +1540,17 @@ exports.init = function (cli) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.resources}]); } + paramPath = options.path + '/' + 'identity'; + if (options.identity) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.identity); + cli.output.verbose('================================================'); + if (options.parse && options.identity) { + options.identity = JSON.parse(options.identity); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.identity}]); + } paramPath = options.path + '/' + 'id'; if (options.id) { cli.output.verbose('================================================'); @@ -1370,13 +1618,13 @@ exports.init = function (cli) { }); //config delete virtual-machine - var catparametersCreateOrUpdateVirtualMachinesVirtualMachine1 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVirtualMachine1 = catparametersCreateOrUpdateVirtualMachinesVirtualMachine1.category('config') + var catparametersCreateOrUpdateVirtualMachinesVirtualMachine11 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVirtualMachine11 = catparametersCreateOrUpdateVirtualMachinesVirtualMachine11.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesVirtualMachine1 = parametersCreateOrUpdateVirtualMachinesVirtualMachine1.category('virtual-machine') + var deleteparametersCreateOrUpdateVirtualMachinesVirtualMachine11 = parametersCreateOrUpdateVirtualMachinesVirtualMachine11.category('virtual-machine') .description($('Commands to configure virtual-machine of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesVirtualMachine1.command('delete') - .description($('Remove virtual-machine in config string or files, e.g. \r\n{\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "hardwareProfile":{\r\n "vmSize":""\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n },\r\n "osProfile":{\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "availabilitySet":{\r\n "id":""\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "licenseType":"",\r\n "vmId":"",\r\n "resources":[\r\n {\r\n "forceUpdateTag":"",\r\n "publisher":"",\r\n "virtualMachineExtensionType":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n }\r\n ],\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachinesVirtualMachine11.command('delete') + .description($('Remove virtual-machine in config string or files, e.g. \r\n{\r\n "plan":{\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n },\r\n "hardwareProfile":{\r\n "vmSize":""\r\n },\r\n "storageProfile":{\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n },\r\n "osProfile":{\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n "networkProfile":{\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n },\r\n "diagnosticsProfile":{\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n },\r\n "availabilitySet":{\r\n "id":""\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "maintenanceRedeployStatus":{\r\n "isCustomerInitiatedMaintenanceAllowed":null,\r\n "preMaintenanceWindowStartTime":null,\r\n "preMaintenanceWindowEndTime":null,\r\n "maintenanceWindowStartTime":null,\r\n "maintenanceWindowEndTime":null,\r\n "lastOperationResultCode":null,\r\n "lastOperationMessage":""\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "licenseType":"",\r\n "vmId":"",\r\n "resources":[\r\n {\r\n "forceUpdateTag":"",\r\n "publisher":"",\r\n "virtualMachineExtensionType":"",\r\n "typeHandlerVersion":"",\r\n "autoUpgradeMinorVersion":null,\r\n "settings":{\r\n },\r\n "protectedSettings":{\r\n },\r\n "provisioningState":"",\r\n "instanceView":{\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n }\r\n ],\r\n "identity":{\r\n "principalId":"",\r\n "tenantId":"",\r\n "type":null\r\n },\r\n "id":null,\r\n "name":null,\r\n "type":null,\r\n "location":"",\r\n "tags":{\r\n }\r\n}\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--plan', $('Remove the plan value.')) @@ -1391,6 +1639,7 @@ exports.init = function (cli) { .option('--license-type', $('Remove the license-type value.')) .option('--vm-id', $('Remove the vm-id value.')) .option('--resources', $('Remove the resources value.')) + .option('--identity', $('Remove the identity value.')) .option('--id', $('Remove the id value.')) .option('--name', $('Remove the name value.')) .option('--type', $('Remove the type value.')) @@ -1411,7 +1660,7 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = ''; - var anySubItem = false || options.plan || options.hardwareProfile || options.storageProfile || options.osProfile || options.networkProfile || options.diagnosticsProfile || options.availabilitySet || options.provisioningState || options.instanceView || options.licenseType || options.vmId || options.resources || options.id || options.name || options.type || options.location || options.tags; + var anySubItem = false || options.plan || options.hardwareProfile || options.storageProfile || options.osProfile || options.networkProfile || options.diagnosticsProfile || options.availabilitySet || options.provisioningState || options.instanceView || options.licenseType || options.vmId || options.resources || options.identity || options.id || options.name || options.type || options.location || options.tags; if (anySubItem) { var subItemPath = null; if (options.plan) { @@ -1462,6 +1711,10 @@ exports.init = function (cli) { subItemPath = options.path + '/resources'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.identity) { + subItemPath = options.path + '/identity'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.id) { subItemPath = options.path + '/id'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -1498,12 +1751,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set plan - var catparametersCreateOrUpdateVirtualMachinesPlan0P = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesPlan0P = catparametersCreateOrUpdateVirtualMachinesPlan0P.category('config') + var catparametersCreateOrUpdateVirtualMachinesPlan0P1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesPlan0P1 = catparametersCreateOrUpdateVirtualMachinesPlan0P1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesPlan0P = parametersCreateOrUpdateVirtualMachinesPlan0P.category('plan') + var setparametersCreateOrUpdateVirtualMachinesPlan0P1 = parametersCreateOrUpdateVirtualMachinesPlan0P1.category('plan') .description($('Commands to configure plan of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesPlan0P.command('set') + setparametersCreateOrUpdateVirtualMachinesPlan0P1.command('set') .description($('Set plan in config string or files, e.g. \r\n {\r\n ...\r\n "plan" : {\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1587,12 +1840,12 @@ exports.init = function (cli) { }); //config delete plan - var catparametersCreateOrUpdateVirtualMachinesPlan1P = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesPlan1P = catparametersCreateOrUpdateVirtualMachinesPlan1P.category('config') + var catparametersCreateOrUpdateVirtualMachinesPlan1P1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesPlan1P1 = catparametersCreateOrUpdateVirtualMachinesPlan1P1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesPlan1P = parametersCreateOrUpdateVirtualMachinesPlan1P.category('plan') + var deleteparametersCreateOrUpdateVirtualMachinesPlan1P1 = parametersCreateOrUpdateVirtualMachinesPlan1P1.category('plan') .description($('Commands to configure plan of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesPlan1P.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesPlan1P1.command('delete') .description($('Remove plan in config string or files, e.g. \r\n {\r\n ...\r\n "plan" : {\r\n "name":"",\r\n "publisher":"",\r\n "product":"",\r\n "promotionCode":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1650,12 +1903,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set hardware-profile - var catparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesHardwareProfile0HP = catparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP.category('config') + var catparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1 = catparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP = parametersCreateOrUpdateVirtualMachinesHardwareProfile0HP.category('hardware-profile') + var setparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1 = parametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1.category('hardware-profile') .description($('Commands to configure hardware-profile of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP.command('set') + setparametersCreateOrUpdateVirtualMachinesHardwareProfile0HP1.command('set') .description($('Set hardware-profile in config string or files, e.g. \r\n {\r\n ...\r\n "hardwareProfile" : {\r\n "vmSize":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1703,12 +1956,12 @@ exports.init = function (cli) { }); //config delete hardware-profile - var catparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesHardwareProfile1HP = catparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP.category('config') + var catparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1 = catparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP = parametersCreateOrUpdateVirtualMachinesHardwareProfile1HP.category('hardware-profile') + var deleteparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1 = parametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1.category('hardware-profile') .description($('Commands to configure hardware-profile of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesHardwareProfile1HP1.command('delete') .description($('Remove hardware-profile in config string or files, e.g. \r\n {\r\n ...\r\n "hardwareProfile" : {\r\n "vmSize":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1751,12 +2004,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set storage-profile - var catparametersCreateOrUpdateVirtualMachinesStorageProfile0SP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesStorageProfile0SP = catparametersCreateOrUpdateVirtualMachinesStorageProfile0SP.category('config') + var catparametersCreateOrUpdateVirtualMachinesStorageProfile0SP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesStorageProfile0SP1 = catparametersCreateOrUpdateVirtualMachinesStorageProfile0SP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesStorageProfile0SP = parametersCreateOrUpdateVirtualMachinesStorageProfile0SP.category('storage-profile') + var setparametersCreateOrUpdateVirtualMachinesStorageProfile0SP1 = parametersCreateOrUpdateVirtualMachinesStorageProfile0SP1.category('storage-profile') .description($('Commands to configure storage-profile of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesStorageProfile0SP.command('set') + setparametersCreateOrUpdateVirtualMachinesStorageProfile0SP1.command('set') .description($('Set storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1828,12 +2081,12 @@ exports.init = function (cli) { }); //config delete storage-profile - var catparametersCreateOrUpdateVirtualMachinesStorageProfile1SP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesStorageProfile1SP = catparametersCreateOrUpdateVirtualMachinesStorageProfile1SP.category('config') + var catparametersCreateOrUpdateVirtualMachinesStorageProfile1SP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesStorageProfile1SP1 = catparametersCreateOrUpdateVirtualMachinesStorageProfile1SP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesStorageProfile1SP = parametersCreateOrUpdateVirtualMachinesStorageProfile1SP.category('storage-profile') + var deleteparametersCreateOrUpdateVirtualMachinesStorageProfile1SP1 = parametersCreateOrUpdateVirtualMachinesStorageProfile1SP1.category('storage-profile') .description($('Commands to configure storage-profile of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesStorageProfile1SP.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesStorageProfile1SP1.command('delete') .description($('Remove storage-profile in config string or files, e.g. \r\n {\r\n ...\r\n "storageProfile" : {\r\n "imageReference":{\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n },\r\n "osDisk":{\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n },\r\n "dataDisks":[\r\n {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1886,12 +2139,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set image-reference - var catparametersCreateOrUpdateVirtualMachinesImageReference0SPiR = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesImageReference0SPiR = catparametersCreateOrUpdateVirtualMachinesImageReference0SPiR.category('config') + var catparametersCreateOrUpdateVirtualMachinesImageReference0SPiR1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImageReference0SPiR1 = catparametersCreateOrUpdateVirtualMachinesImageReference0SPiR1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesImageReference0SPiR = parametersCreateOrUpdateVirtualMachinesImageReference0SPiR.category('image-reference') + var setparametersCreateOrUpdateVirtualMachinesImageReference0SPiR1 = parametersCreateOrUpdateVirtualMachinesImageReference0SPiR1.category('image-reference') .description($('Commands to configure image-reference of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesImageReference0SPiR.command('set') + setparametersCreateOrUpdateVirtualMachinesImageReference0SPiR1.command('set') .description($('Set image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -1987,12 +2240,12 @@ exports.init = function (cli) { }); //config delete image-reference - var catparametersCreateOrUpdateVirtualMachinesImageReference1SPiR = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesImageReference1SPiR = catparametersCreateOrUpdateVirtualMachinesImageReference1SPiR.category('config') + var catparametersCreateOrUpdateVirtualMachinesImageReference1SPiR1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImageReference1SPiR1 = catparametersCreateOrUpdateVirtualMachinesImageReference1SPiR1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesImageReference1SPiR = parametersCreateOrUpdateVirtualMachinesImageReference1SPiR.category('image-reference') + var deleteparametersCreateOrUpdateVirtualMachinesImageReference1SPiR1 = parametersCreateOrUpdateVirtualMachinesImageReference1SPiR1.category('image-reference') .description($('Commands to configure image-reference of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesImageReference1SPiR.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesImageReference1SPiR1.command('delete') .description($('Remove image-reference in config string or files, e.g. \r\n {\r\n ...\r\n "imageReference" : {\r\n "publisher":"",\r\n "offer":"",\r\n "sku":"",\r\n "version":"",\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2055,12 +2308,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set os-disk - var catparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesOsDisk0SPoD = catparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD.category('config') + var catparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1 = catparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD = parametersCreateOrUpdateVirtualMachinesOsDisk0SPoD.category('os-disk') + var setparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1 = parametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1.category('os-disk') .description($('Commands to configure os-disk of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD.command('set') + setparametersCreateOrUpdateVirtualMachinesOsDisk0SPoD1.command('set') .description($('Set os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2204,12 +2457,12 @@ exports.init = function (cli) { }); //config delete os-disk - var catparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesOsDisk1SPoD = catparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD.category('config') + var catparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1 = catparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD = parametersCreateOrUpdateVirtualMachinesOsDisk1SPoD.category('os-disk') + var deleteparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1 = parametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1.category('os-disk') .description($('Commands to configure os-disk of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesOsDisk1SPoD1.command('delete') .description($('Remove os-disk in config string or files, e.g. \r\n {\r\n ...\r\n "osDisk" : {\r\n "osType":null,\r\n "encryptionSettings":{\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n },\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2292,12 +2545,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set encryption-settings - var catparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS = catparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS.category('config') + var catparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1 = catparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS = parametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS.category('encryption-settings') + var setparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1 = parametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1.category('encryption-settings') .description($('Commands to configure encryption-settings of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS.command('set') + setparametersCreateOrUpdateVirtualMachinesEncryptionSettings0SPoDeS1.command('set') .description($('Set encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2370,12 +2623,12 @@ exports.init = function (cli) { }); //config delete encryption-settings - var catparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS = catparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS.category('config') + var catparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1 = catparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS = parametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS.category('encryption-settings') + var deleteparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1 = parametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1.category('encryption-settings') .description($('Commands to configure encryption-settings of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesEncryptionSettings1SPoDeS1.command('delete') .description($('Remove encryption-settings in config string or files, e.g. \r\n {\r\n ...\r\n "encryptionSettings" : {\r\n "diskEncryptionKey":{\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "keyEncryptionKey":{\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n },\r\n "enabled":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2428,12 +2681,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set disk-encryption-key - var catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK = catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK.category('config') + var catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1 = catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK = parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK.category('disk-encryption-key') + var setparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1 = parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK.command('set') + setparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey0SPoDeSdEK1.command('set') .description($('Set disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2493,12 +2746,12 @@ exports.init = function (cli) { }); //config delete disk-encryption-key - var catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK = catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK.category('config') + var catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1 = catparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK = parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK.category('disk-encryption-key') + var deleteparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1 = parametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1.category('disk-encryption-key') .description($('Commands to configure disk-encryption-key of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesDiskEncryptionKey1SPoDeSdEK1.command('delete') .description($('Remove disk-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "diskEncryptionKey" : {\r\n "secretUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2546,12 +2799,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV = catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV.category('config') + var catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV = parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV.category('source-vault') + var setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1.category('source-vault') .description($('Commands to configure source-vault of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV.command('set') + setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSdEKsV1.command('set') .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2599,12 +2852,12 @@ exports.init = function (cli) { }); //config delete source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV = catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV.category('config') + var catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV = parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV.category('source-vault') + var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1.category('source-vault') .description($('Commands to configure source-vault of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSdEKsV1.command('delete') .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2647,12 +2900,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set key-encryption-key - var catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK = catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK.category('config') + var catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1 = catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK = parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK.category('key-encryption-key') + var setparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1 = parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK.command('set') + setparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey0SPoDeSkEK1.command('set') .description($('Set key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2712,12 +2965,12 @@ exports.init = function (cli) { }); //config delete key-encryption-key - var catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK = catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK.category('config') + var catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1 = catparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK = parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK.category('key-encryption-key') + var deleteparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1 = parametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1.category('key-encryption-key') .description($('Commands to configure key-encryption-key of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesKeyEncryptionKey1SPoDeSkEK1.command('delete') .description($('Remove key-encryption-key in config string or files, e.g. \r\n {\r\n ...\r\n "keyEncryptionKey" : {\r\n "keyUrl":"",\r\n "sourceVault":{\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2764,14 +3017,14 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV = catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV.category('config') + //config set key-encryption-key-source-vault + var catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV = parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV.category('source-vault') - .description($('Commands to configure source-vault of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV.command('set') - .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesSourceVault0SPoDeSkEKsV1.command('set') + .description($('Set key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -2817,14 +3070,14 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); - //config delete source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV = catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV.category('config') + //config delete key-encryption-key-source-vault + var catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV = parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV.category('source-vault') - .description($('Commands to configure source-vault of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV.command('delete') - .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1.category('key-encryption-key-source-vault') + .description($('Commands to configure key-encryption-key-source-vault of vm in config file.')); + deleteparametersCreateOrUpdateVirtualMachinesSourceVault1SPoDeSkEKsV1.command('delete') + .description($('Remove key-encryption-key-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--id', $('Remove the id value.')) @@ -2866,12 +3119,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set vhd - var catparametersCreateOrUpdateVirtualMachinesVhd0SPoDv = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVhd0SPoDv = catparametersCreateOrUpdateVirtualMachinesVhd0SPoDv.category('config') + var catparametersCreateOrUpdateVirtualMachinesVhd0SPoDv1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVhd0SPoDv1 = catparametersCreateOrUpdateVirtualMachinesVhd0SPoDv1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesVhd0SPoDv = parametersCreateOrUpdateVirtualMachinesVhd0SPoDv.category('vhd') + var setparametersCreateOrUpdateVirtualMachinesVhd0SPoDv1 = parametersCreateOrUpdateVirtualMachinesVhd0SPoDv1.category('vhd') .description($('Commands to configure vhd of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesVhd0SPoDv.command('set') + setparametersCreateOrUpdateVirtualMachinesVhd0SPoDv1.command('set') .description($('Set vhd in config string or files, e.g. \r\n {\r\n ...\r\n "vhd" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2919,12 +3172,12 @@ exports.init = function (cli) { }); //config delete vhd - var catparametersCreateOrUpdateVirtualMachinesVhd1SPoDv = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVhd1SPoDv = catparametersCreateOrUpdateVirtualMachinesVhd1SPoDv.category('config') + var catparametersCreateOrUpdateVirtualMachinesVhd1SPoDv1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVhd1SPoDv1 = catparametersCreateOrUpdateVirtualMachinesVhd1SPoDv1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesVhd1SPoDv = parametersCreateOrUpdateVirtualMachinesVhd1SPoDv.category('vhd') + var deleteparametersCreateOrUpdateVirtualMachinesVhd1SPoDv1 = parametersCreateOrUpdateVirtualMachinesVhd1SPoDv1.category('vhd') .description($('Commands to configure vhd of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesVhd1SPoDv.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesVhd1SPoDv1.command('delete') .description($('Remove vhd in config string or files, e.g. \r\n {\r\n ...\r\n "vhd" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -2966,16 +3219,70 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); + //config set image + var catparametersCreateOrUpdateVirtualMachinesImage0SPoDi2 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImage0SPoDi2 = catparametersCreateOrUpdateVirtualMachinesImage0SPoDi2.category('config') + .description($('Commands to manage configuration of virtual-machines in the parameter file.')); + var setparametersCreateOrUpdateVirtualMachinesImage0SPoDi2 = parametersCreateOrUpdateVirtualMachinesImage0SPoDi2.category('image') + .description($('Commands to configure image of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesImage0SPoDi2.command('set') + .description($('Set image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--uri ', $('Set the uri value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/storageProfile/osDisk/image'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'uri'; + if (options.uri) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.uri); + cli.output.verbose('================================================'); + if (options.parse && options.uri) { + options.uri = JSON.parse(options.uri); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.uri}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + //config delete image - var catparametersCreateOrUpdateVirtualMachinesImage1SPoDi1 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesImage1SPoDi1 = catparametersCreateOrUpdateVirtualMachinesImage1SPoDi1.category('config') + var catparametersCreateOrUpdateVirtualMachinesImage1SPoDi2 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImage1SPoDi2 = catparametersCreateOrUpdateVirtualMachinesImage1SPoDi2.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesImage1SPoDi1 = parametersCreateOrUpdateVirtualMachinesImage1SPoDi1.category('image') + var deleteparametersCreateOrUpdateVirtualMachinesImage1SPoDi2 = parametersCreateOrUpdateVirtualMachinesImage1SPoDi2.category('image') .description($('Commands to configure image of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesImage1SPoDi1.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesImage1SPoDi2.command('delete') .description($('Remove image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) + .option('--uri', $('Remove the uri value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -2991,6 +3298,17 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/osDisk/image'; + var anySubItem = false || options.uri; + if (anySubItem) { + var subItemPath = null; + if (options.uri) { + subItemPath = options.path + '/uri'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3003,12 +3321,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set managed-disk - var catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD = catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD.category('config') + var catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1 = catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD = parametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD.category('managed-disk') + var setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1 = parametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD.command('set') + setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPoDmD1.command('set') .description($('Set managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3068,12 +3386,12 @@ exports.init = function (cli) { }); //config delete managed-disk - var catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD = catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD.category('config') + var catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1 = catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD = parametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD.category('managed-disk') + var deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1 = parametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1.category('managed-disk') .description($('Commands to configure managed-disk of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPoDmD1.command('delete') .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3121,12 +3439,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set data-disks - var catparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDataDisks0SPdD = catparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD.category('config') + var catparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1 = catparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD = parametersCreateOrUpdateVirtualMachinesDataDisks0SPdD.category('data-disks') + var setparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1 = parametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1.category('data-disks') .description($('Commands to configure data-disks of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD.command('set') + setparametersCreateOrUpdateVirtualMachinesDataDisks0SPdD1.command('set') .description($('Set data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3264,12 +3582,12 @@ exports.init = function (cli) { }); //config delete data-disks - var catparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDataDisks1SPdD = catparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD.category('config') + var catparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1 = catparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD = parametersCreateOrUpdateVirtualMachinesDataDisks1SPdD.category('data-disks') + var deleteparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1 = parametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1.category('data-disks') .description($('Commands to configure data-disks of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesDataDisks1SPdD1.command('delete') .description($('Remove data-disks in config string or files, e.g. \r\n {\r\n ...\r\n "dataDisks" : {\r\n "lun":"",\r\n "name":"",\r\n "vhd":{\r\n "uri":""\r\n },\r\n "image":{\r\n "uri":""\r\n },\r\n "caching":null,\r\n "createOption":"",\r\n "diskSizeGB":null,\r\n "managedDisk":{\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3347,17 +3665,72 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete vhd - var catparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2 = catparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2.category('config') + //config set data-disks-vhd + var catparametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3 = catparametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2 = parametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2.category('vhd') - .description($('Commands to configure vhd of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv2.command('delete') - .description($('Remove vhd in config string or files, e.g. \r\n {\r\n ...\r\n "vhd" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3 = parametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3.category('data-disks-vhd') + .description($('Commands to configure data-disks-vhd of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesVhd0SPdDDIv3.command('set') + .description($('Set data-disks-vhd in config string or files, e.g. \r\n {\r\n ...\r\n "vhd" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--uri ', $('Set the uri value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/vhd'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'uri'; + if (options.uri) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.uri); + cli.output.verbose('================================================'); + if (options.parse && options.uri) { + options.uri = JSON.parse(options.uri); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.uri}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete data-disks-vhd + var catparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3 = catparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3.category('config') + .description($('Commands to manage configuration of virtual-machines in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3 = parametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3.category('data-disks-vhd') + .description($('Commands to configure data-disks-vhd of vm in config file.')); + deleteparametersCreateOrUpdateVirtualMachinesVhd1SPdDDIv3.command('delete') + .description($('Remove data-disks-vhd in config string or files, e.g. \r\n {\r\n ...\r\n "vhd" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--uri', $('Remove the uri value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -3373,7 +3746,17 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/vhd'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + var anySubItem = false || options.uri; + if (anySubItem) { + var subItemPath = null; + if (options.uri) { + subItemPath = options.path + '/uri'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3385,17 +3768,72 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete image - var catparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3 = catparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3.category('config') + //config set data-disks-image + var catparametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4 = catparametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3 = parametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3.category('image') - .description($('Commands to configure image of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi3.command('delete') - .description($('Remove image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4 = parametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4.category('data-disks-image') + .description($('Commands to configure data-disks-image of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesImage0SPdDDIi4.command('set') + .description($('Set data-disks-image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--uri ', $('Set the uri value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/image'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'uri'; + if (options.uri) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.uri); + cli.output.verbose('================================================'); + if (options.parse && options.uri) { + options.uri = JSON.parse(options.uri); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.uri}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete data-disks-image + var catparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4 = catparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4.category('config') + .description($('Commands to manage configuration of virtual-machines in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4 = parametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4.category('data-disks-image') + .description($('Commands to configure data-disks-image of vm in config file.')); + deleteparametersCreateOrUpdateVirtualMachinesImage1SPdDDIi4.command('delete') + .description($('Remove data-disks-image in config string or files, e.g. \r\n {\r\n ...\r\n "image" : {\r\n "uri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--uri', $('Remove the uri value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -3411,7 +3849,17 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/image'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + var anySubItem = false || options.uri; + if (anySubItem) { + var subItemPath = null; + if (options.uri) { + subItemPath = options.path + '/uri'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3423,17 +3871,85 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config delete managed-disk - var catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1 = catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1.category('config') + //config set data-disks-managed-disk + var catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2 = catparametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1 = parametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1.category('managed-disk') - .description($('Commands to configure managed-disk of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD1.command('delete') - .description($('Remove managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2 = parametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesManagedDisk0SPdDDImD2.command('set') + .description($('Set data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + .usage('[options]') + .option('--parameter-file ', $('The parameter file path.')) + .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--storage-account-type ', $('Set the storage-account-type value.')) + .option('--id ', $('Set the id value.')) + .execute(function(options, _) { + cli.output.verbose(JSON.stringify(options), _); + if (!options.parameterFile) { + options.parameterFile = cli.interaction.promptIfNotGiven($('parameter-file : '), options.parameterFile, _); + } + + cli.output.verbose('====================================='); + cli.output.verbose('Reading file content from: \"' + options.parameterFile + '\"'); + cli.output.verbose('====================================='); + var fileContent = fs.readFileSync(options.parameterFile, 'utf8'); + var parametersObj = JSON.parse(fileContent); + cli.output.verbose('JSON object:'); + cli.output.verbose(JSON.stringify(parametersObj)); + options.operation = 'replace'; + options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/managedDisk'; + var error = jsonpatch.validate([{op: 'remove', path: options.path}], parametersObj); + if (typeof error !== 'undefined') { + jsonpatch.apply(parametersObj, [{op: 'add', path: options.path, value: {}}]); + } + var paramPath = options.path + '/' + 'storageAccountType'; + if (options.storageAccountType) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.storageAccountType); + cli.output.verbose('================================================'); + if (options.parse && options.storageAccountType) { + options.storageAccountType = JSON.parse(options.storageAccountType); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.storageAccountType}]); + } + paramPath = options.path + '/' + 'id'; + if (options.id) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.id); + cli.output.verbose('================================================'); + if (options.parse && options.id) { + options.id = JSON.parse(options.id); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.id}]); + } + var updatedContent = JSON.stringify(parametersObj); + cli.output.verbose('====================================='); + cli.output.verbose('JSON object (updated):'); + cli.output.verbose(JSON.stringify(parametersObj)); + cli.output.verbose('====================================='); + fs.writeFileSync(options.parameterFile, beautify(updatedContent)); + cli.output.verbose('====================================='); + cli.output.verbose('Parameter file updated at: ' + options.parameterFile); + cli.output.verbose('====================================='); + }); + + //config delete data-disks-managed-disk + var catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2 = catparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2.category('config') + .description($('Commands to manage configuration of virtual-machines in the parameter file.')); + var deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2 = parametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2.category('data-disks-managed-disk') + .description($('Commands to configure data-disks-managed-disk of vm in config file.')); + deleteparametersCreateOrUpdateVirtualMachinesManagedDisk1SPdDDImD2.command('delete') + .description($('Remove data-disks-managed-disk in config string or files, e.g. \r\n {\r\n ...\r\n "managedDisk" : {\r\n "storageAccountType":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--data-disks-index ', $('Indexer: data-disks-index.')) + .option('--storage-account-type', $('Remove the storage-account-type value.')) + .option('--id', $('Remove the id value.')) .execute(function(options, _) { cli.output.verbose(JSON.stringify(options), _); if (!options.parameterFile) { @@ -3449,7 +3965,21 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/storageProfile/dataDisks/' + options.dataDisksIndex + '/managedDisk'; - jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + var anySubItem = false || options.storageAccountType || options.id; + if (anySubItem) { + var subItemPath = null; + if (options.storageAccountType) { + subItemPath = options.path + '/storageAccountType'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + if (options.id) { + subItemPath = options.path + '/id'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } + } + else { + jsonpatch.apply(parametersObj, [{op: options.operation, path: options.path}]); + } var updatedContent = JSON.stringify(parametersObj); cli.output.verbose('====================================='); @@ -3462,12 +3992,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set os-profile - var catparametersCreateOrUpdateVirtualMachinesOsProfile0OP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesOsProfile0OP = catparametersCreateOrUpdateVirtualMachinesOsProfile0OP.category('config') + var catparametersCreateOrUpdateVirtualMachinesOsProfile0OP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesOsProfile0OP1 = catparametersCreateOrUpdateVirtualMachinesOsProfile0OP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesOsProfile0OP = parametersCreateOrUpdateVirtualMachinesOsProfile0OP.category('os-profile') + var setparametersCreateOrUpdateVirtualMachinesOsProfile0OP1 = parametersCreateOrUpdateVirtualMachinesOsProfile0OP1.category('os-profile') .description($('Commands to configure os-profile of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesOsProfile0OP.command('set') + setparametersCreateOrUpdateVirtualMachinesOsProfile0OP1.command('set') .description($('Set os-profile in config string or files, e.g. \r\n {\r\n ...\r\n "osProfile" : {\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3587,12 +4117,12 @@ exports.init = function (cli) { }); //config delete os-profile - var catparametersCreateOrUpdateVirtualMachinesOsProfile1OP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesOsProfile1OP = catparametersCreateOrUpdateVirtualMachinesOsProfile1OP.category('config') + var catparametersCreateOrUpdateVirtualMachinesOsProfile1OP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesOsProfile1OP1 = catparametersCreateOrUpdateVirtualMachinesOsProfile1OP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesOsProfile1OP = parametersCreateOrUpdateVirtualMachinesOsProfile1OP.category('os-profile') + var deleteparametersCreateOrUpdateVirtualMachinesOsProfile1OP1 = parametersCreateOrUpdateVirtualMachinesOsProfile1OP1.category('os-profile') .description($('Commands to configure os-profile of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesOsProfile1OP.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesOsProfile1OP1.command('delete') .description($('Remove os-profile in config string or files, e.g. \r\n {\r\n ...\r\n "osProfile" : {\r\n "computerName":"",\r\n "adminUsername":"",\r\n "adminPassword":"",\r\n "customData":"",\r\n "windowsConfiguration":{\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n },\r\n "linuxConfiguration":{\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n },\r\n "secrets":[\r\n {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3665,12 +4195,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set windows-configuration - var catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC = catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC.category('config') + var catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1 = catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC = parametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC.category('windows-configuration') + var setparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1 = parametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1.category('windows-configuration') .description($('Commands to configure windows-configuration of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC.command('set') + setparametersCreateOrUpdateVirtualMachinesWindowsConfiguration0OPwC1.command('set') .description($('Set windows-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "windowsConfiguration" : {\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3768,12 +4298,12 @@ exports.init = function (cli) { }); //config delete windows-configuration - var catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC = catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC.category('config') + var catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1 = catparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC = parametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC.category('windows-configuration') + var deleteparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1 = parametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1.category('windows-configuration') .description($('Commands to configure windows-configuration of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesWindowsConfiguration1OPwC1.command('delete') .description($('Remove windows-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "windowsConfiguration" : {\r\n "provisionVMAgent":null,\r\n "enableAutomaticUpdates":null,\r\n "timeZone":"",\r\n "additionalUnattendContent":[\r\n {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ],\r\n "winRM":{\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3836,12 +4366,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set additional-unattend-content - var catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC = catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC.category('config') + var catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1 = catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC = parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC.category('additional-unattend-content') + var setparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1 = parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1.category('additional-unattend-content') .description($('Commands to configure additional-unattend-content of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC.command('set') + setparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent0OPwCaUC1.command('set') .description($('Set additional-unattend-content in config string or files, e.g. \r\n {\r\n ...\r\n "additionalUnattendContent" : {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3931,12 +4461,12 @@ exports.init = function (cli) { }); //config delete additional-unattend-content - var catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC = catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC.category('config') + var catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1 = catparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC = parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC.category('additional-unattend-content') + var deleteparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1 = parametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1.category('additional-unattend-content') .description($('Commands to configure additional-unattend-content of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesAdditionalUnattendContent1OPwCaUC1.command('delete') .description($('Remove additional-unattend-content in config string or files, e.g. \r\n {\r\n ...\r\n "additionalUnattendContent" : {\r\n "passName":null,\r\n "componentName":null,\r\n "settingName":null,\r\n "content":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -3995,12 +4525,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set win-rm - var catparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM = catparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM.category('config') + var catparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1 = catparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM = parametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM.category('win-rm') + var setparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1 = parametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1.category('win-rm') .description($('Commands to configure win-rm of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM.command('set') + setparametersCreateOrUpdateVirtualMachinesWinRM0OPwCwRM1.command('set') .description($('Set win-rm in config string or files, e.g. \r\n {\r\n ...\r\n "winRM" : {\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4048,12 +4578,12 @@ exports.init = function (cli) { }); //config delete win-rm - var catparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM = catparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM.category('config') + var catparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1 = catparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM = parametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM.category('win-rm') + var deleteparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1 = parametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1.category('win-rm') .description($('Commands to configure win-rm of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesWinRM1OPwCwRM1.command('delete') .description($('Remove win-rm in config string or files, e.g. \r\n {\r\n ...\r\n "winRM" : {\r\n "listeners":[\r\n {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4096,12 +4626,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set listeners - var catparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl = catparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl.category('config') + var catparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1 = catparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl = parametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl.category('listeners') + var setparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1 = parametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1.category('listeners') .description($('Commands to configure listeners of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl.command('set') + setparametersCreateOrUpdateVirtualMachinesListeners0OPwCwRMl1.command('set') .description($('Set listeners in config string or files, e.g. \r\n {\r\n ...\r\n "listeners" : {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4167,12 +4697,12 @@ exports.init = function (cli) { }); //config delete listeners - var catparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl = catparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl.category('config') + var catparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1 = catparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl = parametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl.category('listeners') + var deleteparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1 = parametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1.category('listeners') .description($('Commands to configure listeners of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesListeners1OPwCwRMl1.command('delete') .description($('Remove listeners in config string or files, e.g. \r\n {\r\n ...\r\n "listeners" : {\r\n "protocol":null,\r\n "certificateUrl":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4221,12 +4751,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set linux-configuration - var catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC = catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC.category('config') + var catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1 = catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC = parametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC.category('linux-configuration') + var setparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1 = parametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1.category('linux-configuration') .description($('Commands to configure linux-configuration of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC.command('set') + setparametersCreateOrUpdateVirtualMachinesLinuxConfiguration0OPlC1.command('set') .description($('Set linux-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "linuxConfiguration" : {\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4287,12 +4817,12 @@ exports.init = function (cli) { }); //config delete linux-configuration - var catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC = catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC.category('config') + var catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1 = catparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC = parametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC.category('linux-configuration') + var deleteparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1 = parametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1.category('linux-configuration') .description($('Commands to configure linux-configuration of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesLinuxConfiguration1OPlC1.command('delete') .description($('Remove linux-configuration in config string or files, e.g. \r\n {\r\n ...\r\n "linuxConfiguration" : {\r\n "disablePasswordAuthentication":null,\r\n "ssh":{\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4340,12 +4870,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set ssh - var catparametersCreateOrUpdateVirtualMachinesSsh0OPlCs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSsh0OPlCs = catparametersCreateOrUpdateVirtualMachinesSsh0OPlCs.category('config') + var catparametersCreateOrUpdateVirtualMachinesSsh0OPlCs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSsh0OPlCs1 = catparametersCreateOrUpdateVirtualMachinesSsh0OPlCs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesSsh0OPlCs = parametersCreateOrUpdateVirtualMachinesSsh0OPlCs.category('ssh') + var setparametersCreateOrUpdateVirtualMachinesSsh0OPlCs1 = parametersCreateOrUpdateVirtualMachinesSsh0OPlCs1.category('ssh') .description($('Commands to configure ssh of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesSsh0OPlCs.command('set') + setparametersCreateOrUpdateVirtualMachinesSsh0OPlCs1.command('set') .description($('Set ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4393,12 +4923,12 @@ exports.init = function (cli) { }); //config delete ssh - var catparametersCreateOrUpdateVirtualMachinesSsh1OPlCs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSsh1OPlCs = catparametersCreateOrUpdateVirtualMachinesSsh1OPlCs.category('config') + var catparametersCreateOrUpdateVirtualMachinesSsh1OPlCs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSsh1OPlCs1 = catparametersCreateOrUpdateVirtualMachinesSsh1OPlCs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesSsh1OPlCs = parametersCreateOrUpdateVirtualMachinesSsh1OPlCs.category('ssh') + var deleteparametersCreateOrUpdateVirtualMachinesSsh1OPlCs1 = parametersCreateOrUpdateVirtualMachinesSsh1OPlCs1.category('ssh') .description($('Commands to configure ssh of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesSsh1OPlCs.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesSsh1OPlCs1.command('delete') .description($('Remove ssh in config string or files, e.g. \r\n {\r\n ...\r\n "ssh" : {\r\n "publicKeys":[\r\n {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4441,12 +4971,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set public-keys - var catparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK = catparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK.category('config') + var catparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1 = catparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK = parametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK.category('public-keys') + var setparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1 = parametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1.category('public-keys') .description($('Commands to configure public-keys of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK.command('set') + setparametersCreateOrUpdateVirtualMachinesPublicKeys0OPlCspK1.command('set') .description($('Set public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4512,12 +5042,12 @@ exports.init = function (cli) { }); //config delete public-keys - var catparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK = catparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK.category('config') + var catparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1 = catparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK = parametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK.category('public-keys') + var deleteparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1 = parametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1.category('public-keys') .description($('Commands to configure public-keys of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesPublicKeys1OPlCspK1.command('delete') .description($('Remove public-keys in config string or files, e.g. \r\n {\r\n ...\r\n "publicKeys" : {\r\n "path":"",\r\n "keyData":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4566,12 +5096,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set secrets - var catparametersCreateOrUpdateVirtualMachinesSecrets0OPs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSecrets0OPs = catparametersCreateOrUpdateVirtualMachinesSecrets0OPs.category('config') + var catparametersCreateOrUpdateVirtualMachinesSecrets0OPs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSecrets0OPs1 = catparametersCreateOrUpdateVirtualMachinesSecrets0OPs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesSecrets0OPs = parametersCreateOrUpdateVirtualMachinesSecrets0OPs.category('secrets') + var setparametersCreateOrUpdateVirtualMachinesSecrets0OPs1 = parametersCreateOrUpdateVirtualMachinesSecrets0OPs1.category('secrets') .description($('Commands to configure secrets of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesSecrets0OPs.command('set') + setparametersCreateOrUpdateVirtualMachinesSecrets0OPs1.command('set') .description($('Set secrets in config string or files, e.g. \r\n {\r\n ...\r\n "secrets" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4637,12 +5167,12 @@ exports.init = function (cli) { }); //config delete secrets - var catparametersCreateOrUpdateVirtualMachinesSecrets1OPs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSecrets1OPs = catparametersCreateOrUpdateVirtualMachinesSecrets1OPs.category('config') + var catparametersCreateOrUpdateVirtualMachinesSecrets1OPs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSecrets1OPs1 = catparametersCreateOrUpdateVirtualMachinesSecrets1OPs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesSecrets1OPs = parametersCreateOrUpdateVirtualMachinesSecrets1OPs.category('secrets') + var deleteparametersCreateOrUpdateVirtualMachinesSecrets1OPs1 = parametersCreateOrUpdateVirtualMachinesSecrets1OPs1.category('secrets') .description($('Commands to configure secrets of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesSecrets1OPs.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesSecrets1OPs1.command('delete') .description($('Remove secrets in config string or files, e.g. \r\n {\r\n ...\r\n "secrets" : {\r\n "sourceVault":{\r\n "id":""\r\n },\r\n "vaultCertificates":[\r\n {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4690,14 +5220,14 @@ exports.init = function (cli) { cli.output.verbose('Parameter file updated at: ' + options.parameterFile); cli.output.verbose('====================================='); }); - //config set source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV = catparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV.category('config') + //config set secrets-source-vault + var catparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV = parametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV.category('source-vault') - .description($('Commands to configure source-vault of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV.command('set') - .description($('Set source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var setparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1.category('secrets-source-vault') + .description($('Commands to configure secrets-source-vault of vm in config file.')); + setparametersCreateOrUpdateVirtualMachinesSourceVault0OPsIsV1.command('set') + .description($('Set secrets-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--secrets-index ', $('Indexer: secrets-index.')) @@ -4744,14 +5274,14 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); - //config delete source-vault - var catparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV = catparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV.category('config') + //config delete secrets-source-vault + var catparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1 = catparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV = parametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV.category('source-vault') - .description($('Commands to configure source-vault of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV.command('delete') - .description($('Remove source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + var deleteparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1 = parametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1.category('secrets-source-vault') + .description($('Commands to configure secrets-source-vault of vm in config file.')); + deleteparametersCreateOrUpdateVirtualMachinesSourceVault1OPsIsV1.command('delete') + .description($('Remove secrets-source-vault in config string or files, e.g. \r\n {\r\n ...\r\n "sourceVault" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--secrets-index ', $('Indexer: secrets-index.')) @@ -4794,12 +5324,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set vault-certificates - var catparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC = catparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC.category('config') + var catparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1 = catparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC = parametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC.category('vault-certificates') + var setparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1 = parametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1.category('vault-certificates') .description($('Commands to configure vault-certificates of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC.command('set') + setparametersCreateOrUpdateVirtualMachinesVaultCertificates0OPsIvC1.command('set') .description($('Set vault-certificates in config string or files, e.g. \r\n {\r\n ...\r\n "vaultCertificates" : {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4866,12 +5396,12 @@ exports.init = function (cli) { }); //config delete vault-certificates - var catparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC = catparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC.category('config') + var catparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1 = catparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC = parametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC.category('vault-certificates') + var deleteparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1 = parametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1.category('vault-certificates') .description($('Commands to configure vault-certificates of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesVaultCertificates1OPsIvC1.command('delete') .description($('Remove vault-certificates in config string or files, e.g. \r\n {\r\n ...\r\n "vaultCertificates" : {\r\n "certificateUrl":"",\r\n "certificateStore":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4921,12 +5451,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set network-profile - var catparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesNetworkProfile0NP = catparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP.category('config') + var catparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1 = catparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP = parametersCreateOrUpdateVirtualMachinesNetworkProfile0NP.category('network-profile') + var setparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1 = parametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1.category('network-profile') .description($('Commands to configure network-profile of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP.command('set') + setparametersCreateOrUpdateVirtualMachinesNetworkProfile0NP1.command('set') .description($('Set network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -4974,12 +5504,12 @@ exports.init = function (cli) { }); //config delete network-profile - var catparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesNetworkProfile1NP = catparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP.category('config') + var catparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1 = catparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP = parametersCreateOrUpdateVirtualMachinesNetworkProfile1NP.category('network-profile') + var deleteparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1 = parametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1.category('network-profile') .description($('Commands to configure network-profile of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesNetworkProfile1NP1.command('delete') .description($('Remove network-profile in config string or files, e.g. \r\n {\r\n ...\r\n "networkProfile" : {\r\n "networkInterfaces":[\r\n {\r\n "primary":null,\r\n "id":""\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5022,12 +5552,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set network-interfaces - var catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI = catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI.category('config') + var catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1 = catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI = parametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI.category('network-interfaces') + var setparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1 = parametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1.category('network-interfaces') .description($('Commands to configure network-interfaces of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI.command('set') + setparametersCreateOrUpdateVirtualMachinesNetworkInterfaces0NPnI1.command('set') .description($('Set network-interfaces in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaces" : {\r\n "primary":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5094,12 +5624,12 @@ exports.init = function (cli) { }); //config delete network-interfaces - var catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI = catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI.category('config') + var catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1 = catparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI = parametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI.category('network-interfaces') + var deleteparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1 = parametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1.category('network-interfaces') .description($('Commands to configure network-interfaces of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesNetworkInterfaces1NPnI1.command('delete') .description($('Remove network-interfaces in config string or files, e.g. \r\n {\r\n ...\r\n "networkInterfaces" : {\r\n "primary":null,\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5148,12 +5678,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set diagnostics-profile - var catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP = catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP.category('config') + var catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1 = catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP = parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP.category('diagnostics-profile') + var setparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1 = parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1.category('diagnostics-profile') .description($('Commands to configure diagnostics-profile of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP.command('set') + setparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile0DP1.command('set') .description($('Set diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5201,12 +5731,12 @@ exports.init = function (cli) { }); //config delete diagnostics-profile - var catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP = catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP.category('config') + var catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1 = catparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP = parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP.category('diagnostics-profile') + var deleteparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1 = parametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1.category('diagnostics-profile') .description($('Commands to configure diagnostics-profile of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesDiagnosticsProfile1DP1.command('delete') .description($('Remove diagnostics-profile in config string or files, e.g. \r\n {\r\n ...\r\n "diagnosticsProfile" : {\r\n "bootDiagnostics":{\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5249,12 +5779,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set boot-diagnostics - var catparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD = catparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD.category('config') + var catparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1 = catparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD = parametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD.category('boot-diagnostics') + var setparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1 = parametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1.category('boot-diagnostics') .description($('Commands to configure boot-diagnostics of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD.command('set') + setparametersCreateOrUpdateVirtualMachinesBootDiagnostics0DPbD1.command('set') .description($('Set boot-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "bootDiagnostics" : {\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5315,12 +5845,12 @@ exports.init = function (cli) { }); //config delete boot-diagnostics - var catparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD = catparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD.category('config') + var catparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1 = catparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD = parametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD.category('boot-diagnostics') + var deleteparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1 = parametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1.category('boot-diagnostics') .description($('Commands to configure boot-diagnostics of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesBootDiagnostics1DPbD1.command('delete') .description($('Remove boot-diagnostics in config string or files, e.g. \r\n {\r\n ...\r\n "bootDiagnostics" : {\r\n "enabled":null,\r\n "storageUri":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5368,12 +5898,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set availability-set - var catparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS = catparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS.category('config') + var catparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1 = catparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS = parametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS.category('availability-set') + var setparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1 = parametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1.category('availability-set') .description($('Commands to configure availability-set of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS.command('set') + setparametersCreateOrUpdateVirtualMachinesAvailabilitySet0AS1.command('set') .description($('Set availability-set in config string or files, e.g. \r\n {\r\n ...\r\n "availabilitySet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5421,12 +5951,12 @@ exports.init = function (cli) { }); //config delete availability-set - var catparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS = catparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS.category('config') + var catparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1 = catparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS = parametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS.category('availability-set') + var deleteparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1 = parametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1.category('availability-set') .description($('Commands to configure availability-set of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesAvailabilitySet1AS1.command('delete') .description($('Remove availability-set in config string or files, e.g. \r\n {\r\n ...\r\n "availabilitySet" : {\r\n "id":""\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5469,13 +5999,13 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set instance-view - var catparametersCreateOrUpdateVirtualMachinesInstanceView0IV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesInstanceView0IV = catparametersCreateOrUpdateVirtualMachinesInstanceView0IV.category('config') + var catparametersCreateOrUpdateVirtualMachinesInstanceView0IV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesInstanceView0IV1 = catparametersCreateOrUpdateVirtualMachinesInstanceView0IV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesInstanceView0IV = parametersCreateOrUpdateVirtualMachinesInstanceView0IV.category('instance-view') + var setparametersCreateOrUpdateVirtualMachinesInstanceView0IV1 = parametersCreateOrUpdateVirtualMachinesInstanceView0IV1.category('instance-view') .description($('Commands to configure instance-view of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesInstanceView0IV.command('set') - .description($('Set instance-view in config string or files, e.g. \r\n {\r\n ...\r\n "instanceView" : {\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + setparametersCreateOrUpdateVirtualMachinesInstanceView0IV1.command('set') + .description($('Set instance-view in config string or files, e.g. \r\n {\r\n ...\r\n "instanceView" : {\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "maintenanceRedeployStatus":{\r\n "isCustomerInitiatedMaintenanceAllowed":null,\r\n "preMaintenanceWindowStartTime":null,\r\n "preMaintenanceWindowEndTime":null,\r\n "maintenanceWindowStartTime":null,\r\n "maintenanceWindowEndTime":null,\r\n "lastOperationResultCode":null,\r\n "lastOperationMessage":""\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) @@ -5483,6 +6013,7 @@ exports.init = function (cli) { .option('--platform-fault-domain ', $('Set the platform-fault-domain value.')) .option('--rdp-thumb-print ', $('Set the rdp-thumb-print value.')) .option('--vm-agent ', $('Set the vm-agent value.')) + .option('--maintenance-redeploy-status ', $('Set the maintenance-redeploy-status value.')) .option('--disks ', $('Set the disks value.')) .option('--extensions ', $('Set the extensions value.')) .option('--boot-diagnostics ', $('Set the boot-diagnostics value.')) @@ -5550,6 +6081,17 @@ exports.init = function (cli) { } jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.vmAgent}]); } + paramPath = options.path + '/' + 'maintenanceRedeployStatus'; + if (options.maintenanceRedeployStatus) { + cli.output.verbose('================================================'); + cli.output.verbose('Path : ' + paramPath); + cli.output.verbose('Value : ' + options.maintenanceRedeployStatus); + cli.output.verbose('================================================'); + if (options.parse && options.maintenanceRedeployStatus) { + options.maintenanceRedeployStatus = JSON.parse(options.maintenanceRedeployStatus); + } + jsonpatch.apply(parametersObj, [{op: options.operation, path: paramPath, value: options.maintenanceRedeployStatus}]); + } paramPath = options.path + '/' + 'disks'; if (options.disks) { cli.output.verbose('================================================'); @@ -5606,19 +6148,20 @@ exports.init = function (cli) { }); //config delete instance-view - var catparametersCreateOrUpdateVirtualMachinesInstanceView1IV = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesInstanceView1IV = catparametersCreateOrUpdateVirtualMachinesInstanceView1IV.category('config') + var catparametersCreateOrUpdateVirtualMachinesInstanceView1IV1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesInstanceView1IV1 = catparametersCreateOrUpdateVirtualMachinesInstanceView1IV1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesInstanceView1IV = parametersCreateOrUpdateVirtualMachinesInstanceView1IV.category('instance-view') + var deleteparametersCreateOrUpdateVirtualMachinesInstanceView1IV1 = parametersCreateOrUpdateVirtualMachinesInstanceView1IV1.category('instance-view') .description($('Commands to configure instance-view of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesInstanceView1IV.command('delete') - .description($('Remove instance-view in config string or files, e.g. \r\n {\r\n ...\r\n "instanceView" : {\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) + deleteparametersCreateOrUpdateVirtualMachinesInstanceView1IV1.command('delete') + .description($('Remove instance-view in config string or files, e.g. \r\n {\r\n ...\r\n "instanceView" : {\r\n "platformUpdateDomain":null,\r\n "platformFaultDomain":null,\r\n "rdpThumbPrint":"",\r\n "vmAgent":{\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n },\r\n "maintenanceRedeployStatus":{\r\n "isCustomerInitiatedMaintenanceAllowed":null,\r\n "preMaintenanceWindowStartTime":null,\r\n "preMaintenanceWindowEndTime":null,\r\n "maintenanceWindowStartTime":null,\r\n "maintenanceWindowEndTime":null,\r\n "lastOperationResultCode":null,\r\n "lastOperationMessage":""\r\n },\r\n "disks":[\r\n {\r\n "name":"",\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "extensions":[\r\n {\r\n "name":"",\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "substatuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ],\r\n "bootDiagnostics":{\r\n "consoleScreenshotBlobUri":"",\r\n "serialConsoleLogBlobUri":""\r\n },\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--platform-update-domain', $('Remove the platform-update-domain value.')) .option('--platform-fault-domain', $('Remove the platform-fault-domain value.')) .option('--rdp-thumb-print', $('Remove the rdp-thumb-print value.')) .option('--vm-agent', $('Remove the vm-agent value.')) + .option('--maintenance-redeploy-status', $('Remove the maintenance-redeploy-status value.')) .option('--disks', $('Remove the disks value.')) .option('--extensions', $('Remove the extensions value.')) .option('--boot-diagnostics', $('Remove the boot-diagnostics value.')) @@ -5638,7 +6181,7 @@ exports.init = function (cli) { cli.output.verbose(JSON.stringify(parametersObj)); options.operation = 'remove'; options.path = '/instanceView'; - var anySubItem = false || options.platformUpdateDomain || options.platformFaultDomain || options.rdpThumbPrint || options.vmAgent || options.disks || options.extensions || options.bootDiagnostics || options.statuses; + var anySubItem = false || options.platformUpdateDomain || options.platformFaultDomain || options.rdpThumbPrint || options.vmAgent || options.maintenanceRedeployStatus || options.disks || options.extensions || options.bootDiagnostics || options.statuses; if (anySubItem) { var subItemPath = null; if (options.platformUpdateDomain) { @@ -5657,6 +6200,10 @@ exports.init = function (cli) { subItemPath = options.path + '/vmAgent'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); } + if (options.maintenanceRedeployStatus) { + subItemPath = options.path + '/maintenanceRedeployStatus'; + jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); + } if (options.disks) { subItemPath = options.path + '/disks'; jsonpatch.apply(parametersObj, [{op: options.operation, path: subItemPath}]); @@ -5689,12 +6236,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set vm-agent - var catparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVmAgent0IVvA = catparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA.category('config') + var catparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1 = catparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA = parametersCreateOrUpdateVirtualMachinesVmAgent0IVvA.category('vm-agent') + var setparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1 = parametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1.category('vm-agent') .description($('Commands to configure vm-agent of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA.command('set') + setparametersCreateOrUpdateVirtualMachinesVmAgent0IVvA1.command('set') .description($('Set vm-agent in config string or files, e.g. \r\n {\r\n ...\r\n "vmAgent" : {\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5766,12 +6313,12 @@ exports.init = function (cli) { }); //config delete vm-agent - var catparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesVmAgent1IVvA = catparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA.category('config') + var catparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1 = catparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA = parametersCreateOrUpdateVirtualMachinesVmAgent1IVvA.category('vm-agent') + var deleteparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1 = parametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1.category('vm-agent') .description($('Commands to configure vm-agent of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesVmAgent1IVvA1.command('delete') .description($('Remove vm-agent in config string or files, e.g. \r\n {\r\n ...\r\n "vmAgent" : {\r\n "vmAgentVersion":"",\r\n "extensionHandlers":[\r\n {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ],\r\n "statuses":[\r\n {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ]\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5824,12 +6371,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set extension-handlers - var catparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH = catparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH.category('config') + var catparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1 = catparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH = parametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH.category('extension-handlers') + var setparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1 = parametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1.category('extension-handlers') .description($('Commands to configure extension-handlers of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH.command('set') + setparametersCreateOrUpdateVirtualMachinesExtensionHandlers0IVvAeH1.command('set') .description($('Set extension-handlers in config string or files, e.g. \r\n {\r\n ...\r\n "extensionHandlers" : {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5907,12 +6454,12 @@ exports.init = function (cli) { }); //config delete extension-handlers - var catparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH = catparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH.category('config') + var catparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1 = catparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH = parametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH.category('extension-handlers') + var deleteparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1 = parametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1.category('extension-handlers') .description($('Commands to configure extension-handlers of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesExtensionHandlers1IVvAeH1.command('delete') .description($('Remove extension-handlers in config string or files, e.g. \r\n {\r\n ...\r\n "extensionHandlers" : {\r\n "type":"",\r\n "typeHandlerVersion":"",\r\n "status":{\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -5966,12 +6513,12 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set status - var catparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs = catparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs.category('config') + var catparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1 = catparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs = parametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs.category('status') + var setparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1 = parametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1.category('status') .description($('Commands to configure status of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs.command('set') + setparametersCreateOrUpdateVirtualMachinesStatus0IVvAeHHIs1.command('set') .description($('Set status in config string or files, e.g. \r\n {\r\n ...\r\n "status" : {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -6068,12 +6615,12 @@ exports.init = function (cli) { }); //config delete status - var catparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs = catparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs.category('config') + var catparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1 = catparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var deleteparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs = parametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs.category('status') + var deleteparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1 = parametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1.category('status') .description($('Commands to configure status of vm in config file.')); - deleteparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs.command('delete') + deleteparametersCreateOrUpdateVirtualMachinesStatus1IVvAeHHIs1.command('delete') .description($('Remove status in config string or files, e.g. \r\n {\r\n ...\r\n "status" : {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) @@ -6137,18 +6684,23 @@ exports.init = function (cli) { cli.output.verbose('====================================='); }); //config set statuses - var catparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1 = cli.category('vm'); - var parametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1 = catparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1.category('config') + var catparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2 = cli.category('vm'); + var parametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2 = catparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2.category('config') .description($('Commands to manage configuration of virtual-machines in the parameter file.')); - var setparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1 = parametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1.category('statuses') + var setparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2 = parametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2.category('statuses') .description($('Commands to configure statuses of vm in config file.')); - setparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs1.command('set') + setparametersCreateOrUpdateVirtualMachinesStatuses0IVvAs2.command('set') .description($('Set statuses in config string or files, e.g. \r\n {\r\n ...\r\n "statuses" : {\r\n "code":"",\r\n "level":null,\r\n "displayStatus":"",\r\n "message":"",\r\n "time":null\r\n }\r\n ...\r\n }\r\n\r\n There are two sets of commands:\r\n 1) function commands that are used to manage Azure resources in the cloud, and \r\n 2) parameter commands that generate & edit input files for the other set of commands.\r\n For example, \'vmss show/list/stop\' are the function commands that call get, list and stop operations of \r\n virtual machine scale set, whereas \'vmss config * generate/create/set/delete/add\' commands \r\n are used to configure the input parameter file. The \'vmss config\' command takes a parameter \r\n file as for the VM scale set configuration, and creates it online.')) .usage('[options]') .option('--parameter-file ', $('The parameter file path.')) .option('--index ', $('Indexer: index.')) .option('--value ', $('The input string value for the indexed item.')) .option('--parse', $('Parse the input string, i.e. str, for parameters to a JSON object, e.g. JSON.parse(str).')) + .option('--code ', $('Set the code value.')) + .option('--level ', $('Set the level value.')) + .option('--display-status ', $('Set the display-status value.')) + .option('--message ', $('Set the message value.')) + .option('--time