@@ -69,6 +69,14 @@ class MetricType(StrEnum):
6969 histogram = "histogram"
7070 summary = "summary"
7171
72+ class CriteriaCondition (StrEnum ):
73+ """
74+ Enum for supported CriteriaCondition
75+ Currently, only ALL is supported.
76+ """
77+
78+ all = "ALL"
79+
7280
7381class MetricUnit (StrEnum ):
7482 """
@@ -207,12 +215,12 @@ class TriggerConditions(JSONObject):
207215 }
208216
209217 Fields:
210- - criteria_condition: "ALL" or "ANY" (whether all rules must match or any )
218+ - criteria_condition: "ALL" (currently, only "ALL" is supported )
211219 - evaluation_period_seconds: seconds over which the rule(s) are evaluated
212220 - polling_interval_seconds: how often metrics are sampled (seconds)
213221 - trigger_occurrences: how many consecutive evaluation periods must match to trigger
214222 """
215- criteria_condition : Literal [ "ALL" ] = "ALL"
223+ criteria_condition : CriteriaCondition = CriteriaCondition . all
216224 evaluation_period_seconds : int = 0
217225 polling_interval_seconds : int = 0
218226 trigger_occurrences : int = 0
@@ -234,7 +242,7 @@ class DimensionFilter(JSONObject):
234242 dimension_label : str = ""
235243 label : str = ""
236244 operator : str = ""
237- value : Union [ str , int , float , bool , None ] = None
245+ value : str = None
238246
239247
240248@dataclass
@@ -292,8 +300,6 @@ class AlertChannelEnvelope(JSONObject):
292300 type : str = ""
293301 url : str = ""
294302
295-
296- @dataclass
297303class AlertType (StrEnum ):
298304 """
299305 Enumeration of alert origin types used by alert definitions.
@@ -317,17 +323,17 @@ class AlertDefinition(DerivedBase):
317323 API Documentation: https://techdocs.akamai.com/linode-api/reference/get-alert-definition
318324 """
319325
320- api_endpoint = "/monitor/services/{service }/alert-definitions/{id}"
326+ api_endpoint = "/monitor/services/{service_type }/alert-definitions/{id}"
321327 derived_url_path = "alert-definitions"
322- parent_id_name = "service "
328+ parent_id_name = "service_type "
323329 id_attribute = "id"
324330
325331 properties = {
326332 "id" : Property (identifier = True ),
333+ "service_type" : Property (identifier = True ),
327334 "label" : Property (mutable = True ),
328335 "severity" : Property (mutable = True ),
329336 "type" : Property (AlertType ),
330- "service_type" : Property (identifier = True ),
331337 "status" : Property (),
332338 "has_more_resources" : Property (),
333339 "rule_criteria" : Property (RuleCriteria ),
@@ -371,7 +377,7 @@ class AlertChannel(Base):
371377 and is used by the SDK to list, load, and inspect channels.
372378 """
373379
374- api_endpoint = "/monitor/alert-channels/"
380+ api_endpoint = "/monitor/alert-channels/{id} "
375381
376382 properties = {
377383 "id" : Property (identifier = True ),
0 commit comments