Total Complexity | 1 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
18 | class DeleteHeartbeatAction(OpsGenieBaseAction): |
||
19 | def run(self, name): |
||
20 | """ |
||
21 | Delete monitored heartbeat in OpsGenie. |
||
22 | |||
23 | Args: |
||
24 | - name: Name of the heartbeat. |
||
25 | |||
26 | Returns: |
||
27 | - dict: Data from OpsGenie. |
||
28 | """ |
||
29 | |||
30 | payload = {"apiKey": self.api_key, |
||
31 | "name": name} |
||
32 | |||
33 | data = self._req("DELETE", |
||
34 | "v1/json/heartbeat", |
||
35 | payload=payload) |
||
36 | |||
37 | return data |
||
38 |