Class: AWSCDK::WAF::CfnWebACLProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAF::CfnWebACLProps
- Defined in:
- waf/cfn_web_acl_props.rb
Overview
Properties for defining a CfnWebACL.
Instance Attribute Summary collapse
-
#default_action ⇒ AWSCDK::IResolvable, AWSCDK::WAF::CfnWebACL::WAFActionProperty
readonly
The action to perform if none of the
Rulescontained in theWebACLmatch. -
#metric_name ⇒ String
readonly
The name of the metrics for this
WebACL. -
#name ⇒ String
readonly
A friendly name or description of the
WebACL. -
#rules ⇒ AWSCDK::IResolvable, ...
readonly
An array that contains the action for each
Rulein aWebACL, the priority of theRule, and the ID of theRule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_action:, metric_name:, name:, rules: nil) ⇒ CfnWebACLProps
constructor
A new instance of CfnWebACLProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(default_action:, metric_name:, name:, rules: nil) ⇒ CfnWebACLProps
Returns a new instance of CfnWebACLProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'waf/cfn_web_acl_props.rb', line 13 def initialize(default_action:, metric_name:, name:, rules: nil) @default_action = default_action.is_a?(Hash) ? ::AWSCDK::WAF::CfnWebACL::WAFActionProperty.new(**default_action.transform_keys(&:to_sym)) : default_action Jsii::Type.check_type(@default_action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWYuQ2ZuV2ViQUNMLldhZkFjdGlvblByb3BlcnR5In1dfX0=")), "defaultAction") @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @rules = rules Jsii::Type.check_type(@rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmLkNmbldlYkFDTC5BY3RpdmF0ZWRSdWxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "rules") unless @rules.nil? end |
Instance Attribute Details
#default_action ⇒ AWSCDK::IResolvable, AWSCDK::WAF::CfnWebACL::WAFActionProperty (readonly)
The action to perform if none of the Rules contained in the WebACL match.
The action is specified by the WafAction object.
30 31 32 |
# File 'waf/cfn_web_acl_props.rb', line 30 def default_action @default_action end |
#metric_name ⇒ String (readonly)
The name of the metrics for this WebACL .
The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF , including "All" and "Default_Action." You can't change MetricName after you create the WebACL .
37 38 39 |
# File 'waf/cfn_web_acl_props.rb', line 37 def metric_name @metric_name end |
#name ⇒ String (readonly)
A friendly name or description of the WebACL .
You can't change the name of a WebACL after you create it.
44 45 46 |
# File 'waf/cfn_web_acl_props.rb', line 44 def name @name end |
#rules ⇒ AWSCDK::IResolvable, ... (readonly)
An array that contains the action for each Rule in a WebACL , the priority of the Rule , and the ID of the Rule .
49 50 51 |
# File 'waf/cfn_web_acl_props.rb', line 49 def rules @rules end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'waf/cfn_web_acl_props.rb', line 51 def self.jsii_properties { :default_action => "defaultAction", :metric_name => "metricName", :name => "name", :rules => "rules", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 |
# File 'waf/cfn_web_acl_props.rb', line 60 def to_jsii result = {} result.merge!({ "defaultAction" => @default_action, "metricName" => @metric_name, "name" => @name, "rules" => @rules, }) result.compact end |