You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scaleway-async/scaleway_async/cockpit/v1/api.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
)
14
14
from .typesimport (
15
15
AlertState,
16
+
AlertStatus,
16
17
DataSourceOrigin,
17
18
DataSourceType,
18
19
GrafanaUserRole,
@@ -1473,7 +1474,7 @@ async def list_alerts(
1473
1474
*,
1474
1475
region: Optional[ScwRegion] =None,
1475
1476
project_id: Optional[str] =None,
1476
-
is_enabled: Optional[bool] =None,
1477
+
rule_status: Optional[AlertStatus] =None,
1477
1478
is_preconfigured: Optional[bool] =None,
1478
1479
state: Optional[AlertState] =None,
1479
1480
data_source_id: Optional[str] =None,
@@ -1483,7 +1484,7 @@ async def list_alerts(
1483
1484
List preconfigured and/or custom alerts for the specified Project and data source.
1484
1485
:param region: Region to target. If none is passed will use default region from the config.
1485
1486
:param project_id: Project ID to filter for, only alerts from this Project will be returned.
1486
-
:param is_enabled: True returns only enabled alerts. False returns only disabled alerts. If omitted, no alert filtering is applied. Other filters may still apply.
1487
+
:param rule_status: Returns only alerts with the given activation status. If omitted, no alert filtering is applied. Other filters may still apply.
1487
1488
:param is_preconfigured: True returns only preconfigured alerts. False returns only custom alerts. If omitted, no filtering is applied on alert types. Other filters may still apply.
1488
1489
:param state: Valid values to filter on are `inactive`, `pending` and `firing`. If omitted, no filtering is applied on alert states. Other filters may still apply.
1489
1490
:param data_source_id: If omitted, only alerts from the default Scaleway metrics data source will be listed.
Duration for which the alert must be active before firing. The format of this duration follows the prometheus duration format.
223
234
"""
224
235
225
-
enabled: bool
236
+
rule_status: AlertStatus
226
237
"""
227
-
Indicates if the alert is enabled or disabled. Only preconfigured alerts can be disabled.
238
+
Indicates if the alert is enabled, enabling, disabled or disabling. Preconfigured alerts can have any of these values, whereas custom alerts can only have the status "enabled".
228
239
"""
229
240
230
241
annotations: Dict[str, str]
@@ -1314,9 +1325,9 @@ class RegionalApiListAlertsRequest:
1314
1325
Project ID to filter for, only alerts from this Project will be returned.
1315
1326
"""
1316
1327
1317
-
is_enabled: Optional[bool]
1328
+
rule_status: Optional[AlertStatus]
1318
1329
"""
1319
-
True returns only enabled alerts. False returns only disabled alerts. If omitted, no alert filtering is applied. Other filters may still apply.
1330
+
Returns only alerts with the given activation status. If omitted, no alert filtering is applied. Other filters may still apply.
Copy file name to clipboardExpand all lines: scaleway/scaleway/cockpit/v1/api.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
)
14
14
from .typesimport (
15
15
AlertState,
16
+
AlertStatus,
16
17
DataSourceOrigin,
17
18
DataSourceType,
18
19
GrafanaUserRole,
@@ -1473,7 +1474,7 @@ def list_alerts(
1473
1474
*,
1474
1475
region: Optional[ScwRegion] =None,
1475
1476
project_id: Optional[str] =None,
1476
-
is_enabled: Optional[bool] =None,
1477
+
rule_status: Optional[AlertStatus] =None,
1477
1478
is_preconfigured: Optional[bool] =None,
1478
1479
state: Optional[AlertState] =None,
1479
1480
data_source_id: Optional[str] =None,
@@ -1483,7 +1484,7 @@ def list_alerts(
1483
1484
List preconfigured and/or custom alerts for the specified Project and data source.
1484
1485
:param region: Region to target. If none is passed will use default region from the config.
1485
1486
:param project_id: Project ID to filter for, only alerts from this Project will be returned.
1486
-
:param is_enabled: True returns only enabled alerts. False returns only disabled alerts. If omitted, no alert filtering is applied. Other filters may still apply.
1487
+
:param rule_status: Returns only alerts with the given activation status. If omitted, no alert filtering is applied. Other filters may still apply.
1487
1488
:param is_preconfigured: True returns only preconfigured alerts. False returns only custom alerts. If omitted, no filtering is applied on alert types. Other filters may still apply.
1488
1489
:param state: Valid values to filter on are `inactive`, `pending` and `firing`. If omitted, no filtering is applied on alert states. Other filters may still apply.
1489
1490
:param data_source_id: If omitted, only alerts from the default Scaleway metrics data source will be listed.
Duration for which the alert must be active before firing. The format of this duration follows the prometheus duration format.
223
234
"""
224
235
225
-
enabled: bool
236
+
rule_status: AlertStatus
226
237
"""
227
-
Indicates if the alert is enabled or disabled. Only preconfigured alerts can be disabled.
238
+
Indicates if the alert is enabled, enabling, disabled or disabling. Preconfigured alerts can have any of these values, whereas custom alerts can only have the status "enabled".
228
239
"""
229
240
230
241
annotations: Dict[str, str]
@@ -1314,9 +1325,9 @@ class RegionalApiListAlertsRequest:
1314
1325
Project ID to filter for, only alerts from this Project will be returned.
1315
1326
"""
1316
1327
1317
-
is_enabled: Optional[bool]
1328
+
rule_status: Optional[AlertStatus]
1318
1329
"""
1319
-
True returns only enabled alerts. False returns only disabled alerts. If omitted, no alert filtering is applied. Other filters may still apply.
1330
+
Returns only alerts with the given activation status. If omitted, no alert filtering is applied. Other filters may still apply.
0 commit comments