FirewallRuleAction

class aws_cdk.aws_route53resolver.FirewallRuleAction

Bases: object

(experimental) A Firewall Rule.

Stability:

experimental

ExampleMetadata:

infused

Example:

# my_block_list: route53resolver.FirewallDomainList

route53resolver.FirewallRuleGroup(self, "RuleGroup",
    rules=[route53resolver.FirewallRule(
        priority=10,
        firewall_domain_list=my_block_list,
        # block and reply with NODATA
        action=route53resolver.FirewallRuleAction.block()
    )
    ]
)
Stability:

experimental

Attributes

action

(experimental) The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule’s domain list.

Stability:

experimental

block_response

(experimental) The way that you want DNS Firewall to block the request.

Stability:

experimental

Static Methods

classmethod alert()

(experimental) Permit the request to go through but send an alert to the logs.

Stability:

experimental

Return type:

FirewallRuleAction

classmethod allow()

(experimental) Permit the request to go through.

Stability:

experimental

Return type:

FirewallRuleAction

classmethod block(response=None)

(experimental) Disallow the request.

Parameters:

response (Optional[DnsBlockResponse]) – The way that you want DNS Firewall to block the request.

Stability:

experimental

Return type:

FirewallRuleAction