Class: AWSCDK::WAFv2::CfnIPSetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::WAFv2::CfnIPSetProps
- Defined in:
- wa_fv2/cfn_ip_set_props.rb
Overview
Properties for defining a CfnIPSet.
Instance Attribute Summary collapse
-
#addresses ⇒ Array<String>
readonly
Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
-
#description ⇒ String?
readonly
A description of the IP set that helps with identification.
-
#ip_address_version ⇒ String
readonly
The version of the IP addresses, either
IPV4orIPV6. -
#name ⇒ String?
readonly
The name of the IP set.
-
#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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(addresses:, ip_address_version:, scope:, description: nil, name: nil, tags: nil) ⇒ CfnIPSetProps
constructor
A new instance of CfnIPSetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(addresses:, ip_address_version:, scope:, description: nil, name: nil, tags: nil) ⇒ CfnIPSetProps
Returns a new instance of CfnIPSetProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 15 def initialize(addresses:, ip_address_version:, scope:, description: nil, name: nil, tags: nil) @addresses = addresses Jsii::Type.check_type(@addresses, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "addresses") @ip_address_version = ip_address_version Jsii::Type.check_type(@ip_address_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipAddressVersion") @scope = scope Jsii::Type.check_type(@scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scope") @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.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? end |
Instance Attribute Details
#addresses ⇒ Array<String> (readonly)
Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all IPv4 and IPv6 CIDR ranges except for /0 .
Example address strings:
- For requests that originated from the IP address 192.0.2.44, specify
192.0.2.44/32. - For requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify
192.0.2.0/24. - For requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify
1111:0000:0000:0000:0000:0000:0000:0111/128. - For requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
1111:0000:0000:0000:0000:0000:0000:0000/64.
For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing .
Example JSON Addresses specifications:
- Empty array:
"Addresses": [] - Array with one address:
"Addresses": ["192.0.2.44/32"] - Array with three addresses:
"Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"] - INVALID specification:
"Addresses": [""]INVALID
52 53 54 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 52 def addresses @addresses end |
#description ⇒ String? (readonly)
A description of the IP set that helps with identification.
71 72 73 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 71 def description @description end |
#ip_address_version ⇒ String (readonly)
The version of the IP addresses, either IPV4 or IPV6 .
57 58 59 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 57 def ip_address_version @ip_address_version end |
#name ⇒ String? (readonly)
The name of the IP set.
You cannot change the name of an IPSet after you create it.
78 79 80 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 78 def name @name end |
#scope ⇒ String (readonly)
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
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.
66 67 68 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 66 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.
87 88 89 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 87 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
89 90 91 92 93 94 95 96 97 98 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 89 def self.jsii_properties { :addresses => "addresses", :ip_address_version => "ipAddressVersion", :scope => "scope", :description => "description", :name => "name", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'wa_fv2/cfn_ip_set_props.rb', line 100 def to_jsii result = {} result.merge!({ "addresses" => @addresses, "ipAddressVersion" => @ip_address_version, "scope" => @scope, "description" => @description, "name" => @name, "tags" => @tags, }) result.compact end |