Authorization Manager Update Authorization Role

Authorization Manager Update Authorization Role

Updates a role's name or privileges.

If the new set of privileges are assigned to the role, the system-defined privileges, "System.Anonymous", "System.View", and "System.Read" will be assigned to the role too. This operation might return before the new privileges are effective. A timeout of 100 ms is possible, but it might vary depending on the configuration and the load of the system.

Required privileges: Authorization.ModifyRoles

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/AuthorizationManager/{moId}/UpdateAuthorizationRole
COPY
Path Parameters
string
moId
Required

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 AuthorizationManager/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.


Request Body
UpdateAuthorizationRoleRequestType of type(s) application/json
Required

Show optional properties

{
    "roleId": 0,
    "newName": "string"
}
{
    "roleId": 0,
    "newName": "string",
    "privIds": [
        "string"
    ]
}
integer As int32 As int32
roleId
Required

The ID of the role that is updated.

string
newName
Required

The new name for the role.

array of string
privIds
Optional

The new set of privileges to assign to the role.

Authentication
This operation uses the following authentication methods.
Responses
204

No Content

Operation doesn't return any data structure

500

NotFound: if the role does not exist, or if a privilege in the list cannot be found.

InvalidArgument: if the role is a system role, meaning it cannot be changed.

InvalidName: if the new role name is empty.

AlreadyExists: if another role with the given name already exists.

NoPermission: if current session does not have any privilege that being updated in the new role or "Authorization.ModifyRoles" privilege on the root folder.

Returns VimFault of type(s) application/json
This response body class contains all of the following: MethodFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}