Skip to content

How to give a user permissions on a supervisor namespace? #3623

Answered by dougm
rosenhouse asked this question in Q&A
Discussion options

You must be logged in to vote

There isn't a specific govc command, but you can send any authenticated API request using the session.login command.

Looks like the API for this is: https://developer.broadcom.com/xapis/vsphere-automation-api/latest/vcenter/access/

Here's some examples from what I just tried:

# Example vars
% ns=dev; user=dougm; domain=vsphere.local

# Create access
% govc session.login -r -X POST /api/vcenter/namespaces/instances/$ns/access/$domain/$user?type=USER <<<'{"role": "OWNER"}'

# Get 
% govc session.login -r -X GET /api/vcenter/namespaces/instances/$ns/access/$domain/$user?type=USER
 | jq .
{
  "role": "OWNER",
  "inherited": false
}

% govc session.login -r -X GET /api/vcenter/namespaces/insta…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rosenhouse
Comment options

Answer selected by rosenhouse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants