the domain_snapshot
the flags
the config. The returned object should be unreffed with unref when no longer needed.