Use this API to rename a cachepolicy resource.
433250
public static base_response rename(nitro_service client, cachepolicy resource, String new_policyname) throws Exception {
		cachepolicy renameresource = new cachepolicy();
		renameresource.policyname = resource.policyname;
		return renameresource.rename_resource(client,new_policyname);
	}
1369522
private static void deleteCacheInfoUpdate(CacheStatus cacheStatus) {
    if (!cacheStatus.isInited()) {
      // if it is not created yet, do nothing.
      return;
    }
    synchronized (baseDirSize) {
      Long dirSize = baseDirSize.get(cacheStatus.getBaseDir());
      if ( dirSize != null ) {
        dirSize -= cacheStatus.size;
        baseDirSize.put(cacheStatus.getBaseDir(), dirSize);
      }
    }
    synchronized (baseDirNumberSubDir) {
      Integer dirSubDir = baseDirNumberSubDir.get(cacheStatus.getBaseDir());
      if ( dirSubDir != null ) {
        dirSubDir--;
        baseDirNumberSubDir.put(cacheStatus.getBaseDir(), dirSubDir);
      }
    }
  }
1374711
def rename(self, new_name, *args, **kwargs):
        
        new = self.reddit_session.rename_multireddit(self.name, new_name,
                                                     *args, **kwargs)
        self.__dict__ = new.__dict__  # pylint: disable=W0201
        return self
932075
function(key) {
    var fn = this.pickOption('renameKey');
    if (!fn) {
      fn = this.collection.renameKey || this.app.renameKey;
    }
    if (typeof fn !== 'function') return key;
    return fn(key);
  }
496675
private void rename(CmisObject object, String name){
        Map<String, Object> newName = new HashMap<String, Object>();
        newName.put("cmis:name", name);

        object.updateProperties(newName);
    }
299360
public Response rename(String bucket, String oldFileKey, String newFileKey, boolean force)
            throws QiniuException {
        return move(bucket, oldFileKey, bucket, newFileKey, force);
    }
1359941
def rename(self, old_key, new_key):
        
        assert new_key not in self
        assert old_key != new_key

        file_ = self[old_key]
        old_data = self.filesmap[old_key]

        # Create a new version with the new name
        obj = ObjectVersion.create(
            bucket=self.bucket, key=new_key,
            _file_id=file_.obj.file_id
        )

        # Delete old key
        self.filesmap[new_key] = self.file_cls(obj, old_data).dumps()
        del self[old_key]

        return obj
94841
def Update(self,name):
		

		r = clc.v2.API.Call('PUT','antiAffinityPolicies/%s/%s' % (self.alias,self.id),{'name': name},session=self.session)
		self.name = name
592135
def replace_policy(self, scaling_group, policy, name,
            policy_type, cooldown, change=None, is_percent=False,
            desired_capacity=None, args=None):
        
        policy_id = utils.get_id(policy)
        group_id = utils.get_id(scaling_group)
        uri = "/%s/%s/policies/%s" % (self.uri_base, group_id, policy_id)
        body = self._create_policy_body(name=name, policy_type=policy_type,
                cooldown=cooldown, change=change, is_percent=is_percent,
                desired_capacity=desired_capacity, args=args)
        resp, resp_body = self.api.method_put(uri, body=body)
128080
def rename(oldPath, newPath, **kwargs):
    """"""
    import os
    return os.rename(oldPath, newPath, **kwargs)
1153450
def rename(self, mapping):
        
        for old_key, new_key in mapping:
            self.dict[new_key] = self.dict[old_key]
            del self.dict[old_key]
978132
public static base_responses add(nitro_service client, cachepolicy resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			cachepolicy addresources[] = new cachepolicy[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new cachepolicy();
				addresources[i].policyname = resources[i].policyname;
				addresources[i].rule = resources[i].rule;
				addresources[i].action = resources[i].action;
				addresources[i].storeingroup = resources[i].storeingroup;
				addresources[i].invalgroups = resources[i].invalgroups;
				addresources[i].invalobjects = resources[i].invalobjects;
				addresources[i].undefaction = resources[i].undefaction;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1259817
public static base_response update(nitro_service client, filterpolicy resource) throws Exception {
		filterpolicy updateresource = new filterpolicy();
		updateresource.name = resource.name;
		updateresource.rule = resource.rule;
		updateresource.reqaction = resource.reqaction;
		updateresource.resaction = resource.resaction;
		return updateresource.update_resource(client);
	}
1231979
public static base_response update(nitro_service client, dnspolicy resource) throws Exception {
		dnspolicy updateresource = new dnspolicy();
		updateresource.name = resource.name;
		updateresource.rule = resource.rule;
		updateresource.viewname = resource.viewname;
		updateresource.preferredlocation = resource.preferredlocation;
		updateresource.preferredloclist = resource.preferredloclist;
		updateresource.drop = resource.drop;
		updateresource.cachebypass = resource.cachebypass;
		updateresource.actionname = resource.actionname;
		return updateresource.update_resource(client);
	}
1331536
def update_ikepolicy(self, ikepolicy, body=None):
        """"""
        return self.put(self.ikepolicy_path % (ikepolicy), body=body)
591536
def rename(self, new_name):
        """"""
        old_name = self.name
        self.name = new_name
        pypath = self.relative_pythonpath  # ??
        self.root_path = self.root_path[:-len(old_name)]+new_name
        self.relative_pythonpath = pypath  # ??
        self.save()
735217
def rename(self, newpath):
        ""
        # POST https://www.jottacloud.com/jfs/**USERNAME**/Jotta/Sync/Ny%20mappe?mvDir=/**USERNAME**/Jotta/Sync/testFolder
        #url = '%s?mvDir=/%s%s' % (self.path, self.jfs.username, newpath)
        params = {'mvDir':'/%s%s' % (self.jfs.username, newpath)}
        r = self.jfs.post(self.path,
                          extra_headers={'Content-Type':'application/octet-stream'},
                          params=params)
        return r