Class: AWSCDK::WAFv2::CfnWebACL::AsnMatchStatementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnWebACL::AsnMatchStatementProperty
- Defined in:
- wa_fv2/cfn_web_acl.rb
Overview
A rule statement that inspects web traffic based on the Autonomous System Number (ASN) associated with the request's IP address.
For additional details, see ASN match rule statement in the AWS WAF Developer Guide .
Instance Attribute Summary collapse
-
#asn_list ⇒ Array<Numeric>, ...
readonly
Contains one or more Autonomous System Numbers (ASNs).
-
#forwarded_ip_config ⇒ AWSCDK::IResolvable, ...
readonly
The configuration for inspecting IP addresses to match against an ASN in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(asn_list: nil, forwarded_ip_config: nil) ⇒ AsnMatchStatementProperty
constructor
A new instance of AsnMatchStatementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(asn_list: nil, forwarded_ip_config: nil) ⇒ AsnMatchStatementProperty
Returns a new instance of AsnMatchStatementProperty.
1207 1208 1209 1210 1211 1212 |
# File 'wa_fv2/cfn_web_acl.rb', line 1207 def initialize(asn_list: nil, forwarded_ip_config: nil) @asn_list = asn_list Jsii::Type.check_type(@asn_list, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siY29sbGVjdGlvbiI6eyJlbGVtZW50dHlwZSI6eyJwcmltaXRpdmUiOiJudW1iZXIifSwia2luZCI6ImFycmF5In19LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "asnList") unless @asn_list.nil? @forwarded_ip_config = forwarded_ip_config.is_a?(Hash) ? ::AWSCDK::WAFv2::CfnWebACL::ForwardedIPConfigurationProperty.new(**forwarded_ip_config.transform_keys(&:to_sym)) : forwarded_ip_config Jsii::Type.check_type(@forwarded_ip_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193YWZ2Mi5DZm5XZWJBQ0wuRm9yd2FyZGVkSVBDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "forwardedIpConfig") unless @forwarded_ip_config.nil? end |
Instance Attribute Details
#asn_list ⇒ Array<Numeric>, ... (readonly)
Contains one or more Autonomous System Numbers (ASNs).
ASNs are unique identifiers assigned to large internet networks managed by organizations such as internet service providers, enterprises, universities, or government agencies.
1220 1221 1222 |
# File 'wa_fv2/cfn_web_acl.rb', line 1220 def asn_list @asn_list end |
#forwarded_ip_config ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration for inspecting IP addresses to match against an ASN in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.
Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
1227 1228 1229 |
# File 'wa_fv2/cfn_web_acl.rb', line 1227 def forwarded_ip_config @forwarded_ip_config end |
Class Method Details
.jsii_properties ⇒ Object
1229 1230 1231 1232 1233 1234 |
# File 'wa_fv2/cfn_web_acl.rb', line 1229 def self.jsii_properties { :asn_list => "asnList", :forwarded_ip_config => "forwardedIpConfig", } end |
Instance Method Details
#to_jsii ⇒ Object
1236 1237 1238 1239 1240 1241 1242 1243 |
# File 'wa_fv2/cfn_web_acl.rb', line 1236 def to_jsii result = {} result.merge!({ "asnList" => @asn_list, "forwardedIpConfig" => @forwarded_ip_config, }) result.compact end |