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

# actions

# `prefect.server.events.actions`

The actions consumer watches for actions that have been triggered by Automations
and carries them out.  Also includes the various concrete subtypes of Actions

## Functions

### `record_action_happening` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1847](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1847)</sup>

```python theme={null}
record_action_happening(id: UUID) -> None
```

Record that an action has happened, with an expiration of an hour.

### `action_has_already_happened` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1852](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1852)</sup>

```python theme={null}
action_has_already_happened(id: UUID) -> bool
```

Check if the action has already happened

### `consumer` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1858](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1858)</sup>

```python theme={null}
consumer() -> AsyncGenerator[MessageHandler, None]
```

## Classes

### `ActionFailed` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L109](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L109)</sup>

### `Action` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L114)</sup>

An Action that may be performed when an Automation is triggered

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L127](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L127)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

Perform the requested Action

#### `fail` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L130](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L130)</sup>

```python theme={null}
fail(self, triggered_action: 'TriggeredAction', reason: str) -> None
```

#### `logging_context` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L313](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L313)</sup>

```python theme={null}
logging_context(self, triggered_action: 'TriggeredAction') -> Dict[str, Any]
```

Common logging context for all actions

#### `model_validate_list` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L56)</sup>

```python theme={null}
model_validate_list(cls, obj: Any) -> list[Self]
```

#### `reset_fields` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/\_internal/schemas/bases.py#L85](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/_internal/schemas/bases.py#L85)</sup>

```python theme={null}
reset_fields(self: Self) -> Self
```

Reset the fields of the model that are in the `_reset_fields` set.

**Returns:**

* A new instance of the model with the reset fields.

#### `succeed` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L225](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L225)</sup>

```python theme={null}
succeed(self, triggered_action: 'TriggeredAction') -> None
```

### `DoNothing` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L330](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L330)</sup>

Do nothing when an Automation is triggered

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L335](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L335)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

### `EmitEventAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L342](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L342)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L343](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L343)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `create_event` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L352](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L352)</sup>

```python theme={null}
create_event(self, triggered_action: 'TriggeredAction') -> 'Event'
```

Create an event from the TriggeredAction

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

### `ExternalDataAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L356](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L356)</sup>

Base class for Actions that require data from an external source such as
the Orchestration API

**Methods:**

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

### `JinjaTemplateAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L450](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L450)</sup>

Base class for Actions that use Jinja templates supplied by the user and
are rendered with a context containing data from the triggered action,
and the orchestration API.

**Methods:**

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `instantiate_object` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501)</sup>

```python theme={null}
instantiate_object(self, model: Type[PrefectBaseModel], data: Dict[str, Any], triggered_action: 'TriggeredAction', resource: Optional['Resource'] = None) -> PrefectBaseModel
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

#### `templates_in_dictionary` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480)</sup>

```python theme={null}
templates_in_dictionary(cls, dict_: dict[Any, Any | dict[Any, Any]]) -> list[tuple[dict[Any, Any], dict[Any, str]]]
```

#### `validate_template` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469)</sup>

```python theme={null}
validate_template(cls, template: str, field_name: str) -> str
```

### `DeploymentAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L700](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L700)</sup>

Base class for Actions that operate on Deployments and need to infer them from
events

**Methods:**

#### `deployment_id_to_use` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L729](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L729)</sup>

```python theme={null}
deployment_id_to_use(self, triggered_action: 'TriggeredAction') -> UUID
```

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

#### `selected_deployment_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L719](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L719)</sup>

```python theme={null}
selected_deployment_requires_id(self) -> Self
```

### `DeploymentCommandAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L745](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L745)</sup>

Executes a command against a matching deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Execute the deployment command

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

#### `selected_deployment_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L56](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L56)</sup>

```python theme={null}
selected_deployment_requires_id(self)
```

### `RunDeployment` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L789](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L789)</sup>

Runs the given deployment with the given parameters

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L818](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L818)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Execute the deployment command

#### `instantiate_object` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501)</sup>

```python theme={null}
instantiate_object(self, model: Type[PrefectBaseModel], data: Dict[str, Any], triggered_action: 'TriggeredAction', resource: Optional['Resource'] = None) -> PrefectBaseModel
```

#### `render_parameters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L932](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L932)</sup>

```python theme={null}
render_parameters(self, triggered_action: 'TriggeredAction') -> Dict[str, Any]
```

#### `templates_in_dictionary` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480)</sup>

```python theme={null}
templates_in_dictionary(cls, dict_: dict[Any, Any | dict[Any, Any]]) -> list[tuple[dict[Any, Any], dict[Any, str]]]
```

