Getting group ID
Yandex Cloud assigns a unique ID to each group. With this ID, you can perform various operations with the group itself and the users belonging to it.
To find out the group ID:
- Log in to Cloud Center
. - In the left-hand panel, select
Groups. - Click
next to the group's ID to copy it.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id options.
-
See the description of the CLI command for getting a list of groups:
yc organization-manager group list --help -
To view a list of available groups, run this command by specifying the organization ID:
yc organization-manager group list --organization-id <organization_ID>Result:
+----------------------+-----------------------+ | ID | NAME | +----------------------+-----------------------+ | ajetvnq2mil8******** | group1-technical-name | | aje0857jd5ul******** | group2-technical-name | | ajealo08t37i******** | group3-technical-name | +----------------------+-----------------------+Copy the ID of the organization you need from the
IDcolumn.
Use the list REST API method for the Group resource or the GroupService/List gRPC API call.