This message was deleted.
# ask-marvin
s
This message was deleted.
m
Your message was too long, here's your message at the allowed limit: I'm trying to create automations programmatically Specifically one that emails a group of people when failures happen in deployments/flows with a specific combination of tags I've created an example automation in Prefect Cloud using the send-email-notification action I'm trying to look at the definition from the CLI (via prefect automations ls but am getting validation errors (data-exception-report-subscriptions) PS D \source\data_exception_report_subscriptions> prefect automation ls Traceback (most recent call last) File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\prefect\cli\_utilities py line 37 in async_wrapper return await fn(*args **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\prefect\cli\automation py line 40 in ls automations = await client read_automations() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\prefect\client\orchestration\_automations\client py line 204 in read_automations return Automation model_validate_list(response json()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\prefect\_internal\schemas\bases py line 64 in model_validate_list return validate_list(cls obj) ^^^^^^^^^^^^^^^^^^^^^^^ File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\prefect\utilities\generics py line 18 in validate_list return [model model_validate(item) for item in ListValidator validate_python(input)] ^^^^^^^^^^^^^^^^^^^^^^^^^^ File D \source\data_exception_report_subscriptions\ venv\Lib\site-packages\pydantic\main py line 627 in model_validate return cls __pydantic_validator__ validate_python( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core _pydantic_core ValidationError 18 validation errors for Automation actions 0 DoNothing type Input should be 'do-nothing' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_deployment_requires_id() RunDeployment] type Input should be 'run-deployment' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_deployment_requires_id() PauseDeployment] type Input should be 'pause-deployment' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_deployment_requires_id() ResumeDeployment] type Input should be 'resume-deployment' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 ResumeFlowRun type Input should be 'resume-flow-run' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 CancelFlowRun type Input should be 'cancel-flow-run' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 ChangeFlowRunState type Input should be 'change-flow-run-state' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 ChangeFlowRunState state Field required [type=missing input_value={'type' '<mailto send-email-noti banman@affinitycu ca|send-email-noti banman@affinitycu ca>']} input_type=dict] For further information visit <https //errors pydantic dev/2 10/v/missing> actions 0 function-after[selected_work_queue_requires_id() PauseWorkQueue] type Input sho
uld be 'pause-work-queue' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_work_queue_requires_id() ResumeWorkQueue] type Input should be 'resume-work-queue' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 SendNotification type Input should be 'send-notification' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 CallWebhook type Input should be 'call-webhook' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_automation_requires_id() PauseAutomation] type Input should be 'pause-automation' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 function-after[selected_automation_requires_id() ResumeAutomation] type Input should be 'resume-automation' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 SuspendFlowRun type Input should be 'suspend-flow-run' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 PauseWorkPool type Input should be 'pause-work-pool' [type=literal_error input_value='send-email-notification' input_type=str] For further information visit <https //errors pydantic dev/2 10/v/literal_error> actions 0 ResumeWorkPool type Input