> **Experimental**
>
> `@aws-cdk/aws-route53resolver-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# FirewallRule

A Firewall Rule.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/firewall-rule-group.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0-alpha.0/packages/@aws-cdk/aws-route53resolver-alpha/lib/firewall-rule-group.ts#L47)

## Example

```ts
declare const myBlockList: route53resolver.FirewallDomainList;
declare const ruleGroup: route53resolver.FirewallRuleGroup;

ruleGroup.addRule({
  priority: 10,
  firewallDomainList: myBlockList,
  // block and reply with NXDOMAIN
  action: route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.nxDomain()),
});

ruleGroup.addRule({
  priority: 20,
  firewallDomainList: myBlockList,
  // block and override DNS response with a custom domain
  action: route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.override('amazon.com')),
});
```

## Properties

- `action`: [FirewallRuleAction](/cdk/api/v2/docs/@aws-cdk_aws-route53resolver-alpha.FirewallRuleAction.html) (required) — The action for this rule.

- `firewallDomainList`: [IFirewallDomainList](/cdk/api/v2/docs/@aws-cdk_aws-route53resolver-alpha.IFirewallDomainList.html) (required) — The domain list for this rule.

- `priority`: number (required) — The priority of the rule in the rule group.

  This value must be unique within
  the rule group.
