API.create_alert_rule#

API.create_alert_rule(monitor_id: int, alert_rule: Dict[str, Any], raise_on_status: bool = True) Union[Response, Dict[str, Any]]#

Create alert rule.

Parameters
monitor_idint

The ID of the monitor

alert_ruledict

The alert rule to create

raise_on_statusbool

Whether to raise error on bad status code or not

Returns
Union[httpx.Response, dict]

The response from the server