import json


def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") in [40300, 40301, 40302],
            any(
                [
                    "HybridConnection" in json.dumps(event.to_dict()),
                    "sb://" in json.dumps(event.to_dict()),
                    "servicebus.windows.net" in json.dumps(event.to_dict()),
                    "HybridConnectionManage" in json.dumps(event.to_dict()),
                ]
            ),
        ]
    ):
        return True
    return False
