PHP Класс Cloudflare\User\Firewall\AccessRules

User-level Firewall access rule
Автор: James Bell ([email protected])
Наследование: extends CloudFlare\Api
Показать файл Открыть проект

Открытые методы

Метод Описание
create ( string $mode, 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.
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
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
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.

Описание методов

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 $mode, object $configuration, string | null $notes = null )
$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.

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

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
public delete_rule ( string $identifier )
$identifier string

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

List access rules (permission needed: #billing:read) Search, sort, and filter IP/country access rules
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 )
$mode string | null The action to apply to a matched request
$configuration_target string | null The rule configuration target
$configuration_value string | null Search by IP, range, or country code
$page integer | null Page number of paginated results
$per_page integer | null Number of items per page
$order string | null Field to order rules by
$direction string | null Direction to order rules
$match string | null Whether to match all search requirements or at least one (any)

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

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.