@box/cli
Version:
Official command line interface for the Box API
38 lines (29 loc) • 952 B
JavaScript
;
const { Args } = require('@oclif/core');
const BoxCommand = require('../../box-command');
class LegalHoldPoliciesGetCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(LegalHoldPoliciesGetCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let policy = await this.client.legalHoldPolicies.get(args.id, options);
await this.output(policy);
}
}
LegalHoldPoliciesGetCommand.description = 'Get information about a legal hold policy';
LegalHoldPoliciesGetCommand.examples = ['box legal-hold-policies:get 99999'];
LegalHoldPoliciesGetCommand._endpoint = 'get_legal_hold_policies_id';
LegalHoldPoliciesGetCommand.flags = {
...BoxCommand.flags
};
LegalHoldPoliciesGetCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of the legal hold policy to get',
}),
};
module.exports = LegalHoldPoliciesGetCommand;