Cloudflare\User\Firewall\AccessRules::update PHP Method

update() public method

Update access rule (permission needed: #billing:edit) Update rule state and/or configuration. This will be applied across all zones owned by the user.
public update ( string $identifier, string | null $mode = null, object | null $configuration = null, string | null $notes = null )
$identifier string
$mode string | null The action to apply to a matched request
$configuration object | null Rule configuration
$notes string | null A personal note about the rule. Typically used as a reminder or explanation for the rule.
    public function update($identifier, $mode = null, $configuration = null, $notes = null)
    {
        $data = ['mode' => $mode, 'configuration' => $configuration, 'notes' => $notes];
        return $this->patch('/user/firewall/access_rules/rules/' . $identifier, $data);
    }