> ## 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#L1882](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1882)</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#L1887](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1887)</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#L1893](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1893)</sup>

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

## Classes

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

### `Action` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L117](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L117)</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#L130](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L130)</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#L133](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L133)</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#L316](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L316)</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#L228](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L228)</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#L333](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L333)</sup>

Do nothing when an Automation is triggered

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L338](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L338)</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#L345](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L345)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L346](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L346)</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#L355](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L355)</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#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L386)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

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

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L485](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L485)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

#### `instantiate_object` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L536](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L536)</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#L401](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L401)</sup>

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L515](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L515)</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#L504](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L504)</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#L735](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L735)</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#L764](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L764)</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#L754](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L754)</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#L780](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L780)</sup>

Executes a command against a matching deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785)</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#L815](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L815)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

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

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L824](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L824)</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#L785](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785)</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#L853](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L853)</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#L815](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L815)</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#L536](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L536)</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#L967](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L967)</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#L515](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L515)</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#L910](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L910)</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#L504](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L504)</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#L1091](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1091)</sup>

Pauses the given Deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785)</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#L1098](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1098)</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#L815](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L815)</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#L1107](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1107)</sup>

Resumes the given Deployment

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L785)</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#L1114](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1114)</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#L815](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L815)</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#L1123](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1123)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

#### `flow_run` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1126](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1126)</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#L401](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L401)</sup>

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L1142](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1142)</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#L1149](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1149)</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#L1126](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1126)</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#L1146](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1146)</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#L1185](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1185)</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#L1149](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1149)</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#L1207](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1207)</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#L1146](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1146)</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#L1220](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1220)</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#L1149](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1149)</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#L1225](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1225)</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#L1146](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1146)</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#L1232](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1232)</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#L1237](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1237)</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#L1126](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1126)</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#L1265](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1265)</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#L1149](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1149)</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#L1270](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1270)</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#L1146](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1146)</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#L1284](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1284)</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#L1289](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1289)</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#L1126](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1126)</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#L1318](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1318)</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#L1395](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1395)</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#L1332](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1332)</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#L536](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L536)</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#L515](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L515)</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#L1349](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1349)</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#L504](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L504)</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#L1418](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1418)</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#L1469](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1469)</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#L536](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L536)</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#L1429](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1429)</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#L1481](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1481)</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#L515](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L515)</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#L504](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L504)</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#L1485](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1485)</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#L1505](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1505)</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#L1514](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1514)</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#L1530](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1530)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549)</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#L1578](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1578)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

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

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L1535](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1535)</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#L1587](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1587)</sup>

Pauses a Work Pool

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549)</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#L1594](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1594)</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#L1578](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1578)</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#L1535](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1535)</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#L1603](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1603)</sup>

Resumes a Work Pool

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1549)</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#L1610](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1610)</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#L1578](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1578)</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#L1535](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1535)</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#L1619](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1619)</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#L1638](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1638)</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#L1648](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1648)</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#L1664](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1664)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667)</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#L1697](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1697)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

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

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L1706](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1706)</sup>

Pauses a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667)</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#L1713](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1713)</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#L1697](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1697)</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#L1722](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1722)</sup>

Resumes a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1667)</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#L1729](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1729)</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#L1697](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1697)</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#L1738](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1738)</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#L1767](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1767)</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#L1757](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1757)</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#L1783](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1783)</sup>

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786)</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#L1814](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1814)</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#L412](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L412)</sup>

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

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

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

#### `reason_from_response` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L421)</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#L1823](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1823)</sup>

Pauses a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786)</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#L1830](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1830)</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#L1814](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1814)</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#L1839](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1839)</sup>

Resumes a Work Queue

**Methods:**

#### `act` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1786)</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#L1846](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1846)</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#L1814](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/server/events/actions.py#L1814)</sup>

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

Issue the command to the Work Queue
