To define an email alert policy in code, use the notification_service.email.email_addresses key to provide a list of recipient email addresses. For example:
# alert_policies.yamlalert_policies:-name:"email-alert-policy"description:"An alert policy to email company executives during job failure."tags:-key:"level"value:"critical"event_types:-"JOB_FAILURE"notification_service:email:email_addresses:-"richard.hendricks@hooli.com"-"nelson.bighetti@hooli.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