Method: Wavefront::Validators#wf_monitoredapplication_id?

Defined in:
lib/wavefront-sdk/validators.rb

#wf_monitoredapplication_id?(id) ⇒ Boolean

Ensure the given argument is a valid monitored application ID

Parameters:

Returns:

  • (Boolean)

Raises:

  • Wavefront::Exception::InvalidMonitoredApplicationId if the ID is not valid



616
617
618
619
620
# File 'lib/wavefront-sdk/validators.rb', line 616

def wf_monitoredapplication_id?(id)
  return true if id.is_a?(String) && id.size < 256 && id =~ /^[a-z0-9\-_]+$/

  raise Wavefront::Exception::InvalidMonitoredApplicationId, id
end