Class: AWSCDK::WAFv2::CfnRegexPatternSetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
wa_fv2/cfn_regex_pattern_set_props.rb

Overview

Properties for defining a CfnRegexPatternSet.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(regular_expression_list:, scope:, description: nil, name: nil, tags: nil) ⇒ CfnRegexPatternSetProps

Returns a new instance of CfnRegexPatternSetProps.

Parameters:

  • regular_expression_list (Array<String>)

    The regular expression patterns in the set.

  • scope (String)

    Specifies whether this is for an Amazon CloudFront distribution or for a regional application.

  • description (String, nil) (defaults to: nil)

    A description of the set that helps with identification.

  • name (String, nil) (defaults to: nil)

    The name of the set.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Key:value pairs associated with an AWS resource.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 14

def initialize(regular_expression_list:, scope:, description: nil, name: nil, tags: nil)
  @regular_expression_list = regular_expression_list
  Jsii::Type.check_type(@regular_expression_list, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regularExpressionList")
  @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 = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description of the set that helps with identification.



45
46
47
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 45

def description
  @description
end

#nameString? (readonly)

The name of the set.

You cannot change the name after you create the set.



52
53
54
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 52

def name
  @name
end

#regular_expression_listArray<String> (readonly)

The regular expression patterns in the set.



31
32
33
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 31

def regular_expression_list
  @regular_expression_list
end

#scopeString (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 .



40
41
42
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 40

def scope
  @scope
end

#tagsArray<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.



61
62
63
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 61

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



63
64
65
66
67
68
69
70
71
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 63

def self.jsii_properties
  {
    :regular_expression_list => "regularExpressionList",
    :scope => "scope",
    :description => "description",
    :name => "name",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



73
74
75
76
77
78
79
80
81
82
83
# File 'wa_fv2/cfn_regex_pattern_set_props.rb', line 73

def to_jsii
  result = {}
  result.merge!({
    "regularExpressionList" => @regular_expression_list,
    "scope" => @scope,
    "description" => @description,
    "name" => @name,
    "tags" => @tags,
  })
  result.compact
end