@rockset/cli
Version:
Official Rockset CLI
58 lines (54 loc) • 2.33 kB
JavaScript
;
/* 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 DeleteAlias = /** @class */ (() => {
class DeleteAlias extends base_command_1.RockCommand {
async run() {
const { args, flags } = await this.parse(DeleteAlias);
// Rockset client object
const client = await core_2.main.createClient();
const namedArgs = DeleteAlias.args;
// apicall
const apicall = client.aliases.deleteAlias.bind(client.aliases);
// endpoint
const endpoint = '/v1/orgs/self/ws/{workspace}/aliases/{alias}';
const method = 'DELETE';
await util_1.runApiCall.bind(this)({ args, flags, namedArgs, apicall, method, endpoint, bodySchema });
}
}
DeleteAlias.flags = 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'] }));
DeleteAlias.args = [
{
name: 'workspace',
description: 'name of the workspace',
required: true,
hidden: false,
},
{
name: 'alias',
description: 'name of the alias',
required: true,
hidden: false,
},
];
DeleteAlias.description = `delete an alias
Arguments to this command will be passed as URL parameters to ${chalk.bold(`DELETE: /v1/orgs/self/ws/{workspace}/aliases/{alias}`)}
Endpoint Reference
DELETE: /v1/orgs/self/ws/{workspace}/aliases/{alias}
Delete Alias
Delete an alias.
More documentation at ${chalk.underline(`https://docs.rockset.com/rest-api#deletealias`)}`;
DeleteAlias.examples = ['$ rockset api:aliases:deleteAlias WORKSPACE ALIAS'];
return DeleteAlias;
})();
exports.default = DeleteAlias;