Method: Wavefront::Validators#wf_permission?

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

#wf_permission?(id) ⇒ Boolean

Ensure the given argument is a Wavefront permission

Parameters:

Returns:

  • (Boolean)

Raises:

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



562
563
564
565
566
567
568
569
570
571
572
# File 'lib/wavefront-sdk/validators.rb', line 562

def wf_permission?(id)
  if %w[alerts_management batch_query_priority embedded_charts
        dashboard_management derived_metrics_management ingestion
        events_management external_links_management
        application_management metrics_management agent_management
        host_tag_management user_management].include?(id)
    return true
  end

  raise Wavefront::Exception::InvalidPermission, id
end