Zone Lockdown
Zone Lockdown specifies a list of one or more IP addresses, CIDR ranges, or networks that are the only IPs allowed to access a domain, subdomain, or URL. You can configure multiple destinations, including IPv4/IPv6 addresses, in a single Zone Lockdown rule.
Cloudflare API docsList
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.
php
$response = $client->zones()->lockdowns()->list('zone_id');
Create
Creates a new Zone Lockdown rule.
php
$response = $client->zones()->lockdowns()->create('zone_id', '198.51.100.4');
Details
Fetches the details of a Zone Lockdown rule.
php
$response = $client->zones()->lockdowns()->details('zone_id', 'lockdown_id');
Update
Updates an existing Zone Lockdown rule.
php
$response = $client->zones()->lockdowns()->update('zone_id', 'lockdown_id', '198.51.100.4');
Delete
Deletes an existing Zone Lockdown rule.
php
$response = $client->zones()->lockdowns()->delete('zone_id', 'lockdown_id');