Class: AWSCDK::NetworkFirewall::CfnRuleGroup::StatelessRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
network_firewall/cfn_rule_group.rb

Overview

A single stateless rule.

This is used in StatelessRulesAndCustomActions .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(priority:, rule_definition:) ⇒ StatelessRuleProperty

Returns a new instance of StatelessRuleProperty.

Parameters:



1692
1693
1694
1695
1696
1697
# File 'network_firewall/cfn_rule_group.rb', line 1692

def initialize(priority:, rule_definition:)
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority")
  @rule_definition = rule_definition.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::RuleDefinitionProperty.new(**rule_definition.transform_keys(&:to_sym)) : rule_definition
  Jsii::Type.check_type(@rule_definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLlJ1bGVEZWZpbml0aW9uUHJvcGVydHkifV19fQ==")), "ruleDefinition")
end

Instance Attribute Details

#priorityNumeric (readonly)

Indicates the order in which to run this rule relative to all of the rules that are defined for a stateless rule group.

Network Firewall evaluates the rules in a rule group starting with the lowest priority setting. You must ensure that the priority settings are unique for the rule group.

Each stateless rule group uses exactly one StatelessRulesAndCustomActions object, and each StatelessRulesAndCustomActions contains exactly one StatelessRules object. To ensure unique priority settings for your rule groups, set unique priorities for the stateless rules that you define inside any single StatelessRules object.

You can change the priority settings of your rules at any time. To make it easier to insert rules later, number them so there's a wide range in between, for example use 100, 200, and so on.



1709
1710
1711
# File 'network_firewall/cfn_rule_group.rb', line 1709

def priority
  @priority
end

#rule_definitionAWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::RuleDefinitionProperty (readonly)

Defines the stateless 5-tuple packet inspection criteria and the action to take on a packet that matches the criteria.



1714
1715
1716
# File 'network_firewall/cfn_rule_group.rb', line 1714

def rule_definition
  @rule_definition
end

Class Method Details

.jsii_propertiesObject



1716
1717
1718
1719
1720
1721
# File 'network_firewall/cfn_rule_group.rb', line 1716

def self.jsii_properties
  {
    :priority => "priority",
    :rule_definition => "ruleDefinition",
  }
end

Instance Method Details

#to_jsiiObject



1723
1724
1725
1726
1727
1728
1729
1730
# File 'network_firewall/cfn_rule_group.rb', line 1723

def to_jsii
  result = {}
  result.merge!({
    "priority" => @priority,
    "ruleDefinition" => @rule_definition,
  })
  result.compact
end