@@ -30,30 +30,34 @@ public function monitors()
3030 * Create a monitor
3131 * Create a configured monitor
3232 *
33- * @param string $expected A case-insensitive substring to match in the body of the probe
33+ * @param string $expected_body A case-insensitive substring to match in the body of the probe
3434 * response to declare an origin as up
35- * @param string $type Monitor type
3635 * @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
36+ * @param string|null $method The HTTP method to use for the health check.
37+ * @param int|null $timeout The timeout (in seconds) before marking the health check as failed
38+ * @param string|null $path The endpoint path to health check against.
39+ * @param int|null $interval The interval between each health check. Shorter intervals may improve failover
40+ * time, but will increase load on the origins as we check from multiple locations.
41+ * @param int|null $retries The number of retries to attempt in case of a timeout before marking the origin
42+ * as unhealthy. Retries are attempted immediately.
43+ * @param array|null $header The HTTP request headers to send in the health check. It is recommended you set
44+ * a Host header by default. The User-Agent header cannot be overridden.
45+ * @param int|null $type The protocol to use for the healthcheck. Currently supported protocols are
46+ * 'HTTP' and 'HTTPS'.
4347 * @param string|null $description Object description
4448 */
45- public function create ($ expected , $ type , $ expected_codes , $ method = null , $ path = null , $ interval = null , $ retries = null , $ headers = null , $ probe_timeout = null , $ description = null )
49+ public function create ($ expected_body , $ expected_codes , $ method = null , $ timeout = null , $ path = null , $ interval = null , $ retries = null , $ header = null , $ type = null , $ description = null )
4650 {
4751 $ data = [
48- 'expected ' => $ expected ,
49- 'type ' => $ type ,
52+ 'expected_body ' => $ expected_body ,
5053 'expected_codes ' => $ expected_codes ,
5154 'method ' => $ method ,
55+ 'timeout ' => $ timeout ,
5256 'path ' => $ path ,
5357 'interval ' => $ interval ,
5458 'retries ' => $ retries ,
55- 'headers ' => $ headers ,
56- 'probe_timeout ' => $ probe_timeout ,
59+ 'header ' => $ header ,
60+ 'type ' => $ type ,
5761 'description ' => $ description ,
5862 ];
5963
@@ -76,30 +80,34 @@ public function details($identifier)
7680 * Modify a configured monitor
7781 *
7882 * @param string $identifier
79- * @param string|null $expected A case-insensitive substring to match in the body of the probe
83+ * @param string $expected_body A case-insensitive substring to match in the body of the probe
8084 * 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
85+ * @param string $expected_codes The expected HTTP response code or code range for the probe
86+ * @param string|null $method The HTTP method to use for the health check.
87+ * @param int|null $timeout The timeout (in seconds) before marking the health check as failed
88+ * @param string|null $path The endpoint path to health check against.
89+ * @param int|null $interval The interval between each health check. Shorter intervals may improve failover
90+ * time, but will increase load on the origins as we check from multiple locations.
91+ * @param int|null $retries The number of retries to attempt in case of a timeout before marking the origin
92+ * as unhealthy. Retries are attempted immediately.
93+ * @param array|null $header The HTTP request headers to send in the health check. It is recommended you set
94+ * a Host header by default. The User-Agent header cannot be overridden.
95+ * @param int|null $type The protocol to use for the healthcheck. Currently supported protocols are
96+ * 'HTTP' and 'HTTPS'.
8997 * @param string|null $description Object description
9098 */
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 )
99+ public function update ($ identifier , $ expected_body , $ expected_codes , $ method = null , $ timeout = null , $ path = null , $ interval = null , $ retries = null , $ header = null , $ type = null , $ description = null )
92100 {
93101 $ data = [
94- 'expected ' => $ expected ,
95- 'type ' => $ type ,
102+ 'expected_body ' => $ expected_body ,
96103 'expected_codes ' => $ expected_codes ,
97104 'method ' => $ method ,
105+ 'timeout ' => $ timeout ,
98106 'path ' => $ path ,
99107 'interval ' => $ interval ,
100108 'retries ' => $ retries ,
101- 'headers ' => $ headers ,
102- 'probe_timeout ' => $ probe_timeout ,
109+ 'header ' => $ header ,
110+ 'type ' => $ type ,
103111 'description ' => $ description ,
104112 ];
105113
0 commit comments