FirewallRule
- class aws_cdk.aws_route53resolver_alpha.FirewallRule(*, action, firewall_domain_list, priority)
Bases:
object
(experimental) A Firewall Rule.
- Parameters:
action (
FirewallRuleAction
) – (experimental) The action for this rule.firewall_domain_list (
IFirewallDomainList
) – (experimental) The domain list for this rule.priority (
Union
[int
,float
]) – (experimental) The priority of the rule in the rule group. This value must be unique within the rule group.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# my_block_list: route53resolver.FirewallDomainList # rule_group: route53resolver.FirewallRuleGroup rule_group.add_rule( priority=10, firewall_domain_list=my_block_list, # block and reply with NXDOMAIN action=route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.nx_domain()) ) rule_group.add_rule( priority=20, firewall_domain_list=my_block_list, # block and override DNS response with a custom domain action=route53resolver.FirewallRuleAction.block(route53resolver.DnsBlockResponse.override("amazon.com")) )
Attributes
- action
(experimental) The action for this rule.
- Stability:
experimental
- firewall_domain_list
(experimental) The domain list for this rule.
- Stability:
experimental
- priority
(experimental) The priority of the rule in the rule group.
This value must be unique within the rule group.
- Stability:
experimental