https://developer.zendesk.com/rest_api/docs/chat/roles#delete-role
438626
def role_delete(self, role_id, **kwargs):
        ""
        api_path = "/api/v2/roles/{role_id}"
        api_path = api_path.format(role_id=role_id)
        return self.call(api_path, method="DELETE", **kwargs)
1345603
def delete_role(self, name):
        # type: (str) -> None
        """"""
        client = self._client('iam')
        inline_policies = client.list_role_policies(
            RoleName=name
        )['PolicyNames']
        for policy_name in inline_policies:
            self.delete_role_policy(name, policy_name)
        client.delete_role(RoleName=name)
738712
def chat_delete(self, *, channel: str, ts: str, **kwargs) -> SlackResponse:
        
        kwargs.update({"channel": channel, "ts": ts})
        return self.api_call("chat.delete", json=kwargs)
1018716
def revoke(self, role):
        
        if role in self.roles:
            self.roles.remove(role)
357438
def del_permission(self, role, name):
        
        if not self.has_permission(role, name):
            return True
        targetGroup = AuthGroup.objects(role=role, creator=self.client).first()
        target = AuthPermission.objects(groups=targetGroup, name=name, creator=self.client).first()
        if not target:
            return True
        target.delete()
        return True
213148
protected function deleteUserRole()
    {
        $this->controlAccess('user_role_delete');

        if ($this->role->delete($this->data_role['role_id'])) {
            $this->redirect('admin/user/role', $this->text('Role has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Role has not been deleted'), 'warning');
    }
192382
def delete_ec2_role(self, role, mount_point='aws-ec2'):
        
        return self._adapter.delete('/v1/auth/{0}/role/{1}'.format(mount_point, role))
1109005
async def deleteChatStickerSet(self, chat_id):
        
        p = _strip(locals())
        return await self._api_request('deleteChatStickerSet', _rectify(p))
89223
public function deletePolicy($roleId, $policyId, Request $request)
    {
        try {
            // First try to treat $roleId as a role draft ID.
            $roleDraft = $this->roleService->loadRoleDraft($roleId);

            $policy = null;
            foreach ($roleDraft->getPolicies() as $rolePolicy) {
                if ($rolePolicy->id == $policyId) {
                    $policy = $rolePolicy;
                    break;
                }
            }

            if ($policy !== null) {
                $this->roleService->removePolicyByRoleDraft($roleDraft, $policy);

                return new Values\NoContent();
            }
        } catch (NotFoundException $e) {
            // Then try to treat $roleId as a role ID.
            $role = $this->roleService->loadRole($roleId);

            $policy = null;
            foreach ($role->getPolicies() as $rolePolicy) {
                if ($rolePolicy->id == $policyId) {
                    $policy = $rolePolicy;
                    break;
                }
            }

            if ($policy !== null) {
                $this->roleService->deletePolicy($policy);

                return new Values\NoContent();
            }
        }

        throw new Exceptions\NotFoundException("Policy not found: '{$request->getPathInfo()}'.");
    }
973786
public Response deleteMember(String roomName, String jid) {
		return restClient.delete("chatrooms/" + roomName + "/members/" + jid,
				new HashMap<String, String>());
	}
665644
def remove_role(self, role):
        
        if role in self.__roles:
            self.__roles.remove(role)
885238
def remove_role_from_user(self, user, role):
        
        user.remove_role(role)
        self.save(user)
        events.user_lost_role_event.send(user, role=role)
120887
def remove_role_from_user(user, role):
    
    user = _query_to_user(user)
    role = _query_to_role(role)
    if click.confirm(f'Are you sure you want to remove {role!r} from {user!r}?'):
        user.roles.remove(role)
        user_manager.save(user, commit=True)
        click.echo(f'Successfully removed {role!r} from {user!r}')
    else:
        click.echo('Cancelled.')
185036
def chat_delete(self, room_id, msg_id, **kwargs):
        """"""
        return self.__call_api_post('chat.delete', roomId=room_id, msgId=msg_id, kwargs=kwargs)
629468
def delete(self, roleId):
        """"""
        role = db.Role.find_one(Role.role_id == roleId)
        if not role:
            return self.make_response('No such role found', HTTP.NOT_FOUND)

        if role.name in ('User', 'Admin'):
            return self.make_response('Cannot delete the built-in roles', HTTP.BAD_REQUEST)

        db.session.delete(role)
        db.session.commit()
        auditlog(event='role.delete', actor=session['user'].username, data={'roleId': roleId})

        return self.make_response({
            'message': 'Role has been deleted',
            'roleId': roleId
        })
874279
def delete_role(role_id)
      @roles.reject! { |r| r.id == role_id }
      @members.each do |_, member|
        new_roles = member.roles.reject { |r| r.id == role_id }
        member.update_roles(new_roles)
      end
      @channels.each do |channel|
        overwrites = channel.permission_overwrites.reject { |id, _| id == role_id }
        channel.update_overwrites(overwrites)
      end
    end
539781
public function deleteAction(Request $request, Role $role, RoleAssignment $roleAssignment): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('role', 'assign'));
        $form = $this->formFactory->deleteRoleAssignment(
            new RoleAssignmentDeleteData($roleAssignment)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (RoleAssignmentDeleteData $data) use ($role) {
                $roleAssignment = $data->getRoleAssignment();
                $this->roleService->removeRoleAssignment($roleAssignment);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Assignment on role '%role%' removed.") */
                        'role.assignment_delete.success',
                        ['%role%' => $role->identifier],
                        'role'
                    )
                );

                return new RedirectResponse($this->generateUrl('ezplatform.role.view', [
                    'roleId' => $role->id,
                ]));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('ezplatform.role.view', [
            'roleId' => $role->id,
        ]));
    }