Cloudflare\User\LoadBalancers\Monitors::update PHP Метод

update() публичный Метод

Modify a monitor Modify a configured monitor
public update ( string $identifier, string | null $expected = null, string | null $type = null, string | null $expected_codes = null, string | null $method = null, string | null $path = null, integer | null $interval = null, integer | null $retries = null, array | null $headers = null, integer | null $probe_timeout = null, string | null $description = null )
$identifier string
$expected string | null A case-insensitive substring to match in the body of the probe response to declare an origin as up
$type string | null Monitor type
$expected_codes string | null The expected HTTP response code or code range for the probe
$method string | null The HTTP method for the probe
$path string | null The endpoint path to probe
$interval integer | null The interval in seconds for each PoP to send a probe request
$retries integer | null The number of retries before declaring the origins to be dead
$headers array | null The HTTP headers to use in the probe
$probe_timeout integer | null Timeout in seconds for each probe request
$description string | null Object description
    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)
    {
        $data = ['expected' => $expected, 'type' => $type, 'expected_codes' => $expected_codes, 'method' => $method, 'path' => $path, 'interval' => $interval, 'retries' => $retries, 'headers' => $headers, 'probe_timeout' => $probe_timeout, 'description' => $description];
        return $this->patch('/user/load_balancers/monitors/' . $identifier, $data);
    }