API for defining/sanitizing custom resource attribute types