def __setattr__(self, name, value):
        """Allows an attribute of this resource to be set only if it is a keyword or a property of the Resource with a
        valid value.

        :param str name: the name of the attribute to be set
        :param value: the value of the attribute to be set
        :raises InvalidResourceException: if an invalid property is provided
        """
        if name in self._keywords or name in self.property_types:
            return super(Resource, self).__setattr__(name, value)

        raise InvalidResourceException(self.logical_id,
                                       "property {property_name} not defined for resource of type {resource_type}"
                                       .format(resource_type=self.resource_type, property_name=name))
def __setattr__ ( self , name , value ) : if name in self . _keywords or name in self . property_types : return super ( Resource , self ) . __setattr__ ( name , value ) raise InvalidResourceException ( self . logical_id , "property {property_name} not defined for resource of type {resource_type}" . format ( resource_type = self . resource_type , property_name = name ) )
Allows an attribute of this resource to be set only if it is a keyword or a property of the Resource with a
        valid value.

        :param str name: the name of the attribute to be set
        :param value: the value of the attribute to be set
        :raises InvalidResourceException: if an invalid property is provided