Class: AWSCDK::NetworkFirewall::CfnRuleGroup::CustomActionProperty

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

Overview

An optional, non-standard action to use for stateless packet handling.

You can define this in addition to the standard action that you must specify.

You define and name the custom actions that you want to be able to use, and then you reference them by name in your actions settings.

You can use custom actions in the following places:

  • In a StatelessRulesAndCustomActions . The custom actions are available for use by name inside the StatelessRulesAndCustomActions where you define them. You can use them for your stateless rule actions to specify what to do with a packet that matches the rule's match attributes.
  • In an firewall policy specification, in StatelessCustomActions . The custom actions are available for use inside the policy where you define them. You can use them for the policy's default stateless actions settings to specify what to do with packets that don't match any of the policy's stateless rules.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action_definition:, action_name:) ⇒ CustomActionProperty

Returns a new instance of CustomActionProperty.

Parameters:



698
699
700
701
702
703
# File 'network_firewall/cfn_rule_group.rb', line 698

def initialize(action_definition:, action_name:)
  @action_definition = action_definition.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnRuleGroup::ActionDefinitionProperty.new(**action_definition.transform_keys(&:to_sym)) : action_definition
  Jsii::Type.check_type(@action_definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuUnVsZUdyb3VwLkFjdGlvbkRlZmluaXRpb25Qcm9wZXJ0eSJ9XX19")), "actionDefinition")
  @action_name = action_name
  Jsii::Type.check_type(@action_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actionName")
end

Instance Attribute Details

#action_nameString (readonly)

The descriptive name of the custom action.

You can't change the name of a custom action after you create it.



716
717
718
# File 'network_firewall/cfn_rule_group.rb', line 716

def action_name
  @action_name
end

Class Method Details

.jsii_propertiesObject



718
719
720
721
722
723
# File 'network_firewall/cfn_rule_group.rb', line 718

def self.jsii_properties
  {
    :action_definition => "actionDefinition",
    :action_name => "actionName",
  }
end

Instance Method Details

#to_jsiiObject



725
726
727
728
729
730
731
732
# File 'network_firewall/cfn_rule_group.rb', line 725

def to_jsii
  result = {}
  result.merge!({
    "actionDefinition" => @action_definition,
    "actionName" => @action_name,
  })
  result.compact
end