---
title: Firewall
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/go)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Firewall

#### FirewallLockdowns

##### [List Zone Lockdown rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/lockdowns/methods/list)

client.Firewall.Lockdowns.List(ctx, params) (\*V4PagePaginationArray\[[Lockdown](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/lockdowns

##### [Get a Zone Lockdown rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/lockdowns/methods/get)

client.Firewall.Lockdowns.Get(ctx, lockDownsID, query) (\*[Lockdown](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/firewall/lockdowns/{lock\_downs\_id}

##### [Create a Zone Lockdown rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/lockdowns/methods/create)

client.Firewall.Lockdowns.New(ctx, params) (\*[Lockdown](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)>), error)

POST/zones/{zone\_id}/firewall/lockdowns

##### [Update a Zone Lockdown rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/lockdowns/methods/update)

client.Firewall.Lockdowns.Update(ctx, lockDownsID, params) (\*[Lockdown](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/firewall/lockdowns/{lock\_downs\_id}

##### [Delete a Zone Lockdown rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/lockdowns/methods/delete)

client.Firewall.Lockdowns.Delete(ctx, lockDownsID, body) (\*[LockdownDeleteResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20LockdownDeleteResponse%20%3E%20(schema)>), error)

DELETE/zones/{zone\_id}/firewall/lockdowns/{lock\_downs\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Configuration \[]ConfigurationItem

A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of <code>ip</code> or <code>ip_range</code> configurations.

</summary>

One of the following:

<details>

<summary>

type LockdownIPConfiguration struct{…}

</summary>

Target LockdownIPConfigurationTargetOptional

The configuration target. You must set the target to <code>ip</code> when specifying an IP address in the Zone Lockdown rule.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address to match. This address will be compared to the IP address of incoming requests.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

type LockdownCIDRConfiguration struct{…}

</summary>

Target LockdownCIDRConfigurationTargetOptional

The configuration target. You must set the target to <code>ip_range</code> when specifying an IP address range in the Zone Lockdown rule.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address range to match. You can only use prefix lengths <code>/16</code> and <code>/24</code>.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.lockdowns%20%3E%20(model)%20configuration%20%3E%20(schema)>)

<details>

<summary>

type Lockdown struct{…}

</summary>

ID string

The unique identifier of the Zone Lockdown rule.

maxLength32

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Configurations <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20configuration%20%3E%20(schema)">Configuration</a>

A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of <code>ip</code> or <code>ip_range</code> configurations.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20configurations">Link to this property</a>

CreatedOn Time

The timestamp of when the rule was created.

formatdate-time

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

Description string

An informative summary of the rule.

maxLength1024

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

ModifiedOn Time

The timestamp of when the rule was last modified.

formatdate-time

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

Paused bool

When true, indicates that the rule is currently paused.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20paused">Link to this property</a>

URLs \[]<a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_url%20%3E%20(schema)">LockdownURL</a>

The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)%20%3E%20(property)%20urls">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown%20%3E%20(schema)>)

<details>

<summary>

type LockdownCIDRConfiguration struct{…}

</summary>

Target LockdownCIDRConfigurationTargetOptional

The configuration target. You must set the target to <code>ip_range</code> when specifying an IP address range in the Zone Lockdown rule.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address range to match. You can only use prefix lengths <code>/16</code> and <code>/24</code>.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_cidr_configuration%20%3E%20(schema)>)

<details>

<summary>

type LockdownIPConfiguration struct{…}

</summary>

Target LockdownIPConfigurationTargetOptional

The configuration target. You must set the target to <code>ip</code> when specifying an IP address in the Zone Lockdown rule.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address to match. This address will be compared to the IP address of incoming requests.

<a href="#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_ip_configuration%20%3E%20(schema)>)

type LockdownURL string

[Link to this property](<#(resource)%20firewall.lockdowns%20%3E%20(model)%20lockdown_url%20%3E%20(schema)>)

#### FirewallRules

##### [List firewall rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/list)

Deprecated

client.Firewall.Rules.List(ctx, params) (\*V4PagePaginationArray\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/rules

##### [Get a firewall rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/get)

Deprecated

client.Firewall.Rules.Get(ctx, ruleID, query) (\*[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/firewall/rules/{rule\_id}

##### [Create firewall rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/create)

Deprecated

client.Firewall.Rules.New(ctx, params) (\*SinglePage\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

POST/zones/{zone\_id}/firewall/rules

##### [Update a firewall rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/update)

Deprecated

client.Firewall.Rules.Update(ctx, ruleID, params) (\*[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/firewall/rules/{rule\_id}

##### [Update priority of a firewall rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/edit)

Deprecated

client.Firewall.Rules.Edit(ctx, ruleID, body) (\*SinglePage\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

PATCH/zones/{zone\_id}/firewall/rules/{rule\_id}

##### [Delete a firewall rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/delete)

Deprecated

client.Firewall.Rules.Delete(ctx, ruleID, body) (\*[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>), error)

DELETE/zones/{zone\_id}/firewall/rules/{rule\_id}

##### [Update firewall rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/bulk_update)

Deprecated

client.Firewall.Rules.BulkUpdate(ctx, params) (\*SinglePage\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

PUT/zones/{zone\_id}/firewall/rules

##### [Update priority of firewall rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/bulk_edit)

Deprecated

client.Firewall.Rules.BulkEdit(ctx, params) (\*SinglePage\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

PATCH/zones/{zone\_id}/firewall/rules

##### [Delete firewall rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/rules/methods/bulk_delete)

Deprecated

client.Firewall.Rules.BulkDelete(ctx, body) (\*SinglePage\[[FirewallRule](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)], error)

DELETE/zones/{zone\_id}/firewall/rules

##### ModelsExpand Collapse

<details>

<summary>

type DeletedFilter struct{…}

</summary>

ID string

The unique identifier of the filter.

maxLength32

minLength32

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Deleted bool

When true, indicates that the firewall rule was deleted.

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)%20%3E%20(property)%20deleted">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)>)

<details>

<summary>

type FirewallRule struct{…}

</summary>

ID stringOptional

The unique identifier of the firewall rule.

maxLength32

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Action <a href="https://developers.cloudflare.com/api/go/resources/rate_limits#(resource)%20rate_limits%20%3E%20(model)%20action%20%3E%20(schema)">Action</a>Optional

The action to apply to a matched request. The <code>log</code> action is only available on an Enterprise plan.

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

Description stringOptional

An informative summary of the firewall rule.

maxLength500

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

<details>

<summary>

Filter FirewallRuleFilterOptional

</summary>

One of the following:

<details>

<summary>

type FirewallFilter struct{…}

</summary>

ID stringOptional

The unique identifier of the filter.

maxLength32

minLength32

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Description stringOptional

An informative summary of the filter.

maxLength500

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

Expression stringOptional

The filter expression. For more information, refer to <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/">Expressions</a>.

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)%20%3E%20(property)%20expression">Link to this property</a>

Paused boolOptional

When true, indicates that the filter is currently paused.

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)%20%3E%20(property)%20paused">Link to this property</a>

Ref stringOptional

A short reference tag. Allows you to select related filters.

maxLength50

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)%20%3E%20(property)%20ref">Link to this property</a>

</details>

<a href="#(resource)%20filters%20%3E%20(model)%20firewall_filter%20%3E%20(schema)">Link to this property</a>

<details>

<summary>

type DeletedFilter struct{…}

</summary>

ID string

The unique identifier of the filter.

maxLength32

minLength32

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Deleted bool

When true, indicates that the firewall rule was deleted.

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)%20%3E%20(property)%20deleted">Link to this property</a>

</details>

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20deleted_filter%20%3E%20(schema)">Link to this property</a>

</details>

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20filter">Link to this property</a>

Paused boolOptional

When true, indicates that the firewall rule is currently paused.

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20paused">Link to this property</a>

Priority float64Optional

The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.

maximum2147483647

minimum0

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20priority">Link to this property</a>

<details>

<summary>

Products \[]<a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a>Optional

</summary>

One of the following:

const ProductZoneLockdown <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "zoneLockdown"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const ProductUABlock <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "uaBlock"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

const ProductBIC <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "bic"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

const ProductHot <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "hot"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

const ProductSecurityLevel <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "securityLevel"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

const ProductRateLimit <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "rateLimit"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

const ProductWAF <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "waf"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

</details>

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20products">Link to this property</a>

Ref stringOptional

A short reference tag. Allows you to select related firewall rules.

maxLength50

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)%20%3E%20(property)%20ref">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.rules%20%3E%20(model)%20firewall_rule%20%3E%20(schema)>)

<details>

<summary>

type Product string

A list of products to bypass for a request when using the <code>bypass</code> action.

</summary>

One of the following:

const ProductZoneLockdown <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "zoneLockdown"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const ProductUABlock <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "uaBlock"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

const ProductBIC <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "bic"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

const ProductHot <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "hot"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

const ProductSecurityLevel <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "securityLevel"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

const ProductRateLimit <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "rateLimit"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

const ProductWAF <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)">Product</a> = "waf"

<a href="#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.rules%20%3E%20(model)%20product%20%3E%20(schema)>)

#### FirewallAccess Rules

##### [List IP Access rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/access_rules/methods/list)

client.Firewall.AccessRules.List(ctx, params) (\*V4PagePaginationArray\[[AccessRuleListResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.access_rules%20%3E%20(model)%20AccessRuleListResponse%20%3E%20(schema)>)], error)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/firewall/access\_rules/rules

##### [Get an IP Access rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/access_rules/methods/get)

client.Firewall.AccessRules.Get(ctx, ruleID, query) (\*[AccessRuleGetResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.access_rules%20%3E%20(model)%20AccessRuleGetResponse%20%3E%20(schema)>), error)

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/firewall/access\_rules/rules/{rule\_id}

##### [Create an IP Access rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/access_rules/methods/create)

client.Firewall.AccessRules.New(ctx, params) (\*[AccessRuleNewResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.access_rules%20%3E%20(model)%20AccessRuleNewResponse%20%3E%20(schema)>), error)

POST/{accounts\_or\_zones}/{account\_or\_zone\_id}/firewall/access\_rules/rules

##### [Update an IP Access rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/access_rules/methods/edit)

client.Firewall.AccessRules.Edit(ctx, ruleID, params) (\*[AccessRuleEditResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.access_rules%20%3E%20(model)%20AccessRuleEditResponse%20%3E%20(schema)>), error)

PATCH/{accounts\_or\_zones}/{account\_or\_zone\_id}/firewall/access\_rules/rules/{rule\_id}

##### [Delete an IP Access rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/access_rules/methods/delete)

client.Firewall.AccessRules.Delete(ctx, ruleID, body) (\*[AccessRuleDeleteResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.access_rules%20%3E%20(model)%20AccessRuleDeleteResponse%20%3E%20(schema)>), error)

DELETE/{accounts\_or\_zones}/{account\_or\_zone\_id}/firewall/access\_rules/rules/{rule\_id}

##### ModelsExpand Collapse

<details>

<summary>

type AccessRuleCIDRConfiguration struct{…}

</summary>

Target AccessRuleCIDRConfigurationTargetOptional

The configuration target. You must set the target to <code>ip_range</code> when specifying an IP address range in the rule.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address range to match. You can only use prefix lengths <code>/16</code> and <code>/24</code> for IPv4 ranges, and prefix lengths <code>/32</code>, <code>/48</code>, and <code>/64</code> for IPv6 ranges.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_cidr_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_cidr_configuration%20%3E%20(schema)>)

<details>

<summary>

type AccessRuleIPConfiguration struct{…}

</summary>

Target AccessRuleIPConfigurationTargetOptional

The configuration target. You must set the target to <code>ip</code> when specifying an IP address in the rule.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IP address to match. This address will be compared to the IP address of incoming requests.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_ip_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.access_rules%20%3E%20(model)%20access_rule_ip_configuration%20%3E%20(schema)>)

<details>

<summary>

type ASNConfiguration struct{…}

</summary>

Target ASNConfigurationTargetOptional

The configuration target. You must set the target to <code>asn</code> when specifying an Autonomous System Number (ASN) in the rule.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20asn_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The AS number to match.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20asn_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.access_rules%20%3E%20(model)%20asn_configuration%20%3E%20(schema)>)

<details>

<summary>

type CountryConfiguration struct{…}

</summary>

Target CountryConfigurationTargetOptional

The configuration target. You must set the target to <code>country</code> when specifying a country code in the rule.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20country_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to <a href="https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country">IP Access rules: Parameters</a>.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20country_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.access_rules%20%3E%20(model)%20country_configuration%20%3E%20(schema)>)

<details>

<summary>

type IPV6Configuration struct{…}

</summary>

Target IPV6ConfigurationTargetOptional

The configuration target. You must set the target to <code>ip6</code> when specifying an IPv6 address in the rule.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20ipv6_configuration%20%3E%20(schema)%20%3E%20(property)%20target">Link to this property</a>

Value stringOptional

The IPv6 address to match.

<a href="#(resource)%20firewall.access_rules%20%3E%20(model)%20ipv6_configuration%20%3E%20(schema)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.access_rules%20%3E%20(model)%20ipv6_configuration%20%3E%20(schema)>)

#### FirewallUA Rules

##### [List User Agent Blocking rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/ua_rules/methods/list)

client.Firewall.UARules.List(ctx, params) (\*V4PagePaginationArray\[[UARuleListResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.ua_rules%20%3E%20(model)%20UARuleListResponse%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/ua\_rules

##### [Get a User Agent Blocking rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/ua_rules/methods/get)

client.Firewall.UARules.Get(ctx, uaRuleID, query) (\*[UARuleGetResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.ua_rules%20%3E%20(model)%20UARuleGetResponse%20%3E%20(schema)>), error)

GET/zones/{zone\_id}/firewall/ua\_rules/{ua\_rule\_id}

##### [Create a User Agent Blocking rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/ua_rules/methods/create)

client.Firewall.UARules.New(ctx, params) (\*[UARuleNewResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.ua_rules%20%3E%20(model)%20UARuleNewResponse%20%3E%20(schema)>), error)

POST/zones/{zone\_id}/firewall/ua\_rules

##### [Update a User Agent Blocking rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/ua_rules/methods/update)

client.Firewall.UARules.Update(ctx, uaRuleID, params) (\*[UARuleUpdateResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.ua_rules%20%3E%20(model)%20UARuleUpdateResponse%20%3E%20(schema)>), error)

PUT/zones/{zone\_id}/firewall/ua\_rules/{ua\_rule\_id}

##### [Delete a User Agent Blocking rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/ua_rules/methods/delete)

client.Firewall.UARules.Delete(ctx, uaRuleID, body) (\*[UARuleDeleteResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.ua_rules%20%3E%20(model)%20UARuleDeleteResponse%20%3E%20(schema)>), error)

DELETE/zones/{zone\_id}/firewall/ua\_rules/{ua\_rule\_id}

#### FirewallWAF

#### FirewallWAFOverrides

##### [List WAF overrides](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/overrides/methods/list)

Deprecated

client.Firewall.WAF.Overrides.List(ctx, params) error

GET/zones/{zone\_id}/firewall/waf/overrides

##### [Get a WAF override](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/overrides/methods/get)

Deprecated

client.Firewall.WAF.Overrides.Get(ctx, overridesID, query) error

GET/zones/{zone\_id}/firewall/waf/overrides/{overrides\_id}

##### [Create a WAF override](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/overrides/methods/create)

Deprecated

client.Firewall.WAF.Overrides.New(ctx, params) error

POST/zones/{zone\_id}/firewall/waf/overrides

##### [Update WAF override](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/overrides/methods/update)

Deprecated

client.Firewall.WAF.Overrides.Update(ctx, overridesID, params) error

PUT/zones/{zone\_id}/firewall/waf/overrides/{overrides\_id}

##### [Delete a WAF override](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/overrides/methods/delete)

Deprecated

client.Firewall.WAF.Overrides.Delete(ctx, overridesID, body) error

DELETE/zones/{zone\_id}/firewall/waf/overrides/{overrides\_id}

##### ModelsExpand Collapse

type OverrideURL string

[Link to this property](<#(resource)%20firewall.waf.overrides%20%3E%20(model)%20override_url%20%3E%20(schema)>)

<details>

<summary>

type RewriteAction struct{…}

Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object.

</summary>

<details>

<summary>

Block RewriteActionBlockOptional

The WAF rule action to apply.

</summary>

One of the following:

const RewriteActionBlockChallenge RewriteActionBlock = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block%20%3E%20(member)%200">Link to this property</a>

const RewriteActionBlockBlock RewriteActionBlock = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block%20%3E%20(member)%201">Link to this property</a>

const RewriteActionBlockSimulate RewriteActionBlock = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block%20%3E%20(member)%202">Link to this property</a>

const RewriteActionBlockDisable RewriteActionBlock = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block%20%3E%20(member)%203">Link to this property</a>

const RewriteActionBlockDefault RewriteActionBlock = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20block">Link to this property</a>

<details>

<summary>

Challenge RewriteActionChallengeOptional

The WAF rule action to apply.

</summary>

One of the following:

const RewriteActionChallengeChallenge RewriteActionChallenge = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge%20%3E%20(member)%200">Link to this property</a>

const RewriteActionChallengeBlock RewriteActionChallenge = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge%20%3E%20(member)%201">Link to this property</a>

const RewriteActionChallengeSimulate RewriteActionChallenge = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge%20%3E%20(member)%202">Link to this property</a>

const RewriteActionChallengeDisable RewriteActionChallenge = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge%20%3E%20(member)%203">Link to this property</a>

const RewriteActionChallengeDefault RewriteActionChallenge = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20challenge">Link to this property</a>

<details>

<summary>

Default RewriteActionDefaultOptional

The WAF rule action to apply.

</summary>

One of the following:

const RewriteActionDefaultChallenge RewriteActionDefault = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default%20%3E%20(member)%200">Link to this property</a>

const RewriteActionDefaultBlock RewriteActionDefault = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default%20%3E%20(member)%201">Link to this property</a>

const RewriteActionDefaultSimulate RewriteActionDefault = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default%20%3E%20(member)%202">Link to this property</a>

const RewriteActionDefaultDisable RewriteActionDefault = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default%20%3E%20(member)%203">Link to this property</a>

const RewriteActionDefaultDefault RewriteActionDefault = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20default">Link to this property</a>

<details>

<summary>

Disable RewriteActionDisableOptional

The WAF rule action to apply.

</summary>

One of the following:

const RewriteActionDisableChallenge RewriteActionDisable = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable%20%3E%20(member)%200">Link to this property</a>

const RewriteActionDisableBlock RewriteActionDisable = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable%20%3E%20(member)%201">Link to this property</a>

const RewriteActionDisableSimulate RewriteActionDisable = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable%20%3E%20(member)%202">Link to this property</a>

const RewriteActionDisableDisable RewriteActionDisable = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable%20%3E%20(member)%203">Link to this property</a>

const RewriteActionDisableDefault RewriteActionDisable = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20disable">Link to this property</a>

<details>

<summary>

Simulate RewriteActionSimulateOptional

The WAF rule action to apply.

</summary>

One of the following:

const RewriteActionSimulateChallenge RewriteActionSimulate = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate%20%3E%20(member)%200">Link to this property</a>

const RewriteActionSimulateBlock RewriteActionSimulate = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate%20%3E%20(member)%201">Link to this property</a>

const RewriteActionSimulateSimulate RewriteActionSimulate = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate%20%3E%20(member)%202">Link to this property</a>

const RewriteActionSimulateDisable RewriteActionSimulate = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate%20%3E%20(member)%203">Link to this property</a>

const RewriteActionSimulateDefault RewriteActionSimulate = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)%20%3E%20(property)%20simulate">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.waf.overrides%20%3E%20(model)%20rewrite_action%20%3E%20(schema)>)

<details>

<summary>

type WAFRule map\[string, WAFRuleItem]

An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule, ensure that you also enable the rule group that this WAF rule belongs to. When creating a new URI-based WAF override, you must provide a <code>groups</code> object or a <code>rules</code> object.

</summary>

One of the following:

const WAFRuleItemChallenge WAFRuleItem = "challenge"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const WAFRuleItemBlock WAFRuleItem = "block"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

const WAFRuleItemSimulate WAFRuleItem = "simulate"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%202">Link to this property</a>

const WAFRuleItemDisable WAFRuleItem = "disable"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%203">Link to this property</a>

const WAFRuleItemDefault WAFRuleItem = "default"

<a href="#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)%20%3E%20(items)%20%3E%20(member)%204">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.waf.overrides%20%3E%20(model)%20waf_rule%20%3E%20(schema)>)

#### FirewallWAFPackages

##### [List WAF packages](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/methods/list)

Deprecated

client.Firewall.WAF.Packages.List(ctx, params) (\*V4PagePaginationArray\[[WAFPackageListResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages%20%3E%20(model)%20WAFPackageListResponse%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/waf/packages

##### [Get a WAF package](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/methods/get)

Deprecated

client.Firewall.WAF.Packages.Get(ctx, packageID, query) (\*unknown, error)

GET/zones/{zone\_id}/firewall/waf/packages/{package\_id}

#### FirewallWAFPackagesGroups

##### [List WAF rule groups](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/groups/methods/list)

Deprecated

client.Firewall.WAF.Packages.Groups.List(ctx, packageID, params) (\*V4PagePaginationArray\[[Group](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/waf/packages/{package\_id}/groups

##### [Get a WAF rule group](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/groups/methods/get)

Deprecated

client.Firewall.WAF.Packages.Groups.Get(ctx, packageID, groupID, query) (\*unknown, error)

GET/zones/{zone\_id}/firewall/waf/packages/{package\_id}/groups/{group\_id}

##### [Update a WAF rule group](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/groups/methods/edit)

Deprecated

client.Firewall.WAF.Packages.Groups.Edit(ctx, packageID, groupID, params) (\*unknown, error)

PATCH/zones/{zone\_id}/firewall/waf/packages/{package\_id}/groups/{group\_id}

##### ModelsExpand Collapse

<details>

<summary>

type Group struct{…}

</summary>

ID string

Defines the unique identifier of the rule group.

maxLength32

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Description string

Defines an informative summary of what the rule group does.

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

<details>

<summary>

Mode GroupMode

Defines the state of the rules contained in the rule group. When <code>on</code>, the rules in the group are configurable/usable.

</summary>

One of the following:

const GroupModeOn GroupMode = "on"

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%200">Link to this property</a>

const GroupModeOff GroupMode = "off"

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20mode">Link to this property</a>

Name string

Defines the name of the rule group.

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

RulesCount float64

Defines the number of rules in the current rule group.

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20rules_count">Link to this property</a>

<details>

<summary>

AllowedModes \[]GroupAllowedModeOptional

Defines the available states for the rule group.

</summary>

One of the following:

const GroupAllowedModeOn GroupAllowedMode = "on"

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20allowed_modes%20%3E%20(items)%20%3E%20(member)%200">Link to this property</a>

const GroupAllowedModeOff GroupAllowedMode = "off"

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20allowed_modes%20%3E%20(items)%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20allowed_modes">Link to this property</a>

ModifiedRulesCount float64Optional

Defines the number of rules within the group that have been modified from their default configuration.

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20modified_rules_count">Link to this property</a>

PackageID stringOptional

Defines the unique identifier of a WAF package.

maxLength32

<a href="#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)%20%3E%20(property)%20package_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.waf.packages.groups%20%3E%20(model)%20group%20%3E%20(schema)>)

#### FirewallWAFPackagesRules

##### [List WAF rules](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/rules/methods/list)

Deprecated

client.Firewall.WAF.Packages.Rules.List(ctx, packageID, params) (\*V4PagePaginationArray\[[WAFPackageRuleListResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20WAFPackageRuleListResponse%20%3E%20(schema)>)], error)

GET/zones/{zone\_id}/firewall/waf/packages/{package\_id}/rules

##### [Get a WAF rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/rules/methods/get)

Deprecated

client.Firewall.WAF.Packages.Rules.Get(ctx, packageID, ruleID, query) (\*unknown, error)

GET/zones/{zone\_id}/firewall/waf/packages/{package\_id}/rules/{rule\_id}

##### [Update a WAF rule](https://developers.cloudflare.com/api/go/resources/firewall/subresources/waf/subresources/packages/subresources/rules/methods/edit)

Deprecated

client.Firewall.WAF.Packages.Rules.Edit(ctx, packageID, ruleID, params) (\*[WAFPackageRuleEditResponse](<https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20WAFPackageRuleEditResponse%20%3E%20(schema)>), error)

PATCH/zones/{zone\_id}/firewall/waf/packages/{package\_id}/rules/{rule\_id}

##### ModelsExpand Collapse

<details>

<summary>

type AllowedModesAnomaly string

Defines the mode anomaly. When set to <code>on</code>, the current WAF rule will be used when evaluating the request. Applies to anomaly detection WAF rules.

</summary>

One of the following:

const AllowedModesAnomalyOn <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20allowed_modes_anomaly%20%3E%20(schema)">AllowedModesAnomaly</a> = "on"

<a href="#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20allowed_modes_anomaly%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

const AllowedModesAnomalyOff <a href="https://developers.cloudflare.com/api/go/resources/firewall#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20allowed_modes_anomaly%20%3E%20(schema)">AllowedModesAnomaly</a> = "off"

<a href="#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20allowed_modes_anomaly%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20allowed_modes_anomaly%20%3E%20(schema)>)

<details>

<summary>

type WAFRuleGroup struct{…}

Defines the rule group to which the current WAF rule belongs.

</summary>

ID stringOptional

Defines the unique identifier of the rule group.

maxLength32

<a href="#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20waf_rule_group%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

Name stringOptional

Defines the name of the rule group.

<a href="#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20waf_rule_group%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

</details>

[Link to this property](<#(resource)%20firewall.waf.packages.rules%20%3E%20(model)%20waf_rule_group%20%3E%20(schema)>)