Cloudflare\Organizations\Firewall\AccessRules\Rules::update PHP Метод

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

Update access rule (permission needed: #organization:edit) Update rule state and/or configuration. This will be applied across all zones owned by the organization.
public update ( string $organization_id, string $identifier, string | null $mode = null, object | null $configuration = null, string | null $notes = null )
$organization_id string
$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($organization_id, $identifier, $mode = null, $configuration = null, $notes = null)
    {
        $data = ['mode' => $mode, 'configuration' => $configuration, 'notes' => $notes];
        return $this->patch('organizations/' . $organization_id . '/firewall/access_rules/rules/' . $identifier, $data);
    }