To define a Microsoft Teams alert policy in code, use the notification_service.microsoft_teams.webhook_url key to provide the webhook URL. For example:
# alert_policies.yamlalert_policies:-name:"ms-teams-alert-policy"description:"An alert policy to send a Microsoft Teams webhook during job failure."tags:-key:"level"value:"critical"event_types:-"AGENT_UNAVAILABLE"notification_service:microsoft_teams:webhook_url:"https://yourdomain.webhook.office.com/..."
Then, use the dagster-cloud CLI to set the alert policies for the deployment:
dagster-cloud deployment alert-policies sync -a /path/to/alert_policies.yaml