Delete Role

        Delete a role. This operation will succeed regardless of whether or not
        the role exists.

        This method is ``stable``
969373
def deleteRole(self, *args, **kwargs):
        

        return self._makeApiCall(self.funcinfo["deleteRole"], *args, **kwargs)
698204
def delete_role(self, name):
    
    return roles.delete_role(self._get_resource_root(), self.name, name,
        self._get_cluster_name())
432725
public function removeRole(Role $role)
    {
        $this->initializeRoles();
        if ($this->hasRole($role)) {
            $roleIdentifier = $role->getIdentifier();
            unset($this->roles[$roleIdentifier]);
            $identifierIndex = array_search($roleIdentifier, $this->roleIdentifiers);
            unset($this->roleIdentifiers[$identifierIndex]);
        }
    }
961800
def remove_role(self, databaseName, roleName, collectionName=None):
        
        role = {"databaseName" : databaseName,
                "roleName" : roleName}
        
        if collectionName:
            role["collectionName"] = collectionName
        
        if role in self.roles:
            self.roles.remove(role)
509983
def delete(self,  *args, **kwargs):
        
        self._pre_delete(*args, **kwargs)
        response = self._delete(*args, **kwargs)
        response = self._post_delete(response, *args, **kwargs)
        return response
1198337
public function actionDeleteRole ()
		{

			$auth = Yii::$app->getAuthManager();
			$role = $auth->getRole(Yii::$app->request->get('id'));
			$auth->remove($role);
			$url = Yii::$app->request->referrer . '#roles';
			Yii::$app->response->redirect($url);

			Yii::$app->end();
		}
298454
def role_delete(role_id, endpoint_id):
    
    client = get_client()
    res = client.delete_endpoint_role(endpoint_id, role_id)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
769023
def delete_user_role(self, user, role):
        
        self.project_service.set_auth(self._token_project)
        self.project_service.delete_user_role(user, role)
348172
def remove_role role
      raise ArgumentError, '#remove_role takes a single role String or Symbol as the argument' if !role || role.kind_of?(Array)
      remove_roles role
    end
950592
public function removeRole($role)
    {
        if ( ! ($roleModel = $this->sentinel->findRoleBySlug($role))) {
            return false;
        }

        /** @var EloquentRole $roleModel */
        $roleModel->delete();

        $this->fireRoleChangeEvent();
        return true;
    }
1099769
def _delete(self, *args, **kwargs):
        
        response = requests.delete(*args, **kwargs)
        response.raise_for_status()
892956
public function deleteRole(Role $role)
    {
        $url = self::makeUrl($role->tenantId, $role->name);
        $this->service->prepAndSend($url, array(204), 'DELETE', null, false);
	}
592220
function removeRolePrivilege (access, role, privilege) {
  if (role === true) {
    access[privilege] = {
      role: []
    }
    return
  }

  if (access[privilege].role === true) {
    access[privilege].role = true
  }

  _.pullAll(access[privilege].role, _.concat(role))
}
273278
def delete_user_role(deleted_user_id, role_id,**kwargs):
    
    #check_perm(kwargs.get('user_id'), 'edit_role')
    try:
        _get_user(deleted_user_id)
        _get_role(role_id)
        roleuser_i = db.DBSession.query(RoleUser).filter(RoleUser.user_id==deleted_user_id, RoleUser.role_id==role_id).one()
        db.DBSession.delete(roleuser_i)
    except NoResultFound:
        raise ResourceNotFoundError("User Role does not exist")

    return 'OK'
538465
public function removeRole($role)
    {
        if ($this->instance instanceof \Phavour\Session\Storage) {
            if (!$this->hasRole($role)) {
                return false;
            }
            if ($this->instance->isLocked()) {
                $this->instance->unlock();
            }
            $roles = $this->instance->get('roles');
            if (is_array($roles)) {
                $new = array();
                foreach ($roles as $old) {
                    if ($old != $role) {
                        $new[] = $old;
                    }
                }
                $this->instance->set('roles', $new);
            }

            $this->instance->lock();
            return true;
        }

        return false;
    }
1054354
public Request delete(String roleId) {
    Asserts.assertNotNull(roleId, "role id");

    final String url = baseUrl
        .newBuilder()
        .addEncodedPathSegments("api/v2/roles")
        .addEncodedPathSegments(roleId)
        .build()
        .toString();
    VoidRequest request = new VoidRequest(this.client, url, "DELETE");
    request.addHeader("Authorization", "Bearer " + apiToken);
    return request;
  }
624041
def do_start_role(self, role):
        
        if not role:
            return None

        if not self.has_cluster():
            return None

        if '-' not in role:
            print("Please enter a valid role name")
            return None

        try:
            service = api.get_cluster(self.cluster).get_service(role.split('-')[0])
            service.start_roles(role)
            print("Starting Role")
        except ApiException:
            print("Error: Role or Service Not Found")