Managing users in a group through CLI

Groups can include CDP users or machine users. It cannot include other groups.

The user-id parameter requires the CRN of the CDP user or machine user.

You can use the following command to add a user to a group:

cdp iam add-user-to-group \
--group-name=GroupName \
--user-id=UserCRN 

To remove a user from a group:

cdp iam remove-user-from-group \
--group-name=GroupName \
--user-id=UserCRN 

You can use the following command to add a machine user to a group:

cdp iam add-machine-user-to-group \
--group-name=GroupName \
--user-id=UserCRN 

To remove a machine user from a group:

cdp iam remove-machine-user-from-group \
--group-name=GroupName \
--user-id=UserCRN 

To get a list of the users in a group:

cdp iam list-group-members \
--group-name=GroupName  

To get the list of groups that a user is a member of:

cdp iam list-groups-for-user \
--user-id=UserCRN