def __init__(self, logical_id, relative_id=None, depends_on=None, attributes=None):
self._validate_logical_id(logical_id)<EOL>self.logical_id = logical_id<EOL>self.relative_id = relative_id<EOL>self.depends_on = depends_on<EOL>for name, _ in self.property_types.items():<EOL><INDENT>setattr(self, name, None)<EOL><DEDENT>self.resource_attributes = {}<EOL>if attributes is not None:<EOL><INDENT>for attr, value in attributes.items():<EOL><INDENT>self.set_resource_attribute(attr, value)<EOL><DEDENT><DEDENT>
Initializes a Resource object with the given logical id.

        :param str logical_id: The logical id of this Resource
        :param str relative_id: The logical id of this resource relative to the logical_id. This is useful
                                to identify sub-resources.
        :param depends_on Value of DependsOn resource attribute
        :param attributes Dictionary of resource attributes and their values