UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

631 lines (225 loc) 297 kB
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var util = require("util"); var utils = require("../../../util/utils"); var profile = require("../../../util/profile/index"); var constants = require("./constants"); var $ = utils.getLocaleString; var VirtualNetwork = require("./virtualNetwork"); var Subnet = require("./subnet"); var NetworkUsage = require("./networkUsage"); var LoadBalancer = require("./loadBalancer"); var PublicIp = require("./publicIp"); var Nic = require("./nic"); var Nsg = require("./nsg"); var DnsZone = require("./dnsZone"); var TrafficManager = require("./trafficManager"); var RouteTable = require("./routeTable"); var LocalNetworkGateway = require("./localNetworkGateway"); var VirtualNetworkGateway = require("./virtualNetworkGateway"); var AppGateway = require("./appGateway"); var ExpressRoute = require("./expressRoute"); exports.init = function(cli) { var network = cli.category("network").description($("Commands to manage network resources")); var vnet = network.category("vnet").description($("Commands to manage virtual networks")); vnet.command("create [resource-group] [name] [location]").description("Create a virtual network").usage("[options] <resource-group> <name> <location>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the virtual network")).option("-l, --location <location>", $("the location")).option("-a, --address-prefixes <address-prefixes>", $((("the comma separated list of address prefixes for this virtual network." + "\n For example, -a \"10.0.0.0/24,10.0.1.0/24\"") + "\n Default value is 10.0.0.0/8"))).option("-d, --dns-servers <dns-servers>", $("the comma separated list of DNS servers IP addresses")).option("-t, --tags <tags>", $(constants.help.tags.create)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __1(resourceGroup, name, location, options, _) { var networkManagementClient, virtualNetwork; var __frame = { name: "__1", line: 58 }; return __func(_, this, arguments, __1, 4, __frame, function __$__1() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 3, 41, function ___(__0, __3) { options.location = __3; networkManagementClient = getNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, networkManagementClient); return virtualNetwork.create(resourceGroup, name, options, __cb(_, __frame, 7, 21, function __$__1() { _(); }, true)); }, true)); }, true)); }, true)); }); }); vnet.command("set [resource-group] [name]").description("Set virtual network").usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the virtual network")).option("-a, --address-prefixes <address-prefixes>", $((((("the comma separated list of address prefixes for this virtual network." + "\n For example, -a \"10.0.0.0/24,10.0.1.0/24\"") + "\n This list will be appended to the current list of address prefixes.") + "\n The address prefixes in this list should not overlap between them.") + "\n The address prefixes in this list should not overlap with existing address prefixes in the vnet."))).option("-d, --dns-servers [dns-servers]", $(("the comma separated list of DNS servers IP addresses." + "\n This list will be appended to the current list of DNS server IP addresses."))).option("-t, --tags [tags]", $(constants.help.tags.set)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __2(resourceGroup, name, options, _) { var networkManagementClient, virtualNetwork; var __frame = { name: "__2", line: 82 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, networkManagementClient); return virtualNetwork.set(resourceGroup, name, options, __cb(_, __frame, 6, 21, function __$__2() { _(); }, true)); }, true)); }, true)); }); }); vnet.command("list [resource-group]").description("Get all virtual networks").usage("[options] [resource-group]").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __3(resourceGroup, options, _) { var networkManagementClient, virtualNetwork; var __frame = { name: "__3", line: 96 }; return __func(_, this, arguments, __3, 2, __frame, function __$__3() { options.resourceGroup = resourceGroup; networkManagementClient = getNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, networkManagementClient); return virtualNetwork.list(options, __cb(_, __frame, 4, 21, function __$__3() { _(); }, true)); }); }); vnet.command("show [resource-group] [name]").description("Get a virtual network").usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the virtual network")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __4(resourceGroup, name, location, options, _) { var networkManagementClient, virtualNetwork; var __frame = { name: "__4", line: 109 }; return __func(_, this, arguments, __4, 4, __frame, function __$__4() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, networkManagementClient); return virtualNetwork.show(resourceGroup, name, options, __cb(_, __frame, 6, 21, function __$__4() { _(); }, true)); }, true)); }, true)); }); }); vnet.command("delete [resource-group] [name]").description("Delete a virtual network").usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the virtual network")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __5(resourceGroup, name, options, _) { var networkManagementClient, virtualNetwork; var __frame = { name: "__5", line: 125 }; return __func(_, this, arguments, __5, 3, __frame, function __$__5() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, networkManagementClient); return virtualNetwork.delete(resourceGroup, name, options, __cb(_, __frame, 6, 21, function __$__5() { _(); }, true)); }, true)); }, true)); }); }); var subnet = vnet.category("subnet").description($("Commands to manage virtual network subnets")); subnet.command("create [resource-group] [vnet-name] [name]").description($("Create virtual network subnet")).usage("[options] <resource-group> <vnet-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-a, --address-prefix <address-prefix>", $("the address prefix in CIDR format")).option("-w, --network-security-group-id <network-security-group-id>", util.format($(("the network security group identifier." + "\n e.g. %s")), constants.help.id.nsg)).option("-o, --network-security-group-name <network-security-group-name>", $("the network security group name")).option("-i, --route-table-id <route-table-id>", util.format($(("the route table identifier." + "\n e.g. %s")), constants.help.id.routeTable)).option("-r, --route-table-name <route-table-name>", $("the route table name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __6(resourceGroup, vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__6", line: 151 }; return __func(_, this, arguments, __6, 4, __frame, function __$__6() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; return cli.interaction.promptIfNotGiven($("Address prefix: "), options.addressPrefix, __cb(_, __frame, 4, 46, function ___(__0, __4) { options.addressPrefix = __4; networkManagementClient = getNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.create(resourceGroup, vnetName, name, options, __cb(_, __frame, 8, 13, function __$__6() { _(); }, true)); }, true)); }, true)); }, true)); }, true)); }); }); subnet.command("set [resource-group] [vnet-name] [name]").description($("Set a virtual network subnet")).usage("[options] <resource-group> <vnet-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-a, --address-prefix <address-prefix>", $("the address prefix in CIDR format")).option("-w, --network-security-group-id [network-security-group-id]", util.format($(("the network security group identifier." + "\n e.g. %s")), constants.help.id.nsg)).option("-o, --network-security-group-name [network-security-group-name]", $("the network security group name")).option("-i, --route-table-id [route-table-id]", util.format($(("the route table identifier." + "\n e.g. %s")), constants.help.id.routeTable)).option("-r, --route-table-name [route-table-name]", $("the route table name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __7(resourceGroup, vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__7", line: 176 }; return __func(_, this, arguments, __7, 4, __frame, function __$__7() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.set(resourceGroup, vnetName, name, options, __cb(_, __frame, 7, 13, function __$__7() { _(); }, true)); }, true)); }, true)); }, true)); }); }); subnet.command("list [resource-group] [vnet-name]").description($("Get all virtual network subnets")).usage("[options] <resource-group> <vnet-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __8(resourceGroup, vnetName, options, _) { var networkManagementClient, subnet; var __frame = { name: "__8", line: 192 }; return __func(_, this, arguments, __8, 3, __frame, function __$__8() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; networkManagementClient = getNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.list(resourceGroup, vnetName, options, __cb(_, __frame, 6, 13, function __$__8() { _(); }, true)); }, true)); }, true)); }); }); subnet.command("show [resource-group] [vnet-name] [name]").description($("Get a virtual network subnet")).usage("[options] <resource-group> <vnet-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __9(resourceGroup, vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__9", line: 208 }; return __func(_, this, arguments, __9, 4, __frame, function __$__9() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.show(resourceGroup, vnetName, name, options, __cb(_, __frame, 7, 13, function __$__9() { _(); }, true)); }, true)); }, true)); }, true)); }); }); subnet.command("delete [resource-group] [vnet-name] [name]").description($("Delete a subnet of a virtual network")).usage("[options] <resource-group> <vnet-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the subnet name")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __10(resourceGroup, vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__10", line: 226 }; return __func(_, this, arguments, __10, 4, __frame, function __$__10() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.delete(resourceGroup, vnetName, name, options, __cb(_, __frame, 7, 13, function __$__10() { _(); }, true)); }, true)); }, true)); }, true)); }); }); var usage = network.category("usage").description($("Commands to manage network usage")); usage.command("list [location]").description($("List usage of network resources.")).usage("[options] <location>").option("-l, --location <location>", $("the location")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __11(location, options, _) { var networkManagementClient, networkUsage; var __frame = { name: "__11", line: 244 }; return __func(_, this, arguments, __11, 2, __frame, function __$__11() { return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 1, 35, function ___(__0, __1) { location = __1; location = utils.toLowerCaseAndRemoveSpace(location); networkManagementClient = getNetworkManagementClient(options); networkUsage = new NetworkUsage(cli, networkManagementClient); return networkUsage.list(location, options, __cb(_, __frame, 5, 21, function __$__11() { _(); }, true)); }, true)); }); }); var lb = network.category("lb").description($("Commands to manage load balancers")); lb.command("create [resource-group] [name] [location]").description($("Create a load balancer")).usage("[options] <resource-group> <name> <location>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the load balancer")).option("-l, --location <location>", $("the location")).option("-t, --tags <tags>", $(constants.help.tags.create)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __12(resourceGroup, name, location, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__12", line: 263 }; return __func(_, this, arguments, __12, 4, __frame, function __$__12() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 3, 41, function ___(__0, __3) { options.location = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.create(resourceGroup, name, options, __cb(_, __frame, 7, 19, function __$__12() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lb.command("set [resource-group] [name]").description($("Set a load balancer")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the load balancer")).option("-t, --tags [tags]", $(constants.help.tags.set)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __13(resourceGroup, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__13", line: 280 }; return __func(_, this, arguments, __13, 3, __frame, function __$__13() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.set(resourceGroup, name, options, __cb(_, __frame, 6, 19, function __$__13() { _(); }, true)); }, true)); }, true)); }); }); lb.command("list [resource-group]").description($("Get all load balancers")).usage("[options] [resource-group]").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __14(resourceGroup, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__14", line: 294 }; return __func(_, this, arguments, __14, 2, __frame, function __$__14() { options.resourceGroup = resourceGroup; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.list(options, __cb(_, __frame, 4, 19, function __$__14() { _(); }, true)); }); }); lb.command("show [resource-group] [name]").description($("Get a load balancer")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __15(resourceGroup, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__15", line: 307 }; return __func(_, this, arguments, __15, 3, __frame, function __$__15() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.show(resourceGroup, name, options, __cb(_, __frame, 6, 19, function __$__15() { _(); }, true)); }, true)); }, true)); }); }); lb.command("delete [resource-group] [name]").description($("Delete a load balancer")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-n, --name <name>", $("the name of the load balancer")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __16(resourceGroup, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__16", line: 323 }; return __func(_, this, arguments, __16, 3, __frame, function __$__16() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.delete(resourceGroup, name, options, __cb(_, __frame, 6, 19, function __$__16() { _(); }, true)); }, true)); }, true)); }); }); var lbFrontendIP = lb.category("frontend-ip").description("Commands to manage frontend ip configurations of a load balancer"); lbFrontendIP.command("create [resource-group] [lb-name] [name]").description($("Add a frontend ip configuration to the load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the frontend ip configuration")).option("-a, --private-ip-address <private-ip-address>", $("the private ip address")).option("-u, --public-ip-id <public-ip-id>", util.format($(("the public ip address identifier." + "\n e.g. %s")), constants.help.id.publicIp)).option("-i, --public-ip-name <public-ip-name>", $((("the public ip address name." + "\n This public ip must exist in the same resource group as the load balancer.") + "\n Please use public-ip-id if that is not the case."))).option("-b, --subnet-id <subnet-id>", util.format($(("the subnet identifier." + "\n e.g. %s")), constants.help.id.subnet)).option("-e, --subnet-name <subnet-name>", $("the subnet name")).option("-m, --subnet-vnet-name <subnet-vnet-name>", $((("the virtual network name in which subnet exists." + "\n This virtual network must exist in the same resource group as the load balancer.") + "\n Please use subnet-id if that is not the case."))).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __17(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__17", line: 354 }; return __func(_, this, arguments, __17, 4, __frame, function __$__17() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Frontend IP configuration name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.createFrontendIP(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__17() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbFrontendIP.command("set [resource-group] [lb-name] [name]").description($("Set a frontend ip configuration of a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the frontend ip configuration")).option("-a, --private-ip-address [private-ip-address]", $("the private ip address")).option("-u, --public-ip-id <public-ip-id>", util.format($(("the public ip address identifier." + "\n e.g. %s")), constants.help.id.publicIp)).option("-i, --public-ip-name <public-ip-name>", $((("the public ip address name." + "\n This public ip must exist in the same resource group as the load balancer.") + "\n Please use public-ip-id if that is not the case."))).option("-b, --subnet-id <subnet-id>", util.format($(("the subnet identifier." + "\n e.g. %s")), constants.help.id.subnet)).option("-e, --subnet-name <subnet-name>", $("the subnet name")).option("-m, --subnet-vnet-name <subnet-vnet-name>", $((("the virtual network name in which subnet exists." + "\n This virtual network must exist in the same resource group as the load balancer.") + "\n Please use subnet-id if that is not the case."))).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __18(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__18", line: 383 }; return __func(_, this, arguments, __18, 4, __frame, function __$__18() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Frontend IP configuration name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.setFrontendIP(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__18() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbFrontendIP.command("list [resource-group] [lb-name]").description($("Get all frontend ip configurations in the load balancer")).usage("[options] <resource-group> <lb-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __19(resourceGroup, lbName, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__19", line: 399 }; return __func(_, this, arguments, __19, 3, __frame, function __$__19() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.listFrontendIPs(resourceGroup, lbName, options, __cb(_, __frame, 6, 19, function __$__19() { _(); }, true)); }, true)); }, true)); }); }); lbFrontendIP.command("delete [resource-group] [lb-name] [name]").description($("Delete a frontend ip configuration from a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the frontend ip configuration")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __20(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__20", line: 416 }; return __func(_, this, arguments, __20, 4, __frame, function __$__20() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Frontend ip configuration name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.deleteFrontendIP(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__20() { _(); }, true)); }, true)); }, true)); }, true)); }); }); var lbProbe = lb.category("probe").description($("Commands to manage probes of a load balancer")); lbProbe.command("create [resource-group] [lb-name] [name]").description($("Add a probe to the load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the probe")).option("-p, --protocol <protocol>", $("the probe protocol")).option("-o, --port <port>", $("the probe port")).option("-f, --path <path>", $("the probe path")).option("-i, --interval <interval>", $("the probe interval in seconds")).option("-c, --count <count>", $("the number of probes")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __21(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__21", line: 441 }; return __func(_, this, arguments, __21, 4, __frame, function __$__21() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Probe name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.createProbe(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__21() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbProbe.command("set [resource-group] [lb-name] [name]").usage("[options] <resource-group> <lb-name> <name>").description($("Set a probe of a load balancer")).option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the probe")).option("-p, --protocol <protocol>", $("the probe protocol")).option("-o, --port <port>", $("the probe port")).option("-f, --path <path>", $("the probe path")).option("-i, --interval <interval>", $("the probe interval in seconds")).option("-c, --count <count>", $("the number of probes")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __22(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__22", line: 463 }; return __func(_, this, arguments, __22, 4, __frame, function __$__22() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Probe name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.setProbe(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__22() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbProbe.command("list [resource-group] [lb-name]").description($("Get all probes in a load balancer")).usage("[options] <resource-group> <lb-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __23(resourceGroup, lbName, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__23", line: 479 }; return __func(_, this, arguments, __23, 3, __frame, function __$__23() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.listProbes(resourceGroup, lbName, options, __cb(_, __frame, 6, 19, function __$__23() { _(); }, true)); }, true)); }, true)); }); }); lbProbe.command("delete [resource-group] [lb-name] [name]").description($("Delete a probe from a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the probe name")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __24(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__24", line: 496 }; return __func(_, this, arguments, __24, 4, __frame, function __$__24() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Probe name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.deleteProbe(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__24() { _(); }, true)); }, true)); }, true)); }, true)); }); }); var lbAddressPool = lb.category("address-pool").description("Commands to manage backend address pools of a load balancer"); lbAddressPool.command("create [resource-group] [lb-name] [name]").description($("Add a backend address pool to the load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the backend address pool")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __25(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__25", line: 516 }; return __func(_, this, arguments, __25, 4, __frame, function __$__25() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Backend address pool name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.createBackendAddressPool(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__25() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbAddressPool.command("list [resource-group] [lb-name]").description($("Get all backend address pools in the load balancer")).usage("[options] <resource-group> <lb-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __26(resourceGroup, lbName, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__26", line: 532 }; return __func(_, this, arguments, __26, 3, __frame, function __$__26() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.listBackendAddressPools(resourceGroup, lbName, options, __cb(_, __frame, 6, 19, function __$__26() { _(); }, true)); }, true)); }, true)); }); }); lbAddressPool.command("delete [resource-group] [lb-name] [name]").description($("Delete a backend address pool from a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the backend address pool")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __27(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__27", line: 549 }; return __func(_, this, arguments, __27, 4, __frame, function __$__27() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Backend address pool name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.deleteBackendAddressPool(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__27() { _(); }, true)); }, true)); }, true)); }, true)); }); }); var lbRule = lb.category("rule").description($("Commands to manage load balancer rules")); lbRule.command("create [resource-group] [lb-name] [name]").description($("Add a load balancing rule to a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the rule")).option("-p, --protocol <protocol>", util.format($("the rule protocol [%s]"), constants.lb.protocols)).option("-f, --frontend-port <frontend-port>", util.format($("the frontend port %s"), utils.toRange(constants.portBounds))).option("-b, --backend-port <backend-port>", util.format($("the backend port %s"), utils.toRange(constants.portBounds))).option("-e, --enable-floating-ip <enable-floating-ip>", util.format($("enable floating point ip [%s]"), constants.bool)).option("-i, --idle-timeout <idle-timeout>", $("the idle timeout specified in minutes")).option("-a, --probe-name <probe-name>", $("the name of the probe defined in the same load balancer")).option("-d, --load-distribution <load-distribution>", $("client session persistence")).option("-t, --frontend-ip-name <frontend-ip-name>", $("the name of the frontend ip configuration in the same load balancer")).option("-o, --backend-address-pool-name <backend-address-pool-name>", $("the name of the backend address pool defined in the same load balancer")).option("-a, --probe-name <probe-name>", $("the name of the probe defined in the same load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __28(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__28", line: 579 }; return __func(_, this, arguments, __28, 4, __frame, function __$__28() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Rule name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.createBalancingRule(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__28() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbRule.command("set [resource-group] [lb-name] [name]").description($("Set a load balancing rule of a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the rule")).option("-p, --protocol <protocol>", util.format($("the rule protocol [%s]"), constants.lb.protocols)).option("-f, --frontend-port <frontend-port>", util.format($("the frontend port %s"), utils.toRange(constants.portBounds))).option("-b, --backend-port <backend-port>", util.format($("the backend port %s"), utils.toRange(constants.portBounds))).option("-e, --enable-floating-ip <enable-floating-ip>", util.format($("enable floating point ip [%s]"), constants.bool)).option("-i, --idle-timeout <idle-timeout>", $("the idle timeout specified in minutes")).option("-a, --probe-name [probe-name]", $("the name of the probe defined in the same load balancer")).option("-d, --load-distribution <load-distribution>", $("client session persistence")).option("-t, --frontend-ip-name <frontend-ip-name>", $("the name of the frontend ip configuration in the same load balancer")).option("-o, --backend-address-pool-name <backend-address-pool-name>", $("the name of the backend address pool defined in the same load balancer")).option("-a, --probe-name [probe-name]", $("the name of the probe defined in the same load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __29(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__29", line: 606 }; return __func(_, this, arguments, __29, 4, __frame, function __$__29() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; return cli.interaction.promptIfNotGiven($("Rule name: "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.setBalancingRule(resourceGroup, lbName, name, options, __cb(_, __frame, 7, 19, function __$__29() { _(); }, true)); }, true)); }, true)); }, true)); }); }); lbRule.command("list [resource-group] [lb-name]").description($("Get all load balancing rules of a load balancer")).usage("[options] <resource-group> <lb-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __30(resourceGroup, lbName, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__30", line: 622 }; return __func(_, this, arguments, __30, 3, __frame, function __$__30() { return cli.interaction.promptIfNotGiven($("Resource group name: "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1; return cli.interaction.promptIfNotGiven($("Load balancer name: "), lbName, __cb(_, __frame, 2, 31, function ___(__0, __2) { lbName = __2; networkManagementClient = getNetworkManagementClient(options); loadBalancer = new LoadBalancer(cli, networkManagementClient); return loadBalancer.listBalancingRules(resourceGroup, lbName, options, __cb(_, __frame, 6, 19, function __$__30() { _(); }, true)); }, true)); }, true)); }); }); lbRule.command("delete [resource-group] [lb-name] [name]").description($("Delete a load balancing rule from a load balancer")).usage("[options] <resource-group> <lb-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-l, --lb-name <lb-name>", $("the name of the load balancer")).option("-n, --name <name>", $("the name of the rule")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __31(resourceGroup, lbName, name, options, _) { var networkManagementClient, loadBalancer; var __frame = { name: "__31", line: 639 }; return __func(_, this, arguments,