Create and update resource