resource_definition schema
resource definition codes
bucket refactoring