FirewallRuleGroup

class aws_cdk.aws_route53resolver.FirewallRuleGroup(scope, id, *, name=None, rules=None)

Bases: Resource

(experimental) A Firewall Rule Group.

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()
    )
    ]
)
Parameters:
  • scope (Construct) –

  • id (str) –

  • name (Optional[str]) – (experimental) The name of the rule group. Default: - a CloudFormation generated name

  • rules (Optional[Sequence[Union[FirewallRule, Dict[str, Any]]]]) – (experimental) A list of rules for this group. Default: - no rules

Stability:

experimental

Methods

add_rule(*, action, firewall_domain_list, priority)

(experimental) Adds a rule to this group.

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

Return type:

FirewallRuleGroup

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:

policy (RemovalPolicy) –

Return type:

None

associate(id, *, priority, vpc, mutation_protection=None, name=None)

(experimental) Associates this Firewall Rule Group with a VPC.

Parameters:
  • id (str) –

  • priority (Union[int, float]) – (experimental) The setting that determines the processing order of the rule group among the rule groups that are associated with a single VPC. DNS Firewall filters VPC traffic starting from rule group with the lowest numeric priority setting. This value must be greater than 100 and less than 9,000

  • vpc (IVpc) – (experimental) The VPC that to associate with the rule group.

  • mutation_protection (Optional[bool]) – (experimental) If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections. Default: true

  • name (Optional[str]) – (experimental) The name of the association. Default: - a CloudFormation generated name

Stability:

experimental

Return type:

FirewallRuleGroupAssociation

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

env

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

firewall_rule_group_arn

(experimental) The ARN (Amazon Resource Name) of the rule group.

Stability:

experimental

Attribute:

true

firewall_rule_group_creation_time

(experimental) The date and time that the rule group was created.

Stability:

experimental

Attribute:

true

firewall_rule_group_creator_request_id

(experimental) The creator request ID.

Stability:

experimental

Attribute:

true

firewall_rule_group_id

(experimental) The ID of the rule group.

Stability:

experimental

firewall_rule_group_modification_time

(experimental) The date and time that the rule group was last modified.

Stability:

experimental

Attribute:

true

firewall_rule_group_owner_id

(experimental) The AWS account ID for the account that created the rule group.

Stability:

experimental

Attribute:

true

firewall_rule_group_rule_count

(experimental) The number of rules in the rule group.

Stability:

experimental

Attribute:

true

firewall_rule_group_share_status

(experimental) Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account.

Stability:

experimental

Attribute:

true

firewall_rule_group_status

(experimental) The status of the rule group.

Stability:

experimental

Attribute:

true

firewall_rule_group_status_message

(experimental) Additional information about the status of the rule group.

Stability:

experimental

Attribute:

true

node

The construct tree node associated with this construct.

stack

The stack in which this resource is defined.

Static Methods

classmethod from_firewall_rule_group_id(scope, id, firewall_rule_group_id)

(experimental) Import an existing Firewall Rule Group.

Parameters:
  • scope (Construct) –

  • id (str) –

  • firewall_rule_group_id (str) –

Stability:

experimental

Return type:

IFirewallRuleGroup

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters:

x (Any) –

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct) –

Return type:

bool