Class: AWSCDK::WorkspacesWeb::CfnDataProtectionSettings::CustomPatternProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
workspaces_web/cfn_data_protection_settings.rb

Overview

The pattern configuration for redacting custom data types in session.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern_name:, pattern_regex:, keyword_regex: nil, pattern_description: nil) ⇒ CustomPatternProperty

Returns a new instance of CustomPatternProperty.

Parameters:

  • pattern_name (String)

    The pattern name for the custom pattern.

  • pattern_regex (String)

    The pattern regex for the customer pattern.

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

    The keyword regex for the customer pattern.

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

    The pattern description for the customer pattern.



602
603
604
605
606
607
608
609
610
611
# File 'workspaces_web/cfn_data_protection_settings.rb', line 602

def initialize(pattern_name:, pattern_regex:, keyword_regex: nil, pattern_description: nil)
  @pattern_name = pattern_name
  Jsii::Type.check_type(@pattern_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "patternName")
  @pattern_regex = pattern_regex
  Jsii::Type.check_type(@pattern_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "patternRegex")
  @keyword_regex = keyword_regex
  Jsii::Type.check_type(@keyword_regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keywordRegex") unless @keyword_regex.nil?
  @pattern_description = pattern_description
  Jsii::Type.check_type(@pattern_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "patternDescription") unless @pattern_description.nil?
end

Instance Attribute Details

#keyword_regexString? (readonly)

The keyword regex for the customer pattern.

After there is a match to the pattern regex, the keyword regex is used to search within the proximity of the match. If there is a keyword match, then the match is confirmed. If no keyword regex is provided, the pattern regex match will automatically be confirmed. The format must follow JavaScript regex format. The pattern must be enclosed between slashes, and can have flags behind the second slash. For example, “/ab+c/gi”



631
632
633
# File 'workspaces_web/cfn_data_protection_settings.rb', line 631

def keyword_regex
  @keyword_regex
end

#pattern_descriptionString? (readonly)

The pattern description for the customer pattern.



636
637
638
# File 'workspaces_web/cfn_data_protection_settings.rb', line 636

def pattern_description
  @pattern_description
end

#pattern_nameString (readonly)

The pattern name for the custom pattern.



617
618
619
# File 'workspaces_web/cfn_data_protection_settings.rb', line 617

def pattern_name
  @pattern_name
end

#pattern_regexString (readonly)

The pattern regex for the customer pattern.

The format must follow JavaScript regex format. The pattern must be enclosed between slashes, and can have flags behind the second slash. For example: “/ab+c/gi”.



624
625
626
# File 'workspaces_web/cfn_data_protection_settings.rb', line 624

def pattern_regex
  @pattern_regex
end

Class Method Details

.jsii_propertiesObject



638
639
640
641
642
643
644
645
# File 'workspaces_web/cfn_data_protection_settings.rb', line 638

def self.jsii_properties
  {
    :pattern_name => "patternName",
    :pattern_regex => "patternRegex",
    :keyword_regex => "keywordRegex",
    :pattern_description => "patternDescription",
  }
end

Instance Method Details

#to_jsiiObject



647
648
649
650
651
652
653
654
655
656
# File 'workspaces_web/cfn_data_protection_settings.rb', line 647

def to_jsii
  result = {}
  result.merge!({
    "patternName" => @pattern_name,
    "patternRegex" => @pattern_regex,
    "keywordRegex" => @keyword_regex,
    "patternDescription" => @pattern_description,
  })
  result.compact
end