Get the resource type from ResourceDefinition

Change-Id: Ie34a39a9d6d11bdbd2601e2c4be01b5411c2ac5a
Merge "Get the resource type from ResourceDefinition"