Class: AWSCDK::NetworkFirewall::CfnRuleGroup::RuleGroupProperty

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

Overview

The object that defines the rules in a rule group.

AWS Network Firewall uses a rule group to inspect and control network traffic. You define stateless rule groups to inspect individual packets and you define stateful rule groups to inspect packets in the context of their traffic flow.

To use a rule group, you include it by reference in an Network Firewall firewall policy, then you use the policy in a firewall. You can reference a rule group from more than one firewall policy, and you can use a firewall policy in more than one firewall.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rules_source:, reference_sets: nil, rule_variables: nil, stateful_rule_options: nil) ⇒ RuleGroupProperty

Returns a new instance of RuleGroupProperty.

Parameters:



1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
# File 'network_firewall/cfn_rule_group.rb', line 1291

def initialize(rules_source:, reference_sets: nil, rule_variables: nil, stateful_rule_options: nil)
  @rules_source = rules_source.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::RulesSourceProperty.new(**rules_source.transform_keys(&:to_sym)) : rules_source
  Jsii::Type.check_type(@rules_source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLlJ1bGVzU291cmNlUHJvcGVydHkifV19fQ==")), "rulesSource")
  @reference_sets = reference_sets.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::ReferenceSetsProperty.new(**reference_sets.transform_keys(&:to_sym)) : reference_sets
  Jsii::Type.check_type(@reference_sets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLlJlZmVyZW5jZVNldHNQcm9wZXJ0eSJ9XX19")), "referenceSets") unless @reference_sets.nil?
  @rule_variables = rule_variables.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::RuleVariablesProperty.new(**rule_variables.transform_keys(&:to_sym)) : rule_variables
  Jsii::Type.check_type(@rule_variables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLlJ1bGVWYXJpYWJsZXNQcm9wZXJ0eSJ9XX19")), "ruleVariables") unless @rule_variables.nil?
  @stateful_rule_options = stateful_rule_options.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::StatefulRuleOptionsProperty.new(**stateful_rule_options.transform_keys(&:to_sym)) : stateful_rule_options
  Jsii::Type.check_type(@stateful_rule_options, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLlN0YXRlZnVsUnVsZU9wdGlvbnNQcm9wZXJ0eSJ9XX19")), "statefulRuleOptions") unless @stateful_rule_options.nil?
end

Instance Attribute Details

#reference_setsAWSCDK::IResolvable, ... (readonly)

The reference sets for the stateful rule group.



1311
1312
1313
# File 'network_firewall/cfn_rule_group.rb', line 1311

def reference_sets
  @reference_sets
end

#rule_variablesAWSCDK::IResolvable, ... (readonly)

Settings that are available for use in the rules in the rule group.

You can only use these for stateful rule groups.



1318
1319
1320
# File 'network_firewall/cfn_rule_group.rb', line 1318

def rule_variables
  @rule_variables
end

#rules_sourceAWSCDK::IResolvable, AWSCDK::NetworkFirewall::CfnRuleGroup::RulesSourceProperty (readonly)

The stateful rules or stateless rules for the rule group.



1306
1307
1308
# File 'network_firewall/cfn_rule_group.rb', line 1306

def rules_source
  @rules_source
end

#stateful_rule_optionsAWSCDK::IResolvable, ... (readonly)

Additional options governing how Network Firewall handles stateful rules.

The policies where you use your stateful rule group must have stateful rule options settings that are compatible with these settings. Some limitations apply; for more information, see Strict evaluation order in the AWS Network Firewall Developer Guide .



1325
1326
1327
# File 'network_firewall/cfn_rule_group.rb', line 1325

def stateful_rule_options
  @stateful_rule_options
end

Class Method Details

.jsii_propertiesObject



1327
1328
1329
1330
1331
1332
1333
1334
# File 'network_firewall/cfn_rule_group.rb', line 1327

def self.jsii_properties
  {
    :rules_source => "rulesSource",
    :reference_sets => "referenceSets",
    :rule_variables => "ruleVariables",
    :stateful_rule_options => "statefulRuleOptions",
  }
end

Instance Method Details

#to_jsiiObject



1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
# File 'network_firewall/cfn_rule_group.rb', line 1336

def to_jsii
  result = {}
  result.merge!({
    "rulesSource" => @rules_source,
    "referenceSets" => @reference_sets,
    "ruleVariables" => @rule_variables,
    "statefulRuleOptions" => @stateful_rule_options,
  })
  result.compact
end