-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.ts
More file actions
43 lines (33 loc) · 1.44 KB
/
info.ts
File metadata and controls
43 lines (33 loc) · 1.44 KB
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
38
39
40
41
42
43
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { Flags } from "@oclif/core";
import BaseCommand from "../../../extensions/base-command.js";
export default class AccessControlGroupInfo extends BaseCommand {
static description = 'Retrieve details about a specific group in an iTwin.';
static examples = [
{
command: `<%= config.bin %> <%= command.id %> --itwin-id ad0ba809-9241-48ad-9eb0-c8038c1a1d51 --group-id bf4d8b36-25d7-4b72-b38b-12c1f0325f42`,
description: 'Example 1:'
}
];
static flags = {
"group-id": Flags.string({
char: 'g',
description: 'The ID of the group to retrieve information about.',
required: true,
}),
"itwin-id": Flags.string({
char: 'i',
description: 'The ID of the iTwin where the group exists.',
required: true,
}),
};
async run() {
const { flags } = await this.parse(AccessControlGroupInfo);
const client = await this.getAccessControlApiClient();
const response = await client.getGroup(flags["itwin-id"], flags["group-id"]);
return this.logAndReturnResult(response.group);
}
}