UNPKG

@rockset/cli

Version:
73 lines (69 loc) 3.23 kB
"use strict"; /* eslint-disable unicorn/filename-case */ // Generated file, please do not edit directly Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const core_2 = require("@rockset/core"); const util_1 = require("../../../helper/util"); const base_command_1 = require("../../../base-command"); const chalk = require("chalk"); const cli_ux_1 = require("cli-ux"); const bodySchema = ``; let DeleteQueryLambdaVersion = /** @class */ (() => { class DeleteQueryLambdaVersion extends base_command_1.RockCommand { async run() { const { args, flags } = await this.parse(DeleteQueryLambdaVersion); // Rockset client object const client = await core_2.main.createClient(); const namedArgs = DeleteQueryLambdaVersion.args; // apicall const apicall = client.queryLambdas.deleteQueryLambdaVersion.bind(client.queryLambdas); // endpoint const endpoint = '/v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/version/{version}'; const method = 'DELETE'; await util_1.runApiCall.bind(this)({ args, flags, namedArgs, apicall, method, endpoint, bodySchema }); } } DeleteQueryLambdaVersion.flags = Object.assign(Object.assign({ help: core_1.Flags.help({ char: 'h' }), raw: core_1.Flags.boolean({ description: 'Show the raw output from the server, instead of grabbing the results. Usually used in conjunction with --output=json', }) }, cli_ux_1.cli.table.flags({ only: ['columns', 'output'] })), { loadTestRps: core_1.Flags.integer({ char: 'l', description: 'If this flag is active, a load test will be conducted using this endpoint. The value passed to this flag determines how many requests per second will be sent', }), yes: core_1.Flags.boolean({ char: 'y', description: 'Skip all safety prompts', default: false, }) }); DeleteQueryLambdaVersion.args = [ { name: 'workspace', description: 'name of the workspace', required: true, hidden: false, }, { name: 'queryLambda', description: 'name of the Query Lambda', required: true, hidden: false, }, { name: 'version', description: 'version', required: true, hidden: false, }, ]; DeleteQueryLambdaVersion.description = `delete a query lambda version Arguments to this command will be passed as URL parameters to ${chalk.bold(`DELETE: /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/version/{version}`)} Endpoint Reference DELETE: /v1/orgs/self/ws/{workspace}/lambdas/{queryLambda}/version/{version} Delete Query Lambda Version Delete a Query Lambda version. More documentation at ${chalk.underline(`https://docs.rockset.com/rest-api#deletequerylambdaversion`)}`; DeleteQueryLambdaVersion.examples = [ '$ rockset api:queryLambdas:deleteQueryLambdaVersion WORKSPACE QUERYLAMBDA VERSION', ]; return DeleteQueryLambdaVersion; })(); exports.default = DeleteQueryLambdaVersion;