Class: AWSCDK::NetworkFirewall::CfnFirewallPolicy::CustomActionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
network_firewall/cfn_firewall_policy.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 an 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:



614
615
616
617
618
619
# File 'network_firewall/cfn_firewall_policy.rb', line 614

def initialize(action_definition:, action_name:)
  @action_definition = action_definition.is_a?(Hash) ? ::AWSCDK::NetworkFirewall::CfnFirewallPolicy::ActionDefinitionProperty.new(**action_definition.transform_keys(&:to_sym)) : action_definition
  Jsii::Type.check_type(@action_definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19uZXR3b3JrZmlyZXdhbGwuQ2ZuRmlyZXdhbGxQb2xpY3kuQWN0aW9uRGVmaW5pdGlvblByb3BlcnR5In1dfX0=")), "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.



632
633
634
# File 'network_firewall/cfn_firewall_policy.rb', line 632

def action_name
  @action_name
end

Class Method Details

.jsii_propertiesObject



634
635
636
637
638
639
# File 'network_firewall/cfn_firewall_policy.rb', line 634

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

Instance Method Details

#to_jsiiObject



641
642
643
644
645
646
647
648
# File 'network_firewall/cfn_firewall_policy.rb', line 641

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