Host Access Manager Change Access Mode
Update the access mode for a user or group.
If the host is in lockdown mode, this operation is allowed only on users in the exceptions list - see QueryLockdownExceptions, and trying to change the access mode of other users or groups will fail with SecurityError.
Required privileges: Global.Settings
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case HostAccessManager/{moId}.
The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.
{
"principal": "string",
"isGroup": false,
"accessMode": "string"
}
The affected user or group.
True if principal refers to a group account, false otherwise.
AccessMode to be granted. accessOther is meaningless and will result in InvalidArgument exception.
No Content
AuthMinimumAdminPermission: if this change would render the ESXi host inaccessible for local non-system users. The API ChangeLockdownMode may be used instead.
InvalidArgument: if accessMode is not valid.
SecurityError: if the host is in lockdown mode and 'principal' is not in the exceptions list.
UserNotFound: if the specified user is not found.
{
"_typeName": "string",
"faultCause": {
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
},
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"principal":"string","isGroup":"boolean","accessMode":"{}"}' https://{api_host}/sdk/vim25/{release}/HostAccessManager/{moId}/ChangeAccessMode