update resource