Overview

Namespaces

  • Cloudflare
    • Organizations
      • Firewall
        • AccessRules
    • User
      • Billing
        • Subscriptions
      • Firewall
    • Zone
      • Firewall
      • SSL
      • WAF
        • Packages

Classes

  • AccessRules
  • Overview
  • Namespace
  • Class

Class AccessRules

CloudFlare API wrapper

User-level Firewall access rule

Cloudflare\Api
Extended by Cloudflare\User\Firewall\AccessRules
Namespace: Cloudflare\User\Firewall
Author: James Bell james@james-bell.co.uk
Version: 1
Located at CloudFlare/User/Firewall/AccessRules.php
Methods summary
public
# rules( string|null $mode = null, string|null $configuration_target = null, string|null $configuration_value = null, integer|null $page = null, integer|null $per_page = null, string|null $order = null, string|null $direction = null, string|null $match = null )

List access rules (permission needed: #billing:read) Search, sort, and filter IP/country access rules

List access rules (permission needed: #billing:read) Search, sort, and filter IP/country access rules

Parameters

$mode
The action to apply to a matched request
$configuration_target
The rule configuration target
$configuration_value
Search by IP, range, or country code
$page
Page number of paginated results
$per_page
Number of items per page
$order
Field to order rules by
$direction
Direction to order rules
$match
Whether to match all search requirements or at least one (any)
public
# create( string $mode, Cloudflare\User\Firewall\object $configuration, string|null $notes = null )

Create access rule (permission needed: #billing:edit) Make a new IP, IP range, or country access rule for all zones owned by the user. Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.

Create access rule (permission needed: #billing:edit) Make a new IP, IP range, or country access rule for all zones owned by the user. Note: If you would like to create an access rule that applies to a specific zone only, use the zone firewall endpoints.

Parameters

$mode
The action to apply to a matched request
$configuration
Rule configuration
$notes
A personal note about the rule. Typically used as a reminder or explanation for the rule.
public
# update( string $identifier, string|null $mode = null, object|null $configuration = null, string|null $notes = null )

Update access rule (permission needed: #billing:edit) Update rule state and/or configuration. This will be applied across all zones owned by the user.

Update access rule (permission needed: #billing:edit) Update rule state and/or configuration. This will be applied across all zones owned by the user.

Parameters

$identifier
$mode
The action to apply to a matched request
$configuration
Rule configuration
$notes
A personal note about the rule. Typically used as a reminder or explanation for the rule.
public
# delete_rule( string $identifier )

Delete access rule (permission needed: #billing:edit) Remove an access rule so it is no longer evaluated during requests. This will apply to all zones owned by the user

Delete access rule (permission needed: #billing:edit) Remove an access rule so it is no longer evaluated during requests. This will apply to all zones owned by the user

Parameters

$identifier
Methods inherited from Cloudflare\Api
__construct(), delete(), get(), patch(), permissions(), post(), put(), request(), setAuthKey(), setCurlOption(), setEmail()
Properties summary
protected array $permission_level

Default permissions level

Default permissions level

# ['read' => '#billing:read', 'edit' => '#billing:edit']
Properties inherited from Cloudflare\Api
$auth_key, $curl_options, $email
API documentation generated by ApiGen