Rename this container. Similar to the ``docker rename`` command.

        Args:
            name (str): New name for the container

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
195854
def rename(self, name):
        
        return self.client.api.rename(self.id, name)
1131427
def rename(self, old_label_name, new_label_name):
        
        assert(old_label_name != new_label_name)
        self._bayes.pop(old_label_name)
        old_baye_dir = self._get_baye_dir(old_label_name)
        new_baye_dir = self._get_baye_dir(new_label_name)
        logger.info("Renaming label training {} -> {} : {} -> {}".format(
            old_label_name, new_label_name, old_baye_dir, new_baye_dir
        ))
        os.rename(old_baye_dir, new_baye_dir)
1214216
def rename(name)
        response = JSON.parse(CrateAPI::Base.call("#{CrateAPI::Base::CRATES_URL}/#{CrateAPI::Crates::CRATE_ACTIONS[:rename] % ["#{self.id}"]}", :post, {:body => {:name => name}}))
        raise CrateRenameError, response["message"] unless response["status"] != "failure"
      end
632950
public void rename(String newName) {
        URL url = FOLDER_INFO_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");

        JsonObject updateInfo = new JsonObject();
        updateInfo.add("name", newName);

        request.setBody(updateInfo.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        response.getJSON();
    }
1292256
def rename(self, new_name):
    
    update = copy.copy(self)
    update.name = new_name
    return self._do_update(update)
706518
def rename(self, new_name):
        

        yield from self._hypervisor.send("nio rename {name} {new_name}".format(name=self._name, new_name=new_name))

        log.info("NIO {name} renamed to {new_name}".format(name=self._name, new_name=new_name))
        self._name = new_name
483495
def rename(self, new):
        
        os.rename(self, new)
        return self._next_class(new)
711842
def rename(self, name):
        
        self.update(name='{} node {}'.format(name, self.nodeid))
548564
def rename(args):
    """"""
    old_name, new_name = args.names
    add_tags(resources.ec2.Instance(resolve_instance_id(old_name)), Name=new_name, dry_run=args.dry_run)
94682
def name(self, name):
        
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")
        if name is not None and len(name) > 128:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `128`")
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")
        if name is not None and not re.search('^[^\/]+$', name):
            raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[^\/]+$/`")

        self._name = name
1273807
def rename(new_name, options = {})
      endpoint = "/api/build/rename/#{url_safe(name)}" + "?to=#{new_name}"
      client.post(endpoint, {})
      true
    rescue Error::HTTPError => e
      false
    end
493725
def rename_pipe(self, old_name, new_name):
        
        if old_name not in self.pipe_names:
            raise ValueError(Errors.E001.format(name=old_name, opts=self.pipe_names))
        if new_name in self.pipe_names:
            raise ValueError(Errors.E007.format(name=new_name, opts=self.pipe_names))
        i = self.pipe_names.index(old_name)
        self.pipeline[i] = (new_name, self.pipeline[i][1])
626721
def set_name(self, name):
        

        if len(name) > 6:
            raise ArgumentError("Name must be at most 6 characters long", name=name)

        if len(name) < 6:
            name += ' '*(6 - len(name))

        self.name = name
114752
def obsolete_rename(oldname, newfunc):
    
    newname = newfunc.__name__
    def __obsolete(*args, **kwargs):
        warnings.warn(
            "{oldname} is obsolete and is removed in PyQt5. "
            "Use {newname} instead.".format(oldname=oldname, newname=newname),
            DeprecationWarning,
            stacklevel=2
        )
        return newfunc(*args, **kwargs)
    __obsolete.__name__ = oldname
    return __obsolete
861125
def rename(self, name):
        """"""
        self.ec2.create_tags(Resources = [self.instance_id],
                             Tags      = [{'Key':   'Name',
                                           'Value':  name}])
        self.refresh_info()
1318272
def rename_window(self, new_name):
        

        import shlex

        lex = shlex.shlex(new_name)
        lex.escape = ' '
        lex.whitespace_split = False

        try:
            self.cmd('rename-window', new_name)
            self['window_name'] = new_name
        except Exception as e:
            logger.error(e)

        self.server._update_windows()

        return self
665334
def rename(self, old_key, new_key):
        
        return lib.zhashx_rename(self._as_parameter_, old_key, new_key)