Method: Wavefront::Validators#wf_maintenance_window_id?
- Defined in:
- lib/wavefront-sdk/validators.rb
#wf_maintenance_window_id?(id) ⇒ Boolean
Ensure the given argument is a valid maintenance window ID. IDs are the millisecond epoch timestamp at which the window was created.
314 315 316 317 318 319 |
# File 'lib/wavefront-sdk/validators.rb', line 314 def wf_maintenance_window_id?(id) id = id.to_s if id.is_a?(Numeric) return true if id.is_a?(String) && id =~ /^\d{13}$/ raise Wavefront::Exception::InvalidMaintenanceWindowId, id end |