

def send(tag, data=None, preload=None, with_env=False, with_grains=False, with_pillar=False, with_env_opts=False, **kwargs):
    "\n    Send an event to the Salt Master\n\n    .. versionadded:: 2014.7.0\n\n    :param tag: A tag to give the event.\n        Use slashes to create a namespace for related events. E.g.,\n        ``myco/build/buildserver1/start``, ``myco/build/buildserver1/success``,\n        ``myco/build/buildserver1/failure``.\n\n    :param data: A dictionary of data to send in the event.\n        This is free-form. Send any data points that are needed for whoever is\n        consuming the event. Arguments on the CLI are interpreted as YAML so\n        complex data structures are possible.\n\n    :param with_env: Include environment variables from the current shell\n        environment in the event data as ``environ``.. This is a short-hand for\n        working with systems that seed the environment with relevant data such\n        as Jenkins.\n    :type with_env: Specify ``True`` to include all environment variables, or\n        specify a list of strings of variable names to include.\n\n    :param with_grains: Include grains from the current minion in the event\n        data as ``grains``.\n    :type with_grains: Specify ``True`` to include all grains, or specify a\n        list of strings of grain names to include.\n\n    :param with_pillar: Include Pillar values from the current minion in the\n        event data as ``pillar``. Remember Pillar data is often sensitive data\n        so be careful. This is useful for passing ephemeral Pillar values\n        through an event. Such as passing the ``pillar={}`` kwarg in\n        :py:func:`state.sls <salt.modules.state.sls>` from the Master, through\n        an event on the Minion, then back to the Master.\n    :type with_pillar: Specify ``True`` to include all Pillar values, or\n        specify a list of strings of Pillar keys to include. It is a\n        best-practice to only specify a relevant subset of Pillar data.\n\n    :param with_env_opts: Include ``saltenv`` and ``pillarenv`` set on minion\n        at the moment when event is send into event data.\n    :type with_env_opts: Specify ``True`` to include ``saltenv`` and\n        ``pillarenv`` values or ``False`` to omit them.\n\n    :param kwargs: Any additional keyword arguments passed to this function\n        will be interpreted as key-value pairs and included in the event data.\n        This provides a convenient alternative to YAML for simple values.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt-call event.send myco/mytag foo=Foo bar=Bar\n        salt-call event.send 'myco/mytag' '{foo: Foo, bar: Bar}'\n\n    A convenient way to allow Jenkins to execute ``salt-call`` is via sudo. The\n    following rule in sudoers will allow the ``jenkins`` user to run only the\n    following command.\n\n    ``/etc/sudoers`` (allow preserving the environment):\n\n    .. code-block:: text\n\n        jenkins ALL=(ALL) NOPASSWD:SETENV: /usr/bin/salt-call event.send*\n\n    Call Jenkins via sudo (preserve the environment):\n\n    .. code-block:: bash\n\n        sudo -E salt-call event.send myco/jenkins/build/success with_env=[BUILD_ID, BUILD_URL, GIT_BRANCH, GIT_COMMIT]\n\n    "
    data_dict = {
        
    }
    if with_env:
        if isinstance(with_env, list):
            data_dict['environ'] = _dict_subset(with_env, dict(os.environ))
        else:
            data_dict['environ'] = dict(os.environ)
    if with_grains:
        if isinstance(with_grains, list):
            data_dict['grains'] = _dict_subset(with_grains, __grains__)
        else:
            data_dict['grains'] = __grains__
    if with_pillar:
        if isinstance(with_pillar, list):
            data_dict['pillar'] = _dict_subset(with_pillar, __pillar__)
        else:
            kwargs['pillar'] = __pillar__
    if with_env_opts:
        data_dict['saltenv'] = __opts__.get('environment', 'base')
        data_dict['pillarenv'] = __opts__.get('pillarenv')
    if kwargs:
        data_dict.update(kwargs)
    if isinstance(data, collections.Mapping):
        data_dict.update(data)
    return fire_master(data_dict, tag, preload=preload)

dataset/ETHPy150Open saltstack/salt/salt/modules/event.py send/VarMisuse@170/1467 `data_dict`->`kwargs`