Add ability to query instances based on metadata values