Method: Wavefront::Validators#wf_integration_id?

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

#wf_integration_id?(id) ⇒ Boolean

Ensure the given argument is a valid Wavefront integration ID. These appear to be lower-case strings.

Parameters:

  • id (String)

    the integration ID to validate

Returns:

  • (Boolean)

    True if the integration name is valid

Raises:

  • Wavefront::Exception::InvalidIntegrationId if the integration ID is not valid



507
508
509
510
511
# File 'lib/wavefront-sdk/validators.rb', line 507

def wf_integration_id?(id)
  return true if id.is_a?(String) && id =~ /^[a-z0-9]+$/

  raise Wavefront::Exception::InvalidIntegrationId, id
end