prefect.events.cli.automations

Command line interface for working with automations.

Functions

requires_automations

requires_automations(func: Callable[..., Any]) -> Callable[..., Any]

ls

ls()
List all automations.

inspect

inspect(name: Optional[str] = typer.Argument(None, help="An automation's name"), id: Optional[str] = typer.Option(None, '--id', help="An automation's id"), yaml: bool = typer.Option(False, '--yaml', help='Output as YAML'), json: bool = typer.Option(False, '--json', help='Output as JSON'), output: Optional[str] = typer.Option(None, '--output', '-o', help='Specify an output format. Currently supports: json, yaml'))
Inspect an automation. Arguments: name: the name of the automation to inspect id: the id of the automation to inspect yaml: output as YAML json: output as JSON Examples: $ prefect automation inspect "my-automation" $ prefect automation inspect --id "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" $ prefect automation inspect "my-automation" --yaml $ prefect automation inspect "my-automation" --output json $ prefect automation inspect "my-automation" --output yaml

resume

resume(name: Optional[str] = typer.Argument(None, help="An automation's name"), id: Optional[str] = typer.Option(None, '--id', help="An automation's id"))
Resume an automation. Arguments: name: the name of the automation to resume id: the id of the automation to resume Examples: $ prefect automation resume "my-automation" $ prefect automation resume --id "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"

pause

pause(name: Optional[str] = typer.Argument(None, help="An automation's name"), id: Optional[str] = typer.Option(None, '--id', help="An automation's id"))
Pause an automation. Arguments: name: the name of the automation to pause id: the id of the automation to pause Examples: $ prefect automation pause "my-automation" $ prefect automation pause --id "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"

delete

delete(name: Optional[str] = typer.Argument(None, help="An automation's name"), id: Optional[str] = typer.Option(None, '--id', help="An automation's id"))
Delete an automation. Args:
  • name: the name of the automation to delete
  • id: the id of the automation to delete
Examples: $ prefect automation delete "my-automation" $ prefect automation delete --id "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"

create

create(from_file: Optional[str] = typer.Option(None, '--from-file', '-f', help='Path to YAML or JSON file containing automation(s)'), from_json: Optional[str] = typer.Option(None, '--from-json', '-j', help='JSON string containing automation(s)'))
Create one or more automations from a file or JSON string. Examples: $ prefect automation create --from-file automation.yaml $ prefect automation create -f automation.json $ prefect automation create --from-json '{"name": "my-automation", "trigger": {...}, "actions": [...]}' $ prefect automation create -j '[{"name": "auto1", ...}, {"name": "auto2", ...}]'