Cloudflare\Zone\WAF\Packages::update PHP Method

update() public method

Change anomaly-detection web application firewall package settings (permission needed: #zone:edit) Change the sensitivity and action for an anomaly detection type WAF rule package
public update ( string $zone_identifier, string $identifier, string | null $sensitivity = null, string | null $action_mode = null )
$zone_identifier string
$identifier string
$sensitivity string | null The sensitivity of the firewall package.
$action_mode string | null The default action that will be taken for rules under the firewall package.
    public function update($zone_identifier, $identifier, $sensitivity = null, $action_mode = null)
    {
        $data = ['sensitivity' => $sensitivity, 'action_mode' => $action_mode];
        return $this->patch('/zones/' . $zone_identifier . '/firewall/waf/packages/' . $identifier, $data);
    }