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
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}.
The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.
Show optional properties
{
"name": "string"
}
{
"name": "string",
"privIds": [
"string"
]
}
Name of the new role.
List of privileges to assign to the role.
The roleId assigned to the new role.
AlreadyExists: if a role with the given name already exists.
InvalidName: if the role name is empty.
InvalidArgument: if privIds contains an unknown privilege.
{
"_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 '{"name":"string"}' https://{api_host}/sdk/vim25/{release}/AuthorizationManager/{moId}/AddAuthorizationRole