Class: AWSCDK::WAFv2::CfnWebACL::VisibilityConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::VisibilityConfigProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
Defines and enables Amazon CloudWatch metrics and web request sample collection.
Instance Attribute Summary collapse
-
#cloud_watch_metrics_enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
Indicates whether the associated resource sends metrics to Amazon CloudWatch.
-
#metric_name ⇒ String
readonly
A name of the Amazon CloudWatch metric dimension.
-
#sampled_requests_enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
Indicates whether AWS WAF should store a sampling of the web requests that match the rules.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cloud_watch_metrics_enabled:, metric_name:, sampled_requests_enabled:) ⇒ VisibilityConfigProperty
constructor
A new instance of VisibilityConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cloud_watch_metrics_enabled:, metric_name:, sampled_requests_enabled:) ⇒ VisibilityConfigProperty
Returns a new instance of VisibilityConfigProperty.
6440 6441 6442 6443 6444 6445 6446 6447 |
# File 'wa_fv2/cfn_web_acl.rb', line 6440 def initialize(cloud_watch_metrics_enabled:, metric_name:, sampled_requests_enabled:) @cloud_watch_metrics_enabled = cloud_watch_metrics_enabled Jsii::Type.check_type(@cloud_watch_metrics_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "cloudWatchMetricsEnabled") @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @sampled_requests_enabled = sampled_requests_enabled Jsii::Type.check_type(@sampled_requests_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "sampledRequestsEnabled") end |
Instance Attribute Details
#cloud_watch_metrics_enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
Indicates whether the associated resource sends metrics to Amazon CloudWatch.
For the list of available metrics, see AWS WAF Metrics in the AWS WAF Developer Guide .
For web ACLs, the metrics are for web requests that have the web ACL default action applied. AWS WAF applies the default action to web requests that pass the inspection of all rules in the web ACL without being either allowed or blocked. For more information, see The web ACL default action in the AWS WAF Developer Guide .
6458 6459 6460 |
# File 'wa_fv2/cfn_web_acl.rb', line 6458 def cloud_watch_metrics_enabled @cloud_watch_metrics_enabled end |
#metric_name ⇒ String (readonly)
A name of the Amazon CloudWatch metric dimension.
The name can contain only the characters: A-Z, a-z, 0-9, - (hyphen), and _ (underscore). The name can be from one to 128 characters long. It can't contain whitespace or metric names that are reserved for AWS WAF , for example All and Default_Action .
6465 6466 6467 |
# File 'wa_fv2/cfn_web_acl.rb', line 6465 def metric_name @metric_name end |
#sampled_requests_enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
Indicates whether AWS WAF should store a sampling of the web requests that match the rules.
You can view the sampled requests through the AWS WAF console.
If you configure data protection for the web ACL, the protection applies to the web ACL's sampled web request data.
Request sampling doesn't provide a field redaction option, and any field redaction that you specify in your logging configuration doesn't affect sampling. You can only exclude fields from request sampling by disabling sampling in the web ACL visibility configuration or by configuring data protection for the web ACL.
6476 6477 6478 |
# File 'wa_fv2/cfn_web_acl.rb', line 6476 def sampled_requests_enabled @sampled_requests_enabled end |
Class Method Details
.jsii_properties ⇒ Object
6478 6479 6480 6481 6482 6483 6484 |
# File 'wa_fv2/cfn_web_acl.rb', line 6478 def self.jsii_properties { :cloud_watch_metrics_enabled => "cloudWatchMetricsEnabled", :metric_name => "metricName", :sampled_requests_enabled => "sampledRequestsEnabled", } end |
Instance Method Details
#to_jsii ⇒ Object
6486 6487 6488 6489 6490 6491 6492 6493 6494 |
# File 'wa_fv2/cfn_web_acl.rb', line 6486 def to_jsii result = {} result.merge!({ "cloudWatchMetricsEnabled" => @cloud_watch_metrics_enabled, "metricName" => @metric_name, "sampledRequestsEnabled" => @sampled_requests_enabled, }) result.compact end |