Class: AWSCDK::SecurityAgent::CfnPentest::NetworkTrafficRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
security_agent/cfn_pentest.rb

Overview

Network traffic rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(effect: nil, network_traffic_rule_type: nil, pattern: nil) ⇒ NetworkTrafficRuleProperty

Returns a new instance of NetworkTrafficRuleProperty.

Parameters:

  • effect (String, nil) (defaults to: nil)

    Whether to allow or deny traffic matching this rule.

  • network_traffic_rule_type (String, nil) (defaults to: nil)

    Type of pattern matching for this rule.

  • pattern (String, nil) (defaults to: nil)

    URL pattern this rule applies to.



1053
1054
1055
1056
1057
1058
1059
1060
# File 'security_agent/cfn_pentest.rb', line 1053

def initialize(effect: nil, network_traffic_rule_type: nil, pattern: nil)
  @effect = effect
  Jsii::Type.check_type(@effect, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "effect") unless @effect.nil?
  @network_traffic_rule_type = network_traffic_rule_type
  Jsii::Type.check_type(@network_traffic_rule_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "networkTrafficRuleType") unless @network_traffic_rule_type.nil?
  @pattern = pattern
  Jsii::Type.check_type(@pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") unless @pattern.nil?
end

Instance Attribute Details

#effectString? (readonly)

Whether to allow or deny traffic matching this rule.



1066
1067
1068
# File 'security_agent/cfn_pentest.rb', line 1066

def effect
  @effect
end

#network_traffic_rule_typeString? (readonly)

Type of pattern matching for this rule.



1071
1072
1073
# File 'security_agent/cfn_pentest.rb', line 1071

def network_traffic_rule_type
  @network_traffic_rule_type
end

#patternString? (readonly)

URL pattern this rule applies to.



1076
1077
1078
# File 'security_agent/cfn_pentest.rb', line 1076

def pattern
  @pattern
end

Class Method Details

.jsii_propertiesObject



1078
1079
1080
1081
1082
1083
1084
# File 'security_agent/cfn_pentest.rb', line 1078

def self.jsii_properties
  {
    :effect => "effect",
    :network_traffic_rule_type => "networkTrafficRuleType",
    :pattern => "pattern",
  }
end

Instance Method Details

#to_jsiiObject



1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'security_agent/cfn_pentest.rb', line 1086

def to_jsii
  result = {}
  result.merge!({
    "effect" => @effect,
    "networkTrafficRuleType" => @network_traffic_rule_type,
    "pattern" => @pattern,
  })
  result.compact
end