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

# actions

# `prefect.input.actions`

## Functions

### `ensure_flow_run_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L20](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L20)</sup>

```python theme={null}
ensure_flow_run_id(flow_run_id: Optional[UUID] = None) -> UUID
```

### `acreate_flow_run_input_from_model` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L31](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L31)</sup>

```python theme={null}
acreate_flow_run_input_from_model(key: str, model_instance: pydantic.BaseModel, flow_run_id: Optional[UUID] = None, sender: Optional[str] = None) -> None
```

Create a new flow run input from a Pydantic model asynchronously.

**Args:**

* `key`: the flow run input key
* `model_instance`: a Pydantic model instance to store
* `flow_run_id`: the flow run ID (defaults to current context)
* `sender`: optional sender identifier

### `create_flow_run_input_from_model` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L62](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L62)</sup>

```python theme={null}
create_flow_run_input_from_model(key: str, model_instance: pydantic.BaseModel, flow_run_id: Optional[UUID] = None, sender: Optional[str] = None) -> None
```

Create a new flow run input from a Pydantic model.

**Args:**

* `key`: the flow run input key
* `model_instance`: a Pydantic model instance to store
* `flow_run_id`: the flow run ID (defaults to current context)
* `sender`: optional sender identifier

### `acreate_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L93](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L93)</sup>

```python theme={null}
acreate_flow_run_input(client: 'PrefectClient', key: str, value: Any, flow_run_id: Optional[UUID] = None, sender: Optional[str] = None) -> None
```

Create a new flow run input asynchronously.

The given `value` will be serialized to JSON and stored as a flow run input value.

**Args:**

* `key`: the flow run input key
* `value`: the flow run input value
* `flow_run_id`: the flow run ID (defaults to current context)
* `sender`: optional sender identifier

### `create_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L122](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L122)</sup>

```python theme={null}
create_flow_run_input(key: str, value: Any, flow_run_id: Optional[UUID] = None, sender: Optional[str] = None) -> None
```

Create a new flow run input.

The given `value` will be serialized to JSON and stored as a flow run input value.

**Args:**

* `key`: the flow run input key
* `value`: the flow run input value
* `flow_run_id`: the flow run ID (defaults to current context)
* `sender`: optional sender identifier

### `afilter_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L151](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L151)</sup>

```python theme={null}
afilter_flow_run_input(client: 'PrefectClient', key_prefix: str, limit: int = 1, exclude_keys: Optional[Set[str]] = None, flow_run_id: Optional[UUID] = None) -> 'list[FlowRunInput]'
```

Filter flow run inputs by key prefix asynchronously.

**Args:**

* `key_prefix`: prefix to filter keys by
* `limit`: maximum number of results to return
* `exclude_keys`: keys to exclude from results
* `flow_run_id`: the flow run ID (defaults to current context)

**Returns:**

* List of matching FlowRunInput objects

### `filter_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L184](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L184)</sup>

```python theme={null}
filter_flow_run_input(key_prefix: str, limit: int = 1, exclude_keys: Optional[Set[str]] = None, flow_run_id: Optional[UUID] = None) -> 'list[FlowRunInput]'
```

Filter flow run inputs by key prefix.

**Args:**

* `key_prefix`: prefix to filter keys by
* `limit`: maximum number of results to return
* `exclude_keys`: keys to exclude from results
* `flow_run_id`: the flow run ID (defaults to current context)

**Returns:**

* List of matching FlowRunInput objects

### `aread_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L217](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L217)</sup>

```python theme={null}
aread_flow_run_input(client: 'PrefectClient', key: str, flow_run_id: Optional[UUID] = None) -> Any
```

Read a flow run input asynchronously.

**Args:**

* `key`: the flow run input key
* `flow_run_id`: the flow run ID (defaults to current context)

**Returns:**

* The deserialized input value, or None if not found

### `read_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L243](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L243)</sup>

```python theme={null}
read_flow_run_input(key: str, flow_run_id: Optional[UUID] = None) -> Any
```

Read a flow run input.

**Args:**

* `key`: the flow run input key
* `flow_run_id`: the flow run ID (defaults to current context)

**Returns:**

* The deserialized input value, or None if not found

### `adelete_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L268](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L268)</sup>

```python theme={null}
adelete_flow_run_input(client: 'PrefectClient', key: str, flow_run_id: Optional[UUID] = None) -> None
```

Delete a flow run input asynchronously.

**Args:**

* `key`: the flow run input key
* `flow_run_id`: the flow run ID (defaults to current context)

### `delete_flow_run_input` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L284](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/input/actions.py#L284)</sup>

```python theme={null}
delete_flow_run_input(key: str, flow_run_id: Optional[UUID] = None) -> None
```

Delete a flow run input.

**Args:**

* `key`: the flow run input key
* `flow_run_id`: the flow run ID (defaults to current context)
