Method: Wavefront::Validators#wf_ingestionpolicy_id?

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

#wf_ingestionpolicy_id?(id) ⇒ Boolean

Ensure the given argument is a valid ingestion policy ID

Parameters:

Returns:

  • (Boolean)

Raises:

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



579
580
581
582
583
# File 'lib/wavefront-sdk/validators.rb', line 579

def wf_ingestionpolicy_id?(id)
  return true if id.is_a?(String) && id =~ /^[a-z0-9\-_]+-\d{13}$/

  raise Wavefront::Exception::InvalidIngestionPolicyId, id
end