Get metadata from ResourceDefinition

Change-Id: Ic232030015a95a17f3f8c420adbe6da61393eaab
Merge "Get metadata from ResourceDefinition"