UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

54 lines (20 loc) 2.12 kB
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var utils = require("../../util/utils"); var batchUtil = require("./batch.util"); var $ = utils.getLocaleString; exports.init = function(cli) { var log = cli.output; var batch = cli.category("batch"); var batchLocation = batch.category("location").description($("Commands to manage Batch service options for a subscription at the region level")); var batchLocationQuotas = batchLocation.category("quotas").description($("Commands to manage Batch service quotas at the region level")); function getQuotas(batchClient, location, options, _) { var quotas; var __frame = { name: "getQuotas", line: 33 }; return __func(_, this, arguments, getQuotas, 3, __frame, function __$getQuotas() { return batchClient.location.getQuotas(location, options, __cb(_, __frame, 1, 38, function ___(__0, __1) { quotas = __1; return _(null, quotas); }, true)); }); }; batchLocationQuotas.getCommand = function batchLocationQuotas_getCommand__1(location, options, _) { var batchClient, quotas; var __frame = { name: "batchLocationQuotas_getCommand__1", line: 38 }; return __func(_, this, arguments, batchLocationQuotas_getCommand__1, 2, __frame, function __$batchLocationQuotas_getCommand__1() { batchClient = batchUtil.createBatchManagementClient(options.subscription); return getQuotas(batchClient, location, options, __cb(_, __frame, 3, 17, function ___(__0, __1) { quotas = __1; if (quotas) { cli.interaction.formatOutput(quotas, function(outputData) { log.data($("Account Quota:"), outputData.accountQuota); }); } else { log.info($("No quotas retrieved")); } ; _(); }, true)); }); }; batchLocationQuotas.command("show <location>").description($("Get the Batch service quotas for the specified subscription at the given region")).option("-s, --subscription <id>", $("the subscription id")).execute(batchLocationQuotas.getCommand);};