client.build_notifications_config

To build notification configuration to be used while creating alert rules.

Input ParametersTypeDefaultDescription
emailsOptional[str]NoneComma separated emails list
pagerduty_servicesOptional[str]NoneComma separated pagerduty services list
pagerduty_severityOptional[str]NoneSeverity for the alerts triggered by pagerduty
webhooksOptional[List[str]]NoneComma separated valid uuids of webhooks available

📘

Info

The Fiddler client can be used to build notification configuration to be used while creating alert rules.


notifications_config = client.build_notifications_config(
    emails = "[email protected]",
)

notifications_config = client.build_notifications_config(
  emails = "[email protected],[email protected]",
  pagetduty_services = 'pd_service_1',
  pagerduty_severity = 'critical'
)

notifications_config = client.build_notifications_config(
    webhooks = ["894d76e8-2268-4c2e-b1c7-5561da6f84ae", "3814b0ac-b8fe-4509-afc9-ae86c176ef13"]
)
Return TypeDescription
Dict[str, Dict[str, Any]]:dict with emails and pagerduty dict. If left unused, will store empty string for these values

Example Response:

{'emails': {'email': '[email protected]'}, 'pagerduty': {'service': '', 'severity': ''}, 'webhooks': []}