Class: DatadogAPIClient::V1::EventCreateRequest
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::EventCreateRequest
- Defined in:
- lib/datadog_api_client/v1/models/event_create_request.rb
Overview
Object representing an event.
Instance Attribute Summary collapse
-
#aggregation_key ⇒ Object
An arbitrary string to use for aggregation.
-
#alert_type ⇒ Object
Returns the value of attribute alert_type.
-
#date_happened ⇒ Object
POSIX timestamp of the event.
-
#device_name ⇒ Object
A device name.
-
#host ⇒ Object
Host name to associate with the event.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#related_event_id ⇒ Object
ID of the parent event.
-
#source_type_name ⇒ Object
The type of event being posted.
-
#tags ⇒ Object
A list of tags to apply to the event.
-
#text ⇒ Object
The body of the event.
-
#title ⇒ Object
The event title.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EventCreateRequest
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ EventCreateRequest
Initializes the object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 108 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::EventCreateRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::EventCreateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'aggregation_key') self.aggregation_key = attributes[:'aggregation_key'] end if attributes.key?(:'alert_type') self.alert_type = attributes[:'alert_type'] end if attributes.key?(:'date_happened') self.date_happened = attributes[:'date_happened'] end if attributes.key?(:'device_name') self.device_name = attributes[:'device_name'] end if attributes.key?(:'host') self.host = attributes[:'host'] end if attributes.key?(:'priority') self.priority = attributes[:'priority'] end if attributes.key?(:'related_event_id') self. = attributes[:'related_event_id'] end if attributes.key?(:'source_type_name') self.source_type_name = attributes[:'source_type_name'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes.key?(:'text') self.text = attributes[:'text'] end if attributes.key?(:'title') self.title = attributes[:'title'] end end |
Instance Attribute Details
#aggregation_key ⇒ Object
An arbitrary string to use for aggregation. Limited to 100 characters. If you specify a key, all events using that key are grouped together in the Event Stream.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 27 def aggregation_key @aggregation_key end |
#alert_type ⇒ Object
Returns the value of attribute alert_type.
29 30 31 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 29 def alert_type @alert_type end |
#date_happened ⇒ Object
POSIX timestamp of the event. Must be sent as an integer (that is no quotes). Limited to events no older than 7 days.
32 33 34 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 32 def date_happened @date_happened end |
#device_name ⇒ Object
A device name.
35 36 37 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 35 def device_name @device_name end |
#host ⇒ Object
Host name to associate with the event. Any tags associated with the host are also applied to this event.
38 39 40 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 38 def host @host end |
#priority ⇒ Object
Returns the value of attribute priority.
40 41 42 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 40 def priority @priority end |
#related_event_id ⇒ Object
ID of the parent event. Must be sent as an integer (that is no quotes).
43 44 45 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 43 def end |
#source_type_name ⇒ Object
The type of event being posted. Option examples include nagios, hudson, jenkins, my_apps, chef, puppet, git, bitbucket, etc. A complete list of source attribute values [available here](docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
46 47 48 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 46 def source_type_name @source_type_name end |
#tags ⇒ Object
A list of tags to apply to the event.
49 50 51 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 49 def end |
#text ⇒ Object
The body of the event. Limited to 4000 characters. The text supports markdown. To use markdown in the event text, start the text block with ‘%%% \n` and end the text block with `\n %%%`. Use `msg_text` with the Datadog Ruby library.
52 53 54 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 52 def text @text end |
#title ⇒ Object
The event title.
55 56 57 |
# File 'lib/datadog_api_client/v1/models/event_create_request.rb', line 55 def title @title end |