Add method getResourceByName to RPC and CLI