> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

#  

# `prefect deployment`

```command theme={null}
prefect deployment [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> Manage deployments.

## `prefect deployment schedule`

```command theme={null}
prefect deployment schedule [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> Manage deployment schedules.

### `prefect deployment schedule create`

```command theme={null}
prefect deployment schedule create [OPTIONS] NAME
```

> [!NOTE]
>
> Create a schedule for a given deployment.

> **Arguments**
>
> **NAME** `string` *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`

```command theme={null}
prefect deployment schedule delete [OPTIONS] DEPLOYMENT_NAME SCHEDULE_ID
```

> [!NOTE]
>
> Delete a deployment schedule.

> **Arguments**
>
> **DEPLOYMENT\_NAME** `string` *required*
>
> **SCHEDULE\_ID** `string` *required*

> **Options**
>
> **--accept-yes**
>
> Accept the confirmation prompt without prompting

### `prefect deployment schedule pause`

```command theme={null}
prefect deployment schedule pause [OPTIONS] [DEPLOYMENT_NAME] [SCHEDULE_ID]
```

> [!NOTE]
>
> Pause deployment schedules.

> **Arguments**
>
> **DEPLOYMENT\_NAME** `string`
>
> **SCHEDULE\_ID** `string`

> **Options**
>
> **--all**
>
> Pause all deployment schedules

> [!NOTE]
>
> **Example:**
>
> ```bash theme={null}
> # 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`

```command theme={null}
prefect deployment schedule resume [OPTIONS] [DEPLOYMENT_NAME] [SCHEDULE_ID]
```

> [!NOTE]
>
> Resume deployment schedules.

> **Arguments**
>
> **DEPLOYMENT\_NAME** `string`
>
> **SCHEDULE\_ID** `string`

> **Options**
>
> **--all**
>
> Resume all deployment schedules

> [!NOTE]
>
> **Example:**
>
> ```bash theme={null}
> # 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`

```command theme={null}
prefect deployment schedule ls [OPTIONS] DEPLOYMENT_NAME
```

> [!NOTE]
>
> View all schedules for a deployment.

> **Arguments**
>
> **DEPLOYMENT\_NAME** `string` *required*

> **Options**
>
> **--output**
>
> Specify an output format. Currently supports: json

### `prefect deployment schedule clear`

```command theme={null}
prefect deployment schedule clear [OPTIONS] DEPLOYMENT_NAME
```

> [!NOTE]
>
> Clear all schedules for a deployment.

> **Arguments**
>
> **DEPLOYMENT\_NAME** `string` *required*

> **Options**
>
> **--accept-yes**
>
> Accept the confirmation prompt without prompting

## `prefect deployment inspect`

```command theme={null}
prefect deployment inspect [OPTIONS] NAME
```

> [!NOTE]
>
> View details about a deployment.

> **Arguments**
>
> **NAME** `string` *required*

> **Options**
>
> **--output**
>
> Specify an output format. Currently supports: json

> [!NOTE]
>
> **Example:**
>
> `$ prefect deployment inspect "hello-world/my-deployment"`
>
> ```python theme={null}
> {
>     'id': '610df9c3-0fb4-4856-b330-67f588d20201',
>     'created': '2022-08-01T18:36:25.192102+00:00',
>     'updated': '2022-08-01T18:36:25.188166+00:00',
>     'name': 'my-deployment',
>     'description': None,
>     'flow_id': 'b57b0aa2-ef3a-479e-be49-381fb0483b4e',
>     'schedules': None,
>     'parameters': {'name': 'Marvin'},
>     'tags': ['test'],
>     'parameter_openapi_schema': {
>         'title': 'Parameters',
>         'type': 'object',
>         'properties': {
>             'name': {
>                 'title': 'name',
>                 'type': 'string'
>             }
>         },
>         'required': ['name']
>     },
>     'storage_document_id': '63ef008f-1e5d-4e07-a0d4-4535731adb32',
>     'infrastructure_document_id': '6702c598-7094-42c8-9785-338d2ec3a028',
>     'infrastructure': {
>         'type': 'process',
>         'env': {},
>         'labels': {},
>         'name': None,
>         'command': ['python', '-m', 'prefect.engine'],
>         'stream_output': True
>     }
> }
> ```

## `prefect deployment ls`

```command theme={null}
prefect deployment ls [OPTIONS] [FLOW_NAME]
```

> [!NOTE]
>
> View all deployments or deployments for specific flows.

> **Arguments**
>
> **FLOW\_NAME** `string`
>
> One or more flow names to filter deployments by.

> **Options**
>
> **--by-created**
>
> Sort by created time instead of name.
>
> **--output**
>
> Specify an output format. Currently supports: json

## `prefect deployment run`

```command theme={null}
prefect deployment run [OPTIONS] [NAME]
```

> [!NOTE]
>
> 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
>
> **--job-variable**
>
> 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.
>
> **--param**
>
> 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`

```command theme={null}
prefect deployment delete [OPTIONS] [NAME]
```

> [!NOTE]
>
> 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

> [!NOTE]
>
> **Example:**
>
> ```bash theme={null}
> $ prefect deployment delete test_flow/test_deployment
> $ prefect deployment delete --id dfd3e220-a130-4149-9af6-8d487e02fea6
> ```
