Class: AWSCDK::Macie::CfnCustomDataIdentifierProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
macie/cfn_custom_data_identifier_props.rb

Overview

Properties for defining a CfnCustomDataIdentifier.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, regex:, description: nil, ignore_words: nil, keywords: nil, maximum_match_distance: nil, tags: nil) ⇒ CfnCustomDataIdentifierProps

Returns a new instance of CfnCustomDataIdentifierProps.

Parameters:

  • name (String)

    A custom name for the custom data identifier. The name can contain 1-128 characters.

  • regex (String)

    The regular expression ( regex ) that defines the text pattern to match.

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

    A custom description of the custom data identifier. The description can contain 1-512 characters.

  • ignore_words (Array<String>, nil) (defaults to: nil)

    An array of character sequences ( ignore words ) to exclude from the results.

  • keywords (Array<String>, nil) (defaults to: nil)

    An array of character sequences ( keywords ), one of which must precede and be in proximity ( MaximumMatchDistance ) of the regular expression ( Regex ) to match.

  • maximum_match_distance (Numeric, nil) (defaults to: nil)

    The maximum number of characters that can exist between the end of at least one complete character sequence specified by the Keywords array and the end of text that matches the regular expression ( Regex ).

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

    An array of key-value pairs to apply to the custom data identifier.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'macie/cfn_custom_data_identifier_props.rb', line 16

def initialize(name:, regex:, description: nil, ignore_words: nil, keywords: nil, maximum_match_distance: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @regex = regex
  Jsii::Type.check_type(@regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regex")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @ignore_words = ignore_words
  Jsii::Type.check_type(@ignore_words, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "ignoreWords") unless @ignore_words.nil?
  @keywords = keywords
  Jsii::Type.check_type(@keywords, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "keywords") unless @keywords.nil?
  @maximum_match_distance = maximum_match_distance
  Jsii::Type.check_type(@maximum_match_distance, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumMatchDistance") unless @maximum_match_distance.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 custom description of the custom data identifier. The description can contain 1-512 characters.

Avoid including sensitive data in the description. Users of the account might be able to see the description, depending on the actions that they're allowed to perform in Amazon Macie .



53
54
55
# File 'macie/cfn_custom_data_identifier_props.rb', line 53

def description
  @description
end

#ignore_wordsArray<String>? (readonly)

An array of character sequences ( ignore words ) to exclude from the results.

If text matches the regular expression ( Regex ) but it contains a string in this array, Amazon Macie ignores the text and doesn't include it in the results.

The array can contain 1-10 ignore words. Each ignore word can contain 4-90 UTF-8 characters. Ignore words are case sensitive.



62
63
64
# File 'macie/cfn_custom_data_identifier_props.rb', line 62

def ignore_words
  @ignore_words
end

#keywordsArray<String>? (readonly)

An array of character sequences ( keywords ), one of which must precede and be in proximity ( MaximumMatchDistance ) of the regular expression ( Regex ) to match.

The array can contain 1-50 keywords. Each keyword can contain 3-90 UTF-8 characters. Keywords aren't case sensitive.



69
70
71
# File 'macie/cfn_custom_data_identifier_props.rb', line 69

def keywords
  @keywords
end

#maximum_match_distanceNumeric? (readonly)

The maximum number of characters that can exist between the end of at least one complete character sequence specified by the Keywords array and the end of text that matches the regular expression ( Regex ).

If a complete keyword precedes all the text that matches the regular expression and the keyword is within the specified distance, Amazon Macie includes the result.

The distance can be 1-300 characters. The default value is 50.



78
79
80
# File 'macie/cfn_custom_data_identifier_props.rb', line 78

def maximum_match_distance
  @maximum_match_distance
end

#nameString (readonly)

A custom name for the custom data identifier. The name can contain 1-128 characters.

Avoid including sensitive data in the name of a custom data identifier. Users of the account might be able to see the name, depending on the actions that they're allowed to perform in Amazon Macie .



39
40
41
# File 'macie/cfn_custom_data_identifier_props.rb', line 39

def name
  @name
end

#regexString (readonly)

The regular expression ( regex ) that defines the text pattern to match.

The expression can contain 1-512 characters.



46
47
48
# File 'macie/cfn_custom_data_identifier_props.rb', line 46

def regex
  @regex
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to the custom data identifier.

For more information, see Resource tag .



85
86
87
# File 'macie/cfn_custom_data_identifier_props.rb', line 85

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



87
88
89
90
91
92
93
94
95
96
97
# File 'macie/cfn_custom_data_identifier_props.rb', line 87

def self.jsii_properties
  {
    :name => "name",
    :regex => "regex",
    :description => "description",
    :ignore_words => "ignoreWords",
    :keywords => "keywords",
    :maximum_match_distance => "maximumMatchDistance",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'macie/cfn_custom_data_identifier_props.rb', line 99

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "regex" => @regex,
    "description" => @description,
    "ignoreWords" => @ignore_words,
    "keywords" => @keywords,
    "maximumMatchDistance" => @maximum_match_distance,
    "tags" => @tags,
  })
  result.compact
end