Class: Splunk::Messages
- Inherits:
-
Collection
- Object
- ReadOnlyCollection
- Collection
- Splunk::Messages
- Defined in:
- lib/splunk-sdk-ruby/collection/messages.rb
Overview
Collection representing system-wide messages on Splunk.
There is no API difference from Collection
, and so no reason for a user to be aware of this class.
Instance Attribute Summary
Attributes inherited from ReadOnlyCollection
#entity_class, #resource, #service
Instance Method Summary collapse
-
#create(name, args) ⇒ Object
:nodoc:.
Methods inherited from Collection
Methods inherited from ReadOnlyCollection
#assoc, #atom_entry_to_entity, #each, #each_key, #each_pair, #each_value, #empty?, #fetch, #has_key?, #initialize, #keys, #length, #values
Constructor Details
This class inherits a constructor from Splunk::ReadOnlyCollection
Instance Method Details
#create(name, args) ⇒ Object
:nodoc:
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/splunk-sdk-ruby/collection/messages.rb', line 31 def create(name, args) body_args = args.clone() body_args["name"] = name request_args = { :method => :POST, :resource => @resource, :body => body_args } if args.has_key?(:namespace) request_args[:namespace] = body_args.delete(:namespace) end response = @service.request(request_args) entity = Message.new(@service, Splunk::namespace(:sharing => "system"), @resource, name) return entity end |