Method: Wavefront::Validators#wf_account_id?

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

#wf_account_id?(id) ⇒ Boolean

Ensure the given argument is a valid User or SystemAccount ID.

Parameters:

Returns:

  • (Boolean)

Raises:

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



590
591
592
593
594
595
596
597
598
# File 'lib/wavefront-sdk/validators.rb', line 590

def (id)
  true if wf_user_id?(id)
rescue Wavefront::Exception::InvalidUserId
  begin
    true if wf_serviceaccount_id?(id)
  rescue Wavefront::Exception::InvalidServiceAccountId
    raise Wavefront::Exception::InvalidAccountId, id
  end
end