def agent_check_warn(consul_url=None, checkid=None, **kwargs):
 ret = {}
 query_params = {}
 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 (not checkid):
  raise SaltInvocationError('Required argument "checkid" is missing.')
 if ('note' in kwargs):
  query_params['note'] = kwargs['note']
 function = 'agent/check/warn/{0}'.format(checkid)
 res = _query(consul_url=consul_url, function=function, query_params=query_params, method='GET')
 if res['res']:
  ret['res'] = True
  ret['message'] = 'Check {0} marked as warning.'.format(checkid)
 else:
  ret['res'] = False
  ret['message'] = 'Unable to update check {0}.'.format(checkid)
 return ret

def agent_check_warn ( consul_url = None , checkid = None , ** kwargs ) : ret = { } query_params = { } 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 ( not checkid ) : raise SaltInvocationError ( 'Required argument "checkid" is missing.' ) if ( 'note' in kwargs ) : query_params [ 'note' ] = kwargs [ 'note' ] function = 'agent/check/warn/{0}' . format ( checkid ) res = _query ( consul_url = consul_url , function = function , query_params = query_params , method = 'GET' ) if res [ 'res' ] : ret [ 'res' ] = True ret [ 'message' ] = 'Check {0} marked as warning.' . format ( checkid ) else : ret [ 'res' ] = False ret [ 'message' ] = 'Unable to update check {0}.' . format ( checkid ) return ret
this endpoint is used with a check that is of the ttl type .