Cloudflare

Create zone access rule

Make a new IP, IP range, or country access rule for a given zone.

Inputs

Field

Type

Description

zoneId [required]

string

mode [required]

enum

The action to apply to a matched request. Allowed enum values: whitelist,block,challenge,js_challenge,managed_challenge

target [required]

string

The IP to target in the rule. It can be:

  • an IPv4 address
  • an IPv6 address
  • an IP range specified in CIDR notation (limited to /16 and /24 for IPv4 and /32, /48, and /64 for IPv6)
  • an autonomous system number (ASN)
  • a country / 2-digit ISO country code

type [required]

enum

notes

string

A personal note about the rule. Typically used as a reminder or explanation for the rule.

Outputs

Expand All

Field

Type

Description

accessRule [required]

object

id [required]

string

notes [required]

string

mode [required]

enum

configuration [required]

object

target [required]

string

value [required]

string

created_on [required]

string

modified_on [required]

string

allowed_modes [required]

[string]

scope [required]

object

id [required]

string

email

string

name

string

type [required]

string

paused

boolean