Create Access
Released in v7.0.0Set up access control for the subject on given domain on the namespace.
Request
URLURL
https://{api_host}/api/vcenter/namespaces/instances/{namespace}/access/{domain}/{subject}
Parameters
Parameters
string
namespace
Required
Identifier for the namespace.
The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.
string
domain
Required
The domain of the subject.
string
subject
Required
The principal for this operation.
Query Parameters
Query Parameters
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
NamespacesAccessCreateSpec of type application/json (required){
"role": "enum"
}
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"role":"enum"}' https://{api_host}/api/vcenter/namespaces/instances/{namespace}/access/{domain}/{subject}?type=string
Errors
404
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.not_found : if namespace cannot be located.
409
com.vmware.vapi.std.errors.already_exists : if the specified principal on given domain is already associated with a role on the namespace. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the namespace is marked for deletion or the associated cluster is being disabled.
401
com.vmware.vapi.std.errors.unauthenticated : if the user can not be authenticated. | com.vmware.vapi.std.errors.unauthorized : if the user does not have Namespaces.Configure privilege or the namespace identifier begins with "vmware-system" prefix.