The system entity that represents a Stack Action/Automation in the system.
| 52 | |
| 53 | # copied (in part) from st2common.models.api.action |
| 54 | class ActionAPI(BaseAPI): |
| 55 | """ |
| 56 | The system entity that represents a Stack Action/Automation in the system. |
| 57 | """ |
| 58 | |
| 59 | schema = { |
| 60 | "title": "Action", |
| 61 | "description": "An activity that happens as a response to the external event.", |
| 62 | "type": "object", |
| 63 | "properties": { |
| 64 | "id": { |
| 65 | "description": "The unique identifier for the action.", |
| 66 | "type": "string", |
| 67 | }, |
| 68 | "ref": { |
| 69 | "description": "System computed user friendly reference for the action. \ |
| 70 | Provided value will be overridden by computed value.", |
| 71 | "type": "string", |
| 72 | }, |
| 73 | "uid": {"type": "string"}, |
| 74 | "name": { # used in test |
| 75 | "description": "The name of the action.", |
| 76 | "type": "string", |
| 77 | "required": True, |
| 78 | }, |
| 79 | "description": { # used in test |
| 80 | "description": "The description of the action.", |
| 81 | "type": "string", |
| 82 | }, |
| 83 | "enabled": { |
| 84 | "description": "Enable or disable the action from invocation.", |
| 85 | "type": "boolean", |
| 86 | "default": True, |
| 87 | }, |
| 88 | "runner_type": { # used in test |
| 89 | "description": "The type of runner that executes the action.", |
| 90 | "type": "string", |
| 91 | "required": True, |
| 92 | }, |
| 93 | "entry_point": { |
| 94 | "description": "The entry point for the action.", |
| 95 | "type": "string", |
| 96 | "default": "", |
| 97 | }, |
| 98 | "pack": { |
| 99 | "description": "The content pack this action belongs to.", |
| 100 | "type": "string", |
| 101 | "default": DEFAULT_PACK_NAME, |
| 102 | }, |
| 103 | "parameters": { |
| 104 | "description": "Input parameters for the action.", |
| 105 | "type": "object", |
| 106 | "patternProperties": {r"^\w+$": get_schema()}, |
| 107 | "additionalProperties": False, |
| 108 | "default": {}, |
| 109 | }, |
| 110 | "output_schema": get_schema(description="Action Output Schema"), |
| 111 | "tags": { |
nothing calls this directly
no test coverage detected