Skip to main content

prefect deployment

Manage deployments.

prefect deployment inspect

View details about a deployment.

Arguments

NAME
string
required
[required]

Options

--output
Specify an output format. Currently supports: json
Example:$ prefect deployment inspect "hello-world/my-deployment"

prefect deployment ls

View all deployments or deployments for specific flows.

Options

--flow-name
--by-created
--output
Specify an output format. Currently supports: json

prefect deployment run

Create a flow run for the given flow and deployment.The flow run will be scheduled to run immediately unless --start-in or --start-at is specified. The flow run will not execute until a worker starts. To watch the flow run until it reaches a terminal state, use the --watch flag.

Arguments

NAME
string
A deployed flow’s name: <FLOW_NAME>/<DEPLOYMENT_NAME>

Options

--id
A deployment id to search for if no name is given
-jv
A key, value pair (key=value) specifying a flow run job variable. The value will be interpreted as JSON. May be passed multiple times to specify multiple job variable values.
-p
A key, value pair (key=value) specifying a flow parameter. The value will be interpreted as JSON. May be passed multiple times to specify multiple parameter values.
--params
A mapping of parameters to values. To use a stdin, pass ’-’. Any parameters passed with --param will take precedence over these values.
--start-in
A human-readable string specifying a time interval to wait before starting the flow run. E.g. ‘in 5 minutes’, ‘in 1 hour’, ‘in 2 days’.
--start-at
A human-readable string specifying a time to start the flow run. E.g. ‘at 5:30pm’, ‘at 2022-08-01 17:30’, ‘at 2022-08-01 17:30:00’.
--tag
Tag(s) to be applied to flow run.
--watch
Whether to poll the flow run until a terminal state is reached.
--watch-interval
How often to poll the flow run for state changes (in seconds).
--watch-timeout
Timeout for —watch.
--flow-run-name
Custom name to give the flow run.

prefect deployment delete

Delete a deployment.

Arguments

NAME
string
A deployed flow’s name: <FLOW_NAME>/<DEPLOYMENT_NAME>

Options

--id
A deployment id to search for if no name is given
--all
Delete all deployments
Example:

prefect deployment schedule

Manage deployment schedules.

prefect deployment schedule create

Create a schedule for a given deployment.

Arguments

NAME
string
required
[required]

Options

--interval
An interval to schedule on, specified in seconds
--anchor-date
The anchor date for an interval schedule
--rrule
Deployment schedule rrule string
--cron
Deployment schedule cron string
--day_or
Control how croniter handles day and day_of_week entries
--timezone
Deployment schedule timezone string e.g. ‘America/New_York’
--active
Whether the schedule is active. Defaults to True.
--replace
Replace the deployment’s current schedule(s) with this new schedule.
--accept-yes
Accept the confirmation prompt without prompting

prefect deployment schedule delete

Delete a deployment schedule.

Arguments

DEPLOYMENT_NAME
string
required
[required]
SCHEDULE_ID
string
required
[required]

Options

--accept-yes
Accept the confirmation prompt without prompting

prefect deployment schedule pause

Pause deployment schedules.

Arguments

DEPLOYMENT_NAME
string
SCHEDULE_ID
string

Options

--all
Pause all deployment schedules
Example:Pause a specific schedule: $ prefect deployment schedule pause my-flow/my-deployment abc123-…Pause all schedules: $ prefect deployment schedule pause —all

prefect deployment schedule resume

Resume deployment schedules.

Arguments

DEPLOYMENT_NAME
string
SCHEDULE_ID
string

Options

--all
Resume all deployment schedules
Example:Resume a specific schedule: $ prefect deployment schedule resume my-flow/my-deployment abc123-…Resume all schedules: $ prefect deployment schedule resume —all

prefect deployment schedule ls

View all schedules for a deployment.

Arguments

DEPLOYMENT_NAME
string
required
[required]

Options

--output
Specify an output format. Currently supports: json

prefect deployment schedule clear

Clear all schedules for a deployment.

Arguments

DEPLOYMENT_NAME
string
required
[required]

Options

--accept-yes
Accept the confirmation prompt without prompting