docs: def agent_check_register(consul_url=None, token=None, **kwargs):
      '''
      The register endpoint is used to add a new check to the local agent.
  
      :param consul_url: The Consul server URL.
      :param name: The description of what the check is for.
      :param id: The unique name to use for the check, if not
                 provided 'name' is used.
      :param notes: Human readable description of the check.
      :param script: If script is provided, the check type is
                     a script, and Consul will evaluate that script
                     based on the interval parameter.
      :param http: Check will perform an HTTP GET request against
                   the value of HTTP (expected to be a URL) based
                   on the interval parameter.
      :param ttl: If a TTL type is used, then the TTL update endpoint
                  must be used periodically to update the state of the check.
      :param interval: Interval at which the check should run.
      :return: Boolean and message indicating success or failure.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' consul.agent_check_register name='Memory Utilization' script='/usr/local/bin/check_mem.py' interval='15s'
  
      '''
      ret = {}
      data = {}
      if not consul_url:
          consul_url = _get_config()
          if not consul_url:
              log.error('No Consul URL found.')
              ret['message'] = 'No Consul URL found.'
              ret['res'] = False
              return ret
  
      if 'name' in kwargs:
          data['Name'] = kwargs['name']
      else:
          raise SaltInvocationError('Required argument "name" is missing.')
  
      if True not in [True for item in ('script', 'http', 'ttl') if item in kwargs]:
          ret['message'] = 'Required parameter "script" or "http" is missing.'
          ret['res'] = False
          return ret
  
      if 'id' in kwargs:
          data['ID'] = kwargs['id']
  
      if 'notes' in kwargs:
          data['Notes'] = kwargs['notes']
  
      if 'script' in kwargs:
          if 'interval' not in kwargs:
              ret['message'] = 'Required parameter "interval" is missing.'
              ret['res'] = False
              return ret
          data['Script'] = kwargs['script']
          data['Interval'] = kwargs['interval']
  
      if 'http' in kwargs:
          if 'interval' not in kwargs:
              ret['message'] = 'Required parameter "interval" is missing.'
              ret['res'] = False
              return ret
          data['HTTP'] = kwargs['http']
          data['Interval'] = kwargs['interval']
  
      if 'ttl' in kwargs:
          data['TTL'] = kwargs['ttl']
  
      function = 'agent/check/register'
      res = _query(consul_url=consul_url,
                   function=function,
                   token=token,
                   method='PUT',
                   data=data)
  
      if res['res']:
          ret['res'] = True
          ret['message'] = ('Check {0} added to agent.'.format(kwargs['name']))
      else:
          ret['res'] = False
          ret['message'] = 'Unable to add check to agent.'
      return ret