Skip to content

docs(cockpit): add documentation for enable/disable alert rules requests #1016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scaleway-async/scaleway_async/cockpit/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,8 @@ async def enable_alert_rules(
Enable preconfigured alert rules.
Enable alert rules from the list of available preconfigured rules.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id:
:param rule_ids:
:param project_id: ID of the Project.
:param rule_ids: List of IDs of the rules to enable. If empty, enables all preconfigured rules.
:return: :class:`EnableAlertRulesResponse <EnableAlertRulesResponse>`

Usage:
Expand Down Expand Up @@ -1612,8 +1612,8 @@ async def disable_alert_rules(
Disable preconfigured alert rules.
Disable alert rules from the list of available preconfigured rules.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id:
:param rule_ids:
:param project_id: ID of the Project.
:param rule_ids: List of IDs of the rules to enable. If empty, disables all preconfigured rules.
:return: :class:`DisableAlertRulesResponse <DisableAlertRulesResponse>`

Usage:
Expand Down
26 changes: 26 additions & 0 deletions scaleway-async/scaleway_async/cockpit/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,26 @@ class AlertManager:

@dataclass
class DisableAlertRulesResponse:
"""
Output returned when alert rules are disabled.
"""

disabled_rule_ids: List[str]
"""
Only newly disabled rules are listed. Rules that were already disabled are not returned in the output.
"""


@dataclass
class EnableAlertRulesResponse:
"""
Output returned when alert rules are enabled.
"""

enabled_rule_ids: List[str]
"""
Only newly enabled rules are listed. Rules that were already enabled are not returned in the output.
"""


@dataclass
Expand Down Expand Up @@ -1081,8 +1095,14 @@ class RegionalApiDisableAlertRulesRequest:
"""

project_id: Optional[str]
"""
ID of the Project.
"""

rule_ids: Optional[List[str]]
"""
List of IDs of the rules to enable. If empty, disables all preconfigured rules.
"""


@dataclass
Expand Down Expand Up @@ -1127,8 +1147,14 @@ class RegionalApiEnableAlertRulesRequest:
"""

project_id: Optional[str]
"""
ID of the Project.
"""

rule_ids: Optional[List[str]]
"""
List of IDs of the rules to enable. If empty, enables all preconfigured rules.
"""


@dataclass
Expand Down
8 changes: 4 additions & 4 deletions scaleway/scaleway/cockpit/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,8 @@ def enable_alert_rules(
Enable preconfigured alert rules.
Enable alert rules from the list of available preconfigured rules.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id:
:param rule_ids:
:param project_id: ID of the Project.
:param rule_ids: List of IDs of the rules to enable. If empty, enables all preconfigured rules.
:return: :class:`EnableAlertRulesResponse <EnableAlertRulesResponse>`

Usage:
Expand Down Expand Up @@ -1612,8 +1612,8 @@ def disable_alert_rules(
Disable preconfigured alert rules.
Disable alert rules from the list of available preconfigured rules.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id:
:param rule_ids:
:param project_id: ID of the Project.
:param rule_ids: List of IDs of the rules to enable. If empty, disables all preconfigured rules.
:return: :class:`DisableAlertRulesResponse <DisableAlertRulesResponse>`

Usage:
Expand Down
26 changes: 26 additions & 0 deletions scaleway/scaleway/cockpit/v1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,12 +540,26 @@ class AlertManager:

@dataclass
class DisableAlertRulesResponse:
"""
Output returned when alert rules are disabled.
"""

disabled_rule_ids: List[str]
"""
Only newly disabled rules are listed. Rules that were already disabled are not returned in the output.
"""


@dataclass
class EnableAlertRulesResponse:
"""
Output returned when alert rules are enabled.
"""

enabled_rule_ids: List[str]
"""
Only newly enabled rules are listed. Rules that were already enabled are not returned in the output.
"""


@dataclass
Expand Down Expand Up @@ -1081,8 +1095,14 @@ class RegionalApiDisableAlertRulesRequest:
"""

project_id: Optional[str]
"""
ID of the Project.
"""

rule_ids: Optional[List[str]]
"""
List of IDs of the rules to enable. If empty, disables all preconfigured rules.
"""


@dataclass
Expand Down Expand Up @@ -1127,8 +1147,14 @@ class RegionalApiEnableAlertRulesRequest:
"""

project_id: Optional[str]
"""
ID of the Project.
"""

rule_ids: Optional[List[str]]
"""
List of IDs of the rules to enable. If empty, enables all preconfigured rules.
"""


@dataclass
Expand Down