-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathget.js
37 lines (29 loc) · 1.07 KB
/
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 RetentionPoliciesGetAssignmentCommand extends BoxCommand {
async run() {
const { flags, args } = await this.parse(RetentionPoliciesGetAssignmentCommand);
let options = {};
if (flags.fields) {
options.fields = flags.fields;
}
let assignment = await this.client.retentionPolicies.getAssignment(args.id, options);
await this.output(assignment);
}
}
RetentionPoliciesGetAssignmentCommand.description = 'Get information about a retention policy assignment';
RetentionPoliciesGetAssignmentCommand.examples = ['box retention-policies:assignments:get 1235'];
RetentionPoliciesGetAssignmentCommand._endpoint = 'get_retention_policy_assignments_id';
RetentionPoliciesGetAssignmentCommand.flags = {
...BoxCommand.flags
};
RetentionPoliciesGetAssignmentCommand.args = {
id: Args.string({
name: 'id',
required: true,
hidden: false,
description: 'ID of the retention policy assignment to get',
})
};
module.exports = RetentionPoliciesGetAssignmentCommand;