1 | <?php |
||
18 | class Monitors extends Api |
||
19 | { |
||
20 | /** |
||
21 | * List monitors |
||
22 | * List configured monitors for a user |
||
23 | */ |
||
24 | public function monitors() |
||
28 | |||
29 | /** |
||
30 | * Create a monitor |
||
31 | * Create a configured monitor |
||
32 | * |
||
33 | * @param string $expected A case-insensitive substring to match in the body of the probe |
||
34 | * response to declare an origin as up |
||
35 | * @param string $type Monitor type |
||
36 | * @param string $expected_codes The expected HTTP response code or code range for the probe |
||
37 | * @param string|null $method The HTTP method for the probe |
||
38 | * @param string|null $path The endpoint path to probe |
||
39 | * @param int|null $interval The interval in seconds for each PoP to send a probe request |
||
40 | * @param int|null $retries The number of retries before declaring the origins to be dead |
||
41 | * @param array|null $headers The HTTP headers to use in the probe |
||
42 | * @param int|null $probe_timeout Timeout in seconds for each probe request |
||
43 | * @param string|null $description Object description |
||
44 | */ |
||
45 | public function create($expected, $type, $expected_codes, $method = null, $path = null, $interval = null, $retries = null, $headers = null, $probe_timeout = null, $description = null) |
||
62 | |||
63 | /** |
||
64 | * Monitor details |
||
65 | * List a single configured CTM monitor for a user |
||
66 | * |
||
67 | * @param string $identifier |
||
68 | */ |
||
69 | public function details($identifier) |
||
73 | |||
74 | /** |
||
75 | * Modify a monitor |
||
76 | * Modify a configured monitor |
||
77 | * |
||
78 | * @param string $identifier |
||
79 | * @param string|null $expected A case-insensitive substring to match in the body of the probe |
||
80 | * response to declare an origin as up |
||
81 | * @param string|null $type Monitor type |
||
82 | * @param string|null $expected_codes The expected HTTP response code or code range for the probe |
||
83 | * @param string|null $method The HTTP method for the probe |
||
84 | * @param string|null $path The endpoint path to probe |
||
85 | * @param int|null $interval The interval in seconds for each PoP to send a probe request |
||
86 | * @param int|null $retries The number of retries before declaring the origins to be dead |
||
87 | * @param array|null $headers The HTTP headers to use in the probe |
||
88 | * @param int|null $probe_timeout Timeout in seconds for each probe request |
||
89 | * @param string|null $description Object description |
||
90 | */ |
||
91 | public function update($identifier, $expected = null, $type = null, $expected_codes = null, $method = null, $path = null, $interval = null, $retries = null, $headers = null, $probe_timeout = null, $description = null) |
||
108 | |||
109 | /** |
||
110 | * Delete a monitor |
||
111 | * Delete a configured monitor |
||
112 | * |
||
113 | * @param string $identifier |
||
114 | */ |
||
115 | public function delete_monitor($identifier) |
||
119 | } |
||
120 |