'Return a frozen resource definition, with all functions resolved.
This return a new resource definition with fixed data (containing no
intrinsic functions). Named arguments passed to this method override
the values passed as arguments to the constructor.'

def freeze(self, **overrides):

    if (getattr(self, '_frozen', False) and (not overrides)):
        return self
    def arg_item(attr_name):
        name = attr_name.lstrip('_')
        if (name in overrides):
            value = overrides[name]
            if ((not value) and (getattr(self, attr_name) is None)):
                value = None
        else:
            value = function.resolve(getattr(self, attr_name))
        return (name, value)
    args = ('name', 'resource_type', '_properties', '_metadata', '_depends', '_deletion_policy', '_update_policy', 'description', '_external_id', '_condition')
    defn = type(self)(**dict((arg_item(a) for a in args)))
    defn._frozen = True
    return defn
