Authorization Manager Add Authorization Role

Authorization Manager Add Authorization Role

Adds a new role.

This method will add a user-defined role with given list of privileges and three system-defined privileges, "System.Anonymous", "System.View", and "System.Read".

Required privileges: Authorization.ModifyRoles

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/AuthorizationManager/{moId}/AddAuthorizationRole
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
AddAuthorizationRoleRequestType of type(s) application/json
Required

Show optional properties

{
    "name": "string"
}
{
    "name": "string",
    "privIds": [
        "string"
    ]
}
string
name
Required

Name of the new role.

array of string
privIds
Optional

List of privileges to assign to the role.

Authentication
This operation uses the following authentication methods.
Responses
200

The roleId assigned to the new role.

Returns integer of type(s) application/json
Operation doesn't return any data structure

500

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

InvalidName: if the role name is empty.

InvalidArgument: if privIds contains an unknown privilege.

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"
        }
    ]
}