class FirewallRuleAction
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Route53Resolver.Alpha.FirewallRuleAction |
Go | github.com/aws/aws-cdk-go/awscdkroute53resolveralpha/v2#FirewallRuleAction |
Java | software.amazon.awscdk.services.route53resolver.alpha.FirewallRuleAction |
Python | aws_cdk.aws_route53resolver_alpha.FirewallRuleAction |
TypeScript (source) | @aws-cdk/aws-route53resolver-alpha ยป 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.