Skip to content

Commit d42ad34

Browse files
authored
docs(cockpit): add documentation for enable/disable alert rules requests (scaleway#2586)
1 parent e390359 commit d42ad34

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

api/cockpit/v1/cockpit_sdk.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,13 +769,15 @@ type AlertManager struct {
769769
Region scw.Region `json:"region"`
770770
}
771771

772-
// DisableAlertRulesResponse: disable alert rules response.
772+
// DisableAlertRulesResponse: Output returned when alert rules are disabled.
773773
type DisableAlertRulesResponse struct {
774+
// DisabledRuleIDs: only newly disabled rules are listed. Rules that were already disabled are not returned in the output.
774775
DisabledRuleIDs []string `json:"disabled_rule_ids"`
775776
}
776777

777-
// EnableAlertRulesResponse: enable alert rules response.
778+
// EnableAlertRulesResponse: Output returned when alert rules are enabled.
778779
type EnableAlertRulesResponse struct {
780+
// EnabledRuleIDs: only newly enabled rules are listed. Rules that were already enabled are not returned in the output.
779781
EnabledRuleIDs []string `json:"enabled_rule_ids"`
780782
}
781783

@@ -1211,8 +1213,10 @@ type RegionalAPIDisableAlertRulesRequest struct {
12111213
// Region: region to target. If none is passed will use default region from the config.
12121214
Region scw.Region `json:"-"`
12131215

1216+
// ProjectID: ID of the Project.
12141217
ProjectID string `json:"project_id"`
12151218

1219+
// RuleIDs: list of IDs of the rules to enable. If empty, disables all preconfigured rules.
12161220
RuleIDs []string `json:"rule_ids"`
12171221
}
12181222

@@ -1239,8 +1243,10 @@ type RegionalAPIEnableAlertRulesRequest struct {
12391243
// Region: region to target. If none is passed will use default region from the config.
12401244
Region scw.Region `json:"-"`
12411245

1246+
// ProjectID: ID of the Project.
12421247
ProjectID string `json:"project_id"`
12431248

1249+
// RuleIDs: list of IDs of the rules to enable. If empty, enables all preconfigured rules.
12441250
RuleIDs []string `json:"rule_ids"`
12451251
}
12461252

0 commit comments

Comments
 (0)