#### `validate_parameters` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L875](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L875)</sup>

```python theme={null}
validate_parameters(cls, value: dict[str, Any] | None) -> dict[str, Any] | None
```

#### `validate_template` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469)</sup>

```python theme={null}
validate_template(cls, template: str, field_name: str) -> str
```

### `PauseDeployment` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1056](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1056)</sup>

Pauses the given Deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1063](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1063)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Execute the deployment command

### `ResumeDeployment` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1072](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1072)</sup>

Resumes the given Deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L750)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1079](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1079)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', deployment_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Execute the deployment command

### `FlowRunAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1088](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1088)</sup>

An action that operates on a flow run

**Methods:**

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `flow_run` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091)</sup>

```python theme={null}
flow_run(self, triggered_action: 'TriggeredAction') -> UUID
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

### `FlowRunStateChangeAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1107](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1107)</sup>

Changes the state of a flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `flow_run` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091)</sup>

```python theme={null}
flow_run(self, triggered_action: 'TriggeredAction') -> UUID
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

Return the new state for the flow run

### `ChangeFlowRunState` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1150](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1150)</sup>

Changes the state of a flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1172](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1172)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

Return the new state for the flow run

### `CancelFlowRun` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1185](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1185)</sup>

Cancels a flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1190](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1190)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

Return the new state for the flow run

### `DeleteFlowRun` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1197](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1197)</sup>

Deletes a flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1202](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1202)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `flow_run` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091)</sup>

```python theme={null}
flow_run(self, triggered_action: 'TriggeredAction') -> UUID
```

### `SuspendFlowRun` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1230](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1230)</sup>

Suspends a flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1235](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1235)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

#### `new_state` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1111)</sup>

```python theme={null}
new_state(self, triggered_action: 'TriggeredAction') -> StateCreate
```

Return the new state for the flow run

### `ResumeFlowRun` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1249](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1249)</sup>

Resumes a paused or suspended flow run associated with the trigger

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1254](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1254)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `flow_run` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091)</sup>

```python theme={null}
flow_run(self, triggered_action: 'TriggeredAction') -> UUID
```

### `CallWebhook` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1283](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1283)</sup>

Call a webhook when an Automation is triggered.

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1360)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `ensure_payload_is_a_string` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1297](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1297)</sup>

```python theme={null}
ensure_payload_is_a_string(cls, value: Union[str, Dict[str, Any], None]) -> Optional[str]
```

Temporary measure while we migrate payloads from being a dictionary to
a string template.  This covers both reading from the database where values
may currently be a dictionary, as well as the API, where older versions of the
frontend may be sending a JSON object with the single `"message"` key.

#### `instantiate_object` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501)</sup>

```python theme={null}
instantiate_object(self, model: Type[PrefectBaseModel], data: Dict[str, Any], triggered_action: 'TriggeredAction', resource: Optional['Resource'] = None) -> PrefectBaseModel
```

#### `templates_in_dictionary` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480)</sup>

```python theme={null}
templates_in_dictionary(cls, dict_: dict[Any, Any | dict[Any, Any]]) -> list[tuple[dict[Any, Any], dict[Any, str]]]
```

#### `validate_payload_templates` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1314](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1314)</sup>

```python theme={null}
validate_payload_templates(cls, value: Optional[str]) -> Optional[str]
```

Validate user-provided payload template.

#### `validate_template` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469)</sup>

```python theme={null}
validate_template(cls, template: str, field_name: str) -> str
```

### `SendNotification` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1383](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1383)</sup>

Send a notification when an Automation is triggered

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1434](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1434)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `instantiate_object` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L501)</sup>

```python theme={null}
instantiate_object(self, model: Type[PrefectBaseModel], data: Dict[str, Any], triggered_action: 'TriggeredAction', resource: Optional['Resource'] = None) -> PrefectBaseModel
```

#### `is_valid_template` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1394](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1394)</sup>

```python theme={null}
is_valid_template(cls, value: str, info: ValidationInfo) -> str
```

#### `render` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1446](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1446)</sup>

```python theme={null}
render(self, triggered_action: 'TriggeredAction') -> List[str]
```

#### `templates_in_dictionary` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L480)</sup>

```python theme={null}
templates_in_dictionary(cls, dict_: dict[Any, Any | dict[Any, Any]]) -> list[tuple[dict[Any, Any], dict[Any, str]]]
```

#### `validate_template` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L469)</sup>

```python theme={null}
validate_template(cls, template: str, field_name: str) -> str
```

### `WorkPoolAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1450](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1450)</sup>

