Class: DatadogAPIClient::V1::ServiceLevelObjective
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::ServiceLevelObjective
- Defined in:
- lib/datadog_api_client/v1/models/service_level_objective.rb
Overview
A service level objective object includes a service level indicator, thresholds for one or more timeframes, and metadata (‘name`, `description`, `tags`, etc.).
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Creation timestamp (UNIX time in seconds) Always included in service level objective responses.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#description ⇒ Object
A user-defined description of the service level objective.
-
#groups ⇒ Object
A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective.
-
#id ⇒ Object
A unique identifier for the service level objective object.
-
#modified_at ⇒ Object
Modification timestamp (UNIX time in seconds) Always included in service level objective responses.
-
#monitor_ids ⇒ Object
A list of monitor ids that defines the scope of a monitor service level objective.
-
#monitor_tags ⇒ Object
The union of monitor tags for all monitors referenced by the ‘monitor_ids` field.
-
#name ⇒ Object
The name of the service level objective object.
-
#query ⇒ Object
Returns the value of attribute query.
-
#tags ⇒ Object
A list of tags associated with this service level objective.
-
#thresholds ⇒ Object
The thresholds (timeframes and associated targets) for this service level objective object.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ServiceLevelObjective
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ ServiceLevelObjective
Initializes the object
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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 118 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ServiceLevelObjective` 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::ServiceLevelObjective`. 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?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'creator') self.creator = attributes[:'creator'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'groups') if (value = attributes[:'groups']).is_a?(Array) self.groups = value end end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'modified_at') self.modified_at = attributes[:'modified_at'] end if attributes.key?(:'monitor_ids') if (value = attributes[:'monitor_ids']).is_a?(Array) self.monitor_ids = value end end if attributes.key?(:'monitor_tags') if (value = attributes[:'monitor_tags']).is_a?(Array) self. = value end end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'query') self.query = attributes[:'query'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes.key?(:'thresholds') if (value = attributes[:'thresholds']).is_a?(Array) self.thresholds = value end end if attributes.key?(:'type') self.type = attributes[:'type'] end end |
Instance Attribute Details
#created_at ⇒ Object
Creation timestamp (UNIX time in seconds) Always included in service level objective responses.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 27 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
29 30 31 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 29 def creator @creator end |
#description ⇒ Object
A user-defined description of the service level objective. Always included in service level objective responses (but may be ‘null`). Optional in create/update requests.
32 33 34 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 32 def description @description end |
#groups ⇒ Object
A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective. Included in service level objective responses if it is not empty. Optional in create/update requests for monitor service level objectives, but may only be used when then length of the ‘monitor_ids` field is one.
35 36 37 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 35 def groups @groups end |
#id ⇒ Object
A unique identifier for the service level objective object. Always included in service level objective responses.
38 39 40 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 38 def id @id end |
#modified_at ⇒ Object
Modification timestamp (UNIX time in seconds) Always included in service level objective responses.
41 42 43 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 41 def modified_at @modified_at end |
#monitor_ids ⇒ Object
A list of monitor ids that defines the scope of a monitor service level objective. **Required if type is ‘monitor`**.
44 45 46 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 44 def monitor_ids @monitor_ids end |
#monitor_tags ⇒ Object
The union of monitor tags for all monitors referenced by the ‘monitor_ids` field. Always included in service level objective responses for monitor service level objectives (but may be empty). Ignored in create/update requests. Does not affect which monitors are included in the service level objective (that is determined entirely by the `monitor_ids` field).
47 48 49 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 47 def end |
#name ⇒ Object
The name of the service level objective object.
50 51 52 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 50 def name @name end |
#query ⇒ Object
Returns the value of attribute query.
52 53 54 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 52 def query @query end |
#tags ⇒ Object
A list of tags associated with this service level objective. Always included in service level objective responses (but may be empty). Optional in create/update requests.
55 56 57 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 55 def end |
#thresholds ⇒ Object
The thresholds (timeframes and associated targets) for this service level objective object.
58 59 60 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 58 def thresholds @thresholds end |
#type ⇒ Object
Returns the value of attribute type.
60 61 62 |
# File 'lib/datadog_api_client/v1/models/service_level_objective.rb', line 60 def type @type end |