class FirewallRuleAction
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Route53Resolver.FirewallRuleAction |
Java | software.amazon.awscdk.services.route53resolver.FirewallRuleAction |
Python | aws_cdk.aws_route53resolver.FirewallRuleAction |
TypeScript (source) | @aws-cdk/aws-route53resolver » FirewallRuleAction |
A Firewall Rule.
Example
declare const myBlockList: route53resolver.FirewallDomainList;
new route53resolver.FirewallRuleGroup(this, 'RuleGroup', {
rules: [
{
priority: 10,
firewallDomainList: myBlockList,
// block and reply with NODATA
action: route53resolver.FirewallRuleAction.block(),
},
],
});
Initializer
new FirewallRuleAction()
Properties
| Name | Type | Description |
|---|---|---|
| action | string | The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. |
| block | Dns | The way that you want DNS Firewall to block the request. |
action
Type:
string
The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list.
blockResponse?
Type:
Dns
(optional)
The way that you want DNS Firewall to block the request.
Methods
| Name | Description |
|---|---|
| static alert() | Permit the request to go through but send an alert to the logs. |
| static allow() | Permit the request to go through. |
| static block(response?) | Disallow the request. |
static alert()
public static alert(): FirewallRuleAction
Returns
Permit the request to go through but send an alert to the logs.
static allow()
public static allow(): FirewallRuleAction
Returns
Permit the request to go through.
static block(response?)
public static block(response?: DnsBlockResponse): FirewallRuleAction
Parameters
- response
Dns— The way that you want DNS Firewall to block the request.Block Response
Returns
Disallow the request.

.NET
Java
Python
TypeScript (