

def send_message(name, room_id, from_name, message, api_url=None, api_key=None, api_version=None, message_color='yellow', notify=False):
    '\n    Send a message to a Hipchat room.\n\n    .. code-block:: yaml\n\n        hipchat-message:\n          hipchat.send_message:\n            - room_id: 123456\n            - from_name: SuperAdmin\n            - message: \'This state was executed successfully.\'\n            - api_url: https://hipchat.myteam.com\n            - api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15\n            - api_version: v1\n            - color: green\n            - notify: True\n\n    The following parameters are required:\n\n    name\n        The unique name for this event.\n\n    room_id\n        The room to send the message to. Can either be the ID or the name.\n\n    from_name\n        The name of that is to be shown in the "from" field.\n        If not specified, defaults to.\n\n    message\n        The message that is to be sent to the Hipchat room.\n\n    The following parameters are optional:\n\n    api_url\n        The API URl to be used.\n        If not specified here or in the configuration options of master or minion,\n        will use the public HipChat API: https://api.hipchat.com\n\n    api_key\n        The api key for Hipchat to use for authentication,\n        if not specified in the configuration options of master or minion.\n\n    api_version\n        The api version for Hipchat to use,\n        if not specified in the configuration options of master or minion.\n\n    color\n        The color the Hipchat message should be displayed in. One of the following, default: yellow\n        "yellow", "red", "green", "purple", "gray", or "random".\n\n    notify\n        Should a notification in the room be raised.\n    '
    ret = {
        'name': name,
        'changes': {
            
        },
        'result': False,
        'comment': '',
    }
    if __opts__['test']:
        ret['comment'] = 'The following message is to be sent to Hipchat: {0}'.format(message)
        ret['result'] = None
        return ret
    if (not room_id):
        ret['comment'] = 'Hipchat room id is missing: {0}'.format(message_color)
        return ret
    if (not from_name):
        ret['comment'] = 'Hipchat from name is missing: {0}'.format(name)
        return ret
    if (not message):
        ret['comment'] = 'Hipchat message is missing: {0}'.format(name)
        return ret
    ret['result'] = __salt__['hipchat.send_message'](room_id=room_id, message=message, from_name=from_name, api_url=api_url, api_key=api_key, api_version=api_version, color=message_color, notify=notify)
    if (ret and ret['result']):
        ret['comment'] = 'Sent message: {0}'.format(name)
    else:
        ret['comment'] = 'Failed to send message: {0}'.format(name)
    return ret

dataset/ETHPy150Open saltstack/salt/salt/states/hipchat.py send_message/VarMisuse@115/816 `name`->`message_color`