Class: AWSCDK::Logs::CustomDataIdentifier

Inherits:
DataIdentifier
  • Object
show all
Defined in:
logs/custom_data_identifier.rb

Overview

A custom data identifier.

Include a custom data identifier name and regular expression in the JSON policy used to define the data protection policy.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, regex) ⇒ CustomDataIdentifier

Create a custom data identifier.

Parameters:

  • name (String)
    • the name of the custom data identifier.
  • regex (String)
    • the regular expression to detect and mask log events for.


14
15
16
17
18
# File 'logs/custom_data_identifier.rb', line 14

def initialize(name, regex)
  Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  Jsii::Type.check_type(regex, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "regex")
  Jsii::Object.instance_method(:initialize).bind(self).call(name, regex)
end

Class Method Details

.jsii_overridable_methodsObject



20
21
22
23
24
25
26
# File 'logs/custom_data_identifier.rb', line 20

def self.jsii_overridable_methods
  {
    :name => { kind: :property, name: "name", is_optional: false },
    :regex => { kind: :property, name: "regex", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
  }
end

Instance Method Details

#nameString

  • the name of the custom data identifier.

This cannot share the same name as a managed data identifier.

Returns:

  • (String)


33
34
35
# File 'logs/custom_data_identifier.rb', line 33

def name()
  jsii_get_property("name")
end

#regexString

  • the regular expression to detect and mask log events for.

Returns:

  • (String)


40
41
42
# File 'logs/custom_data_identifier.rb', line 40

def regex()
  jsii_get_property("regex")
end

#to_stringString

String representation of a CustomDataIdentifier.

Returns:

  • (String)

    the name and RegEx of the custom data identifier



47
48
49
# File 'logs/custom_data_identifier.rb', line 47

def to_string()
  jsii_call_method("toString", [])
end