Authorization Manager Reset Entity Permissions

Authorization Manager Reset Entity Permissions

Update the entire set of permissions defined on an entity.

Any existing permissions on the entity are removed and replaced with the provided set.

If a permission is specified multiple times for the same user or group, the last permission specified takes effect.

The operation is transactional per permission and could partially fail. The updates are performed in the order of the permission array argument. The first failed update will abort the operation and throw the appropriate exception. When the operation aborts, any permissions that have not yet been removed are left in their original state.

After updates are applied, original permissions that are not in the new set are removed. A failure to remove a permission, such as a violation of the minimum administrator permission rule, will abort the operation and could leave remaining original permissions still effective on the entity.

This will fail with an InvalidArgument fault if called on: the direct child folders of a datacenter managed object, the root resource pool of a ComputeResource or ClusterComputeResource, or a HostSystem that is part of a ComputeResource (Stand-alone Host). These objects always have the same permissions as their parent.

This will fail with an InvalidArgument fault if called on a fault-tolerance (FT) secondary VirtualMachine. Such a VirtualMachine always has the same permissions as its FT primary VirtualMachine.

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/AuthorizationManager/{moId}/ResetEntityPermissions
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.2.0 APIs.


Request Body
ResetEntityPermissionsRequestType of type(s) application/json
Required
{
    "entity": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "permission": [
        {
            "_typeName": "string",
            "entity": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "principal": "string",
            "group": false,
            "roleId": 0,
            "propagate": false
        }
    ]
}
entity
Required

Reference to an instance of the ManagedEntity managed object.

array of Permission
permission
Optional

The list of Permission objects that define the new rules for access to the entity and potentially entities below it. If the list is empty, all permissions on the entity are removed.

Authentication
This operation uses the following authentication methods.
Responses
204

No Content

Operation doesn't return any data structure

500

ManagedObjectNotFound: if the given entity does not exist.

UserNotFound: if one of the given users or groups does not exist.

NotFound: if a permission for this entity and user or group does not exist.

AuthMinimumAdminPermission: if this change would leave the system with no Administrator permission on the root node, or it would grant further permission to a user or group who already has Administrator permission on the root node.

InvalidArgument: if one of the new role IDs is the View or Anonymous role, or the entity does not support assigning permissions.

NoPermission: if current session does not have any privilege in the updated permission or "Authorization.ModifyPermissions" privilege on the entity.

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