> For the complete documentation index, see [llms.txt](https://api.pyblish.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.pyblish.com/pyblish.api/action/action.on.md).

# .on

Tailor the circumstance upon which a particular action should be made available.

## Description

Sometimes an Action is not relevant until a certain precondition has been met. For example, if an action is meant to repair broken validation, then it makes the most sense to provide this functionality until validation has actually failed.

## Example

```python
import pyblish.api

class MyAction(pyblish.api.Action):
    on = "failed"
```
