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
@@ -532,25 +544,35 @@ type GetConfigResponseRetention struct {
532
544
DefaultDaysuint32`json:"default_days"`
533
545
}
534
546
535
-
// Alert: alert.
547
+
// Alert: Structure representing an alert.
536
548
typeAlertstruct {
537
-
// Region: region to target. If none is passed will use default region from the config.
549
+
// Region: the region in which the alert is defined.
538
550
Region scw.Region`json:"region"`
539
551
552
+
// Preconfigured: indicates if the alert is preconfigured or custom.
540
553
Preconfiguredbool`json:"preconfigured"`
541
554
555
+
// Name: name of the alert.
542
556
Namestring`json:"name"`
543
557
558
+
// Rule: rule defining the alert condition.
544
559
Rulestring`json:"rule"`
545
560
561
+
// Duration: duration for which the alert must be active before firing. The format of this duration follows the prometheus duration format.
546
562
Durationstring`json:"duration"`
547
563
564
+
// Enabled: indicates if the alert is enabled or disabled. Only preconfigured alerts can be disabled.
548
565
Enabledbool`json:"enabled"`
549
566
550
-
// State: default value: unknown_state
567
+
// State: current state of the alert. Possible states are `inactive`, `pending`, and `firing`.
568
+
// Default value: unknown_state
551
569
State*AlertState`json:"state"`
552
570
571
+
// Annotations: annotations for the alert, used to provide additional information about the alert.
553
572
Annotationsmap[string]string`json:"annotations"`
573
+
574
+
// PreconfiguredData: contains additional data for preconfigured alerts, such as the rule ID, display name, and description. Only present if the alert is preconfigured.
// Region: region to target. If none is passed will use default region from the config.
@@ -1183,6 +1215,16 @@ type RegionalAPIEnableAlertManagerRequest struct {
1183
1215
ProjectIDstring`json:"project_id"`
1184
1216
}
1185
1217
1218
+
// RegionalAPIEnableAlertRulesRequest: regional api enable alert rules request.
1219
+
typeRegionalAPIEnableAlertRulesRequeststruct {
1220
+
// Region: region to target. If none is passed will use default region from the config.
1221
+
Region scw.Region`json:"-"`
1222
+
1223
+
ProjectIDstring`json:"project_id"`
1224
+
1225
+
RuleIDs []string`json:"rule_ids"`
1226
+
}
1227
+
1186
1228
// RegionalAPIEnableManagedAlertsRequest: Enable the sending of managed alerts.
1187
1229
typeRegionalAPIEnableManagedAlertsRequeststruct {
1188
1230
// Region: region to target. If none is passed will use default region from the config.
@@ -1249,7 +1291,7 @@ type RegionalAPIListAlertsRequest struct {
1249
1291
// IsPreconfigured: true returns only preconfigured alerts. False returns only custom alerts. If omitted, no filtering is applied on alert types. Other filters may still apply.
1250
1292
IsPreconfigured*bool`json:"-"`
1251
1293
1252
-
// State: valid values to filter on are `disabled`, `enabled`, `pending` and `firing`. If omitted, no filtering is applied on alert states. Other filters may still apply.
1294
+
// 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.
1253
1295
// Default value: unknown_state
1254
1296
State*AlertState`json:"-"`
1255
1297
}
@@ -2502,6 +2544,76 @@ func (s *RegionalAPI) DisableManagedAlerts(req *RegionalAPIDisableManagedAlertsR
2502
2544
return&resp, nil
2503
2545
}
2504
2546
2547
+
// EnableAlertRules: Enable preconfigured alert rules. Enable alert rules from the list of available preconfigured rules.
0 commit comments