Add a method to freeze a ResourceDefinition

Change-Id: Idcbdd0efbc9c3b38c39b8ac1e64e9057fad15899
Merge "Add a method to freeze a ResourceDefinition"