Method: Wavefront::Validators#wf_link_id?

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

Ensure the given argument is a valid external Link ID

Parameters:

  • id (String)

    the external link ID to validate

Returns:

  • (Boolean)

    True if the link ID is valid

Raises:

  • Wavefront::Exception::InvalidExternalLinkId if the link ID is not valid



300
301
302
303
304
# File 'lib/wavefront-sdk/validators.rb', line 300

def wf_link_id?(id)
  return true if id.is_a?(String) && id =~ /^\w{16}$/

  raise Wavefront::Exception::InvalidExternalLinkId, id
end