| Conditions | 1 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
| 19 | def run(self, name): |
||
| 20 | """ |
||
| 21 | Enable an alert policy in OpsGenie. |
||
| 22 | |||
| 23 | Args: |
||
| 24 | - name: Name of policy. |
||
| 25 | |||
| 26 | Returns: |
||
| 27 | - dict: Data from OpsGenie. |
||
| 28 | """ |
||
| 29 | |||
| 30 | payload = {"name": name} |
||
| 31 | data = self._req("POST", |
||
| 32 | "v1/json/policy/enable", |
||
| 33 | payload) |
||
| 34 | return data |
||
| 35 |