-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathassign.js
36 lines (29 loc) · 883 Bytes
/
assign.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
'use strict';
const BoxCommand = require('../../box-command');
class StoragePoliciesAssignCommand extends BoxCommand {
async run() {
const { flags, args } = this.parse(StoragePoliciesAssignCommand);
let assignment = await this.client.storagePolicies.assign(args.storagePolicyID, args.userID);
await this.output(assignment);
}
}
StoragePoliciesAssignCommand.description = 'Assign a storage policy';
StoragePoliciesAssignCommand.examples = ['box storage-policies:assign 12345 33333'];
StoragePoliciesAssignCommand.flags = {
...BoxCommand.flags
};
StoragePoliciesAssignCommand.args = [
{
name: 'storagePolicyID',
required: true,
hidden: false,
description: 'Id of the storage policy'
},
{
name: 'userID',
required: true,
hidden: false,
description: 'Id of the user to assign the storage policy to'
}
];
module.exports = StoragePoliciesAssignCommand;