How to deactivate a resource?