Base class for Actions that operate on Work Pools and need to infer them from
events

**Methods:**

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

#### `selected_work_pool_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1470](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1470)</sup>

```python theme={null}
selected_work_pool_requires_id(self) -> Self
```

#### `work_pool_id_to_use` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1479](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1479)</sup>

```python theme={null}
work_pool_id_to_use(self, triggered_action: 'TriggeredAction') -> UUID
```

### `WorkPoolCommandAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1495](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1495)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_pool: WorkPool, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Pool

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

#### `target_work_pool` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500)</sup>

```python theme={null}
target_work_pool(self, triggered_action: 'TriggeredAction') -> WorkPool
```

### `PauseWorkPool` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1552](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1552)</sup>

Pauses a Work Pool

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1559](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1559)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_pool: WorkPool, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_pool: WorkPool, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Pool

#### `target_work_pool` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500)</sup>

```python theme={null}
target_work_pool(self, triggered_action: 'TriggeredAction') -> WorkPool
```

### `ResumeWorkPool` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1568](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1568)</sup>

Resumes a Work Pool

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1575](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1575)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_pool: WorkPool, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1543)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_pool: WorkPool, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Pool

#### `target_work_pool` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1500)</sup>

```python theme={null}
target_work_pool(self, triggered_action: 'TriggeredAction') -> WorkPool
```

### `WorkQueueAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1584](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1584)</sup>

Base class for Actions that operate on Work Queues and need to infer them from
events

**Methods:**

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

#### `selected_work_queue_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1603](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1603)</sup>

```python theme={null}
selected_work_queue_requires_id(self) -> Self
```

#### `work_queue_id_to_use` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1613](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1613)</sup>

```python theme={null}
work_queue_id_to_use(self, triggered_action: 'TriggeredAction') -> UUID
```

### `WorkQueueCommandAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1629](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1629)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_queue_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

#### `selected_work_queue_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L229](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L229)</sup>

```python theme={null}
selected_work_queue_requires_id(self) -> Self
```

### `PauseWorkQueue` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1671](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1671)</sup>

Pauses a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1678](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1678)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_queue_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_queue_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue

### `ResumeWorkQueue` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1687](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1687)</sup>

Resumes a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1632)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1694](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1694)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_queue_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1662)</sup>

```python theme={null}
command(self, orchestration: 'OrchestrationClient', work_queue_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue

### `AutomationAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1703](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1703)</sup>

Base class for Actions that operate on Automations and need to infer them from
events

**Methods:**

#### `automation_id_to_use` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1732](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1732)</sup>

```python theme={null}
automation_id_to_use(self, triggered_action: 'TriggeredAction') -> UUID
```

#### `describe_for_cli` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L26)</sup>

```python theme={null}
describe_for_cli(self) -> str
```

A human-readable description of the action

#### `selected_automation_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1722](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1722)</sup>

```python theme={null}
selected_automation_requires_id(self) -> Self
```

### `AutomationCommandAction` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1748](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1748)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779)</sup>

```python theme={null}
command(self, events: PrefectServerEventsAPIClient, automation_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue

#### `events_api_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L374)</sup>

```python theme={null}
events_api_client(self, triggered_action: 'TriggeredAction') -> PrefectServerEventsAPIClient
```

#### `orchestration_client` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L360)</sup>

```python theme={null}
orchestration_client(self, triggered_action: 'TriggeredAction') -> 'OrchestrationClient'
```

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</sup>

```python theme={null}
reason_from_response(self, response: Response) -> str
```

#### `selected_automation_requires_id` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L271](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/events/actions.py#L271)</sup>

```python theme={null}
selected_automation_requires_id(self) -> Self
```

### `PauseAutomation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1788](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1788)</sup>

Pauses a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1795](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1795)</sup>

```python theme={null}
command(self, events: PrefectServerEventsAPIClient, automation_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779)</sup>

```python theme={null}
command(self, events: PrefectServerEventsAPIClient, automation_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue

### `ResumeAutomation` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1804](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1804)</sup>

Resumes a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1751)</sup>

```python theme={null}
act(self, triggered_action: 'TriggeredAction') -> None
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1811](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1811)</sup>

```python theme={null}
command(self, events: PrefectServerEventsAPIClient, automation_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

#### `command` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1779)</sup>

```python theme={null}
command(self, events: PrefectServerEventsAPIClient, automation_id: UUID, triggered_action: 'TriggeredAction') -> Response
```

Issue the command to the Work Queue
