-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathget.js
37 lines (29 loc) · 948 Bytes
/
get.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
const { Args } = require('@oclif/core');
const BoxCommand = require('../../box-command');
class RetentionPoliciesGetCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(RetentionPoliciesGetCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let policy = await this.client.retentionPolicies.get(args.id, options);
await this.output(policy);
}
}
RetentionPoliciesGetCommand.description = 'Get information about a retention policy';
RetentionPoliciesGetCommand.examples = ['box retention-policies:get 12345'];
RetentionPoliciesGetCommand._endpoint = 'get_retention_policies_id';
RetentionPoliciesGetCommand.flags = {
...BoxCommand.flags
};
RetentionPoliciesGetCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of the retention policy to get',
}),
};
module.exports = RetentionPoliciesGetCommand;