def get_object_id_by_params(obj, params=None, **kwargs):
    '''
    .. versionadded:: 2017.7

    Get ID of single Zabbix object specified by its name.

    :param obj: Zabbix object type
    :param params: Parameters by which object is uniquely identified
    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    :return: object ID
    '''
    if params is None:
        params = {}
    res = run_query(obj + '.get', params, **kwargs)
    if res and len(res) == 1:
        return six.text_type(res[0][ZABBIX_ID_MAPPER[obj]])
    else:
        raise SaltException('Zabbix API: Object does not exist or bad Zabbix user permissions or other unexpected '
                            'result. Called method {0} with params {1}. '
                            'Result: {2}'.format(obj + '.get', params, res))
def get_object_id_by_params ( obj , params = None , ** kwargs ) : if params is None : params = { } res = run_query ( obj + '.get' , params , ** kwargs ) if res and len ( res ) == 1 : return six . text_type ( res [ 0 ] [ ZABBIX_ID_MAPPER [ obj ] ] ) else : raise SaltException ( 'Zabbix API: Object does not exist or bad Zabbix user permissions or other unexpected ' 'result. Called method {0} with params {1}. ' 'Result: {2}' . format ( obj + '.get' , params , res ) )
.. versionadded:: 2017.7

    Get ID of single Zabbix object specified by its name.

    :param obj: Zabbix object type
    :param params: Parameters by which object is uniquely identified
    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    :return: object ID