::
        
            POST /:login/machines/:id?action=resize
        
        Initiate resizing of the remote machine to a new package.

def resize(self, package):
        """
        ::
        
            POST /:login/machines/:id?action=resize
        
        Initiate resizing of the remote machine to a new package.
        """
        if isinstance(package, dict):
            package = package['name']
        action = {'action': 'resize',
                  'package': package}
        j, r = self.datacenter.request('POST', self.path, params=action)
        r.raise_for_status()