Skip to content

Commit bc06854

Browse files
authored
docs(cockpit): add documentation for enable/disable alert rules requests (#1016)
1 parent f828f03 commit bc06854

File tree

4 files changed

+60
-8
lines changed

4 files changed

+60
-8
lines changed

scaleway-async/scaleway_async/cockpit/v1/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,8 @@ async def enable_alert_rules(
15711571
Enable preconfigured alert rules.
15721572
Enable alert rules from the list of available preconfigured rules.
15731573
:param region: Region to target. If none is passed will use default region from the config.
1574-
:param project_id:
1575-
:param rule_ids:
1574+
:param project_id: ID of the Project.
1575+
:param rule_ids: List of IDs of the rules to enable. If empty, enables all preconfigured rules.
15761576
:return: :class:`EnableAlertRulesResponse <EnableAlertRulesResponse>`
15771577
15781578
Usage:
@@ -1612,8 +1612,8 @@ async def disable_alert_rules(
16121612
Disable preconfigured alert rules.
16131613
Disable alert rules from the list of available preconfigured rules.
16141614
:param region: Region to target. If none is passed will use default region from the config.
1615-
:param project_id:
1616-
:param rule_ids:
1615+
:param project_id: ID of the Project.
1616+
:param rule_ids: List of IDs of the rules to enable. If empty, disables all preconfigured rules.
16171617
:return: :class:`DisableAlertRulesResponse <DisableAlertRulesResponse>`
16181618
16191619
Usage:

scaleway-async/scaleway_async/cockpit/v1/types.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,26 @@ class AlertManager:
540540

541541
@dataclass
542542
class DisableAlertRulesResponse:
543+
"""
544+
Output returned when alert rules are disabled.
545+
"""
546+
543547
disabled_rule_ids: List[str]
548+
"""
549+
Only newly disabled rules are listed. Rules that were already disabled are not returned in the output.
550+
"""
544551

545552

546553
@dataclass
547554
class EnableAlertRulesResponse:
555+
"""
556+
Output returned when alert rules are enabled.
557+
"""
558+
548559
enabled_rule_ids: List[str]
560+
"""
561+
Only newly enabled rules are listed. Rules that were already enabled are not returned in the output.
562+
"""
549563

550564

551565
@dataclass
@@ -1081,8 +1095,14 @@ class RegionalApiDisableAlertRulesRequest:
10811095
"""
10821096

10831097
project_id: Optional[str]
1098+
"""
1099+
ID of the Project.
1100+
"""
10841101

10851102
rule_ids: Optional[List[str]]
1103+
"""
1104+
List of IDs of the rules to enable. If empty, disables all preconfigured rules.
1105+
"""
10861106

10871107

10881108
@dataclass
@@ -1127,8 +1147,14 @@ class RegionalApiEnableAlertRulesRequest:
11271147
"""
11281148

11291149
project_id: Optional[str]
1150+
"""
1151+
ID of the Project.
1152+
"""
11301153

11311154
rule_ids: Optional[List[str]]
1155+
"""
1156+
List of IDs of the rules to enable. If empty, enables all preconfigured rules.
1157+
"""
11321158

11331159

11341160
@dataclass

scaleway/scaleway/cockpit/v1/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,8 +1571,8 @@ def enable_alert_rules(
15711571
Enable preconfigured alert rules.
15721572
Enable alert rules from the list of available preconfigured rules.
15731573
:param region: Region to target. If none is passed will use default region from the config.
1574-
:param project_id:
1575-
:param rule_ids:
1574+
:param project_id: ID of the Project.
1575+
:param rule_ids: List of IDs of the rules to enable. If empty, enables all preconfigured rules.
15761576
:return: :class:`EnableAlertRulesResponse <EnableAlertRulesResponse>`
15771577
15781578
Usage:
@@ -1612,8 +1612,8 @@ def disable_alert_rules(
16121612
Disable preconfigured alert rules.
16131613
Disable alert rules from the list of available preconfigured rules.
16141614
:param region: Region to target. If none is passed will use default region from the config.
1615-
:param project_id:
1616-
:param rule_ids:
1615+
:param project_id: ID of the Project.
1616+
:param rule_ids: List of IDs of the rules to enable. If empty, disables all preconfigured rules.
16171617
:return: :class:`DisableAlertRulesResponse <DisableAlertRulesResponse>`
16181618
16191619
Usage:

scaleway/scaleway/cockpit/v1/types.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,12 +540,26 @@ class AlertManager:
540540

541541
@dataclass
542542
class DisableAlertRulesResponse:
543+
"""
544+
Output returned when alert rules are disabled.
545+
"""
546+
543547
disabled_rule_ids: List[str]
548+
"""
549+
Only newly disabled rules are listed. Rules that were already disabled are not returned in the output.
550+
"""
544551

545552

546553
@dataclass
547554
class EnableAlertRulesResponse:
555+
"""
556+
Output returned when alert rules are enabled.
557+
"""
558+
548559
enabled_rule_ids: List[str]
560+
"""
561+
Only newly enabled rules are listed. Rules that were already enabled are not returned in the output.
562+
"""
549563

550564

551565
@dataclass
@@ -1081,8 +1095,14 @@ class RegionalApiDisableAlertRulesRequest:
10811095
"""
10821096

10831097
project_id: Optional[str]
1098+
"""
1099+
ID of the Project.
1100+
"""
10841101

10851102
rule_ids: Optional[List[str]]
1103+
"""
1104+
List of IDs of the rules to enable. If empty, disables all preconfigured rules.
1105+
"""
10861106

10871107

10881108
@dataclass
@@ -1127,8 +1147,14 @@ class RegionalApiEnableAlertRulesRequest:
11271147
"""
11281148

11291149
project_id: Optional[str]
1150+
"""
1151+
ID of the Project.
1152+
"""
11301153

11311154
rule_ids: Optional[List[str]]
1155+
"""
1156+
List of IDs of the rules to enable. If empty, enables all preconfigured rules.
1157+
"""
11321158

11331159

11341160
@dataclass

0 commit comments

Comments
 (0)