---
title: actions
sidebarTitle: actions
---

# `prefect.client.schemas.actions`

## Classes

### `StateCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L64" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a new state.


### `FlowCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L76" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a flow.


### `FlowUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L91" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a flow.


### `DeploymentScheduleCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L101" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

**Methods:**

#### `from_schedule` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L139" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
from_schedule(cls, schedule: Schedule) -> 'DeploymentScheduleCreate'
```

#### `validate_active` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L123" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
validate_active(cls, v: Any, handler: Callable[[Any], Any]) -> bool
```

#### `validate_max_scheduled_runs` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L133" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
validate_max_scheduled_runs(cls, v: Optional[int]) -> Optional[int]
```

### `DeploymentScheduleUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L178" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

**Methods:**

#### `validate_max_scheduled_runs` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L201" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
validate_max_scheduled_runs(cls, v: Optional[int]) -> Optional[int]
```

### `DeploymentCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L207" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a deployment.


**Methods:**

#### `check_valid_configuration` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L287" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
check_valid_configuration(self, base_job_template: dict[str, Any]) -> None
```

Check that the combination of base_job_template defaults
and job_variables conforms to the specified schema.


#### `convert_to_strings` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L217" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
convert_to_strings(cls, values: Optional[Union[str, list[str]]]) -> Union[str, list[str]]
```

#### `remove_old_fields` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L212" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
remove_old_fields(cls, values: dict[str, Any]) -> dict[str, Any]
```

### `DeploymentUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L307" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a deployment.


**Methods:**

#### `check_valid_configuration` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L365" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
check_valid_configuration(self, base_job_template: dict[str, Any]) -> None
```

Check that the combination of base_job_template defaults
and job_variables conforms to the specified schema.


#### `remove_old_fields` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L312" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
remove_old_fields(cls, values: dict[str, Any]) -> dict[str, Any]
```

### `DeploymentBranch` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L386" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

**Methods:**

#### `validate_branch_length` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L399" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
validate_branch_length(cls, v: str) -> str
```

### `FlowRunUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L405" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a flow run.


### `TaskRunCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L419" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a task run


### `TaskRunUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L464" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a task run


### `FlowRunCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L470" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a flow run.


### `DeploymentFlowRunCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L502" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a flow run from a deployment.


**Methods:**

#### `convert_parameters_to_plain_data` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L533" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
convert_parameters_to_plain_data(cls, values: dict[str, Any]) -> dict[str, Any]
```

#### `serialize_parameters` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L547" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
serialize_parameters(self, value: dict[str, Any]) -> dict[str, Any]
```

Serialize datetime types as ISO strings instead of timestamps.

PrefectBaseModel has ser_json_timedelta='float' to serialize timedeltas as floats,
but this also causes datetime/date/time to serialize as timestamps. This serializer
overrides that behavior for datetime types while preserving float serialization for
timedeltas.


### `SavedSearchCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L568" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a saved search.


### `ConcurrencyLimitCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L577" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a concurrency limit.


### `ConcurrencyLimitV2Create` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L586" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a v2 concurrency limit.


### `ConcurrencyLimitV2Update` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L606" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a v2 concurrency limit.


### `BlockTypeCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L617" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a block type.


### `BlockTypeUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L638" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a block type.


**Methods:**

#### `updatable_fields` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L647" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
updatable_fields(cls) -> set[str]
```

### `BlockSchemaCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L651" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a block schema.


### `BlockDocumentCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L668" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a block document.


**Methods:**

#### `validate_name_is_present_if_not_anonymous` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L692" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
validate_name_is_present_if_not_anonymous(cls, values: dict[str, Any]) -> dict[str, Any]
```

### `BlockDocumentUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L698" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a block document.


### `BlockDocumentReferenceCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L713" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used to create block document reference.


### `LogCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L728" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a log.


**Methods:**

#### `model_dump` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L739" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
model_dump(self, *args: Any, **kwargs: Any) -> dict[str, Any]
```

The worker_id field is only included in logs sent to Prefect Cloud.
If it's unset, we should not include it in the log payload.


### `WorkPoolCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L750" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a work pool.


### `WorkPoolUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L777" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a work pool.


### `WorkQueueCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L790" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a work queue.


### `WorkQueueUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L819" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a work queue.


### `ArtifactCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L842" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create an artifact.


### `ArtifactUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L854" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update an artifact.


### `VariableCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L862" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a Variable.


### `VariableUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L874" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a Variable.


### `GlobalConcurrencyLimitCreate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L886" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to create a global concurrency limit.


### `GlobalConcurrencyLimitUpdate` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/client/schemas/actions.py#L913" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>


Data used by the Prefect REST API to update a global concurrency limit.

