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

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

Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.
public create ( string $organization_id, string $mode, object $configuration, string | null $notes = null )
$organization_id string
$mode string The action to apply to a matched request
$configuration object Rule configuration
$notes string | null A personal note about the rule. Typically used as a reminder or explanation for the rule.
    public function create($organization_id, $mode, $configuration, $notes = null)
    {
        $data = ['mode' => $mode, 'configuration' => $configuration, 'notes' => $notes];
        return $this->post('organizations/' . $organization_id . '/firewall/access_rules/rules', $data);
    }