Class: AWSCDK::WAFv2::CfnWebACLProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACLProps
- Defined in:
- wa_fv2/cfn_web_acl_props.rb
Overview
Properties for defining a CfnWebACL.
Instance Attribute Summary collapse
-
#application_config ⇒ AWSCDK::IResolvable, ...
readonly
Returns a list of
ApplicationAttributes. -
#association_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies custom configurations for the associations between the web ACL and protected resources.
-
#captcha_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies how AWS WAF should handle
CAPTCHAevaluations for rules that don't have their ownCaptchaConfigsettings. -
#challenge_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own
ChallengeConfigsettings. -
#custom_response_bodies ⇒ AWSCDK::IResolvable, ...
readonly
A map of custom response keys and content bodies.
-
#data_protection_config ⇒ AWSCDK::IResolvable, ...
readonly
Specifies data protection to apply to the web request data for the web ACL.
-
#default_action ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::DefaultActionProperty
readonly
The action to perform if none of the
Rulescontained in theWebACLmatch. -
#description ⇒ String?
readonly
A description of the web ACL that helps with identification.
-
#monetization_config ⇒ AWSCDK::IResolvable, ...
readonly
Configures monetization for the web ACL or rule group.
-
#name ⇒ String?
readonly
The name of the web ACL.
-
#on_source_d_do_s_protection_config ⇒ AWSCDK::IResolvable, ...
readonly
Configures the level of DDoS protection that applies to web ACLs associated with Application Load Balancers.
-
#rules ⇒ AWSCDK::IResolvable, ...
readonly
The rule statements used to identify the web requests that you want to manage.
-
#scope ⇒ String
readonly
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Key:value pairs associated with an AWS resource.
-
#token_domains ⇒ Array<String>?
readonly
Specifies the domains that AWS WAF should accept in a web request token.
-
#visibility_config ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::VisibilityConfigProperty
readonly
Defines and enables Amazon CloudWatch metrics and web request sample collection.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_action:, scope:, visibility_config:, application_config: nil, association_config: nil, captcha_config: nil, challenge_config: nil, custom_response_bodies: nil, data_protection_config: nil, description: nil, monetization_config: nil, name: nil, on_source_d_do_s_protection_config: nil, rules: nil, tags: nil, token_domains: nil) ⇒ CfnWebACLProps
constructor
A new instance of CfnWebACLProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(default_action:, scope:, visibility_config:, application_config: nil, association_config: nil, captcha_config: nil, challenge_config: nil, custom_response_bodies: nil, data_protection_config: nil, description: nil, monetization_config: nil, name: nil, on_source_d_do_s_protection_config: nil, rules: nil, tags: nil, token_domains: nil) ⇒ CfnWebACLProps
Returns a new instance of CfnWebACLProps.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 25 def initialize(default_action:, scope:, visibility_config:, application_config: nil, association_config: nil, captcha_config: nil, challenge_config: nil, custom_response_bodies: nil, data_protection_config: nil, description: nil, monetization_config: nil, name: nil, on_source_d_do_s_protection_config: nil, rules: nil, tags: nil, token_domains: nil) @default_action = default_action.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::DefaultActionProperty.new(**default_action.transform_keys(&:to_sym)) : default_action Jsii::Type.check_type(@default_action, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRGVmYXVsdEFjdGlvblByb3BlcnR5In1dfX0=")), "defaultAction") @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scope") @visibility_config = visibility_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::VisibilityConfigProperty.new(**visibility_config.transform_keys(&:to_sym)) : visibility_config Jsii::Type.check_type(@visibility_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuVmlzaWJpbGl0eUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "visibilityConfig") @application_config = application_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::ApplicationConfigProperty.new(**application_config.transform_keys(&:to_sym)) : application_config Jsii::Type.check_type(@application_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQXBwbGljYXRpb25Db25maWdQcm9wZXJ0eSJ9XX19")), "applicationConfig") unless @application_config.nil? @association_config = association_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::AssociationConfigProperty.new(**association_config.transform_keys(&:to_sym)) : association_config Jsii::Type.check_type(@association_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQXNzb2NpYXRpb25Db25maWdQcm9wZXJ0eSJ9XX19")), "associationConfig") unless @association_config.nil? @captcha_config = captcha_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::CaptchaConfigProperty.new(**captcha_config.transform_keys(&:to_sym)) : captcha_config Jsii::Type.check_type(@captcha_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQ2FwdGNoYUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "captchaConfig") unless @captcha_config.nil? @challenge_config = challenge_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::ChallengeConfigProperty.new(**challenge_config.transform_keys(&:to_sym)) : challenge_config Jsii::Type.check_type(@challenge_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuQ2hhbGxlbmdlQ29uZmlnUHJvcGVydHkifV19fQ==")), "challengeConfig") unless @challenge_config.nil? @custom_response_bodies = custom_response_bodies Jsii::Type.check_type(@custom_response_bodies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLkN1c3RvbVJlc3BvbnNlQm9keVByb3BlcnR5In1dfX0sImtpbmQiOiJtYXAifX1dfX0=")), "customResponseBodies") unless @custom_response_bodies.nil? @data_protection_config = data_protection_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::DataProtectionConfigProperty.new(**data_protection_config.transform_keys(&:to_sym)) : data_protection_config Jsii::Type.check_type(@data_protection_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRGF0YVByb3RlY3Rpb25Db25maWdQcm9wZXJ0eSJ9XX19")), "dataProtectionConfig") unless @data_protection_config.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @monetization_config = monetization_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::MonetizationConfigProperty.new(**monetization_config.transform_keys(&:to_sym)) : monetization_config Jsii::Type.check_type(@monetization_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuTW9uZXRpemF0aW9uQ29uZmlnUHJvcGVydHkifV19fQ==")), "monetizationConfig") unless @monetization_config.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil? @on_source_d_do_s_protection_config = on_source_d_do_s_protection_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::OnSourceDDoSProtectionConfigProperty.new(**on_source_d_do_s_protection_config.transform_keys(&:to_sym)) : on_source_d_do_s_protection_config Jsii::Type.check_type(@on_source_d_do_s_protection_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuT25Tb3VyY2VERG9TUHJvdGVjdGlvbkNvbmZpZ1Byb3BlcnR5In1dfX0=")), "onSourceDDoSProtectionConfig") unless @on_source_d_do_s_protection_config.nil? @rules = rules Jsii::Type.check_type(@rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfd2FmdjIuQ2ZuV2ViQUNMLlJ1bGVQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "rules") unless @rules.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @token_domains = token_domains Jsii::Type.check_type(@token_domains, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tokenDomains") unless @token_domains.nil? end |
Instance Attribute Details
#application_config ⇒ AWSCDK::IResolvable, ... (readonly)
Returns a list of ApplicationAttribute s.
85 86 87 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 85 def application_config @application_config end |
#association_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies custom configurations for the associations between the web ACL and protected resources.
Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).
You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see AWS WAF Pricing .
For Application Load Balancer and AWS AppSync , the limit is fixed at 8 KB (8,192 bytes).
96 97 98 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 96 def association_config @association_config end |
#captcha_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies how AWS WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings.
If you don't specify this, AWS WAF uses its default settings for CaptchaConfig .
103 104 105 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 103 def captcha_config @captcha_config end |
#challenge_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own ChallengeConfig settings.
If you don't specify this, AWS WAF uses its default settings for ChallengeConfig .
110 111 112 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 110 def challenge_config @challenge_config end |
#custom_response_bodies ⇒ AWSCDK::IResolvable, ... (readonly)
A map of custom response keys and content bodies.
When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
121 122 123 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 121 def custom_response_bodies @custom_response_bodies end |
#data_protection_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies data protection to apply to the web request data for the web ACL.
This is a web ACL level data protection option.
The data protection that you configure for the web ACL alters the data that's available for any other data collection activity, including your AWS WAF logging destinations, web ACL request sampling, and Amazon Security Lake data collection and management. Your other option for data protection is in the logging configuration, which only affects logging.
130 131 132 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 130 def data_protection_config @data_protection_config end |
#default_action ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::DefaultActionProperty (readonly)
The action to perform if none of the Rules contained in the WebACL match.
64 65 66 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 64 def default_action @default_action end |
#description ⇒ String? (readonly)
A description of the web ACL that helps with identification.
135 136 137 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 135 def description @description end |
#monetization_config ⇒ AWSCDK::IResolvable, ... (readonly)
Configures monetization for the web ACL or rule group.
140 141 142 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 140 def monetization_config @monetization_config end |
#name ⇒ String? (readonly)
The name of the web ACL.
You cannot change the name of a web ACL after you create it.
147 148 149 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 147 def name @name end |
#on_source_d_do_s_protection_config ⇒ AWSCDK::IResolvable, ... (readonly)
Configures the level of DDoS protection that applies to web ACLs associated with Application Load Balancers.
152 153 154 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 152 def on_source_d_do_s_protection_config @on_source_d_do_s_protection_config end |
#rules ⇒ AWSCDK::IResolvable, ... (readonly)
The rule statements used to identify the web requests that you want to manage.
Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
159 160 161 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 159 def rules @rules end |
#scope ⇒ String (readonly)
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
For an AWS Amplify application, use CLOUDFRONT . A regional application can be an Application Load Balancer (ALB), an REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are CLOUDFRONT and REGIONAL .
For
CLOUDFRONT, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1.
For information about how to define the association of the web ACL with your resource, see WebACLAssociation .
75 76 77 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 75 def scope @scope end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Key:value pairs associated with an AWS resource.
The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
168 169 170 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 168 def @tags end |
#token_domains ⇒ Array<String>? (readonly)
Specifies the domains that AWS WAF should accept in a web request token.
This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
175 176 177 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 175 def token_domains @token_domains end |
#visibility_config ⇒ AWSCDK::IResolvable, AWSCDK::WAFv2::CfnWebACL::VisibilityConfigProperty (readonly)
Defines and enables Amazon CloudWatch metrics and web request sample collection.
80 81 82 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 80 def visibility_config @visibility_config end |
Class Method Details
.jsii_properties ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 177 def self.jsii_properties { :default_action => "defaultAction", :scope => "scope", :visibility_config => "visibilityConfig", :application_config => "applicationConfig", :association_config => "associationConfig", :captcha_config => "captchaConfig", :challenge_config => "challengeConfig", :custom_response_bodies => "customResponseBodies", :data_protection_config => "dataProtectionConfig", :description => "description", :monetization_config => "monetizationConfig", :name => "name", :on_source_d_do_s_protection_config => "onSourceDDoSProtectionConfig", :rules => "rules", :tags => "tags", :token_domains => "tokenDomains", } end |
Instance Method Details
#to_jsii ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'wa_fv2/cfn_web_acl_props.rb', line 198 def to_jsii result = {} result.merge!({ "defaultAction" => @default_action, "scope" => @scope, "visibilityConfig" => @visibility_config, "applicationConfig" => @application_config, "associationConfig" => @association_config, "captchaConfig" => @captcha_config, "challengeConfig" => @challenge_config, "customResponseBodies" => @custom_response_bodies, "dataProtectionConfig" => @data_protection_config, "description" => @description, "monetizationConfig" => @monetization_config, "name" => @name, "onSourceDDoSProtectionConfig" => @on_source_d_do_s_protection_config, "rules" => @rules, "tags" => @tags, "tokenDomains" => @token_domains, }) result.compact end |